]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
firewire: fw-sbp2: delay first login to avoid retries
authorStefan Richter <stefanr@s5r6.in-berlin.de>
Mon, 27 Oct 2008 22:29:00 +0000 (23:29 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 7 Nov 2008 03:05:45 +0000 (19:05 -0800)
commit25a5d6623213609e2569c9fc3c64136bbb811946
treeb10f5d3c4fa3098e5c2e7337ac87f49576e52577
parentff0f8d16839cd02dc95bd92c212cbd5d433a4d2b
firewire: fw-sbp2: delay first login to avoid retries

commit 0dcfeb7e3c8695c5aa3677dda8efb9bef2e7e64d upstream

This optimizes firewire-sbp2's device probe for the case that the local
node and the SBP-2 node were discovered at the same time.  In this case,
fw-core's bus management work and fw-sbp2's login and SCSI probe work
are scheduled in parallel (in the globally shared workqueue and in
fw-sbp2's workqueue, respectively).  The bus reset from fw-core may then
disturb and extremely delay the login and SCSI probe because the latter
fails with several command timeouts and retries and has to be retried
from scratch.

We avoid this particular situation of sbp2_login() and fw_card_bm_work()
running in parallel by delaying the first sbp2_login() a little bit.

This is meant to be a short-term fix for
https://bugzilla.redhat.com/show_bug.cgi?id=466679.  In the long run,
the SCSI probe, i.e. fw-sbp2's call of __scsi_add_device(), should be
parallelized with sbp2_reconnect().

Problem reported and fix tested and confirmed by Alex Kanavin.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/firewire/fw-sbp2.c