diff options
author | Christoph Hellwig <hch@lst.de> | 2006-02-17 12:11:29 +0100 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-02-28 04:26:45 +0100 |
commit | 938050916f57f08e20595b1fa1c1e57c2fbf7243 (patch) | |
tree | 461104c764c00d7824eaa7df8cba8d9cdd0dbb66 /drivers | |
parent | [SCSI] fc_transport: stop creating duplicate rport entries. (diff) | |
download | linux-938050916f57f08e20595b1fa1c1e57c2fbf7243.tar.xz linux-938050916f57f08e20595b1fa1c1e57c2fbf7243.zip |
[SCSI] scsi: handle ->slave_configure return value
When >slave_configure fails the scsi midlayer should handle it.
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/scsi/scsi_scan.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c index 5acb83ca5ae5..f9ecc3dea7df 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 |