|
@@ -148,7 +148,7 @@ static void srpt_event_handler(struct ib_event_handler *handler,
|
|
|
return;
|
|
|
|
|
|
pr_debug("ASYNC event= %d on device= %s\n", event->event,
|
|
|
- sdev->device->name);
|
|
|
+ dev_name(&sdev->device->dev));
|
|
|
|
|
|
switch (event->event) {
|
|
|
case IB_EVENT_PORT_ERR:
|
|
@@ -1941,7 +1941,8 @@ static void __srpt_close_all_ch(struct srpt_port *sport)
|
|
|
if (srpt_disconnect_ch(ch) >= 0)
|
|
|
pr_info("Closing channel %s because target %s_%d has been disabled\n",
|
|
|
ch->sess_name,
|
|
|
- sport->sdev->device->name, sport->port);
|
|
|
+ dev_name(&sport->sdev->device->dev),
|
|
|
+ sport->port);
|
|
|
srpt_close_ch(ch);
|
|
|
}
|
|
|
}
|
|
@@ -2127,7 +2128,7 @@ static int srpt_cm_req_recv(struct srpt_device *const sdev,
|
|
|
if (!sport->enabled) {
|
|
|
rej->reason = cpu_to_be32(SRP_LOGIN_REJ_INSUFFICIENT_RESOURCES);
|
|
|
pr_info("rejected SRP_LOGIN_REQ because target port %s_%d has not yet been enabled\n",
|
|
|
- sport->sdev->device->name, port_num);
|
|
|
+ dev_name(&sport->sdev->device->dev), port_num);
|
|
|
goto reject;
|
|
|
}
|
|
|
|
|
@@ -2267,7 +2268,7 @@ static int srpt_cm_req_recv(struct srpt_device *const sdev,
|
|
|
rej->reason = cpu_to_be32(
|
|
|
SRP_LOGIN_REJ_INSUFFICIENT_RESOURCES);
|
|
|
pr_info("rejected SRP_LOGIN_REQ because target %s_%d is not enabled\n",
|
|
|
- sdev->device->name, port_num);
|
|
|
+ dev_name(&sdev->device->dev), port_num);
|
|
|
mutex_unlock(&sport->mutex);
|
|
|
goto reject;
|
|
|
}
|
|
@@ -2842,7 +2843,7 @@ static int srpt_release_sport(struct srpt_port *sport)
|
|
|
while (wait_event_timeout(sport->ch_releaseQ,
|
|
|
srpt_ch_list_empty(sport), 5 * HZ) <= 0) {
|
|
|
pr_info("%s_%d: waiting for session unregistration ...\n",
|
|
|
- sport->sdev->device->name, sport->port);
|
|
|
+ dev_name(&sport->sdev->device->dev), sport->port);
|
|
|
rcu_read_lock();
|
|
|
list_for_each_entry(nexus, &sport->nexus_list, entry) {
|
|
|
list_for_each_entry(ch, &nexus->ch_list, list) {
|
|
@@ -2932,7 +2933,7 @@ static int srpt_alloc_srq(struct srpt_device *sdev)
|
|
|
}
|
|
|
|
|
|
pr_debug("create SRQ #wr= %d max_allow=%d dev= %s\n", sdev->srq_size,
|
|
|
- sdev->device->attrs.max_srq_wr, device->name);
|
|
|
+ sdev->device->attrs.max_srq_wr, dev_name(&device->dev));
|
|
|
|
|
|
sdev->ioctx_ring = (struct srpt_recv_ioctx **)
|
|
|
srpt_alloc_ioctx_ring(sdev, sdev->srq_size,
|
|
@@ -2965,8 +2966,8 @@ static int srpt_use_srq(struct srpt_device *sdev, bool use_srq)
|
|
|
} else if (use_srq && !sdev->srq) {
|
|
|
ret = srpt_alloc_srq(sdev);
|
|
|
}
|
|
|
- pr_debug("%s(%s): use_srq = %d; ret = %d\n", __func__, device->name,
|
|
|
- sdev->use_srq, ret);
|
|
|
+ pr_debug("%s(%s): use_srq = %d; ret = %d\n", __func__,
|
|
|
+ dev_name(&device->dev), sdev->use_srq, ret);
|
|
|
return ret;
|
|
|
}
|
|
|
|
|
@@ -3052,7 +3053,7 @@ static void srpt_add_one(struct ib_device *device)
|
|
|
|
|
|
if (srpt_refresh_port(sport)) {
|
|
|
pr_err("MAD registration failed for %s-%d.\n",
|
|
|
- sdev->device->name, i);
|
|
|
+ dev_name(&sdev->device->dev), i);
|
|
|
goto err_event;
|
|
|
}
|
|
|
}
|
|
@@ -3063,7 +3064,7 @@ static void srpt_add_one(struct ib_device *device)
|
|
|
|
|
|
out:
|
|
|
ib_set_client_data(device, &srpt_client, sdev);
|
|
|
- pr_debug("added %s.\n", device->name);
|
|
|
+ pr_debug("added %s.\n", dev_name(&device->dev));
|
|
|
return;
|
|
|
|
|
|
err_event:
|
|
@@ -3078,7 +3079,7 @@ free_dev:
|
|
|
kfree(sdev);
|
|
|
err:
|
|
|
sdev = NULL;
|
|
|
- pr_info("%s(%s) failed.\n", __func__, device->name);
|
|
|
+ pr_info("%s(%s) failed.\n", __func__, dev_name(&device->dev));
|
|
|
goto out;
|
|
|
}
|
|
|
|
|
@@ -3093,7 +3094,8 @@ static void srpt_remove_one(struct ib_device *device, void *client_data)
|
|
|
int i;
|
|
|
|
|
|
if (!sdev) {
|
|
|
- pr_info("%s(%s): nothing to do.\n", __func__, device->name);
|
|
|
+ pr_info("%s(%s): nothing to do.\n", __func__,
|
|
|
+ dev_name(&device->dev));
|
|
|
return;
|
|
|
}
|
|
|
|