aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@trik.(none)>2005-04-02 19:28:52 +0200
committerBartlomiej Zolnierkiewicz <bzolnier@trik.(none)>2005-04-02 19:28:52 +0200
commit49f0c7c7ba5f3cd7157a81d393253391f41736d5 (patch)
tree5298694535ed6d688d8ed7a4eae427894678f9f0
parent2b55b78c26ba106c5caabd6a2529b8af749e4151 (diff)
downloadhistory-49f0c7c7ba5f3cd7157a81d393253391f41736d5.tar.gz
[ide] drive->nice1 fix
It is drive's property independent of the driver being used so move drive->nice1 setup from ide_register_subdriver() to probe_hwif() in ide-probe.c. As a result changing a driver which controls the drive no longer affects this flag. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
-rw-r--r--drivers/ide/ide-probe.c11
-rw-r--r--drivers/ide/ide.c1
2 files changed, 8 insertions, 4 deletions
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c
index cb158558d20125..2b8c8f86edbd00 100644
--- a/drivers/ide/ide-probe.c
+++ b/drivers/ide/ide-probe.c
@@ -862,6 +862,13 @@ static void probe_hwif(ide_hwif_t *hwif)
drive->autotune == IDE_TUNE_AUTO)
/* auto-tune PIO mode */
hwif->tuneproc(drive, 255);
+
+ if (drive->autotune != IDE_TUNE_DEFAULT &&
+ drive->autotune != IDE_TUNE_AUTO)
+ continue;
+
+ drive->nice1 = 1;
+
/*
* MAJOR HACK BARF :-/
*
@@ -871,9 +878,7 @@ static void probe_hwif(ide_hwif_t *hwif)
* Move here to prevent module loading clashing.
*/
// drive->autodma = hwif->autodma;
- if ((hwif->ide_dma_check) &&
- ((drive->autotune == IDE_TUNE_DEFAULT) ||
- (drive->autotune == IDE_TUNE_AUTO))) {
+ if (hwif->ide_dma_check) {
/*
* Force DMAing for the beginning of the check.
* Some chipsets appear to do interesting
diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c
index 20da2d61b200f9..f1f1091894cc91 100644
--- a/drivers/ide/ide.c
+++ b/drivers/ide/ide.c
@@ -2038,7 +2038,6 @@ int ide_register_subdriver(ide_drive_t *drive, ide_driver_t *driver)
(drive->autotune == IDE_TUNE_AUTO)) {
/* DMA timings and setup moved to ide-probe.c */
drive->dsc_overlap = (drive->next != drive && driver->supports_dsc_overlap);
- drive->nice1 = 1;
}
#ifdef CONFIG_PROC_FS
if (drive->driver != &idedefault_driver)