RDMA/cxgb3 patches for 2.6.25
Subsystems (3)
cover RDMA/cxgb3 patches for 2.6.25
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.
PATCH 1/2 RDMA/cxgb3: Hold rtnl_lock() around ethtool get_drvinfo call.
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.
---
drivers/infiniband/hw/cxgb3/iwch_provider.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
drivers/infiniband/hw/cxgb3/iwch_provider.c +5 -0
@@ -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); }
PATCH 2/2 RDMA/cxgb3: Support 5.0 firmware.
In reply to Steve WiseRDMA/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.
---
drivers/infiniband/hw/cxgb3/iwch_qp.c | 21 ++------------------- 1 files changed, 2 insertions(+), 19 deletions(-)
drivers/infiniband/hw/cxgb3/iwch_qp.c +2 -19
@@ -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.
OK, applied 1 and 2...
Quoted 1 line
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.
Yes.
Quoted 11 lines · Roland Dreier
OK, applied 1 and 2...
Quoted 1 line
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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html