From: Christoph Hellwig Date: Fri, 17 Feb 2006 11:11:29 +0000 (+0100) Subject: [SCSI] scsi: handle ->slave_configure return value X-Git-Tag: upstream/snapshot3+hdmi~42501^2~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=938050916f57f08e20595b1fa1c1e57c2fbf7243;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git [SCSI] scsi: handle ->slave_configure return value When ­>slave_configure fails the scsi midlayer should handle it. Signed-off-by: James Bottomley --- diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c index 5acb83c..f9ecc3d 100644 --- a/drivers/scsi/scsi_scan.c +++ b/drivers/scsi/scsi_scan.c @@ -752,8 +752,20 @@ static int scsi_add_lun(struct scsi_device *sdev, char *inq_result, int *bflags) 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