[ofa-general] [PATCH 2.6.25 0/2] RDMA/cxgb3 patches for 2.6.25

5 messages, 2 authors, 2007-11-29 · open the first message on its own page

[ofa-general] [PATCH 2.6.25 0/2] RDMA/cxgb3 patches for 2.6.25

From: Steve Wise <hidden>
Date: 2007-11-26 17:24:57

Hey roland,

Please pull these two iw_cxgb3 patches for 2.6.25.  The 5.0 firmware
change must be committed along with the cxgb3 NIC changes submitted here:

http://lkml.org/lkml/2007/11/16/224

and merged by Jeff here:

http://lkml.org/lkml/2007/11/23/180


Shortlog:

      RDMA/cxgb3: Hold rtnl_lock() around ethtool get_drvinfo call.
      RDMA/cxgb3: Support 5.0 firmware.

---

Steve.

[ofa-general] [PATCH 2.6.25 1/2] RDMA/cxgb3: Hold rtnl_lock() around ethtool get_drvinfo call.

From: Steve Wise <hidden>
Date: 2007-11-26 17:28:44

RDMA/cxgb3: Hold rtnl_lock() around ethtool get_drvinfo call.

Currently the call into cxgb3 to get the driver info is not serialized.
The iw_cxgb3 module needs to hold the rtnl_lock around the ethtool ops
call like dev_ioctl() does.

Signed-off-by: Steve Wise <redacted>
---

 drivers/infiniband/hw/cxgb3/iwch_provider.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/drivers/infiniband/hw/cxgb3/iwch_provider.c b/drivers/infiniband/hw/cxgb3/iwch_provider.c
index b5436ca..69b1204 100644
--- a/drivers/infiniband/hw/cxgb3/iwch_provider.c
+++ b/drivers/infiniband/hw/cxgb3/iwch_provider.c
@@ -39,6 +39,7 @@
 #include <linux/list.h>
 #include <linux/spinlock.h>
 #include <linux/ethtool.h>
+#include <linux/rtnetlink.h>
 
 #include <asm/io.h>
 #include <asm/irq.h>
@@ -1053,7 +1054,9 @@ static ssize_t show_fw_ver(struct class_device *cdev, char *buf)
 	struct net_device *lldev = dev->rdev.t3cdev_p->lldev;
 
 	PDBG("%s class dev 0x%p\n", __FUNCTION__, cdev);
+	rtnl_lock();
 	lldev->ethtool_ops->get_drvinfo(lldev, &info);
+	rtnl_unlock();
 	return sprintf(buf, "%s\n", info.fw_version);
 }
 
@@ -1065,7 +1068,9 @@ static ssize_t show_hca(struct class_device *cdev, char *buf)
 	struct net_device *lldev = dev->rdev.t3cdev_p->lldev;
 
 	PDBG("%s class dev 0x%p\n", __FUNCTION__, cdev);
+	rtnl_lock();
 	lldev->ethtool_ops->get_drvinfo(lldev, &info);
+	rtnl_unlock();
 	return sprintf(buf, "%s\n", info.driver);
 }
 

[ofa-general] [PATCH 2.6.25 2/2] RDMA/cxgb3: Support 5.0 firmware.

From: Steve Wise <hidden>
Date: 2007-11-26 17:28:46

RDMA/cxgb3: Support 5.0 firmware.

The 5.0 firmware now supports translating sgls in recv wrs, so remove
the host driver logic currently doing the translation.

Note: this change requires 5.0 firmware.

Signed-off-by: Steve Wise <redacted>
---

 drivers/infiniband/hw/cxgb3/iwch_qp.c |   21 ++-------------------
 1 files changed, 2 insertions(+), 19 deletions(-)
diff --git a/drivers/infiniband/hw/cxgb3/iwch_qp.c b/drivers/infiniband/hw/cxgb3/iwch_qp.c
index dd89b6b..9bb8112 100644
--- a/drivers/infiniband/hw/cxgb3/iwch_qp.c
+++ b/drivers/infiniband/hw/cxgb3/iwch_qp.c
@@ -208,36 +208,19 @@ static int iwch_sgl2pbl_map(struct iwch_dev *rhp, struct ib_sge *sg_list,
 static int iwch_build_rdma_recv(struct iwch_dev *rhp, union t3_wr *wqe,
 				struct ib_recv_wr *wr)
 {
-	int i, err = 0;
-	u32 pbl_addr[4];
-	u8 page_size[4];
+	int i;
 	if (wr->num_sge > T3_MAX_SGE)
 		return -EINVAL;
-	err = iwch_sgl2pbl_map(rhp, wr->sg_list, wr->num_sge, pbl_addr,
-			       page_size);
-	if (err)
-		return err;
-	wqe->recv.pagesz[0] = page_size[0];
-	wqe->recv.pagesz[1] = page_size[1];
-	wqe->recv.pagesz[2] = page_size[2];
-	wqe->recv.pagesz[3] = page_size[3];
 	wqe->recv.num_sgle = cpu_to_be32(wr->num_sge);
 	for (i = 0; i < wr->num_sge; i++) {
 		wqe->recv.sgl[i].stag = cpu_to_be32(wr->sg_list[i].lkey);
 		wqe->recv.sgl[i].len = cpu_to_be32(wr->sg_list[i].length);
-
-		/* to in the WQE == the offset into the page */
-		wqe->recv.sgl[i].to = cpu_to_be64(((u32) wr->sg_list[i].addr) %
-				(1UL << (12 + page_size[i])));
-
-		/* pbl_addr is the adapters address in the PBL */
-		wqe->recv.pbl_addr[i] = cpu_to_be32(pbl_addr[i]);
+		wqe->recv.sgl[i].to = cpu_to_be64(wr->sg_list[i].addr);
 	}
 	for (; i < T3_MAX_SGE; i++) {
 		wqe->recv.sgl[i].stag = 0;
 		wqe->recv.sgl[i].len = 0;
 		wqe->recv.sgl[i].to = 0;
-		wqe->recv.pbl_addr[i] = 0;
 	}
 	return 0;
 }

[ofa-general] Re: [PATCH 2.6.25 2/2] RDMA/cxgb3: Support 5.0 firmware.

From: Roland Dreier <hidden>
Date: 2007-11-29 03:41:22

OK, applied 1 and 2...

 > Note: this change requires 5.0 firmware.

I assume the change to the cxgb3 FW versions is pending in a net
driver change for 2.6.25?

[ofa-general] Re: [PATCH 2.6.25 2/2] RDMA/cxgb3: Support 5.0 firmware.

From: Steve Wise <hidden>
Date: 2007-11-29 04:21:53

Yes.

Roland Dreier wrote:
OK, applied 1 and 2...

 > Note: this change requires 5.0 firmware.

I assume the change to the cxgb3 FW versions is pending in a net
driver change for 2.6.25?
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help