patch-2.2.0-pre8 linux/drivers/scsi/ide-scsi.c

Next file: linux/drivers/scsi/mac_NCR5380.c
Previous file: linux/drivers/scsi/i91uscsi.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.2.0-pre7/linux/drivers/scsi/ide-scsi.c linux/drivers/scsi/ide-scsi.c
@@ -23,6 +23,8 @@
  * Ver 0.6   Jan 27 98   Allow disabling of SCSI command translation layer
  *                        for access through /dev/sg.
  *                       Fix MODE_SENSE_6/MODE_SELECT_6/INQUIRY translation.
+ * Ver 0.7   Dev 04 98   Ignore commands where lun != 0 to avoid multiple
+ *                        detection of devices with CONFIG_SCSI_MULTI_LUN
  */
 
 #define IDESCSI_VERSION "0.6"
@@ -726,6 +728,9 @@
 
 	if (!drive) {
 		printk (KERN_ERR "ide-scsi: drive id %d not present\n", cmd->target);
+		goto abort;
+	}
+	if (cmd->lun != 0) {		/* Only respond to LUN 0. Drop others */
 		goto abort;
 	}
 	scsi = drive->driver_data;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov