Skip to contentSkip to conversation

firewire: fw-sbp2: extend failure check after SCSI probe

PATCH In review Stefan Richter 1 participant 2 messages Oct 14, 2008 – Oct 21, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 firewire: fw-sbp2: extend failure check after SCSI probe

https://bugzilla.redhat.com/show_bug.cgi?id=466679 indicates that the SCSI stack's probe may fail (with the sdev offlined) even if no 1394 bus generation update happened. It's cheap to check for offline status, hence add this check to initiate a logout/ login/ SCSI probe retry.

---
 drivers/firewire/fw-sbp2.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/firewire/fw-sbp2.c +2 -1
Index: linux/drivers/firewire/fw-sbp2.c
===================================================================
@@ -930,7 +930,8 @@ static void sbp2_login(struct work_struc
 
 	/* Unreported error during __scsi_add_device() */
 	smp_rmb(); /* get current card generation */
-	if (generation != device->card->generation) {
+	if (generation != device->card->generation ||
+	    !scsi_device_online(sdev)) {
 		scsi_remove_device(sdev);
 		scsi_device_put(sdev);
 		goto out_logout_login;
Signature · 3 lines
Stefan Richter
-=====-==--- =-=- -====
http://arcgraph.de/sr/
#1 lore raw

I wrote on 2008-10-15:

Quoted 15 lines

https://bugzilla.redhat.com/show_bug.cgi?id=466679 indicates that the SCSI stack's probe may fail (with the sdev offlined) even if no 1394 bus generation update happened. It's cheap to check for offline status, hence add this check to initiate a logout/ login/ SCSI probe retry.

---
 drivers/firewire/fw-sbp2.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Index: linux/drivers/firewire/fw-sbp2.c
===================================================================

drivers/firewire/fw-sbp2.c static void sbp2_login(struct work_struc · line 937

Quoted 9 lines
drivers/firewire/fw-sbp2.c +2 -1
@@ -930,7 +930,8 @@ static void sbp2_login(struct work_struc
 
 	/* Unreported error during __scsi_add_device() */
 	smp_rmb(); /* get current card generation */
-	if (generation != device->card->generation) {
+	if (generation != device->card->generation ||
+	    !scsi_device_online(sdev)) {
 		scsi_remove_device(sdev);
 		scsi_device_put(sdev);
 		goto out_logout_login;

Wrong. I was mislead by missing info in the bug report. The generation check /is/ most certainly sufficient after all.

And adding the scsi_device_online check does not fix https://bugzilla.redhat.com/show_bug.cgi?id=466679 at all. To fix that bug, we have to tweak fw-sbp2 so that the SCSI probe succeeds in the very first attempt in the specific scenario which is relevant to the reporter. (The scenario is basically: The firewire-sbp2 module was initialized before the firewire-ohci module.)

Signature · 3 lines
Stefan Richter
-=====-==--- =-=- =-=-=
http://arcgraph.de/sr/