public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Willem Riede <wrlk@riede.org>
To: linux-kernel@vger.kernel.org
Subject: [PATCH] Selective attach for ide-scsi
Date: Sun, 8 Feb 2004 17:42:48 -0500	[thread overview]
Message-ID: <20040208224248.GA28026@serve.riede.org> (raw)

Today, if you boot 2.6.x with hdd=ide-scsi, ide-scsi will attach to
all your Atapi drives, not just hdd, unless you explicitely specified
another driver for those.

Given that we don't want people to use ide-scsi for cdroms and cd-writers,
that behavior is IMHO suboptimal.

The patch below makes ide-scsi attach ONLY to those drives that you tell
it to. So if you want it to handle hdb and hdd, but not hdc, you boot
with hdb=ide-scsi hdd=ide-scsi.

Regards, Willem Riede.

--- p0/drivers/scsi/ide-scsi.c	2004-01-31 10:29:11.000000000 -0500
+++ a1/drivers/scsi/ide-scsi.c	2004-02-08 16:40:19.000000000 -0500
@@ -955,17 +955,18 @@
 	static int warned;
 	int err;
 
-	if (!warned && drive->media == ide_cdrom) {
-		printk(KERN_WARNING "ide-scsi is deprecated for cd burning! Use ide-cd and give dev=/dev/hdX as device\n");
-		warned = 1;
-	}
-
-	if (!strstr("ide-scsi", drive->driver_req) ||
+	if (!drive->driver_req ||
+	    !strstr(drive->driver_req, "ide-scsi") ||
 	    !drive->present ||
 	    drive->media == ide_disk ||
 	    !(host = scsi_host_alloc(&idescsi_template,sizeof(idescsi_scsi_t))))
 		return 1;
 
+	if (!warned && drive->media == ide_cdrom) {
+		printk(KERN_WARNING "ide-scsi is deprecated for cd burning! Use ide-cd and give dev=/dev/hdX as device\n");
+		warned = 1;
+	}
+
 	host->max_id = 1;
 	host->max_lun = 1;
 	drive->driver_data = host;

             reply	other threads:[~2004-02-08 22:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-08 22:42 Willem Riede [this message]
2004-02-09  8:24 ` [PATCH] Selective attach for ide-scsi Mikael Pettersson
2004-02-10  0:02   ` Willem Riede
2004-02-11 20:11     ` Patrick Mansfield
2004-02-14 22:06       ` Willem Riede
2004-02-14 22:54         ` Bartlomiej Zolnierkiewicz
2004-02-14 23:03           ` Willem Riede

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=20040208224248.GA28026@serve.riede.org \
    --to=wrlk@riede.org \
    --cc=linux-kernel@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