Skip to content

Commit

Permalink
[SCSI] scsi: handle ->slave_configure return value
Browse files Browse the repository at this point in the history
When ­>slave_configure fails the scsi midlayer should handle it.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
  • Loading branch information
Christoph Hellwig authored and James Bottomley committed Feb 28, 2006
1 parent 8b097a6 commit 9380509
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions drivers/scsi/scsi_scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9380509

Please sign in to comment.