Browse Source

[SCSI] fix missing check for no scanning

Drivers that called scsi_scan_target() instead of scsi_scan_host() were
still adding devices; this needs to be under the control of userspace,
not the driver.

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Matthew Wilcox 18 years ago
parent
commit
93b45af5c6
1 changed files with 3 additions and 0 deletions
  1. 3 0
      drivers/scsi/scsi_scan.c

+ 3 - 0
drivers/scsi/scsi_scan.c

@@ -1549,6 +1549,9 @@ void scsi_scan_target(struct device *parent, unsigned int channel,
 {
 {
 	struct Scsi_Host *shost = dev_to_shost(parent);
 	struct Scsi_Host *shost = dev_to_shost(parent);
 
 
+	if (strncmp(scsi_scan_type, "none", 4) == 0)
+		return;
+
 	if (!shost->async_scan)
 	if (!shost->async_scan)
 		scsi_complete_async_scans();
 		scsi_complete_async_scans();