[ofa-general] [PATCH ofed_1_2] Chelsio: driver fixes + new FW support
Steve Wise
swise at aoot.com
Fri Mar 30 06:04:34 PDT 2007
Vlad,
Please pull these commits from
git://staging.openfabrics.org/~swise/ofed_1_2.git ofed_1_2
All the cross compiles and kernel builds pass.
Thanks,
Steve.
Git log:
--------
commit 40db91a1ae5947c7b38d5a845608f62690825c12
Author: Steve Wise <swise at opengridcomputing.com>
Date: Thu Mar 29 14:25:03 2007 -0500
Support new firmware version 3.3.
Signed-off-by: Steve Wise <swise at opengridcomputing.com>
commit 20b6844c9e2ff57f2e8428080a1a90bcaef17174
Author: Steve Wise <swise at opengridcomputing.com>
Date: Thu Mar 29 14:25:03 2007 -0500
cxgb3: delay 15us when reading eeprom for sles9sp3.
Signed-off-by: Steve Wise <swise at opengridcomputing.com>
commit 9fe553d9f03577e85c182e85665c916827cbdbad
Author: Steve Wise <swise at opengridcomputing.com>
Date: Thu Mar 29 14:25:02 2007 -0500
Fix TERM codes.
Fix TERMINATE layer, type, and ecode values based on
conformance testing.
Signed-off-by: Steve Wise <swise at opengridcomputing.com>
Complete diffs:
------
commit 40db91a1ae5947c7b38d5a845608f62690825c12
Author: Steve Wise <swise at opengridcomputing.com>
Date: Thu Mar 29 14:25:03 2007 -0500
Support new firmware version 3.3.
Signed-off-by: Steve Wise <swise at opengridcomputing.com>
diff --git a/drivers/net/cxgb3/version.h b/drivers/net/cxgb3/version.h
index 782a6cf..b0e68fa 100644
--- a/drivers/net/cxgb3/version.h
+++ b/drivers/net/cxgb3/version.h
@@ -37,5 +37,5 @@ #define DRV_NAME "cxgb3"
/* Driver version */
#define DRV_VERSION "1.0"
#define FW_VERSION_MAJOR 3
-#define FW_VERSION_MINOR 2
+#define FW_VERSION_MINOR 3
#endif /* __CHELSIO_VERSION_H */
commit 20b6844c9e2ff57f2e8428080a1a90bcaef17174
Author: Steve Wise <swise at opengridcomputing.com>
Date: Thu Mar 29 14:25:03 2007 -0500
cxgb3: delay 15us when reading eeprom for sles9sp3.
Signed-off-by: Steve Wise <swise at opengridcomputing.com>
diff --git a/kernel_patches/backport/2.6.5_sles9_sp3/cxgb3_t3_hw_to_2.6.5_sles9_sp3.patch b/kernel_patches/backport/2.6.5_sles9_sp3/cxgb3_t3_hw_to_2.6.5_sles9_sp3.patch
new file mode 100644
index 0000000..3d0eedc
--- /dev/null
+++ b/kernel_patches/backport/2.6.5_sles9_sp3/cxgb3_t3_hw_to_2.6.5_sles9_sp3.patch
@@ -0,0 +1,25 @@
+cxgb3: Add more delay when reading the eeprom.
+
+From: Steve Wise <swise at opengridcomputing.com>
+
+Needed for sles9sp3.
+
+Signed-off-by: Steve Wise <swise at opengridcomputing.com>
+---
+
+ drivers/net/cxgb3/t3_hw.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/drivers/net/cxgb3/t3_hw.c b/drivers/net/cxgb3/t3_hw.c
+index eaa7a2e..18ec16d 100644
+--- a/drivers/net/cxgb3/t3_hw.c
++++ b/drivers/net/cxgb3/t3_hw.c
+@@ -548,7 +548,7 @@ int t3_seeprom_read(struct adapter *adap
+
+ pci_write_config_word(adapter->pdev, base + PCI_VPD_ADDR, addr);
+ do {
+- udelay(10);
++ udelay(15);
+ pci_read_config_word(adapter->pdev, base + PCI_VPD_ADDR, &val);
+ } while (!(val & PCI_VPD_ADDR_F) && --attempts);
+
commit 9fe553d9f03577e85c182e85665c916827cbdbad
Author: Steve Wise <swise at opengridcomputing.com>
Date: Thu Mar 29 14:25:02 2007 -0500
Fix TERM codes.
Fix TERMINATE layer, type, and ecode values based on
conformance testing.
Signed-off-by: Steve Wise <swise at opengridcomputing.com>
diff --git a/drivers/infiniband/hw/cxgb3/iwch_qp.c b/drivers/infiniband/hw/cxgb3/iwch_qp.c
index 25149a4..7530dc0 100644
--- a/drivers/infiniband/hw/cxgb3/iwch_qp.c
+++ b/drivers/infiniband/hw/cxgb3/iwch_qp.c
@@ -473,44 +473,62 @@ int iwch_bind_mw(struct ib_qp *qp,
return err;
}
-static inline void build_term_codes(int t3err, u8 *layer_type, u8 *ecode,
- int tagged)
+static inline void build_term_codes(struct respQ_msg_t *rsp_msg,
+ u8 *layer_type, u8 *ecode)
{
- switch (t3err) {
+ int status = TPT_ERR_INTERNAL_ERR;
+ int tagged = 0;
+ int opcode = -1;
+ int rqtype = 0;
+ int send_inv = 0;
+
+ if (rsp_msg) {
+ status = CQE_STATUS(rsp_msg->cqe);
+ opcode = CQE_OPCODE(rsp_msg->cqe);
+ rqtype = RQ_TYPE(rsp_msg->cqe);
+ send_inv = (opcode == T3_SEND_WITH_INV) ||
+ (opcode == T3_SEND_WITH_SE_INV);
+ tagged = (opcode == T3_RDMA_WRITE) ||
+ (rqtype && (opcode == T3_READ_RESP));
+ }
+
+ switch (status) {
case TPT_ERR_STAG:
- if (tagged == 1) {
- *layer_type = LAYER_DDP|DDP_TAGGED_ERR;
- *ecode = DDPT_INV_STAG;
- } else if (tagged == 2) {
+ if (send_inv) {
+ *layer_type = LAYER_RDMAP|RDMAP_REMOTE_OP;
+ *ecode = RDMAP_CANT_INV_STAG;
+ } else {
*layer_type = LAYER_RDMAP|RDMAP_REMOTE_PROT;
*ecode = RDMAP_INV_STAG;
}
break;
case TPT_ERR_PDID:
+ *layer_type = LAYER_RDMAP|RDMAP_REMOTE_PROT;
+ if ((opcode == T3_SEND_WITH_INV) ||
+ (opcode == T3_SEND_WITH_SE_INV))
+ *ecode = RDMAP_CANT_INV_STAG;
+ else
+ *ecode = RDMAP_STAG_NOT_ASSOC;
+ break;
case TPT_ERR_QPID:
+ *layer_type = LAYER_RDMAP|RDMAP_REMOTE_PROT;
+ *ecode = RDMAP_STAG_NOT_ASSOC;
+ break;
case TPT_ERR_ACCESS:
- if (tagged == 1) {
- *layer_type = LAYER_DDP|DDP_TAGGED_ERR;
- *ecode = DDPT_STAG_NOT_ASSOC;
- } else if (tagged == 2) {
- *layer_type = LAYER_RDMAP|RDMAP_REMOTE_PROT;
- *ecode = RDMAP_STAG_NOT_ASSOC;
- }
+ *layer_type = LAYER_RDMAP|RDMAP_REMOTE_PROT;
+ *ecode = RDMAP_ACC_VIOL;
break;
case TPT_ERR_WRAP:
*layer_type = LAYER_RDMAP|RDMAP_REMOTE_PROT;
*ecode = RDMAP_TO_WRAP;
break;
case TPT_ERR_BOUND:
- if (tagged == 1) {
+ if (tagged) {
*layer_type = LAYER_DDP|DDP_TAGGED_ERR;
*ecode = DDPT_BASE_BOUNDS;
- } else if (tagged == 2) {
+ } else {
*layer_type = LAYER_RDMAP|RDMAP_REMOTE_PROT;
*ecode = RDMAP_BASE_BOUNDS;
- } else {
- *layer_type = LAYER_DDP|DDP_UNTAGGED_ERR;
- *ecode = DDPU_MSG_TOOBIG;
}
break;
case TPT_ERR_INVALIDATE_SHARED_MR:
@@ -594,8 +612,6 @@ int iwch_post_terminate(struct iwch_qp *
{
union t3_wr *wqe;
struct terminate_message *term;
- int status;
- int tagged = 0;
struct sk_buff *skb;
PDBG("%s %d\n", __FUNCTION__, __LINE__);
@@ -613,17 +629,7 @@ int iwch_post_terminate(struct iwch_qp *
/* immediate data starts here. */
term = (struct terminate_message *)wqe->send.sgl;
- if (rsp_msg) {
- status = CQE_STATUS(rsp_msg->cqe);
- if (CQE_OPCODE(rsp_msg->cqe) == T3_RDMA_WRITE)
- tagged = 1;
- if ((CQE_OPCODE(rsp_msg->cqe) == T3_READ_REQ) ||
- (CQE_OPCODE(rsp_msg->cqe) == T3_READ_RESP))
- tagged = 2;
- } else {
- status = TPT_ERR_INTERNAL_ERR;
- }
- build_term_codes(status, &term->layer_etype, &term->ecode, tagged);
+ build_term_codes(rsp_msg, &term->layer_etype, &term->ecode);
build_fw_riwrh((void *)wqe, T3_WR_SEND,
T3_COMPLETION_FLAG | T3_NOTIFY_FLAG, 1,
qhp->ep->hwtid, 5);
More information about the general
mailing list