Skip to contentSkip to conversation

scsi: handle ->slave_configure return value

PATCH New Christoph Hellwig 1 participant 1 message Feb 17, 2006 SCSI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scsi: handle ->slave_configure return value

When �>slave_configure fails the scsi midlayer should handle it.

drivers/scsi/scsi_scan.c +14 -2
Index: linux-2.6/drivers/scsi/scsi_scan.c
===================================================================
@@ -770,8 +770,20 @@
 
 	transport_configure_device(&sdev->sdev_gendev);
 
-	if (sdev->host->hostt->slave_configure)
-		sdev->host->hostt->slave_configure(sdev);
+	if (sdev->host->hostt->slave_configure) {
+		int ret = sdev->host->hostt->slave_configure(sdev);
+		if (ret) {
+			/*
+			 * if LLDD reports slave not present, don't clutter
+			 * console with alloc failure messages
+			 */
+			if (ret != -ENXIO) {
+				sdev_printk(KERN_ERR, sdev,
+					"failed to configure device\n");
+			}
+			return SCSI_SCAN_NO_RESPONSE;
+		}
+	}
 
 	/*
 	 * Ok, the device is now all set up, we can

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