diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2007-10-16 16:29:58 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2007-10-16 16:29:58 -0400 |
commit | 9ff6f72f432364991d68e99cae72cb141c166e70 (patch) | |
tree | e37e5dc6d1b2387f7cbc2909d5cb534d4a395a79 | |
parent | 1b5169405e50b98b2bd1e4f86c7706ea24a59193 (diff) |
ide: remove hwif->autodma and drive->autodma
* hpt34x.c: disable DMA masks for HPT345
(hwif->autodma is zero so DMA won't be enabled anyway).
* trm290.c: disable IDE_HFLAG_TRUST_BIOS_FOR_DMA flag
(hwif->autodma is zero so DMA won't be enabled anyway).
* Check noautodma global variable instead of drive->autodma in ide_tune_dma().
This fixes handling of "ide=nodma" kernel parameter for icside, ide-cris,
au1xxx-ide, pmac, it821x, jmicron, sgiioc4 and siimage host drivers.
* Remove hwif->autodma (it was not checked by IDE core code anyway) and
drive->autodma (was set by all host drivers - except HPT345/TRM290 special
cases - unless "ide=nodma" was used).
While at it:
- remove needless printk() from icside.c
- remove stale FIXME/comment from ide-probe.c
- don't force DMA off if PCI bus-mastering had to be enabled in setup-pci.c
(this setting was always later over-ridden by host drivers anyway)
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
41 files changed, 14 insertions, 249 deletions
diff --git a/drivers/ide/arm/icside.c b/drivers/ide/arm/icside.c index 0c6ce2faf8f5..e4875cef78bb 100644 --- a/drivers/ide/arm/icside.c +++ b/drivers/ide/arm/icside.c | |||
@@ -415,8 +415,6 @@ static void icside_dma_lost_irq(ide_drive_t *drive) | |||
415 | 415 | ||
416 | static void icside_dma_init(ide_hwif_t *hwif) | 416 | static void icside_dma_init(ide_hwif_t *hwif) |
417 | { | 417 | { |
418 | printk(" %s: SG-DMA", hwif->name); | ||
419 | |||
420 | hwif->atapi_dma = 1; | 418 | hwif->atapi_dma = 1; |
421 | hwif->mwdma_mask = 7; /* MW0..2 */ | 419 | hwif->mwdma_mask = 7; /* MW0..2 */ |
422 | hwif->swdma_mask = 7; /* SW0..2 */ | 420 | hwif->swdma_mask = 7; /* SW0..2 */ |
@@ -424,7 +422,6 @@ static void icside_dma_init(ide_hwif_t *hwif) | |||
424 | hwif->dmatable_cpu = NULL; | 422 | hwif->dmatable_cpu = NULL; |
425 | hwif->dmatable_dma = 0; | 423 | hwif->dmatable_dma = 0; |
426 | hwif->set_dma_mode = icside_set_dma_mode; | 424 | hwif->set_dma_mode = icside_set_dma_mode; |
427 | hwif->autodma = 1; | ||
428 | 425 | ||
429 | hwif->dma_host_off = icside_dma_host_off; | 426 | hwif->dma_host_off = icside_dma_host_off; |
430 | hwif->dma_off_quietly = icside_dma_off_quietly; | 427 | hwif->dma_off_quietly = icside_dma_off_quietly; |
@@ -437,11 +434,6 @@ static void icside_dma_init(ide_hwif_t *hwif) | |||
437 | hwif->ide_dma_test_irq = icside_dma_test_irq; | 434 | hwif->ide_dma_test_irq = icside_dma_test_irq; |
438 | hwif->dma_timeout = icside_dma_timeout; | 435 | hwif->dma_timeout = icside_dma_timeout; |
439 | hwif->dma_lost_irq = icside_dma_lost_irq; | 436 | hwif->dma_lost_irq = icside_dma_lost_irq; |
440 | |||
441 | hwif->drives[0].autodma = hwif->autodma; | ||
442 | hwif->drives[1].autodma = hwif->autodma; | ||
443 | |||
444 | printk(" capable%s\n", hwif->autodma ? ", auto-enable" : ""); | ||
445 | } | 437 | } |
446 | #else | 438 | #else |
447 | #define icside_dma_init(hwif) (0) | 439 | #define icside_dma_init(hwif) (0) |
diff --git a/drivers/ide/cris/ide-cris.c b/drivers/ide/cris/ide-cris.c index 1ee078d43dbf..06c75f18eb88 100644 --- a/drivers/ide/cris/ide-cris.c +++ b/drivers/ide/cris/ide-cris.c | |||
@@ -810,9 +810,6 @@ init_e100_ide (void) | |||
810 | hwif->drives[1].autotune = 1; | 810 | hwif->drives[1].autotune = 1; |
811 | hwif->ultra_mask = cris_ultra_mask; | 811 | hwif->ultra_mask = cris_ultra_mask; |
812 | hwif->mwdma_mask = 0x07; /* Multiword DMA 0-2 */ | 812 | hwif->mwdma_mask = 0x07; /* Multiword DMA 0-2 */ |
813 | hwif->autodma = 1; | ||
814 | hwif->drives[0].autodma = 1; | ||
815 | hwif->drives[1].autodma = 1; | ||
816 | } | 813 | } |
817 | 814 | ||
818 | /* Reset pulse */ | 815 | /* Reset pulse */ |
diff --git a/drivers/ide/ide-dma.c b/drivers/ide/ide-dma.c index 8ff9de599bf1..45fa1ef29d2c 100644 --- a/drivers/ide/ide-dma.c +++ b/drivers/ide/ide-dma.c | |||
@@ -759,7 +759,7 @@ static int ide_tune_dma(ide_drive_t *drive) | |||
759 | { | 759 | { |
760 | u8 speed; | 760 | u8 speed; |
761 | 761 | ||
762 | if ((drive->id->capability & 1) == 0 || drive->autodma == 0) | 762 | if (noautodma || (drive->id->capability & 1) == 0) |
763 | return 0; | 763 | return 0; |
764 | 764 | ||
765 | /* consult the list of known "bad" drives */ | 765 | /* consult the list of known "bad" drives */ |
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c index c2d69d2d3044..41e7a4229fc4 100644 --- a/drivers/ide/ide-probe.c +++ b/drivers/ide/ide-probe.c | |||
@@ -835,15 +835,6 @@ static void probe_hwif(ide_hwif_t *hwif, void (*fixup)(ide_hwif_t *hwif)) | |||
835 | 835 | ||
836 | drive->nice1 = 1; | 836 | drive->nice1 = 1; |
837 | 837 | ||
838 | /* | ||
839 | * MAJOR HACK BARF :-/ | ||
840 | * | ||
841 | * FIXME: chipsets own this cruft! | ||
842 | */ | ||
843 | /* | ||
844 | * Move here to prevent module loading clashing. | ||
845 | */ | ||
846 | // drive->autodma = hwif->autodma; | ||
847 | if (hwif->ide_dma_on) { | 838 | if (hwif->ide_dma_on) { |
848 | /* | 839 | /* |
849 | * Force DMAing for the beginning of the check. | 840 | * Force DMAing for the beginning of the check. |
diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c index 02336595144a..27c4fe250701 100644 --- a/drivers/ide/ide.c +++ b/drivers/ide/ide.c | |||
@@ -458,7 +458,6 @@ static void ide_hwif_restore(ide_hwif_t *hwif, ide_hwif_t *tmp_hwif) | |||
458 | hwif->select_data = tmp_hwif->select_data; | 458 | hwif->select_data = tmp_hwif->select_data; |
459 | hwif->extra_base = tmp_hwif->extra_base; | 459 | hwif->extra_base = tmp_hwif->extra_base; |
460 | hwif->extra_ports = tmp_hwif->extra_ports; | 460 | hwif->extra_ports = tmp_hwif->extra_ports; |
461 | hwif->autodma = tmp_hwif->autodma; | ||
462 | 461 | ||
463 | hwif->hwif_data = tmp_hwif->hwif_data; | 462 | hwif->hwif_data = tmp_hwif->hwif_data; |
464 | } | 463 | } |
diff --git a/drivers/ide/mips/au1xxx-ide.c b/drivers/ide/mips/au1xxx-ide.c index cd00081fb278..47c035a550e3 100644 --- a/drivers/ide/mips/au1xxx-ide.c +++ b/drivers/ide/mips/au1xxx-ide.c | |||
@@ -700,19 +700,14 @@ static int au_ide_probe(struct device *dev) | |||
700 | hwif->dma_lost_irq = &auide_dma_lost_irq; | 700 | hwif->dma_lost_irq = &auide_dma_lost_irq; |
701 | hwif->ide_dma_on = &auide_dma_on; | 701 | hwif->ide_dma_on = &auide_dma_on; |
702 | 702 | ||
703 | hwif->autodma = 1; | ||
704 | hwif->drives[0].autodma = hwif->autodma; | ||
705 | hwif->drives[1].autodma = hwif->autodma; | ||
706 | hwif->atapi_dma = 1; | 703 | hwif->atapi_dma = 1; |
707 | 704 | ||
708 | #else /* !CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA */ | 705 | #else /* !CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA */ |
709 | hwif->autodma = 0; | ||
710 | hwif->channel = 0; | 706 | hwif->channel = 0; |
711 | hwif->hold = 1; | 707 | hwif->hold = 1; |
712 | hwif->select_data = 0; /* no chipset-specific code */ | 708 | hwif->select_data = 0; /* no chipset-specific code */ |
713 | hwif->config_data = 0; /* no chipset-specific code */ | 709 | hwif->config_data = 0; /* no chipset-specific code */ |
714 | 710 | ||
715 | hwif->drives[0].autodma = 0; | ||
716 | hwif->drives[0].autotune = 1; /* 1=autotune, 2=noautotune, 0=default */ | 711 | hwif->drives[0].autotune = 1; /* 1=autotune, 2=noautotune, 0=default */ |
717 | #endif | 712 | #endif |
718 | hwif->drives[0].no_io_32bit = 1; | 713 | hwif->drives[0].no_io_32bit = 1; |
diff --git a/drivers/ide/pci/aec62xx.c b/drivers/ide/pci/aec62xx.c index df1be18cb474..3a4c2c26a77e 100644 --- a/drivers/ide/pci/aec62xx.c +++ b/drivers/ide/pci/aec62xx.c | |||
@@ -218,10 +218,6 @@ static void __devinit init_hwif_aec62xx(ide_hwif_t *hwif) | |||
218 | 218 | ||
219 | hwif->cbl = (ata66 & mask) ? ATA_CBL_PATA40 : ATA_CBL_PATA80; | 219 | hwif->cbl = (ata66 & mask) ? ATA_CBL_PATA40 : ATA_CBL_PATA80; |
220 | } | 220 | } |
221 | |||
222 | if (!noautodma) | ||
223 | hwif->autodma = 1; | ||
224 | hwif->drives[0].autodma = hwif->drives[1].autodma = hwif->autodma; | ||
225 | } | 221 | } |
226 | 222 | ||
227 | static int __devinit init_setup_aec62xx(struct pci_dev *dev, ide_pci_device_t *d) | 223 | static int __devinit init_setup_aec62xx(struct pci_dev *dev, ide_pci_device_t *d) |
diff --git a/drivers/ide/pci/alim15x3.c b/drivers/ide/pci/alim15x3.c index 0ef7703b036f..31d4e50647d5 100644 --- a/drivers/ide/pci/alim15x3.c +++ b/drivers/ide/pci/alim15x3.c | |||
@@ -660,7 +660,6 @@ static u8 __devinit ata66_ali15x3(ide_hwif_t *hwif) | |||
660 | 660 | ||
661 | static void __devinit init_hwif_common_ali15x3 (ide_hwif_t *hwif) | 661 | static void __devinit init_hwif_common_ali15x3 (ide_hwif_t *hwif) |
662 | { | 662 | { |
663 | hwif->autodma = 0; | ||
664 | hwif->set_pio_mode = &ali_set_pio_mode; | 663 | hwif->set_pio_mode = &ali_set_pio_mode; |
665 | hwif->set_dma_mode = &ali_set_dma_mode; | 664 | hwif->set_dma_mode = &ali_set_dma_mode; |
666 | hwif->udma_filter = &ali_udma_filter; | 665 | hwif->udma_filter = &ali_udma_filter; |
@@ -699,12 +698,6 @@ static void __devinit init_hwif_common_ali15x3 (ide_hwif_t *hwif) | |||
699 | 698 | ||
700 | if (hwif->cbl != ATA_CBL_PATA40_SHORT) | 699 | if (hwif->cbl != ATA_CBL_PATA40_SHORT) |
701 | hwif->cbl = ata66_ali15x3(hwif); | 700 | hwif->cbl = ata66_ali15x3(hwif); |
702 | |||
703 | if (!noautodma) | ||
704 | hwif->autodma = 1; | ||
705 | |||
706 | hwif->drives[0].autodma = hwif->autodma; | ||
707 | hwif->drives[1].autodma = hwif->autodma; | ||
708 | } | 701 | } |
709 | 702 | ||
710 | /** | 703 | /** |
diff --git a/drivers/ide/pci/amd74xx.c b/drivers/ide/pci/amd74xx.c index 669951d8a20d..c7b3a5650259 100644 --- a/drivers/ide/pci/amd74xx.c +++ b/drivers/ide/pci/amd74xx.c | |||
@@ -376,8 +376,6 @@ static void __devinit init_hwif_amd74xx(ide_hwif_t *hwif) | |||
376 | if (hwif->irq == 0) /* 0 is bogus but will do for now */ | 376 | if (hwif->irq == 0) /* 0 is bogus but will do for now */ |
377 | hwif->irq = pci_get_legacy_ide_irq(hwif->pci_dev, hwif->channel); | 377 | hwif->irq = pci_get_legacy_ide_irq(hwif->pci_dev, hwif->channel); |
378 | 378 | ||
379 | hwif->autodma = 0; | ||
380 | |||
381 | hwif->set_pio_mode = &amd_set_pio_mode; | 379 | hwif->set_pio_mode = &amd_set_pio_mode; |
382 | hwif->set_dma_mode = &amd_set_drive; | 380 | hwif->set_dma_mode = &amd_set_drive; |
383 | 381 | ||
@@ -404,11 +402,6 @@ static void __devinit init_hwif_amd74xx(ide_hwif_t *hwif) | |||
404 | else | 402 | else |
405 | hwif->cbl = ATA_CBL_PATA40; | 403 | hwif->cbl = ATA_CBL_PATA40; |
406 | } | 404 | } |
407 | |||
408 | if (!noautodma) | ||
409 | hwif->autodma = 1; | ||
410 | hwif->drives[0].autodma = hwif->autodma; | ||
411 | hwif->drives[1].autodma = hwif->autodma; | ||
412 | } | 405 | } |
413 | 406 | ||
414 | #define DECLARE_AMD_DEV(name_str) \ | 407 | #define DECLARE_AMD_DEV(name_str) \ |
diff --git a/drivers/ide/pci/atiixp.c b/drivers/ide/pci/atiixp.c index 2466e0a04e44..446900da1329 100644 --- a/drivers/ide/pci/atiixp.c +++ b/drivers/ide/pci/atiixp.c | |||
@@ -175,7 +175,6 @@ static void __devinit init_hwif_atiixp(ide_hwif_t *hwif) | |||
175 | if (!hwif->irq) | 175 | if (!hwif->irq) |
176 | hwif->irq = ch ? 15 : 14; | 176 | hwif->irq = ch ? 15 : 14; |
177 | 177 | ||
178 | hwif->autodma = 0; | ||
179 | hwif->set_pio_mode = &atiixp_set_pio_mode; | 178 | hwif->set_pio_mode = &atiixp_set_pio_mode; |
180 | hwif->set_dma_mode = &atiixp_set_dma_mode; | 179 | hwif->set_dma_mode = &atiixp_set_dma_mode; |
181 | hwif->drives[0].autotune = 1; | 180 | hwif->drives[0].autotune = 1; |
@@ -197,12 +196,6 @@ static void __devinit init_hwif_atiixp(ide_hwif_t *hwif) | |||
197 | 196 | ||
198 | hwif->dma_host_on = &atiixp_dma_host_on; | 197 | hwif->dma_host_on = &atiixp_dma_host_on; |
199 | hwif->dma_host_off = &atiixp_dma_host_off; | 198 | hwif->dma_host_off = &atiixp_dma_host_off; |
200 | |||
201 | if (!noautodma) | ||
202 | hwif->autodma = 1; | ||
203 | |||
204 | hwif->drives[1].autodma = hwif->autodma; | ||
205 | hwif->drives[0].autodma = hwif->autodma; | ||
206 | } | 199 | } |
207 | 200 | ||
208 | 201 | ||
diff --git a/drivers/ide/pci/cmd64x.c b/drivers/ide/pci/cmd64x.c index 8c6cdb44f00c..f3d3bde8daba 100644 --- a/drivers/ide/pci/cmd64x.c +++ b/drivers/ide/pci/cmd64x.c | |||
@@ -559,10 +559,6 @@ static void __devinit init_hwif_cmd64x(ide_hwif_t *hwif) | |||
559 | hwif->ide_dma_test_irq = &cmd64x_ide_dma_test_irq; | 559 | hwif->ide_dma_test_irq = &cmd64x_ide_dma_test_irq; |
560 | break; | 560 | break; |
561 | } | 561 | } |
562 | |||
563 | if (!noautodma) | ||
564 | hwif->autodma = 1; | ||
565 | hwif->drives[0].autodma = hwif->drives[1].autodma = hwif->autodma; | ||
566 | } | 562 | } |
567 | 563 | ||
568 | static int __devinit init_setup_cmd64x(struct pci_dev *dev, ide_pci_device_t *d) | 564 | static int __devinit init_setup_cmd64x(struct pci_dev *dev, ide_pci_device_t *d) |
diff --git a/drivers/ide/pci/cs5520.c b/drivers/ide/pci/cs5520.c index 6ea6465f49c7..a8bf4940ca9c 100644 --- a/drivers/ide/pci/cs5520.c +++ b/drivers/ide/pci/cs5520.c | |||
@@ -146,12 +146,6 @@ static void __devinit init_hwif_cs5520(ide_hwif_t *hwif) | |||
146 | hwif->ultra_mask = 0; | 146 | hwif->ultra_mask = 0; |
147 | hwif->swdma_mask = 0; | 147 | hwif->swdma_mask = 0; |
148 | hwif->mwdma_mask = 0; | 148 | hwif->mwdma_mask = 0; |
149 | |||
150 | if (!noautodma) | ||
151 | hwif->autodma = 1; | ||
152 | |||
153 | hwif->drives[0].autodma = hwif->autodma; | ||
154 | hwif->drives[1].autodma = hwif->autodma; | ||
155 | } | 149 | } |
156 | 150 | ||
157 | #define DECLARE_CS_DEV(name_str) \ | 151 | #define DECLARE_CS_DEV(name_str) \ |
diff --git a/drivers/ide/pci/cs5530.c b/drivers/ide/pci/cs5530.c index ef51bbfd2cba..0d23b8aabe9c 100644 --- a/drivers/ide/pci/cs5530.c +++ b/drivers/ide/pci/cs5530.c | |||
@@ -244,7 +244,6 @@ static void __devinit init_hwif_cs5530 (ide_hwif_t *hwif) | |||
244 | { | 244 | { |
245 | unsigned long basereg; | 245 | unsigned long basereg; |
246 | u32 d0_timings; | 246 | u32 d0_timings; |
247 | hwif->autodma = 0; | ||
248 | 247 | ||
249 | if (hwif->mate) | 248 | if (hwif->mate) |
250 | hwif->serialized = hwif->mate->serialized = 1; | 249 | hwif->serialized = hwif->mate->serialized = 1; |
@@ -270,11 +269,6 @@ static void __devinit init_hwif_cs5530 (ide_hwif_t *hwif) | |||
270 | hwif->mwdma_mask = 0x07; | 269 | hwif->mwdma_mask = 0x07; |
271 | 270 | ||
272 | hwif->udma_filter = cs5530_udma_filter; | 271 | hwif->udma_filter = cs5530_udma_filter; |
273 | |||
274 | if (!noautodma) | ||
275 | hwif->autodma = 1; | ||
276 | hwif->drives[0].autodma = hwif->autodma; | ||
277 | hwif->drives[1].autodma = hwif->autodma; | ||
278 | } | 272 | } |
279 | 273 | ||
280 | static ide_pci_device_t cs5530_chipset __devinitdata = { | 274 | static ide_pci_device_t cs5530_chipset __devinitdata = { |
diff --git a/drivers/ide/pci/cs5535.c b/drivers/ide/pci/cs5535.c index 5ddd4c546ead..e4891a16afef 100644 --- a/drivers/ide/pci/cs5535.c +++ b/drivers/ide/pci/cs5535.c | |||
@@ -177,8 +177,6 @@ static u8 __devinit cs5535_cable_detect(struct pci_dev *dev) | |||
177 | */ | 177 | */ |
178 | static void __devinit init_hwif_cs5535(ide_hwif_t *hwif) | 178 | static void __devinit init_hwif_cs5535(ide_hwif_t *hwif) |
179 | { | 179 | { |
180 | hwif->autodma = 0; | ||
181 | |||
182 | hwif->set_pio_mode = &cs5535_set_pio_mode; | 180 | hwif->set_pio_mode = &cs5535_set_pio_mode; |
183 | hwif->set_dma_mode = &cs5535_set_dma_mode; | 181 | hwif->set_dma_mode = &cs5535_set_dma_mode; |
184 | 182 | ||
@@ -192,11 +190,6 @@ static void __devinit init_hwif_cs5535(ide_hwif_t *hwif) | |||
192 | hwif->mwdma_mask = 0x07; | 190 | hwif->mwdma_mask = 0x07; |
193 | 191 | ||
194 | hwif->cbl = cs5535_cable_detect(hwif->pci_dev); | 192 | hwif->cbl = cs5535_cable_detect(hwif->pci_dev); |
195 | |||
196 | if (!noautodma) | ||
197 | hwif->autodma = 1; | ||
198 | |||
199 | hwif->drives[1].autodma = hwif->drives[0].autodma = hwif->autodma; | ||
200 | } | 193 | } |
201 | 194 | ||
202 | static ide_pci_device_t cs5535_chipset __devinitdata = { | 195 | static ide_pci_device_t cs5535_chipset __devinitdata = { |
diff --git a/drivers/ide/pci/cy82c693.c b/drivers/ide/pci/cy82c693.c index 31850836ff7e..c498ecfd7fcb 100644 --- a/drivers/ide/pci/cy82c693.c +++ b/drivers/ide/pci/cy82c693.c | |||
@@ -428,8 +428,6 @@ static unsigned int __devinit init_chipset_cy82c693(struct pci_dev *dev, const c | |||
428 | */ | 428 | */ |
429 | static void __devinit init_hwif_cy82c693(ide_hwif_t *hwif) | 429 | static void __devinit init_hwif_cy82c693(ide_hwif_t *hwif) |
430 | { | 430 | { |
431 | hwif->autodma = 0; | ||
432 | |||
433 | hwif->chipset = ide_cy82c693; | 431 | hwif->chipset = ide_cy82c693; |
434 | hwif->set_pio_mode = &cy82c693_set_pio_mode; | 432 | hwif->set_pio_mode = &cy82c693_set_pio_mode; |
435 | 433 | ||
@@ -444,10 +442,6 @@ static void __devinit init_hwif_cy82c693(ide_hwif_t *hwif) | |||
444 | hwif->swdma_mask = 0x04; | 442 | hwif->swdma_mask = 0x04; |
445 | 443 | ||
446 | hwif->ide_dma_on = &cy82c693_ide_dma_on; | 444 | hwif->ide_dma_on = &cy82c693_ide_dma_on; |
447 | if (!noautodma) | ||
448 | hwif->autodma = 1; | ||
449 | hwif->drives[0].autodma = hwif->autodma; | ||
450 | hwif->drives[1].autodma = hwif->autodma; | ||
451 | } | 445 | } |
452 | 446 | ||
453 | static __devinitdata ide_hwif_t *primary; | 447 | static __devinitdata ide_hwif_t *primary; |
diff --git a/drivers/ide/pci/generic.c b/drivers/ide/pci/generic.c index fef945f86082..cce6311b02df 100644 --- a/drivers/ide/pci/generic.c +++ b/drivers/ide/pci/generic.c | |||
@@ -73,11 +73,6 @@ static void __devinit init_hwif_generic (ide_hwif_t *hwif) | |||
73 | hwif->ultra_mask = 0x7f; | 73 | hwif->ultra_mask = 0x7f; |
74 | hwif->mwdma_mask = 0x07; | 74 | hwif->mwdma_mask = 0x07; |
75 | hwif->swdma_mask = 0x07; | 75 | hwif->swdma_mask = 0x07; |
76 | |||
77 | if (!noautodma) | ||
78 | hwif->autodma = 1; | ||
79 | hwif->drives[0].autodma = hwif->autodma; | ||
80 | hwif->drives[1].autodma = hwif->autodma; | ||
81 | } | 76 | } |
82 | 77 | ||
83 | #if 0 | 78 | #if 0 |
diff --git a/drivers/ide/pci/hpt34x.c b/drivers/ide/pci/hpt34x.c index 88472e5a3ec7..44ac0e2f7a09 100644 --- a/drivers/ide/pci/hpt34x.c +++ b/drivers/ide/pci/hpt34x.c | |||
@@ -127,8 +127,6 @@ static void __devinit init_hwif_hpt34x(ide_hwif_t *hwif) | |||
127 | { | 127 | { |
128 | u16 pcicmd = 0; | 128 | u16 pcicmd = 0; |
129 | 129 | ||
130 | hwif->autodma = 0; | ||
131 | |||
132 | hwif->set_pio_mode = &hpt34x_set_pio_mode; | 130 | hwif->set_pio_mode = &hpt34x_set_pio_mode; |
133 | hwif->set_dma_mode = &hpt34x_set_mode; | 131 | hwif->set_dma_mode = &hpt34x_set_mode; |
134 | 132 | ||
@@ -141,15 +139,13 @@ static void __devinit init_hwif_hpt34x(ide_hwif_t *hwif) | |||
141 | return; | 139 | return; |
142 | 140 | ||
143 | #ifdef CONFIG_HPT34X_AUTODMA | 141 | #ifdef CONFIG_HPT34X_AUTODMA |
142 | if ((pcicmd & PCI_COMMAND_MEMORY) == 0) | ||
143 | return; | ||
144 | |||
144 | hwif->ultra_mask = 0x07; | 145 | hwif->ultra_mask = 0x07; |
145 | hwif->mwdma_mask = 0x07; | 146 | hwif->mwdma_mask = 0x07; |
146 | hwif->swdma_mask = 0x07; | 147 | hwif->swdma_mask = 0x07; |
147 | #endif | 148 | #endif |
148 | |||
149 | if (!noautodma) | ||
150 | hwif->autodma = (pcicmd & PCI_COMMAND_MEMORY) ? 1 : 0; | ||
151 | hwif->drives[0].autodma = hwif->autodma; | ||
152 | hwif->drives[1].autodma = hwif->autodma; | ||
153 | } | 149 | } |
154 | 150 | ||
155 | static ide_pci_device_t hpt34x_chipset __devinitdata = { | 151 | static ide_pci_device_t hpt34x_chipset __devinitdata = { |
diff --git a/drivers/ide/pci/hpt366.c b/drivers/ide/pci/hpt366.c index 6b0daea5abb8..fcb21ddab2cc 100644 --- a/drivers/ide/pci/hpt366.c +++ b/drivers/ide/pci/hpt366.c | |||
@@ -1345,10 +1345,6 @@ static void __devinit init_hwif_hpt366(ide_hwif_t *hwif) | |||
1345 | hwif->dma_timeout = &hpt370_dma_timeout; | 1345 | hwif->dma_timeout = &hpt370_dma_timeout; |
1346 | } else | 1346 | } else |
1347 | hwif->dma_lost_irq = &hpt366_dma_lost_irq; | 1347 | hwif->dma_lost_irq = &hpt366_dma_lost_irq; |
1348 | |||
1349 | if (!noautodma) | ||
1350 | hwif->autodma = 1; | ||
1351 | hwif->drives[0].autodma = hwif->drives[1].autodma = hwif->autodma; | ||
1352 | } | 1348 | } |
1353 | 1349 | ||
1354 | static void __devinit init_dma_hpt366(ide_hwif_t *hwif, unsigned long dmabase) | 1350 | static void __devinit init_dma_hpt366(ide_hwif_t *hwif, unsigned long dmabase) |
diff --git a/drivers/ide/pci/it8213.c b/drivers/ide/pci/it8213.c index 5822d2641959..24a71d03744a 100644 --- a/drivers/ide/pci/it8213.c +++ b/drivers/ide/pci/it8213.c | |||
@@ -170,8 +170,6 @@ static void __devinit init_hwif_it8213(ide_hwif_t *hwif) | |||
170 | hwif->set_dma_mode = &it8213_set_dma_mode; | 170 | hwif->set_dma_mode = &it8213_set_dma_mode; |
171 | hwif->set_pio_mode = &it8213_set_pio_mode; | 171 | hwif->set_pio_mode = &it8213_set_pio_mode; |
172 | 172 | ||
173 | hwif->autodma = 0; | ||
174 | |||
175 | hwif->drives[0].autotune = 1; | 173 | hwif->drives[0].autotune = 1; |
176 | hwif->drives[1].autotune = 1; | 174 | hwif->drives[1].autotune = 1; |
177 | 175 | ||
@@ -187,16 +185,6 @@ static void __devinit init_hwif_it8213(ide_hwif_t *hwif) | |||
187 | 185 | ||
188 | if (hwif->cbl != ATA_CBL_PATA40_SHORT) | 186 | if (hwif->cbl != ATA_CBL_PATA40_SHORT) |
189 | hwif->cbl = (reg42h & 0x02) ? ATA_CBL_PATA40 : ATA_CBL_PATA80; | 187 | hwif->cbl = (reg42h & 0x02) ? ATA_CBL_PATA40 : ATA_CBL_PATA80; |
190 | |||
191 | /* | ||
192 | * The BIOS often doesn't set up DMA on this controller | ||
193 | * so we always do it. | ||
194 | */ | ||
195 | if (!noautodma) | ||
196 | hwif->autodma = 1; | ||
197 | |||
198 | hwif->drives[0].autodma = hwif->autodma; | ||
199 | hwif->drives[1].autodma = hwif->autodma; | ||
200 | } | 188 | } |
201 | 189 | ||
202 | 190 | ||
diff --git a/drivers/ide/pci/it821x.c b/drivers/ide/pci/it821x.c index 752a142ca89b..f3391a8698ac 100644 --- a/drivers/ide/pci/it821x.c +++ b/drivers/ide/pci/it821x.c | |||
@@ -537,10 +537,11 @@ static void __devinit init_hwif_it821x(ide_hwif_t *hwif) | |||
537 | struct it821x_dev *idev = kzalloc(sizeof(struct it821x_dev), GFP_KERNEL); | 537 | struct it821x_dev *idev = kzalloc(sizeof(struct it821x_dev), GFP_KERNEL); |
538 | u8 conf; | 538 | u8 conf; |
539 | 539 | ||
540 | if(idev == NULL) { | 540 | if (idev == NULL) { |
541 | printk(KERN_ERR "it821x: out of memory, falling back to legacy behaviour.\n"); | 541 | printk(KERN_ERR "it821x: out of memory, falling back to legacy behaviour.\n"); |
542 | goto fallback; | 542 | return; |
543 | } | 543 | } |
544 | |||
544 | ide_set_hwifdata(hwif, idev); | 545 | ide_set_hwifdata(hwif, idev); |
545 | 546 | ||
546 | hwif->atapi_dma = 1; | 547 | hwif->atapi_dma = 1; |
@@ -589,27 +590,14 @@ static void __devinit init_hwif_it821x(ide_hwif_t *hwif) | |||
589 | hwif->drives[0].autotune = 1; | 590 | hwif->drives[0].autotune = 1; |
590 | hwif->drives[1].autotune = 1; | 591 | hwif->drives[1].autotune = 1; |
591 | 592 | ||
592 | if (!hwif->dma_base) | 593 | if (hwif->dma_base == 0) |
593 | goto fallback; | 594 | return; |
594 | 595 | ||
595 | hwif->ultra_mask = 0x7f; | 596 | hwif->ultra_mask = 0x7f; |
596 | hwif->mwdma_mask = 0x07; | 597 | hwif->mwdma_mask = 0x07; |
597 | 598 | ||
598 | if (hwif->cbl != ATA_CBL_PATA40_SHORT) | 599 | if (hwif->cbl != ATA_CBL_PATA40_SHORT) |
599 | hwif->cbl = ata66_it821x(hwif); | 600 | hwif->cbl = ata66_it821x(hwif); |
600 | |||
601 | /* | ||
602 | * The BIOS often doesn't set up DMA on this controller | ||
603 | * so we always do it. | ||
604 | */ | ||
605 | |||
606 | hwif->autodma = 1; | ||
607 | hwif->drives[0].autodma = hwif->autodma; | ||
608 | hwif->drives[1].autodma = hwif->autodma; | ||
609 | return; | ||
610 | fallback: | ||
611 | hwif->autodma = 0; | ||
612 | return; | ||
613 | } | 601 | } |
614 | 602 | ||
615 | static void __devinit it8212_disable_raid(struct pci_dev *dev) | 603 | static void __devinit it8212_disable_raid(struct pci_dev *dev) |
diff --git a/drivers/ide/pci/jmicron.c b/drivers/ide/pci/jmicron.c index e4a4f1fb5be7..bb893ffcc987 100644 --- a/drivers/ide/pci/jmicron.c +++ b/drivers/ide/pci/jmicron.c | |||
@@ -114,8 +114,8 @@ static void __devinit init_hwif_jmicron(ide_hwif_t *hwif) | |||
114 | hwif->drives[0].autotune = 1; | 114 | hwif->drives[0].autotune = 1; |
115 | hwif->drives[1].autotune = 1; | 115 | hwif->drives[1].autotune = 1; |
116 | 116 | ||
117 | if (!hwif->dma_base) | 117 | if (hwif->dma_base == 0) |
118 | goto fallback; | 118 | return; |
119 | 119 | ||
120 | hwif->atapi_dma = 1; | 120 | hwif->atapi_dma = 1; |
121 | hwif->ultra_mask = 0x7f; | 121 | hwif->ultra_mask = 0x7f; |
@@ -123,14 +123,6 @@ static void __devinit init_hwif_jmicron(ide_hwif_t *hwif) | |||
123 | 123 | ||
124 | if (hwif->cbl != ATA_CBL_PATA40_SHORT) | 124 | if (hwif->cbl != ATA_CBL_PATA40_SHORT) |
125 | hwif->cbl = ata66_jmicron(hwif); | 125 | hwif->cbl = ata66_jmicron(hwif); |
126 | |||
127 | hwif->autodma = 1; | ||
128 | hwif->drives[0].autodma = hwif->autodma; | ||
129 | hwif->drives[1].autodma = hwif->autodma; | ||
130 | return; | ||
131 | fallback: | ||
132 | hwif->autodma = 0; | ||
133 | return; | ||
134 | } | 126 | } |
135 | 127 | ||
136 | static ide_pci_device_t jmicron_chipset __devinitdata = { | 128 | static ide_pci_device_t jmicron_chipset __devinitdata = { |
diff --git a/drivers/ide/pci/ns87415.c b/drivers/ide/pci/ns87415.c index 726f67cc85d0..a8cd50ab62fb 100644 --- a/drivers/ide/pci/ns87415.c +++ b/drivers/ide/pci/ns87415.c | |||
@@ -197,7 +197,6 @@ static void __devinit init_hwif_ns87415 (ide_hwif_t *hwif) | |||
197 | u8 stat; | 197 | u8 stat; |
198 | #endif | 198 | #endif |
199 | 199 | ||
200 | hwif->autodma = 0; | ||
201 | hwif->selectproc = &ns87415_selectproc; | 200 | hwif->selectproc = &ns87415_selectproc; |
202 | 201 | ||
203 | /* | 202 | /* |
@@ -259,11 +258,6 @@ static void __devinit init_hwif_ns87415 (ide_hwif_t *hwif) | |||
259 | outb(0x60, hwif->dma_status); | 258 | outb(0x60, hwif->dma_status); |
260 | hwif->dma_setup = &ns87415_ide_dma_setup; | 259 | hwif->dma_setup = &ns87415_ide_dma_setup; |
261 | hwif->ide_dma_end = &ns87415_ide_dma_end; | 260 | hwif->ide_dma_end = &ns87415_ide_dma_end; |
262 | |||
263 | if (!noautodma) | ||
264 | hwif->autodma = 1; | ||
265 | hwif->drives[0].autodma = hwif->autodma; | ||
266 | hwif->drives[1].autodma = hwif->autodma; | ||
267 | } | 261 | } |
268 | 262 | ||
269 | static ide_pci_device_t ns87415_chipset __devinitdata = { | 263 | static ide_pci_device_t ns87415_chipset __devinitdata = { |
diff --git a/drivers/ide/pci/opti621.c b/drivers/ide/pci/opti621.c index aa8b6c510d2e..250662ea18ad 100644 --- a/drivers/ide/pci/opti621.c +++ b/drivers/ide/pci/opti621.c | |||
@@ -328,7 +328,6 @@ static void opti621_set_pio_mode(ide_drive_t *drive, const u8 pio) | |||
328 | */ | 328 | */ |
329 | static void __devinit init_hwif_opti621 (ide_hwif_t *hwif) | 329 | static void __devinit init_hwif_opti621 (ide_hwif_t *hwif) |
330 | { | 330 | { |
331 | hwif->autodma = 0; | ||
332 | hwif->drives[0].drive_data = PIO_DONT_KNOW; | 331 | hwif->drives[0].drive_data = PIO_DONT_KNOW; |
333 | hwif->drives[1].drive_data = PIO_DONT_KNOW; | 332 | hwif->drives[1].drive_data = PIO_DONT_KNOW; |
334 | 333 | ||
@@ -340,11 +339,6 @@ static void __devinit init_hwif_opti621 (ide_hwif_t *hwif) | |||
340 | hwif->atapi_dma = 1; | 339 | hwif->atapi_dma = 1; |
341 | hwif->mwdma_mask = 0x07; | 340 | hwif->mwdma_mask = 0x07; |
342 | hwif->swdma_mask = 0x07; | 341 | hwif->swdma_mask = 0x07; |
343 | |||
344 | if (!noautodma) | ||
345 | hwif->autodma = 1; | ||
346 | hwif->drives[0].autodma = hwif->autodma; | ||
347 | hwif->drives[1].autodma = hwif->autodma; | ||
348 | } | 342 | } |
349 | 343 | ||
350 | static ide_pci_device_t opti621_chipsets[] __devinitdata = { | 344 | static ide_pci_device_t opti621_chipsets[] __devinitdata = { |
diff --git a/drivers/ide/pci/pdc202xx_new.c b/drivers/ide/pci/pdc202xx_new.c index d1087cc83f12..8704b6f33312 100644 --- a/drivers/ide/pci/pdc202xx_new.c +++ b/drivers/ide/pci/pdc202xx_new.c | |||
@@ -469,8 +469,6 @@ static unsigned int __devinit init_chipset_pdcnew(struct pci_dev *dev, const cha | |||
469 | 469 | ||
470 | static void __devinit init_hwif_pdc202new(ide_hwif_t *hwif) | 470 | static void __devinit init_hwif_pdc202new(ide_hwif_t *hwif) |
471 | { | 471 | { |
472 | hwif->autodma = 0; | ||
473 | |||
474 | hwif->set_pio_mode = &pdcnew_set_pio_mode; | 472 | hwif->set_pio_mode = &pdcnew_set_pio_mode; |
475 | hwif->set_dma_mode = &pdcnew_set_mode; | 473 | hwif->set_dma_mode = &pdcnew_set_mode; |
476 | 474 | ||
@@ -491,10 +489,6 @@ static void __devinit init_hwif_pdc202new(ide_hwif_t *hwif) | |||
491 | 489 | ||
492 | if (hwif->cbl != ATA_CBL_PATA40_SHORT) | 490 | if (hwif->cbl != ATA_CBL_PATA40_SHORT) |
493 | hwif->cbl = pdcnew_cable_detect(hwif); | 491 | hwif->cbl = pdcnew_cable_detect(hwif); |
494 | |||
495 | if (!noautodma) | ||
496 | hwif->autodma = 1; | ||
497 | hwif->drives[0].autodma = hwif->drives[1].autodma = hwif->autodma; | ||
498 | } | 492 | } |
499 | 493 | ||
500 | static int __devinit init_setup_pdcnew(struct pci_dev *dev, ide_pci_device_t *d) | 494 | static int __devinit init_setup_pdcnew(struct pci_dev *dev, ide_pci_device_t *d) |
diff --git a/drivers/ide/pci/pdc202xx_old.c b/drivers/ide/pci/pdc202xx_old.c index 21b41436ae4a..e1d2337a9f1d 100644 --- a/drivers/ide/pci/pdc202xx_old.c +++ b/drivers/ide/pci/pdc202xx_old.c | |||
@@ -312,8 +312,6 @@ static void __devinit init_hwif_pdc202xx(ide_hwif_t *hwif) | |||
312 | (dev->device == PCI_DEVICE_ID_PROMISE_20265)) | 312 | (dev->device == PCI_DEVICE_ID_PROMISE_20265)) |
313 | hwif->rqsize = 256; | 313 | hwif->rqsize = 256; |
314 | 314 | ||
315 | hwif->autodma = 0; | ||
316 | |||
317 | hwif->set_pio_mode = &pdc202xx_set_pio_mode; | 315 | hwif->set_pio_mode = &pdc202xx_set_pio_mode; |
318 | hwif->set_dma_mode = &pdc202xx_set_mode; | 316 | hwif->set_dma_mode = &pdc202xx_set_mode; |
319 | 317 | ||
@@ -345,10 +343,6 @@ static void __devinit init_hwif_pdc202xx(ide_hwif_t *hwif) | |||
345 | hwif->ide_dma_end = &pdc202xx_old_ide_dma_end; | 343 | hwif->ide_dma_end = &pdc202xx_old_ide_dma_end; |
346 | } | 344 | } |
347 | hwif->ide_dma_test_irq = &pdc202xx_old_ide_dma_test_irq; | 345 | hwif->ide_dma_test_irq = &pdc202xx_old_ide_dma_test_irq; |
348 | |||
349 | if (!noautodma) | ||
350 | hwif->autodma = 1; | ||
351 | hwif->drives[0].autodma = hwif->drives[1].autodma = hwif->autodma; | ||
352 | } | 346 | } |
353 | 347 | ||
354 | static void __devinit init_dma_pdc202xx(ide_hwif_t *hwif, unsigned long dmabase) | 348 | static void __devinit init_dma_pdc202xx(ide_hwif_t *hwif, unsigned long dmabase) |
diff --git a/drivers/ide/pci/piix.c b/drivers/ide/pci/piix.c index c50ae3ab2e64..a8dd0c0add35 100644 --- a/drivers/ide/pci/piix.c +++ b/drivers/ide/pci/piix.c | |||
@@ -384,8 +384,6 @@ static void __devinit init_hwif_piix(ide_hwif_t *hwif) | |||
384 | return; | 384 | return; |
385 | } | 385 | } |
386 | 386 | ||
387 | hwif->autodma = 0; | ||
388 | |||
389 | hwif->set_pio_mode = &piix_set_pio_mode; | 387 | hwif->set_pio_mode = &piix_set_pio_mode; |
390 | hwif->set_dma_mode = &piix_set_dma_mode; | 388 | hwif->set_dma_mode = &piix_set_dma_mode; |
391 | 389 | ||
@@ -412,12 +410,6 @@ static void __devinit init_hwif_piix(ide_hwif_t *hwif) | |||
412 | 410 | ||
413 | if (no_piix_dma) | 411 | if (no_piix_dma) |
414 | hwif->ultra_mask = hwif->mwdma_mask = hwif->swdma_mask = 0; | 412 | hwif->ultra_mask = hwif->mwdma_mask = hwif->swdma_mask = 0; |
415 | |||
416 | if (!noautodma) | ||
417 | hwif->autodma = 1; | ||
418 | |||
419 | hwif->drives[1].autodma = hwif->autodma; | ||
420 | hwif->drives[0].autodma = hwif->autodma; | ||
421 | } | 413 | } |
422 | 414 | ||
423 | #define DECLARE_PIIX_DEV(name_str, udma) \ | 415 | #define DECLARE_PIIX_DEV(name_str, udma) \ |
diff --git a/drivers/ide/pci/sc1200.c b/drivers/ide/pci/sc1200.c index 29945b99161e..54c5c98a2e26 100644 --- a/drivers/ide/pci/sc1200.c +++ b/drivers/ide/pci/sc1200.c | |||
@@ -364,7 +364,6 @@ static void __devinit init_hwif_sc1200 (ide_hwif_t *hwif) | |||
364 | { | 364 | { |
365 | if (hwif->mate) | 365 | if (hwif->mate) |
366 | hwif->serialized = hwif->mate->serialized = 1; | 366 | hwif->serialized = hwif->mate->serialized = 1; |
367 | hwif->autodma = 0; | ||
368 | 367 | ||
369 | hwif->set_pio_mode = &sc1200_set_pio_mode; | 368 | hwif->set_pio_mode = &sc1200_set_pio_mode; |
370 | hwif->set_dma_mode = &sc1200_set_dma_mode; | 369 | hwif->set_dma_mode = &sc1200_set_dma_mode; |
@@ -378,15 +377,9 @@ static void __devinit init_hwif_sc1200 (ide_hwif_t *hwif) | |||
378 | hwif->udma_filter = sc1200_udma_filter; | 377 | hwif->udma_filter = sc1200_udma_filter; |
379 | hwif->ide_dma_end = &sc1200_ide_dma_end; | 378 | hwif->ide_dma_end = &sc1200_ide_dma_end; |
380 | 379 | ||
381 | if (!noautodma) | ||
382 | hwif->autodma = 1; | ||
383 | |||
384 | hwif->atapi_dma = 1; | 380 | hwif->atapi_dma = 1; |
385 | hwif->ultra_mask = 0x07; | 381 | hwif->ultra_mask = 0x07; |
386 | hwif->mwdma_mask = 0x07; | 382 | hwif->mwdma_mask = 0x07; |
387 | |||
388 | hwif->drives[0].autodma = hwif->autodma; | ||
389 | hwif->drives[1].autodma = hwif->autodma; | ||
390 | } | 383 | } |
391 | 384 | ||
392 | static ide_pci_device_t sc1200_chipset __devinitdata = { | 385 | static ide_pci_device_t sc1200_chipset __devinitdata = { |
diff --git a/drivers/ide/pci/scc_pata.c b/drivers/ide/pci/scc_pata.c index 0a66991063eb..bd4c1d3070e4 100644 --- a/drivers/ide/pci/scc_pata.c +++ b/drivers/ide/pci/scc_pata.c | |||
@@ -697,12 +697,6 @@ static void __devinit init_hwif_scc(ide_hwif_t *hwif) | |||
697 | 697 | ||
698 | /* we support 80c cable only. */ | 698 | /* we support 80c cable only. */ |
699 | hwif->cbl = ATA_CBL_PATA80; | 699 | hwif->cbl = ATA_CBL_PATA80; |
700 | |||
701 | hwif->autodma = 0; | ||
702 | if (!noautodma) | ||
703 | hwif->autodma = 1; | ||
704 | hwif->drives[0].autodma = hwif->autodma; | ||
705 | hwif->drives[1].autodma = hwif->autodma; | ||
706 | } | 700 | } |
707 | 701 | ||
708 | #define DECLARE_SCC_DEV(name_str) \ | 702 | #define DECLARE_SCC_DEV(name_str) \ |
diff --git a/drivers/ide/pci/serverworks.c b/drivers/ide/pci/serverworks.c index e4208e3d9901..d3ffc52e22af 100644 --- a/drivers/ide/pci/serverworks.c +++ b/drivers/ide/pci/serverworks.c | |||
@@ -374,8 +374,6 @@ static void __devinit init_hwif_svwks (ide_hwif_t *hwif) | |||
374 | 374 | ||
375 | hwif->mwdma_mask = 0x07; | 375 | hwif->mwdma_mask = 0x07; |
376 | 376 | ||
377 | hwif->autodma = 0; | ||
378 | |||
379 | hwif->drives[0].autotune = 1; | 377 | hwif->drives[0].autotune = 1; |
380 | hwif->drives[1].autotune = 1; | 378 | hwif->drives[1].autotune = 1; |
381 | 379 | ||
@@ -386,10 +384,6 @@ static void __devinit init_hwif_svwks (ide_hwif_t *hwif) | |||
386 | if (hwif->cbl != ATA_CBL_PATA40_SHORT) | 384 | if (hwif->cbl != ATA_CBL_PATA40_SHORT) |
387 | hwif->cbl = ata66_svwks(hwif); | 385 | hwif->cbl = ata66_svwks(hwif); |
388 | } | 386 | } |
389 | if (!noautodma) | ||
390 | hwif->autodma = 1; | ||
391 | |||
392 | hwif->drives[0].autodma = hwif->drives[1].autodma = 1; | ||
393 | } | 387 | } |
394 | 388 | ||
395 | static int __devinit init_setup_svwks (struct pci_dev *dev, ide_pci_device_t *d) | 389 | static int __devinit init_setup_svwks (struct pci_dev *dev, ide_pci_device_t *d) |
diff --git a/drivers/ide/pci/sgiioc4.c b/drivers/ide/pci/sgiioc4.c index 210f32d1e93c..9a9474f534e5 100644 --- a/drivers/ide/pci/sgiioc4.c +++ b/drivers/ide/pci/sgiioc4.c | |||
@@ -674,12 +674,7 @@ sgiioc4_ide_setup_pci_device(struct pci_dev *dev) | |||
674 | /* Initializing chipset IRQ Registers */ | 674 | /* Initializing chipset IRQ Registers */ |
675 | writel(0x03, (void __iomem *)(irqport + IOC4_INTR_SET * 4)); | 675 | writel(0x03, (void __iomem *)(irqport + IOC4_INTR_SET * 4)); |
676 | 676 | ||
677 | hwif->autodma = 0; | 677 | if (dma_base == 0 || ide_dma_sgiioc4(hwif, dma_base)) |
678 | |||
679 | if (dma_base && ide_dma_sgiioc4(hwif, dma_base) == 0) { | ||
680 | hwif->autodma = 1; | ||
681 | hwif->drives[1].autodma = hwif->drives[0].autodma = 1; | ||
682 | } else | ||
683 | printk(KERN_INFO "%s: %s Bus-Master DMA disabled\n", | 678 | printk(KERN_INFO "%s: %s Bus-Master DMA disabled\n", |
684 | hwif->name, DRV_NAME); | 679 | hwif->name, DRV_NAME); |
685 | 680 | ||
diff --git a/drivers/ide/pci/siimage.c b/drivers/ide/pci/siimage.c index cc1706798a14..85d0afd00e66 100644 --- a/drivers/ide/pci/siimage.c +++ b/drivers/ide/pci/siimage.c | |||
@@ -873,8 +873,6 @@ static u8 __devinit ata66_siimage(ide_hwif_t *hwif) | |||
873 | 873 | ||
874 | static void __devinit init_hwif_siimage(ide_hwif_t *hwif) | 874 | static void __devinit init_hwif_siimage(ide_hwif_t *hwif) |
875 | { | 875 | { |
876 | hwif->autodma = 0; | ||
877 | |||
878 | hwif->resetproc = &siimage_reset; | 876 | hwif->resetproc = &siimage_reset; |
879 | hwif->set_pio_mode = &sil_set_pio_mode; | 877 | hwif->set_pio_mode = &sil_set_pio_mode; |
880 | hwif->set_dma_mode = &sil_set_dma_mode; | 878 | hwif->set_dma_mode = &sil_set_dma_mode; |
@@ -912,15 +910,6 @@ static void __devinit init_hwif_siimage(ide_hwif_t *hwif) | |||
912 | } else { | 910 | } else { |
913 | hwif->ide_dma_test_irq = & siimage_io_ide_dma_test_irq; | 911 | hwif->ide_dma_test_irq = & siimage_io_ide_dma_test_irq; |
914 | } | 912 | } |
915 | |||
916 | /* | ||
917 | * The BIOS often doesn't set up DMA on this controller | ||
918 | * so we always do it. | ||
919 | */ | ||
920 | |||
921 | hwif->autodma = 1; | ||
922 | hwif->drives[0].autodma = hwif->autodma; | ||
923 | hwif->drives[1].autodma = hwif->autodma; | ||
924 | } | 913 | } |
925 | 914 | ||
926 | #define DECLARE_SII_DEV(name_str) \ | 915 | #define DECLARE_SII_DEV(name_str) \ |
diff --git a/drivers/ide/pci/sis5513.c b/drivers/ide/pci/sis5513.c index 729ee86e75cc..d758865f06be 100644 --- a/drivers/ide/pci/sis5513.c +++ b/drivers/ide/pci/sis5513.c | |||
@@ -811,8 +811,6 @@ static void __devinit init_hwif_sis5513 (ide_hwif_t *hwif) | |||
811 | { | 811 | { |
812 | u8 udma_rates[] = { 0x00, 0x00, 0x07, 0x1f, 0x3f, 0x3f, 0x7f, 0x7f }; | 812 | u8 udma_rates[] = { 0x00, 0x00, 0x07, 0x1f, 0x3f, 0x3f, 0x7f, 0x7f }; |
813 | 813 | ||
814 | hwif->autodma = 0; | ||
815 | |||
816 | if (!hwif->irq) | 814 | if (!hwif->irq) |
817 | hwif->irq = hwif->channel ? 15 : 14; | 815 | hwif->irq = hwif->channel ? 15 : 14; |
818 | 816 | ||
@@ -835,12 +833,6 @@ static void __devinit init_hwif_sis5513 (ide_hwif_t *hwif) | |||
835 | 833 | ||
836 | if (hwif->cbl != ATA_CBL_PATA40_SHORT) | 834 | if (hwif->cbl != ATA_CBL_PATA40_SHORT) |
837 | hwif->cbl = ata66_sis5513(hwif); | 835 | hwif->cbl = ata66_sis5513(hwif); |
838 | |||
839 | if (!noautodma) | ||
840 | hwif->autodma = 1; | ||
841 | |||
842 | hwif->drives[0].autodma = hwif->autodma; | ||
843 | hwif->drives[1].autodma = hwif->autodma; | ||
844 | } | 836 | } |
845 | 837 | ||
846 | static ide_pci_device_t sis5513_chipset __devinitdata = { | 838 | static ide_pci_device_t sis5513_chipset __devinitdata = { |
diff --git a/drivers/ide/pci/sl82c105.c b/drivers/ide/pci/sl82c105.c index 92726292af32..771efb8884c8 100644 --- a/drivers/ide/pci/sl82c105.c +++ b/drivers/ide/pci/sl82c105.c | |||
@@ -397,10 +397,6 @@ static void __devinit init_hwif_sl82c105(ide_hwif_t *hwif) | |||
397 | hwif->dma_start = &sl82c105_dma_start; | 397 | hwif->dma_start = &sl82c105_dma_start; |
398 | hwif->dma_timeout = &sl82c105_dma_timeout; | 398 | hwif->dma_timeout = &sl82c105_dma_timeout; |
399 | 399 | ||
400 | if (!noautodma) | ||
401 | hwif->autodma = 1; | ||
402 | hwif->drives[0].autodma = hwif->drives[1].autodma = hwif->autodma; | ||
403 | |||
404 | if (hwif->mate) | 400 | if (hwif->mate) |
405 | hwif->serialized = hwif->mate->serialized = 1; | 401 | hwif->serialized = hwif->mate->serialized = 1; |
406 | } | 402 | } |
diff --git a/drivers/ide/pci/slc90e66.c b/drivers/ide/pci/slc90e66.c index 3e6ed73feb6c..fa8df6d43832 100644 --- a/drivers/ide/pci/slc90e66.c +++ b/drivers/ide/pci/slc90e66.c | |||
@@ -133,8 +133,6 @@ static void __devinit init_hwif_slc90e66 (ide_hwif_t *hwif) | |||
133 | u8 reg47 = 0; | 133 | u8 reg47 = 0; |
134 | u8 mask = hwif->channel ? 0x01 : 0x02; /* bit0:Primary */ | 134 | u8 mask = hwif->channel ? 0x01 : 0x02; /* bit0:Primary */ |
135 | 135 | ||
136 | hwif->autodma = 0; | ||
137 | |||
138 | if (!hwif->irq) | 136 | if (!hwif->irq) |
139 | hwif->irq = hwif->channel ? 15 : 14; | 137 | hwif->irq = hwif->channel ? 15 : 14; |
140 | 138 | ||
@@ -157,11 +155,6 @@ static void __devinit init_hwif_slc90e66 (ide_hwif_t *hwif) | |||
157 | if (hwif->cbl != ATA_CBL_PATA40_SHORT) | 155 | if (hwif->cbl != ATA_CBL_PATA40_SHORT) |
158 | /* bit[0(1)]: 0:80, 1:40 */ | 156 | /* bit[0(1)]: 0:80, 1:40 */ |
159 | hwif->cbl = (reg47 & mask) ? ATA_CBL_PATA40 : ATA_CBL_PATA80; | 157 | hwif->cbl = (reg47 & mask) ? ATA_CBL_PATA40 : ATA_CBL_PATA80; |
160 | |||
161 | if (!noautodma) | ||
162 | hwif->autodma = 1; | ||
163 | hwif->drives[0].autodma = hwif->autodma; | ||
164 | hwif->drives[1].autodma = hwif->autodma; | ||
165 | } | 158 | } |
166 | 159 | ||
167 | static ide_pci_device_t slc90e66_chipset __devinitdata = { | 160 | static ide_pci_device_t slc90e66_chipset __devinitdata = { |
diff --git a/drivers/ide/pci/tc86c001.c b/drivers/ide/pci/tc86c001.c index 01360ee813e1..de62db576adc 100644 --- a/drivers/ide/pci/tc86c001.c +++ b/drivers/ide/pci/tc86c001.c | |||
@@ -212,10 +212,6 @@ static void __devinit init_hwif_tc86c001(ide_hwif_t *hwif) | |||
212 | scr1 = hwif->INW(sc_base + 0x00); | 212 | scr1 = hwif->INW(sc_base + 0x00); |
213 | hwif->cbl = (scr1 & 0x2000) ? ATA_CBL_PATA40 : ATA_CBL_PATA80; | 213 | hwif->cbl = (scr1 & 0x2000) ? ATA_CBL_PATA40 : ATA_CBL_PATA80; |
214 | } | 214 | } |
215 | |||
216 | if (!noautodma) | ||
217 | hwif->autodma = 1; | ||
218 | hwif->drives[0].autodma = hwif->drives[1].autodma = hwif->autodma; | ||
219 | } | 215 | } |
220 | 216 | ||
221 | static unsigned int __devinit init_chipset_tc86c001(struct pci_dev *dev, | 217 | static unsigned int __devinit init_chipset_tc86c001(struct pci_dev *dev, |
diff --git a/drivers/ide/pci/triflex.c b/drivers/ide/pci/triflex.c index 9bedeae30c4a..4075c907f05c 100644 --- a/drivers/ide/pci/triflex.c +++ b/drivers/ide/pci/triflex.c | |||
@@ -107,11 +107,6 @@ static void __devinit init_hwif_triflex(ide_hwif_t *hwif) | |||
107 | hwif->atapi_dma = 1; | 107 | hwif->atapi_dma = 1; |
108 | hwif->mwdma_mask = 0x07; | 108 | hwif->mwdma_mask = 0x07; |
109 | hwif->swdma_mask = 0x07; | 109 | hwif->swdma_mask = 0x07; |
110 | |||
111 | if (!noautodma) | ||
112 | hwif->autodma = 1; | ||
113 | hwif->drives[0].autodma = hwif->autodma; | ||
114 | hwif->drives[1].autodma = hwif->autodma; | ||
115 | } | 110 | } |
116 | 111 | ||
117 | static ide_pci_device_t triflex_device __devinitdata = { | 112 | static ide_pci_device_t triflex_device __devinitdata = { |
diff --git a/drivers/ide/pci/trm290.c b/drivers/ide/pci/trm290.c index 88174488c886..e3d943ada7b0 100644 --- a/drivers/ide/pci/trm290.c +++ b/drivers/ide/pci/trm290.c | |||
@@ -292,9 +292,6 @@ static void __devinit init_hwif_trm290(ide_hwif_t *hwif) | |||
292 | hwif->ide_dma_test_irq = &trm290_ide_dma_test_irq; | 292 | hwif->ide_dma_test_irq = &trm290_ide_dma_test_irq; |
293 | 293 | ||
294 | hwif->selectproc = &trm290_selectproc; | 294 | hwif->selectproc = &trm290_selectproc; |
295 | hwif->autodma = 0; /* play it safe for now */ | ||
296 | hwif->drives[0].autodma = hwif->autodma; | ||
297 | hwif->drives[1].autodma = hwif->autodma; | ||
298 | #if 1 | 295 | #if 1 |
299 | { | 296 | { |
300 | /* | 297 | /* |
@@ -329,7 +326,9 @@ static ide_pci_device_t trm290_chipset __devinitdata = { | |||
329 | .init_hwif = init_hwif_trm290, | 326 | .init_hwif = init_hwif_trm290, |
330 | .autodma = NOAUTODMA, | 327 | .autodma = NOAUTODMA, |
331 | .bootable = ON_BOARD, | 328 | .bootable = ON_BOARD, |
329 | #if 0 /* play it safe for now */ | ||
332 | .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA, | 330 | .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA, |
331 | #endif | ||
333 | }; | 332 | }; |
334 | 333 | ||
335 | static int __devinit trm290_init_one(struct pci_dev *dev, const struct pci_device_id *id) | 334 | static int __devinit trm290_init_one(struct pci_dev *dev, const struct pci_device_id *id) |
diff --git a/drivers/ide/pci/via82cxxx.c b/drivers/ide/pci/via82cxxx.c index 5f13f3a23f15..bf9957fe21a8 100644 --- a/drivers/ide/pci/via82cxxx.c +++ b/drivers/ide/pci/via82cxxx.c | |||
@@ -425,8 +425,6 @@ static void __devinit init_hwif_via82cxxx(ide_hwif_t *hwif) | |||
425 | struct via82cxxx_dev *vdev = pci_get_drvdata(hwif->pci_dev); | 425 | struct via82cxxx_dev *vdev = pci_get_drvdata(hwif->pci_dev); |
426 | int i; | 426 | int i; |
427 | 427 | ||
428 | hwif->autodma = 0; | ||
429 | |||
430 | hwif->set_pio_mode = &via_set_pio_mode; | 428 | hwif->set_pio_mode = &via_set_pio_mode; |
431 | hwif->set_dma_mode = &via_set_drive; | 429 | hwif->set_dma_mode = &via_set_drive; |
432 | 430 | ||
@@ -454,11 +452,6 @@ static void __devinit init_hwif_via82cxxx(ide_hwif_t *hwif) | |||
454 | 452 | ||
455 | if (hwif->cbl != ATA_CBL_PATA40_SHORT) | 453 | if (hwif->cbl != ATA_CBL_PATA40_SHORT) |
456 | hwif->cbl = via82cxxx_cable_detect(hwif); | 454 | hwif->cbl = via82cxxx_cable_detect(hwif); |
457 | |||
458 | if (!noautodma) | ||
459 | hwif->autodma = 1; | ||
460 | hwif->drives[0].autodma = hwif->autodma; | ||
461 | hwif->drives[1].autodma = hwif->autodma; | ||
462 | } | 455 | } |
463 | 456 | ||
464 | static ide_pci_device_t via82cxxx_chipsets[] __devinitdata = { | 457 | static ide_pci_device_t via82cxxx_chipsets[] __devinitdata = { |
diff --git a/drivers/ide/ppc/pmac.c b/drivers/ide/ppc/pmac.c index 182f9a6a8a27..1d25a3433008 100644 --- a/drivers/ide/ppc/pmac.c +++ b/drivers/ide/ppc/pmac.c | |||
@@ -1804,9 +1804,6 @@ pmac_ide_setup_dma(pmac_ide_hwif_t *pmif, ide_hwif_t *hwif) | |||
1804 | hwif->swdma_mask = 0x00; | 1804 | hwif->swdma_mask = 0x00; |
1805 | break; | 1805 | break; |
1806 | } | 1806 | } |
1807 | |||
1808 | hwif->autodma = 1; | ||
1809 | hwif->drives[1].autodma = hwif->drives[0].autodma = hwif->autodma; | ||
1810 | } | 1807 | } |
1811 | 1808 | ||
1812 | #endif /* CONFIG_BLK_DEV_IDEDMA_PMAC */ | 1809 | #endif /* CONFIG_BLK_DEV_IDEDMA_PMAC */ |
diff --git a/drivers/ide/setup-pci.c b/drivers/ide/setup-pci.c index f620da42e157..3d101f73f910 100644 --- a/drivers/ide/setup-pci.c +++ b/drivers/ide/setup-pci.c | |||
@@ -438,8 +438,6 @@ static void ide_hwif_setup_dma(struct pci_dev *dev, ide_pci_device_t *d, ide_hwi | |||
438 | * Set up BM-DMA capability | 438 | * Set up BM-DMA capability |
439 | * (PnP BIOS should have done this) | 439 | * (PnP BIOS should have done this) |
440 | */ | 440 | */ |
441 | /* default DMA off if we had to configure it here */ | ||
442 | hwif->autodma = 0; | ||
443 | pci_set_master(dev); | 441 | pci_set_master(dev); |
444 | if (pci_read_config_word(dev, PCI_COMMAND, &pcicmd) || !(pcicmd & PCI_COMMAND_MASTER)) { | 442 | if (pci_read_config_word(dev, PCI_COMMAND, &pcicmd) || !(pcicmd & PCI_COMMAND_MASTER)) { |
445 | printk(KERN_ERR "%s: %s error updating PCICMD\n", | 443 | printk(KERN_ERR "%s: %s error updating PCICMD\n", |
diff --git a/include/linux/ide.h b/include/linux/ide.h index c144c7f2605a..79652c5c0ea5 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -576,7 +576,6 @@ typedef struct ide_drive_s { | |||
576 | select_t select; /* basic drive/head select reg value */ | 576 | select_t select; /* basic drive/head select reg value */ |
577 | 577 | ||
578 | u8 keep_settings; /* restore settings after drive reset */ | 578 | u8 keep_settings; /* restore settings after drive reset */ |
579 | u8 autodma; /* device can safely use dma on host */ | ||
580 | u8 using_dma; /* disk is using dma for read/write */ | 579 | u8 using_dma; /* disk is using dma for read/write */ |
581 | u8 retry_pio; /* retrying dma capable host in pio */ | 580 | u8 retry_pio; /* retrying dma capable host in pio */ |
582 | u8 state; /* retry state */ | 581 | u8 state; /* retry state */ |
@@ -797,7 +796,6 @@ typedef struct hwif_s { | |||
797 | unsigned serialized : 1; /* serialized all channel operation */ | 796 | unsigned serialized : 1; /* serialized all channel operation */ |
798 | unsigned sharing_irq: 1; /* 1 = sharing irq with another hwif */ | 797 | unsigned sharing_irq: 1; /* 1 = sharing irq with another hwif */ |
799 | unsigned reset : 1; /* reset after probe */ | 798 | unsigned reset : 1; /* reset after probe */ |
800 | unsigned autodma : 1; /* auto-attempt using DMA at boot */ | ||
801 | unsigned no_lba48 : 1; /* 1 = cannot do LBA48 */ | 799 | unsigned no_lba48 : 1; /* 1 = cannot do LBA48 */ |
802 | unsigned no_lba48_dma : 1; /* 1 = cannot do LBA48 DMA */ | 800 | unsigned no_lba48_dma : 1; /* 1 = cannot do LBA48 DMA */ |
803 | unsigned auto_poll : 1; /* supports nop auto-poll */ | 801 | unsigned auto_poll : 1; /* supports nop auto-poll */ |