[PATCH] firewire: fw-sbp2: extend failure check after SCSI probe

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

Signed-off-by: Stefan Richter <stefanr@xxxxxxxxxxxxxxxxx>
---
 drivers/firewire/fw-sbp2.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Index: linux/drivers/firewire/fw-sbp2.c
===================================================================
--- linux.orig/drivers/firewire/fw-sbp2.c
+++ 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;

-- 
Stefan Richter
-=====-==--- =-=- -====
http://arcgraph.de/sr/

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux