Commit 79352e9f authored by Stefan Richter's avatar Stefan Richter

firewire: fw-sbp2: let SCSI shutdown commands through before logout

This affects of course only the "soft shutdown" case, e.g. "modprobe -r
firewire-sbp2", while it doesn't matter for hot unplug.
Signed-off-by: default avatarStefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: default avatarKristian Høgsberg <krh@redhat.com>
parent cf47c7a2
...@@ -520,17 +520,15 @@ static int sbp2_agent_reset(struct fw_unit *unit) ...@@ -520,17 +520,15 @@ static int sbp2_agent_reset(struct fw_unit *unit)
static void sbp2_reconnect(struct work_struct *work); static void sbp2_reconnect(struct work_struct *work);
static struct scsi_host_template scsi_driver_template; static struct scsi_host_template scsi_driver_template;
static void static void release_sbp2_device(struct kref *kref)
release_sbp2_device(struct kref *kref)
{ {
struct sbp2_device *sd = container_of(kref, struct sbp2_device, kref); struct sbp2_device *sd = container_of(kref, struct sbp2_device, kref);
struct Scsi_Host *host = struct Scsi_Host *host =
container_of((void *)sd, struct Scsi_Host, hostdata[0]); container_of((void *)sd, struct Scsi_Host, hostdata[0]);
scsi_remove_host(host);
sbp2_send_management_orb(sd->unit, sd->node_id, sd->generation, sbp2_send_management_orb(sd->unit, sd->node_id, sd->generation,
SBP2_LOGOUT_REQUEST, sd->login_id, NULL); SBP2_LOGOUT_REQUEST, sd->login_id, NULL);
scsi_remove_host(host);
fw_core_remove_address_handler(&sd->address_handler); fw_core_remove_address_handler(&sd->address_handler);
fw_notify("removed sbp2 unit %s\n", sd->unit->device.bus_id); fw_notify("removed sbp2 unit %s\n", sd->unit->device.bus_id);
put_device(&sd->unit->device); put_device(&sd->unit->device);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment