netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [ofa-general] [PATCH 2.6.25 0/2] RDMA/cxgb3 patches for 2.6.25
@ 2007-11-26 17:24 Steve Wise
  2007-11-26 17:28 ` [ofa-general] [PATCH 2.6.25 1/2] RDMA/cxgb3: Hold rtnl_lock() around ethtool get_drvinfo call Steve Wise
  2007-11-26 17:28 ` [ofa-general] [PATCH 2.6.25 2/2] RDMA/cxgb3: Support 5.0 firmware Steve Wise
  0 siblings, 2 replies; 5+ messages in thread
From: Steve Wise @ 2007-11-26 17:24 UTC (permalink / raw)
  To: rdreier; +Cc: netdev, jeff, ewg, general

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.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [ofa-general] [PATCH 2.6.25 1/2] RDMA/cxgb3: Hold rtnl_lock() around ethtool get_drvinfo call.
  2007-11-26 17:24 [ofa-general] [PATCH 2.6.25 0/2] RDMA/cxgb3 patches for 2.6.25 Steve Wise
@ 2007-11-26 17:28 ` Steve Wise
  2007-11-26 17:28 ` [ofa-general] [PATCH 2.6.25 2/2] RDMA/cxgb3: Support 5.0 firmware Steve Wise
  1 sibling, 0 replies; 5+ messages in thread
From: Steve Wise @ 2007-11-26 17:28 UTC (permalink / raw)
  To: rdreier; +Cc: netdev, ewg, general


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 <swise@opengridcomputing.com>
---

 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);
 }
 

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [ofa-general] [PATCH 2.6.25 2/2] RDMA/cxgb3: Support 5.0 firmware.
  2007-11-26 17:24 [ofa-general] [PATCH 2.6.25 0/2] RDMA/cxgb3 patches for 2.6.25 Steve Wise
  2007-11-26 17:28 ` [ofa-general] [PATCH 2.6.25 1/2] RDMA/cxgb3: Hold rtnl_lock() around ethtool get_drvinfo call Steve Wise
@ 2007-11-26 17:28 ` Steve Wise
  2007-11-29  3:41   ` [ofa-general] " Roland Dreier
  1 sibling, 1 reply; 5+ messages in thread
From: Steve Wise @ 2007-11-26 17:28 UTC (permalink / raw)
  To: rdreier; +Cc: netdev, ewg, general


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 <swise@opengridcomputing.com>
---

 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;
 }

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [ofa-general] Re: [PATCH 2.6.25 2/2] RDMA/cxgb3: Support 5.0 firmware.
  2007-11-26 17:28 ` [ofa-general] [PATCH 2.6.25 2/2] RDMA/cxgb3: Support 5.0 firmware Steve Wise
@ 2007-11-29  3:41   ` Roland Dreier
  2007-11-29  4:21     ` Steve Wise
  0 siblings, 1 reply; 5+ messages in thread
From: Roland Dreier @ 2007-11-29  3:41 UTC (permalink / raw)
  To: Steve Wise; +Cc: netdev, ewg, general

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?

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [ofa-general] Re: [PATCH 2.6.25 2/2] RDMA/cxgb3: Support 5.0 firmware.
  2007-11-29  3:41   ` [ofa-general] " Roland Dreier
@ 2007-11-29  4:21     ` Steve Wise
  0 siblings, 0 replies; 5+ messages in thread
From: Steve Wise @ 2007-11-29  4:21 UTC (permalink / raw)
  To: Roland Dreier; +Cc: netdev, ewg, general

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
>   

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-11-29  4:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-26 17:24 [ofa-general] [PATCH 2.6.25 0/2] RDMA/cxgb3 patches for 2.6.25 Steve Wise
2007-11-26 17:28 ` [ofa-general] [PATCH 2.6.25 1/2] RDMA/cxgb3: Hold rtnl_lock() around ethtool get_drvinfo call Steve Wise
2007-11-26 17:28 ` [ofa-general] [PATCH 2.6.25 2/2] RDMA/cxgb3: Support 5.0 firmware Steve Wise
2007-11-29  3:41   ` [ofa-general] " Roland Dreier
2007-11-29  4:21     ` Steve Wise

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).