* [patch 3/9] drive->dsc_overlap fix
@ 2005-02-04 2:49 Bartlomiej Zolnierkiewicz
0 siblings, 0 replies; only message in thread
From: Bartlomiej Zolnierkiewicz @ 2005-02-04 2:49 UTC (permalink / raw)
To: linux-ide, linux-kernel
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);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-02-04 2:54 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-02-04 2:49 [patch 3/9] drive->dsc_overlap fix Bartlomiej Zolnierkiewicz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).