]> git.hungrycats.org Git - linux/commitdiff
[PATCH] ide-scsi: warn when used for cdroms
authorAndrew Morton <akpm@osdl.org>
Tue, 18 Nov 2003 16:15:43 +0000 (08:15 -0800)
committerLinus Torvalds <torvalds@home.osdl.org>
Tue, 18 Nov 2003 16:15:43 +0000 (08:15 -0800)
From: Jens Axboe <axboe@suse.de>

Print a runtime warning if ide-scsi is used on a cd device.

Modify the ide-scsi menuconfig help to reflect that ide-scsi should
not be used for cd burning.

drivers/ide/Kconfig
drivers/scsi/ide-scsi.c

index 3d9e7417f2c936c69c20baefb7772cf911379994..116b7505adfd9002e034d0ee4bfb0aa51cca2012 100644 (file)
@@ -249,12 +249,17 @@ config BLK_DEV_IDESCSI
        tristate "SCSI emulation support"
        depends on SCSI
        ---help---
+         WARNING: ide-scsi is no longer needed for cd writing applications!
+         The 2.6 kernel supports direct writing to ide-cd, which eliminates
+         the need for ide-scsi + the entire scsi stack just for writing a
+         cd. The new method is more efficient in every way.
+
          This will provide SCSI host adapter emulation for IDE ATAPI devices,
          and will allow you to use a SCSI device driver instead of a native
          ATAPI driver.
 
          This is useful if you have an ATAPI device for which no native
-         driver has been written (for example, an ATAPI PD-CD or CDR drive);
+         driver has been written (for example, an ATAPI PD-CD drive);
          you can then use this emulation together with an appropriate SCSI
          device driver. In order to do this, say Y here and to "SCSI support"
          and "SCSI generic support", below. You must then provide the kernel
@@ -262,8 +267,7 @@ config BLK_DEV_IDESCSI
          documentation of your boot loader (lilo or loadlin) about how to
          pass options to the kernel at boot time) for devices if you want the
          native EIDE sub-drivers to skip over the native support, so that
-         this SCSI emulation can be used instead. This is required for use of
-         CD-RW's.
+         this SCSI emulation can be used instead.
 
          Note that this option does NOT allow you to attach SCSI devices to a
          box that doesn't have a SCSI host adapter installed.
index 51074136719970dc2f477eaff812dfffcabf287e..9626afa032a73b879189f7cfa8c29a877e3eb9ed 100644 (file)
@@ -950,8 +950,14 @@ static int idescsi_attach(ide_drive_t *drive)
 {
        idescsi_scsi_t *idescsi;
        struct Scsi_Host *host;
+       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) ||
            !drive->present ||
            drive->media == ide_disk ||