Skip to contentSkip to conversation

Kernel patches...

TRIVIAL Rusty Trivial Russell 2 participants 2 messages Dec 6, 2002 SCSI

lore
Share & tools
lore
#0 lore raw

From: Woody Suwalski <[email protected]>

Quoted 4 lines

Yes agreed, a hdX=multilun is what I'm after.

Quoted 8 lines
Quoted 3 lines

This works for me, no dice on getting me to bite on this whopper.

I'm sure woody will supply such a patch :)

OK, so here is the new patch.
It takes advantage of hdXlun, so no changes to the config files are needed. By default keeps IDE LUN at zero, unless hdXlun=n specified on command line. Compiles with 2.4.20.

Thanks, Woody

drivers/scsi/ide-scsi.c renamed from drivers/scsi/ide-scsi.c.orig +11 -2
@@ -640,8 +640,17 @@
 	if(host == NULL)
 		return 0;
 		
-	for (id = 0; id < MAX_HWIFS * MAX_DRIVES && idescsi_drives[id]; id++)
-		last_lun = IDE_MAX(last_lun, idescsi_drives[id]->last_lun);
+/*
+ * by default do not trust multiple LUN support on IDE devices.
+ * Too many broken IDE controllers respond to LUN != 0
+ * To reenable this feature, specify "hdxlun=n" on the command line.
+ */
+	for (id = 0; id < MAX_HWIFS * MAX_DRIVES && idescsi_drives[id]; id++) {
+		if (idescsi_drives[id]->forced_lun)
+			last_lun = IDE_MAX(last_lun, idescsi_drives[id]->last_lun);
+		else
+			last_lun = 0;
+	}
 	host->max_id = id;
 	host->max_lun = last_lun + 1;
 	host->can_queue = host->cmd_per_lun * id;
Signature · 2 lines
  Don't blame me: the Monkey is driving
  File: Woody Suwalski <[email protected]>: Re: Kernel patches...
#1 lore raw

OK, so here is the new patch.
It takes advantage of hdXlun, so no changes to the config files are
needed.
By default keeps IDE LUN at zero, unless hdXlun=n specified on command
line.
Compiles with 2.4.20.

Rejected