aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/hw/ipath/ipath_keys.c15
-rw-r--r--drivers/infiniband/hw/ipath/ipath_verbs.c1
2 files changed, 16 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_keys.c b/drivers/infiniband/hw/ipath/ipath_keys.c
index 46773c673a1a..a5ca279370aa 100644
--- a/drivers/infiniband/hw/ipath/ipath_keys.c
+++ b/drivers/infiniband/hw/ipath/ipath_keys.c
@@ -197,6 +197,21 @@ int ipath_rkey_ok(struct ipath_ibdev *dev, struct ipath_sge_state *ss,
197 size_t off; 197 size_t off;
198 int ret; 198 int ret;
199 199
200 /*
201 * We use RKEY == zero for physical addresses
202 * (see ipath_get_dma_mr).
203 */
204 if (rkey == 0) {
205 sge->mr = NULL;
206 sge->vaddr = phys_to_virt(vaddr);
207 sge->length = len;
208 sge->sge_length = len;
209 ss->sg_list = NULL;
210 ss->num_sge = 1;
211 ret = 1;
212 goto bail;
213 }
214
200 mr = rkt->table[(rkey >> (32 - ib_ipath_lkey_table_size))]; 215 mr = rkt->table[(rkey >> (32 - ib_ipath_lkey_table_size))];
201 if (unlikely(mr == NULL || mr->lkey != rkey)) { 216 if (unlikely(mr == NULL || mr->lkey != rkey)) {
202 ret = 0; 217 ret = 0;
diff --git a/drivers/infiniband/hw/ipath/ipath_verbs.c b/drivers/infiniband/hw/ipath/ipath_verbs.c
index 56ac336dd1ec..70bce7a8d538 100644
--- a/drivers/infiniband/hw/ipath/ipath_verbs.c
+++ b/drivers/infiniband/hw/ipath/ipath_verbs.c
@@ -627,6 +627,7 @@ static int ipath_query_device(struct ib_device *ibdev,
627 props->device_cap_flags = IB_DEVICE_BAD_PKEY_CNTR | 627 props->device_cap_flags = IB_DEVICE_BAD_PKEY_CNTR |
628 IB_DEVICE_BAD_QKEY_CNTR | IB_DEVICE_SHUTDOWN_PORT | 628 IB_DEVICE_BAD_QKEY_CNTR | IB_DEVICE_SHUTDOWN_PORT |
629 IB_DEVICE_SYS_IMAGE_GUID; 629 IB_DEVICE_SYS_IMAGE_GUID;
630 props->page_size_cap = PAGE_SIZE;
630 props->vendor_id = ipath_layer_get_vendorid(dev->dd); 631 props->vendor_id = ipath_layer_get_vendorid(dev->dd);
631 props->vendor_part_id = ipath_layer_get_deviceid(dev->dd); 632 props->vendor_part_id = ipath_layer_get_deviceid(dev->dd);
632 props->hw_ver = ipath_layer_get_pcirev(dev->dd); 633 props->hw_ver = ipath_layer_get_pcirev(dev->dd);