From: Stefan Richter <stefanr@s5r6.in-berlin.de>
To: stable@kernel.org
Cc: linux1394-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org
Subject: [patch 2.6.27.y 5/6] firewire: fw-sbp2: delay first login to avoid retries
Date: Mon, 27 Oct 2008 23:29:00 +0100 (CET) [thread overview]
Message-ID: <tkrat.9bc21c3b6a97bebe@s5r6.in-berlin.de> (raw)
In-Reply-To: <tkrat.df6e0a4afb92ef6e@s5r6.in-berlin.de>
Date: Wed, 22 Oct 2008 00:28:36 +0200 (CEST)
From: Stefan Richter <stefanr@s5r6.in-berlin.de>
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.
Same as commit 0dcfeb7e3c8695c5aa3677dda8efb9bef2e7e64d.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
---
drivers/firewire/fw-sbp2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: linux/drivers/firewire/fw-sbp2.c
===================================================================
--- linux.orig/drivers/firewire/fw-sbp2.c
+++ linux/drivers/firewire/fw-sbp2.c
@@ -1158,7 +1158,7 @@ static int sbp2_probe(struct device *dev
/* Do the login in a workqueue so we can easily reschedule retries. */
list_for_each_entry(lu, &tgt->lu_list, link)
- sbp2_queue_work(lu, 0);
+ sbp2_queue_work(lu, DIV_ROUND_UP(HZ, 5));
return 0;
fail_tgt_put:
--
Stefan Richter
-=====-==--- =-=- ==-==
http://arcgraph.de/sr/
next prev parent reply other threads:[~2008-10-27 22:29 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-27 22:24 [patch 2.6.27.y 0/6] firewire: proposed patches for -stable Stefan Richter
2008-10-27 22:26 ` [patch 2.6.27.y 1/6] firewire: fix setting tag and sy in iso transmission Stefan Richter
2008-10-27 22:26 ` [patch 2.6.27.y 2/6] firewire: fix ioctl() return code Stefan Richter
2008-10-27 22:27 ` [patch 2.6.27.y 3/6] firewire: Survive more than 256 bus resets Stefan Richter
2008-10-27 22:28 ` [patch 2.6.27.y 4/6] firewire: fix struct fw_node memory leak Stefan Richter
2008-10-27 22:29 ` Stefan Richter [this message]
2008-10-27 22:29 ` [patch 2.6.27.y 6/6] firewire: fw-sbp2: fix races Stefan Richter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tkrat.9bc21c3b6a97bebe@s5r6.in-berlin.de \
--to=stefanr@s5r6.in-berlin.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux1394-devel@lists.sourceforge.net \
--cc=stable@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®