diff options
author | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2008-01-19 19:24:26 -0500 |
---|---|---|
committer | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2008-01-30 16:22:26 -0500 |
commit | 4dccd020d7ca5e673d7804cc4ff80fbf58d8a37e (patch) | |
tree | d9d1c5a6c218b8d8aeb35ce7c0a3848298d8c490 /drivers/firewire | |
parent | f148e20cef696e30a370d4f7cb9aeb46273fdd6e (diff) |
firewire: fw-sbp2: skip unnecessary logout
Don't attempt to send a logout ORB if the target was already unplugged
or had its link switched off. If two targets are attached, this
enhances the chance to quickly reconnect to the remaining target when
one target is plugged out.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Acked-by: Jarod Wilson <jwilson@redhat.com>
Diffstat (limited to 'drivers/firewire')
-rw-r--r-- | drivers/firewire/fw-sbp2.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/firewire/fw-sbp2.c b/drivers/firewire/fw-sbp2.c index e5a2571a3671..661a5b66f661 100644 --- a/drivers/firewire/fw-sbp2.c +++ b/drivers/firewire/fw-sbp2.c | |||
@@ -606,13 +606,17 @@ static void sbp2_release_target(struct kref *kref) | |||
606 | struct sbp2_logical_unit *lu, *next; | 606 | struct sbp2_logical_unit *lu, *next; |
607 | struct Scsi_Host *shost = | 607 | struct Scsi_Host *shost = |
608 | container_of((void *)tgt, struct Scsi_Host, hostdata[0]); | 608 | container_of((void *)tgt, struct Scsi_Host, hostdata[0]); |
609 | struct fw_device *device = fw_device(tgt->unit->device.parent); | ||
609 | 610 | ||
610 | list_for_each_entry_safe(lu, next, &tgt->lu_list, link) { | 611 | list_for_each_entry_safe(lu, next, &tgt->lu_list, link) { |
611 | if (lu->sdev) | 612 | if (lu->sdev) |
612 | scsi_remove_device(lu->sdev); | 613 | scsi_remove_device(lu->sdev); |
613 | 614 | ||
614 | sbp2_send_management_orb(lu, tgt->node_id, lu->generation, | 615 | if (!fw_device_is_shutdown(device)) |
615 | SBP2_LOGOUT_REQUEST, lu->login_id, NULL); | 616 | sbp2_send_management_orb(lu, tgt->node_id, |
617 | lu->generation, SBP2_LOGOUT_REQUEST, | ||
618 | lu->login_id, NULL); | ||
619 | |||
616 | fw_core_remove_address_handler(&lu->address_handler); | 620 | fw_core_remove_address_handler(&lu->address_handler); |
617 | list_del(&lu->link); | 621 | list_del(&lu->link); |
618 | kfree(lu); | 622 | kfree(lu); |