patch-2.3.32 linux/drivers/scsi/ide-scsi.c
Next file: linux/drivers/scsi/inia100.c
Previous file: linux/drivers/scsi/ibmmca.c
Back to the patch index
Back to the overall index
-  Lines: 16
 -  Date:
Wed Dec  8 15:17:55 1999
 -  Orig file: 
v2.3.31/linux/drivers/scsi/ide-scsi.c
 -  Orig date: 
Thu Nov 18 20:25:37 1999
 
diff -u --recursive --new-file v2.3.31/linux/drivers/scsi/ide-scsi.c linux/drivers/scsi/ide-scsi.c
@@ -602,11 +602,14 @@
 {
 	struct Scsi_Host *host;
 	int id;
+	int last_lun = 0;
 
 	host_template->proc_name = "ide-scsi";
 	host = scsi_register(host_template, 0);
-	for (id = 0; id < MAX_HWIFS * MAX_DRIVES && idescsi_drives[id]; id++);
+	for (id = 0; id < MAX_HWIFS * MAX_DRIVES && idescsi_drives[id]; id++)
+		last_lun = IDE_MAX(last_lun, idescsi_drives[id]->last_lun);
 	host->max_id = id;
+	host->max_lun = last_lun + 1;
 	host->can_queue = host->cmd_per_lun * id;
 	return 1;
 }
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)