diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-06-07 12:25:27 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-06-07 12:25:27 -0400 |
commit | 6e38335dcc70f03faba26bf1260ee024d930afe1 (patch) | |
tree | 207fdd3119ba4999bb2707b30e294de6c7a1baa7 /drivers/infiniband/ulp | |
parent | a02a532c2a6c79a898cd6c430fe3ad011d9aece3 (diff) | |
parent | 4f240dfec6bcc852b124ea7c419fb590949fbd4c (diff) |
Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma
Pull rdma fixes from Jason Gunthorpe:
"Things are looking pretty quiet here in RDMA, not too many bug fixes
rolling in right now. The usual driver bug fixes and fixes for a
couple of regressions introduced in 5.2:
- Fix a race on bootup with RDMA device renaming and srp. SRP also
needs to rename its internal sys files
- Fix a memory leak in hns
- Don't leak resources in efa on certain error unwinds
- Don't panic in certain error unwinds in ib_register_device
- Various small user visible bug fix patches for the hfi and efa
drivers
- Fix the 32 bit compilation break"
* tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma:
RDMA/efa: Remove MAYEXEC flag check from mmap flow
mlx5: avoid 64-bit division
IB/hfi1: Validate page aligned for a given virtual address
IB/{qib, hfi1, rdmavt}: Correct ibv_devinfo max_mr value
IB/hfi1: Insure freeze_work work_struct is canceled on shutdown
IB/rdmavt: Fix alloc_qpn() WARN_ON()
RDMA/core: Fix panic when port_data isn't initialized
RDMA/uverbs: Pass udata on uverbs error unwind
RDMA/core: Clear out the udata before error unwind
RDMA/hns: Fix PD memory leak for internal allocation
RDMA/srp: Rename SRP sysfs name after IB device rename trigger
Diffstat (limited to 'drivers/infiniband/ulp')
-rw-r--r-- | drivers/infiniband/ulp/srp/ib_srp.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c index be9ddcad8f28..4305da2c9037 100644 --- a/drivers/infiniband/ulp/srp/ib_srp.c +++ b/drivers/infiniband/ulp/srp/ib_srp.c | |||
@@ -148,6 +148,7 @@ MODULE_PARM_DESC(ch_count, | |||
148 | 148 | ||
149 | static void srp_add_one(struct ib_device *device); | 149 | static void srp_add_one(struct ib_device *device); |
150 | static void srp_remove_one(struct ib_device *device, void *client_data); | 150 | static void srp_remove_one(struct ib_device *device, void *client_data); |
151 | static void srp_rename_dev(struct ib_device *device, void *client_data); | ||
151 | static void srp_recv_done(struct ib_cq *cq, struct ib_wc *wc); | 152 | static void srp_recv_done(struct ib_cq *cq, struct ib_wc *wc); |
152 | static void srp_handle_qp_err(struct ib_cq *cq, struct ib_wc *wc, | 153 | static void srp_handle_qp_err(struct ib_cq *cq, struct ib_wc *wc, |
153 | const char *opname); | 154 | const char *opname); |
@@ -162,7 +163,8 @@ static struct workqueue_struct *srp_remove_wq; | |||
162 | static struct ib_client srp_client = { | 163 | static struct ib_client srp_client = { |
163 | .name = "srp", | 164 | .name = "srp", |
164 | .add = srp_add_one, | 165 | .add = srp_add_one, |
165 | .remove = srp_remove_one | 166 | .remove = srp_remove_one, |
167 | .rename = srp_rename_dev | ||
166 | }; | 168 | }; |
167 | 169 | ||
168 | static struct ib_sa_client srp_sa_client; | 170 | static struct ib_sa_client srp_sa_client; |
@@ -4112,6 +4114,20 @@ free_host: | |||
4112 | return NULL; | 4114 | return NULL; |
4113 | } | 4115 | } |
4114 | 4116 | ||
4117 | static void srp_rename_dev(struct ib_device *device, void *client_data) | ||
4118 | { | ||
4119 | struct srp_device *srp_dev = client_data; | ||
4120 | struct srp_host *host, *tmp_host; | ||
4121 | |||
4122 | list_for_each_entry_safe(host, tmp_host, &srp_dev->dev_list, list) { | ||
4123 | char name[IB_DEVICE_NAME_MAX + 8]; | ||
4124 | |||
4125 | snprintf(name, sizeof(name), "srp-%s-%d", | ||
4126 | dev_name(&device->dev), host->port); | ||
4127 | device_rename(&host->dev, name); | ||
4128 | } | ||
4129 | } | ||
4130 | |||
4115 | static void srp_add_one(struct ib_device *device) | 4131 | static void srp_add_one(struct ib_device *device) |
4116 | { | 4132 | { |
4117 | struct srp_device *srp_dev; | 4133 | struct srp_device *srp_dev; |