Commit:     4dccd020d7ca5e673d7804cc4ff80fbf58d8a37e
Parent:     f148e20cef696e30a370d4f7cb9aeb46273fdd6e
Author:     Stefan Richter <[EMAIL PROTECTED]>
AuthorDate: Sun Jan 20 01:24:26 2008 +0100
Committer:  Stefan Richter <[EMAIL PROTECTED]>
CommitDate: Wed Jan 30 22:22:26 2008 +0100

    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 <[EMAIL PROTECTED]>
    Acked-by: Jarod Wilson <[EMAIL PROTECTED]>
 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 e5a2571..661a5b6 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)
        struct sbp2_logical_unit *lu, *next;
        struct Scsi_Host *shost =
                container_of((void *)tgt, struct Scsi_Host, hostdata[0]);
+       struct fw_device *device = fw_device(tgt->unit->device.parent);
        list_for_each_entry_safe(lu, next, &tgt->lu_list, link) {
                if (lu->sdev)
-               sbp2_send_management_orb(lu, tgt->node_id, lu->generation,
-                               SBP2_LOGOUT_REQUEST, lu->login_id, NULL);
+               if (!fw_device_is_shutdown(device))
+                       sbp2_send_management_orb(lu, tgt->node_id,
+                                       lu->generation, SBP2_LOGOUT_REQUEST,
+                                       lu->login_id, NULL);
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to