diff options
author | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2008-10-21 18:28:36 -0400 |
---|---|---|
committer | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2008-10-26 05:27:01 -0400 |
commit | 0dcfeb7e3c8695c5aa3677dda8efb9bef2e7e64d (patch) | |
tree | 1b810e6cec5bc303c16806d4e33b2923a122a1ee /drivers/firewire | |
parent | 7007a0765e33bf89182e069e35ec6009fa54f610 (diff) |
firewire: fw-sbp2: delay first login to avoid retries
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>
Diffstat (limited to 'drivers/firewire')
-rw-r--r-- | drivers/firewire/fw-sbp2.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/firewire/fw-sbp2.c b/drivers/firewire/fw-sbp2.c index ef0b9b419c27..17bf0e1468e6 100644 --- a/drivers/firewire/fw-sbp2.c +++ b/drivers/firewire/fw-sbp2.c | |||
@@ -1147,7 +1147,7 @@ static int sbp2_probe(struct device *dev) | |||
1147 | 1147 | ||
1148 | /* Do the login in a workqueue so we can easily reschedule retries. */ | 1148 | /* Do the login in a workqueue so we can easily reschedule retries. */ |
1149 | list_for_each_entry(lu, &tgt->lu_list, link) | 1149 | list_for_each_entry(lu, &tgt->lu_list, link) |
1150 | sbp2_queue_work(lu, 0); | 1150 | sbp2_queue_work(lu, DIV_ROUND_UP(HZ, 5)); |
1151 | return 0; | 1151 | return 0; |
1152 | 1152 | ||
1153 | fail_tgt_put: | 1153 | fail_tgt_put: |