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
This commit is contained in:
@@ -148,6 +148,7 @@ MODULE_PARM_DESC(ch_count,
|
||||
|
||||
static void srp_add_one(struct ib_device *device);
|
||||
static void srp_remove_one(struct ib_device *device, void *client_data);
|
||||
static void srp_rename_dev(struct ib_device *device, void *client_data);
|
||||
static void srp_recv_done(struct ib_cq *cq, struct ib_wc *wc);
|
||||
static void srp_handle_qp_err(struct ib_cq *cq, struct ib_wc *wc,
|
||||
const char *opname);
|
||||
@@ -162,7 +163,8 @@ static struct workqueue_struct *srp_remove_wq;
|
||||
static struct ib_client srp_client = {
|
||||
.name = "srp",
|
||||
.add = srp_add_one,
|
||||
.remove = srp_remove_one
|
||||
.remove = srp_remove_one,
|
||||
.rename = srp_rename_dev
|
||||
};
|
||||
|
||||
static struct ib_sa_client srp_sa_client;
|
||||
@@ -4112,6 +4114,20 @@ free_host:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void srp_rename_dev(struct ib_device *device, void *client_data)
|
||||
{
|
||||
struct srp_device *srp_dev = client_data;
|
||||
struct srp_host *host, *tmp_host;
|
||||
|
||||
list_for_each_entry_safe(host, tmp_host, &srp_dev->dev_list, list) {
|
||||
char name[IB_DEVICE_NAME_MAX + 8];
|
||||
|
||||
snprintf(name, sizeof(name), "srp-%s-%d",
|
||||
dev_name(&device->dev), host->port);
|
||||
device_rename(&host->dev, name);
|
||||
}
|
||||
}
|
||||
|
||||
static void srp_add_one(struct ib_device *device)
|
||||
{
|
||||
struct srp_device *srp_dev;
|
||||
|
Reference in New Issue
Block a user