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

    firewire: fw-sbp2: try to increase reconnect_hold (speed up reconnection)
    Ask the target to grant 4 seconds instead of the standard and minimum of
    1 second window after bus reset for reconnection.  This accelerates
    reconnection if there are more than one targets on the bus:  If a login
    and inquiry to one target blocks the fw-sbp2 workqueue for more than 1s
    after bus reset, we now still can reconnect to the other target.
    Before that, fw-sbp2's reconnect attempts would be rejected with "error
    status: 0:9" (function rejected), and fw-sbp2 would finally re-login.
    All those futile reconnect attemps cost extra time until the target
    which needs re-login is ready for I/O again.
    The reconnect timeout field in the login ORB doesn't have to be honored
    by the target though.  I found that we could get up to
      - allegedly 32768s from an old OXFW911 firmware
      - 256s from LSI bridges
      - 4s from OXUF922 and OXFW912 bridges,
      - 2s from TI bridges,
      - only the standard 1s from Initio and Prolific bridges and from
        Apple OpenFirmware in target mode.
    We just try to get 4 seconds which already covers the case of a few
    HDDs on the same bus quite nicely.
    A minor drawback occurs in the following (rare and impractical) border
      - two initiators are there, initiator 1 holds an exclusive login to
        a target,
      - initiator 1 goes off the bus,
      - target refuses login attempts from initiator 2 until reconnect_hold
        seconds after bus reset.
    An alternative approach to the issue at hand would be to parallelize
    fw-sbp2's reconnect and login work.
    Signed-off-by: Stefan Richter <[EMAIL PROTECTED]>
    Acked-by: Jarod Wilson <[EMAIL PROTECTED]>
 drivers/firewire/fw-sbp2.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/firewire/fw-sbp2.c b/drivers/firewire/fw-sbp2.c
index 661a5b6..d2fbfc6 100644
--- a/drivers/firewire/fw-sbp2.c
+++ b/drivers/firewire/fw-sbp2.c
@@ -514,9 +514,10 @@ sbp2_send_management_orb(struct sbp2_logical_unit *lu, int 
        orb->request.status_fifo.low  = lu->address_handler.offset;
        if (function == SBP2_LOGIN_REQUEST) {
+               /* Ask for 2^2 == 4 seconds reconnect grace period */
                orb->request.misc |=
-                       MANAGEMENT_ORB_EXCLUSIVE(sbp2_param_exclusive_login) |
-                       MANAGEMENT_ORB_RECONNECT(0);
+                       MANAGEMENT_ORB_RECONNECT(2) |
+                       MANAGEMENT_ORB_EXCLUSIVE(sbp2_param_exclusive_login);
        fw_memcpy_to_be32(&orb->request, &orb->request, sizeof(orb->request));
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