public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Rusty Trivial Russell <rusty@rustcorp.com.au>
To: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [TRIVIAL] Re: Kernel patches...
Date: Fri, 06 Dec 2002 14:45:59 +1100	[thread overview]
Message-ID: <20021206035754.B2B912C256@lists.samba.org> (raw)

From:  Woody Suwalski <woodys@xandros.com>

  >Yes agreed, a hdX=multilun is what I'm after.
  >
  >  
  >
  >>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
  

--- trivial-2.5-bk/drivers/scsi/ide-scsi.c.orig	2002-12-06 13:56:56.000000000 +1100
+++ trivial-2.5-bk/drivers/scsi/ide-scsi.c	2002-12-06 13:56:56.000000000 +1100
@@ -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;
-- 
  Don't blame me: the Monkey is driving
  File: Woody Suwalski <woodys@xandros.com>: Re: Kernel patches...

             reply	other threads:[~2002-12-06  3:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-06  3:45 Rusty Trivial Russell [this message]
2002-12-06 13:16 ` [TRIVIAL] Re: Kernel patches Alan Cox

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20021206035754.B2B912C256@lists.samba.org \
    --to=rusty@rustcorp.com.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox