drive->dsc_overlap is supported only by ide-{cd,tape} drivers.
Add missing clearing of ->dsc_overlap to ide_{cd,tape}_release()
and move ->dsc_overlap setup from ide_register_subdriver() to
ide_cdrom_setup() (ide-tape enables it unconditionally).

diff -Nru a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
--- a/drivers/ide/ide-cd.c      2005-02-04 03:31:14 +01:00
+++ b/drivers/ide/ide-cd.c      2005-02-04 03:31:14 +01:00
@@ -3219,6 +3219,9 @@
         */
        blk_queue_hardsect_size(drive->queue, CD_FRAMESIZE);

+       if (drive->autotune == IDE_TUNE_DEFAULT ||
+           drive->autotune == IDE_TUNE_AUTO)
+               drive->dsc_overlap = (drive->next != drive);
 #if 0
        drive->dsc_overlap = (HWIF(drive)->no_dsc) ? 0 : 1;
        if (HWIF(drive)->no_dsc) {
@@ -3282,6 +3285,7 @@
        if (devinfo->handle == drive && unregister_cdrom(devinfo))
                printk(KERN_ERR "%s: %s failed to unregister device from the 
cdrom "
                                "driver.\n", __FUNCTION__, drive->name);
+       drive->dsc_overlap = 0;
        drive->driver_data = NULL;
        blk_queue_prep_rq(drive->queue, NULL);
        g->private_data = NULL;
diff -Nru a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c
--- a/drivers/ide/ide-tape.c    2005-02-04 03:31:14 +01:00
+++ b/drivers/ide/ide-tape.c    2005-02-04 03:31:14 +01:00
@@ -4691,6 +4691,7 @@
        ide_drive_t *drive = tape->drive;
        struct gendisk *g = drive->disk;

+       drive->dsc_overlap = 0;
        drive->driver_data = NULL;
        devfs_remove("%s/mt", drive->devfs_name);
        devfs_remove("%s/mtn", drive->devfs_name);
diff -Nru a/drivers/ide/ide.c b/drivers/ide/ide.c
--- a/drivers/ide/ide.c 2005-02-04 03:31:14 +01:00
+++ b/drivers/ide/ide.c 2005-02-04 03:31:14 +01:00
@@ -2029,11 +2029,6 @@
        list_add_tail(&drive->list, &driver->drives);
        spin_unlock(&drives_lock);
 //     printk(KERN_INFO "%s: attached %s driver.\n", drive->name, 
driver->name);
-       if ((drive->autotune == IDE_TUNE_DEFAULT) ||
-               (drive->autotune == IDE_TUNE_AUTO)) {
-               /* DMA timings and setup moved to ide-probe.c */
-               drive->dsc_overlap = (drive->next != drive && 
driver->supports_dsc_overlap);
-       }
 #ifdef CONFIG_PROC_FS
        if (drive->driver != &idedefault_driver)
                ide_add_proc_entries(drive->proc, driver->proc, drive);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to