public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Selective attach for ide-scsi
@ 2004-02-08 22:42 Willem Riede
  2004-02-09  8:24 ` Mikael Pettersson
  0 siblings, 1 reply; 7+ messages in thread
From: Willem Riede @ 2004-02-08 22:42 UTC (permalink / raw)
  To: linux-kernel

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;

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2004-02-14 23:03 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-08 22:42 [PATCH] Selective attach for ide-scsi Willem Riede
2004-02-09  8:24 ` 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox