mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
Merge of primary rdma-core code for 4.9
- Updates to mlx5
- Updates to mlx4 (two conflicts, both minor and easily resolved)
- Updates to iw_cxgb4 (one conflict, not so obvious to resolve, proper
resolution is to keep the code in cxgb4_main.c as it is in Linus'
tree as attach_uld was refactored and moved into cxgb4_uld.c)
- Improvements to uAPI (moved vendor specific API elements to uAPI area)
- Add hns-roce driver and hns and hns-roce ACPI reset support
- Conversion of all rdma code away from deprecated
create_singlethread_workqueue
- Security improvement: remove unsafe ib_get_dma_mr (breaks lustre in
staging)
-----BEGIN PGP SIGNATURE-----
iQIcBAABAgAGBQJX+AwSAAoJELgmozMOVy/d0WkQAKxPzVccMWwHv28iZI4ey13u
JwE+VoCNpCAZAVuEgzK5zzFdNHPvAk2jU93H4apA7dfXJBXPatVuj9Lnk+ieEEnW
tbFwJjBpbQ3Zol3+SPfAHnsVMbtax+xmd6WDKExPXXEDl1L6rutwL3KKfmgWEitg
ysX7XOJCiSdyM0hcg4T6UPB9a3jGPff9NLu0oGamV+yoUk5Y0WGoVFxHZ4MKcw8t
OkFBYIxGz4SGwq2tulStuH03HteURX594KngtrA8dyq6l1R2GlGRv+bkJAUEIWUv
aA0ow3VWusOM6fT+jLXPCv8iUwIXM8tR/U6F7X+cmORUUtWvCl+uCUVid113j/aN
BK+Af2nJnfoJ5cDBPsD+bC76l5gQycNZO/Qh8op2kmgJtD+6OpGM3cBXsHx53+kk
0wloJ2lKCGShWxNj+ig8n8rR/rhhs/x3vV3ouCVWNMbOUgOSN3eYHxmK3wGFW4nd
Qx+WYCjj9Yi/J6nmUDcfEQ4NWPR22Q2+0ENAabfhLhV6mDloAO5ILHd4GDqC3IA9
UtxlVjf4ZonaiLnTQQzCnDMGVVk6tT8FJ9D42s0ScwjbdYwjyCW9/rs/g2EhcprR
Cc+AmjqLviCWGtzBSFO0SijqQon8lcQOwdLw61CdFFvPa/mlLdf1rbx9ArIyNVKn
JSrbr3CGyoqyYj6qaEO5
=LC+S
-----END PGP SIGNATURE-----
Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma
Pull main rdma updates from Doug Ledford:
"This is the main pull request for the rdma stack this release. The
code has been through 0day and I had it tagged for linux-next testing
for a couple days.
Summary:
- updates to mlx5
- updates to mlx4 (two conflicts, both minor and easily resolved)
- updates to iw_cxgb4 (one conflict, not so obvious to resolve,
proper resolution is to keep the code in cxgb4_main.c as it is in
Linus' tree as attach_uld was refactored and moved into
cxgb4_uld.c)
- improvements to uAPI (moved vendor specific API elements to uAPI
area)
- add hns-roce driver and hns and hns-roce ACPI reset support
- conversion of all rdma code away from deprecated
create_singlethread_workqueue
- security improvement: remove unsafe ib_get_dma_mr (breaks lustre in
staging)"
* tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma: (75 commits)
staging/lustre: Disable InfiniBand support
iw_cxgb4: add fast-path for small REG_MR operations
cxgb4: advertise support for FR_NSMR_TPTE_WR
IB/core: correctly handle rdma_rw_init_mrs() failure
IB/srp: Fix infinite loop when FMR sg[0].offset != 0
IB/srp: Remove an unused argument
IB/core: Improve ib_map_mr_sg() documentation
IB/mlx4: Fix possible vl/sl field mismatch in LRH header in QP1 packets
IB/mthca: Move user vendor structures
IB/nes: Move user vendor structures
IB/ocrdma: Move user vendor structures
IB/mlx4: Move user vendor structures
IB/cxgb4: Move user vendor structures
IB/cxgb3: Move user vendor structures
IB/mlx5: Move and decouple user vendor structures
IB/{core,hw}: Add constant for node_desc
ipoib: Make ipoib_warn ratelimited
IB/mlx4/alias_GUID: Remove deprecated create_singlethread_workqueue
IB/ipoib_verbs: Remove deprecated create_singlethread_workqueue
IB/ipoib: Remove deprecated create_singlethread_workqueue
...
This commit is contained in:
commit
b9044ac829
114 changed files with 12089 additions and 483 deletions
|
|
@ -54,7 +54,6 @@
|
|||
struct nvme_rdma_device {
|
||||
struct ib_device *dev;
|
||||
struct ib_pd *pd;
|
||||
struct ib_mr *mr;
|
||||
struct kref ref;
|
||||
struct list_head entry;
|
||||
};
|
||||
|
|
@ -408,10 +407,7 @@ static void nvme_rdma_free_dev(struct kref *ref)
|
|||
list_del(&ndev->entry);
|
||||
mutex_unlock(&device_list_mutex);
|
||||
|
||||
if (!register_always)
|
||||
ib_dereg_mr(ndev->mr);
|
||||
ib_dealloc_pd(ndev->pd);
|
||||
|
||||
kfree(ndev);
|
||||
}
|
||||
|
||||
|
|
@ -444,24 +440,16 @@ nvme_rdma_find_get_device(struct rdma_cm_id *cm_id)
|
|||
ndev->dev = cm_id->device;
|
||||
kref_init(&ndev->ref);
|
||||
|
||||
ndev->pd = ib_alloc_pd(ndev->dev);
|
||||
ndev->pd = ib_alloc_pd(ndev->dev,
|
||||
register_always ? 0 : IB_PD_UNSAFE_GLOBAL_RKEY);
|
||||
if (IS_ERR(ndev->pd))
|
||||
goto out_free_dev;
|
||||
|
||||
if (!register_always) {
|
||||
ndev->mr = ib_get_dma_mr(ndev->pd,
|
||||
IB_ACCESS_LOCAL_WRITE |
|
||||
IB_ACCESS_REMOTE_READ |
|
||||
IB_ACCESS_REMOTE_WRITE);
|
||||
if (IS_ERR(ndev->mr))
|
||||
goto out_free_pd;
|
||||
}
|
||||
|
||||
if (!(ndev->dev->attrs.device_cap_flags &
|
||||
IB_DEVICE_MEM_MGT_EXTENSIONS)) {
|
||||
dev_err(&ndev->dev->dev,
|
||||
"Memory registrations not supported.\n");
|
||||
goto out_free_mr;
|
||||
goto out_free_pd;
|
||||
}
|
||||
|
||||
list_add(&ndev->entry, &device_list);
|
||||
|
|
@ -469,9 +457,6 @@ out_unlock:
|
|||
mutex_unlock(&device_list_mutex);
|
||||
return ndev;
|
||||
|
||||
out_free_mr:
|
||||
if (!register_always)
|
||||
ib_dereg_mr(ndev->mr);
|
||||
out_free_pd:
|
||||
ib_dealloc_pd(ndev->pd);
|
||||
out_free_dev:
|
||||
|
|
@ -915,7 +900,7 @@ static int nvme_rdma_map_sg_single(struct nvme_rdma_queue *queue,
|
|||
|
||||
sg->addr = cpu_to_le64(sg_dma_address(req->sg_table.sgl));
|
||||
put_unaligned_le24(sg_dma_len(req->sg_table.sgl), sg->length);
|
||||
put_unaligned_le32(queue->device->mr->rkey, sg->key);
|
||||
put_unaligned_le32(queue->device->pd->unsafe_global_rkey, sg->key);
|
||||
sg->type = NVME_KEY_SGL_FMT_DATA_DESC << 4;
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -1000,7 +985,7 @@ static int nvme_rdma_map_data(struct nvme_rdma_queue *queue,
|
|||
nvme_rdma_queue_idx(queue))
|
||||
return nvme_rdma_map_sg_inline(queue, req, c);
|
||||
|
||||
if (!register_always)
|
||||
if (dev->pd->flags & IB_PD_UNSAFE_GLOBAL_RKEY)
|
||||
return nvme_rdma_map_sg_single(queue, req, c);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -848,7 +848,7 @@ nvmet_rdma_find_get_device(struct rdma_cm_id *cm_id)
|
|||
ndev->device = cm_id->device;
|
||||
kref_init(&ndev->ref);
|
||||
|
||||
ndev->pd = ib_alloc_pd(ndev->device);
|
||||
ndev->pd = ib_alloc_pd(ndev->device, 0);
|
||||
if (IS_ERR(ndev->pd))
|
||||
goto out_free_dev;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue