From: Stefan Richter <stefanr@s5r6.in-berlin.de>
To: linux1394-devel@lists.sourceforge.net
Cc: linux-kernel@vger.kernel.org, damien_benoist@yahoo.com
Subject: [patch 3/3] ieee1394: sbp2: let nodemgr retry node updates during bus reset series
Date: Sat, 16 Aug 2008 13:39:26 +0200 (CEST) [thread overview]
Message-ID: <tkrat.5bc1689ebb141ddb@s5r6.in-berlin.de> (raw)
In-Reply-To: <tkrat.a3ef08493991acb0@s5r6.in-berlin.de>
sbp2 was too quick to run away screaming "Failed to reconnect to sbp2
device!" when additional nodes on the same bus came online.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
---
drivers/ieee1394/sbp2.c | 25 ++++++++++++++++++-------
1 file changed, 18 insertions(+), 7 deletions(-)
Index: linux/drivers/ieee1394/sbp2.c
===================================================================
--- linux.orig/drivers/ieee1394/sbp2.c
+++ linux/drivers/ieee1394/sbp2.c
@@ -733,15 +733,26 @@ static int sbp2_update(struct unit_direc
{
struct sbp2_lu *lu = ud->device.driver_data;
- if (sbp2_reconnect_device(lu)) {
- /* Reconnect has failed. Perhaps we didn't reconnect fast
- * enough. Try a regular login, but first log out just in
- * case of any weirdness. */
+ if (sbp2_reconnect_device(lu) != 0) {
+ /*
+ * Reconnect failed. If another bus reset happened,
+ * let nodemgr proceed and call sbp2_update again later
+ * (or sbp2_remove if this node went away).
+ */
+ if (!hpsb_node_entry_valid(lu->ne))
+ return 0;
+ /*
+ * Or the target rejected the reconnect because we weren't
+ * fast enough. Try a regular login, but first log out
+ * just in case of any weirdness.
+ */
sbp2_logout_device(lu);
- if (sbp2_login_device(lu)) {
- /* Login failed too, just fail, and the backend
- * will call our sbp2_remove for us */
+ if (sbp2_login_device(lu) != 0) {
+ if (!hpsb_node_entry_valid(lu->ne))
+ return 0;
+
+ /* Maybe another initiator won the login. */
SBP2_ERR("Failed to reconnect to sbp2 device!");
return -EBUSY;
}
--
Stefan Richter
-=====-==--- =--- =----
http://arcgraph.de/sr/
next prev parent reply other threads:[~2008-08-16 11:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <994096.81924.qm@web50505.mail.re2.yahoo.com>
[not found] ` <48A5A80A.90506@s5r6.in-berlin.de>
[not found] ` <48A6BA6F.2030000@s5r6.in-berlin.de>
2008-08-16 11:36 ` [patch 1/3] ieee1394: regression in 2.6.25: updates should happen before probes Stefan Richter
2008-08-16 11:38 ` [patch 2/3] ieee1394: don't drop nodes during bus reset series Stefan Richter
2008-08-16 11:39 ` Stefan Richter [this message]
2008-08-19 19:28 ` Stefan Richter
2008-08-19 19:29 ` [patch 1/2] ieee1394: nodemgr clean up class iterators Stefan Richter
2008-08-19 19:30 ` [patch 2/2] ieee1394: survive a few seconds connection loss Stefan Richter
2008-10-10 17:13 ` [patch amendment] " 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.5bc1689ebb141ddb@s5r6.in-berlin.de \
--to=stefanr@s5r6.in-berlin.de \
--cc=damien_benoist@yahoo.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux1394-devel@lists.sourceforge.net \
/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®