diff options
author | James Bottomley <jejb@titanic.(none)> | 2005-08-28 11:18:35 -0500 |
---|---|---|
committer | James Bottomley <jejb@titanic.(none)> | 2005-08-28 11:18:35 -0500 |
commit | 7a93aef7fbac6f4db40b6fec5c0c6b654ae7a93c (patch) | |
tree | 4cd7aae38012dfc1ff6c62be20ef8840e56d8383 /drivers/scsi/scsi_scan.c | |
parent | 392160335c798bbe94ab3aae6ea0c85d32b81bbc (diff) | |
parent | 8224bfa84d510630b40ea460b2bb380c91acb8ae (diff) | |
download | talos-op-linux-7a93aef7fbac6f4db40b6fec5c0c6b654ae7a93c.tar.gz talos-op-linux-7a93aef7fbac6f4db40b6fec5c0c6b654ae7a93c.zip |
Merge HEAD from ../scsi-misc-2.6-tmp
Diffstat (limited to 'drivers/scsi/scsi_scan.c')
-rw-r--r-- | drivers/scsi/scsi_scan.c | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c index d2ca4b8fbc13..0048beaffc9f 100644 --- a/drivers/scsi/scsi_scan.c +++ b/drivers/scsi/scsi_scan.c @@ -1251,9 +1251,12 @@ struct scsi_device *__scsi_add_device(struct Scsi_Host *shost, uint channel, get_device(&starget->dev); down(&shost->scan_mutex); - res = scsi_probe_and_add_lun(starget, lun, NULL, &sdev, 1, hostdata); - if (res != SCSI_SCAN_LUN_PRESENT) - sdev = ERR_PTR(-ENODEV); + if (scsi_host_scan_allowed(shost)) { + res = scsi_probe_and_add_lun(starget, lun, NULL, &sdev, 1, + hostdata); + if (res != SCSI_SCAN_LUN_PRESENT) + sdev = ERR_PTR(-ENODEV); + } up(&shost->scan_mutex); scsi_target_reap(starget); put_device(&starget->dev); @@ -1403,11 +1406,15 @@ int scsi_scan_host_selected(struct Scsi_Host *shost, unsigned int channel, return -EINVAL; down(&shost->scan_mutex); - if (channel == SCAN_WILD_CARD) - for (channel = 0; channel <= shost->max_channel; channel++) + if (scsi_host_scan_allowed(shost)) { + if (channel == SCAN_WILD_CARD) + for (channel = 0; channel <= shost->max_channel; + channel++) + scsi_scan_channel(shost, channel, id, lun, + rescan); + else scsi_scan_channel(shost, channel, id, lun, rescan); - else - scsi_scan_channel(shost, channel, id, lun, rescan); + } up(&shost->scan_mutex); return 0; |