]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
RDMA/core: Add local DMA L_Key support
authorSteve Wise <swise@opengridcomputing.com>
Tue, 15 Jul 2008 06:48:53 +0000 (23:48 -0700)
committerRoland Dreier <rolandd@cisco.com>
Tue, 15 Jul 2008 06:48:53 +0000 (23:48 -0700)
- 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>
drivers/infiniband/hw/amso1100/c2_rnic.c
drivers/infiniband/hw/cxgb3/iwch_provider.c
drivers/infiniband/hw/nes/nes_hw.c
include/rdma/ib_verbs.h

index b1441aeb60c27d017d66e667ffbcd071f56f5c36..dd05c48356425f30e2109cd4b17ba484c2919a0d 100644 (file)
@@ -454,7 +454,7 @@ int __devinit c2_rnic_init(struct c2_dev *c2dev)
            (IB_DEVICE_RESIZE_MAX_WR |
             IB_DEVICE_CURR_QP_STATE_MOD |
             IB_DEVICE_SYS_IMAGE_GUID |
-            IB_DEVICE_ZERO_STAG |
+            IB_DEVICE_LOCAL_DMA_LKEY |
             IB_DEVICE_MEM_WINDOW);
 
        /* Allocate the qptr_array */
index c9a3893b38e8540e944bdd5511abc06209e0c04b..7ecfd4d638c584ce27647c2b0ec831efebce6efd 100644 (file)
@@ -1325,8 +1325,10 @@ int iwch_register_device(struct iwch_dev *dev)
        memset(&dev->ibdev.node_guid, 0, sizeof(dev->ibdev.node_guid));
        memcpy(&dev->ibdev.node_guid, dev->rdev.t3cdev_p->lldev->dev_addr, 6);
        dev->ibdev.owner = THIS_MODULE;
-       dev->device_cap_flags = IB_DEVICE_ZERO_STAG |
-                               IB_DEVICE_MEM_WINDOW;
+       dev->device_cap_flags = IB_DEVICE_LOCAL_DMA_LKEY | IB_DEVICE_MEM_WINDOW;
+
+       /* cxgb3 supports STag 0. */
+       dev->ibdev.local_dma_lkey = 0;
        if (fw_supports_fastreg(dev))
                dev->device_cap_flags |= IB_DEVICE_MEM_MGT_EXTENSIONS;
 
index 902b1375a5d840a8507d1edc3e08b84f5f36dba2..85f26d19a32b26187a9289a90fa6c600e33fc0b3 100644 (file)
@@ -398,7 +398,7 @@ struct nes_adapter *nes_init_adapter(struct nes_device *nesdev, u8 hw_rev) {
        nesadapter->base_pd = 1;
 
        nesadapter->device_cap_flags =
-               IB_DEVICE_ZERO_STAG | IB_DEVICE_MEM_WINDOW;
+               IB_DEVICE_LOCAL_DMA_LKEY | IB_DEVICE_MEM_WINDOW;
 
        nesadapter->allocated_qps = (unsigned long *)&(((unsigned char *)nesadapter)
                        [(sizeof(struct nes_adapter)+(sizeof(unsigned long)-1))&(~(sizeof(unsigned long)-1))]);
index 07b41e05565a50835d3283be4eaaf9767cf6cded..90b529f7a154efdc26c02b43b7e591022b491987 100644 (file)
@@ -91,7 +91,7 @@ enum ib_device_cap_flags {
        IB_DEVICE_RC_RNR_NAK_GEN        = (1<<12),
        IB_DEVICE_SRQ_RESIZE            = (1<<13),
        IB_DEVICE_N_NOTIFY_CQ           = (1<<14),
-       IB_DEVICE_ZERO_STAG             = (1<<15),
+       IB_DEVICE_LOCAL_DMA_LKEY        = (1<<15),
        IB_DEVICE_RESERVED              = (1<<16), /* old SEND_W_INV */
        IB_DEVICE_MEM_WINDOW            = (1<<17),
        /*
@@ -1149,6 +1149,7 @@ struct ib_device {
 
        char                         node_desc[64];
        __be64                       node_guid;
+       u32                          local_dma_lkey;
        u8                           node_type;
        u8                           phys_port_cnt;
 };