aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw
diff options
context:
space:
mode:
authorSteve Wise <swise@opengridcomputing.com>2008-07-15 02:48:53 -0400
committerRoland Dreier <rolandd@cisco.com>2008-07-15 02:48:53 -0400
commit96f15c03532282366364ecfd20f04e49b5d96f3a (patch)
treecf3cdbd22a112c43807175045d4e02286b729de0 /drivers/infiniband/hw
parentaed012279d35e88e29fd55737d8821604433f50a (diff)
RDMA/core: Add local DMA L_Key support
- Change the IB_DEVICE_ZERO_STAG flag to the transport-neutral name IB_DEVICE_LOCAL_DMA_LKEY, which is used by iWARP RNICs to indicate 0 STag support and IB HCAs to indicate reserved L_Key support. - Add a u32 local_dma_lkey member to struct ib_device. Drivers fill this in with the appropriate local DMA L_Key (if they support it). - Fix up the drivers using this flag. Signed-off-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw')
-rw-r--r--drivers/infiniband/hw/amso1100/c2_rnic.c2
-rw-r--r--drivers/infiniband/hw/cxgb3/iwch_provider.c6
-rw-r--r--drivers/infiniband/hw/nes/nes_hw.c2
3 files changed, 6 insertions, 4 deletions
diff --git a/drivers/infiniband/hw/amso1100/c2_rnic.c b/drivers/infiniband/hw/amso1100/c2_rnic.c
index b1441aeb60c2..dd05c4835642 100644
--- a/drivers/infiniband/hw/amso1100/c2_rnic.c
+++ b/drivers/infiniband/hw/amso1100/c2_rnic.c
@@ -454,7 +454,7 @@ int __devinit c2_rnic_init(struct c2_dev *c2dev)
454 (IB_DEVICE_RESIZE_MAX_WR | 454 (IB_DEVICE_RESIZE_MAX_WR |
455 IB_DEVICE_CURR_QP_STATE_MOD | 455 IB_DEVICE_CURR_QP_STATE_MOD |
456 IB_DEVICE_SYS_IMAGE_GUID | 456 IB_DEVICE_SYS_IMAGE_GUID |
457 IB_DEVICE_ZERO_STAG | 457 IB_DEVICE_LOCAL_DMA_LKEY |
458 IB_DEVICE_MEM_WINDOW); 458 IB_DEVICE_MEM_WINDOW);
459 459
460 /* Allocate the qptr_array */ 460 /* Allocate the qptr_array */
diff --git a/drivers/infiniband/hw/cxgb3/iwch_provider.c b/drivers/infiniband/hw/cxgb3/iwch_provider.c
index c9a3893b38e8..7ecfd4d638c5 100644
--- a/drivers/infiniband/hw/cxgb3/iwch_provider.c
+++ b/drivers/infiniband/hw/cxgb3/iwch_provider.c
@@ -1325,8 +1325,10 @@ int iwch_register_device(struct iwch_dev *dev)
1325 memset(&dev->ibdev.node_guid, 0, sizeof(dev->ibdev.node_guid)); 1325 memset(&dev->ibdev.node_guid, 0, sizeof(dev->ibdev.node_guid));
1326 memcpy(&dev->ibdev.node_guid, dev->rdev.t3cdev_p->lldev->dev_addr, 6); 1326 memcpy(&dev->ibdev.node_guid, dev->rdev.t3cdev_p->lldev->dev_addr, 6);
1327 dev->ibdev.owner = THIS_MODULE; 1327 dev->ibdev.owner = THIS_MODULE;
1328 dev->device_cap_flags = IB_DEVICE_ZERO_STAG | 1328 dev->device_cap_flags = IB_DEVICE_LOCAL_DMA_LKEY | IB_DEVICE_MEM_WINDOW;
1329 IB_DEVICE_MEM_WINDOW; 1329
1330 /* cxgb3 supports STag 0. */
1331 dev->ibdev.local_dma_lkey = 0;
1330 if (fw_supports_fastreg(dev)) 1332 if (fw_supports_fastreg(dev))
1331 dev->device_cap_flags |= IB_DEVICE_MEM_MGT_EXTENSIONS; 1333 dev->device_cap_flags |= IB_DEVICE_MEM_MGT_EXTENSIONS;
1332 1334
diff --git a/drivers/infiniband/hw/nes/nes_hw.c b/drivers/infiniband/hw/nes/nes_hw.c
index 902b1375a5d8..85f26d19a32b 100644
--- a/drivers/infiniband/hw/nes/nes_hw.c
+++ b/drivers/infiniband/hw/nes/nes_hw.c
@@ -398,7 +398,7 @@ struct nes_adapter *nes_init_adapter(struct nes_device *nesdev, u8 hw_rev) {
398 nesadapter->base_pd = 1; 398 nesadapter->base_pd = 1;
399 399
400 nesadapter->device_cap_flags = 400 nesadapter->device_cap_flags =
401 IB_DEVICE_ZERO_STAG | IB_DEVICE_MEM_WINDOW; 401 IB_DEVICE_LOCAL_DMA_LKEY | IB_DEVICE_MEM_WINDOW;
402 402
403 nesadapter->allocated_qps = (unsigned long *)&(((unsigned char *)nesadapter) 403 nesadapter->allocated_qps = (unsigned long *)&(((unsigned char *)nesadapter)
404 [(sizeof(struct nes_adapter)+(sizeof(unsigned long)-1))&(~(sizeof(unsigned long)-1))]); 404 [(sizeof(struct nes_adapter)+(sizeof(unsigned long)-1))&(~(sizeof(unsigned long)-1))]);