summaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci/it821x.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2007-10-16 22:29:58 +0200
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2007-10-16 22:29:58 +0200
commit9ff6f72f432364991d68e99cae72cb141c166e70 (patch)
treee37e5dc6d1b2387f7cbc2909d5cb534d4a395a79 /drivers/ide/pci/it821x.c
parent1b5169405e50b98b2bd1e4f86c7706ea24a59193 (diff)
downloadlinux-9ff6f72f432364991d68e99cae72cb141c166e70.tar.gz
linux-9ff6f72f432364991d68e99cae72cb141c166e70.tar.bz2
linux-9ff6f72f432364991d68e99cae72cb141c166e70.zip
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>
Diffstat (limited to 'drivers/ide/pci/it821x.c')
-rw-r--r--drivers/ide/pci/it821x.c22
1 files changed, 5 insertions, 17 deletions
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)
struct it821x_dev *idev = kzalloc(sizeof(struct it821x_dev), GFP_KERNEL);
u8 conf;
- if(idev == NULL) {
+ if (idev == NULL) {
printk(KERN_ERR "it821x: out of memory, falling back to legacy behaviour.\n");
- goto fallback;
+ return;
}
+
ide_set_hwifdata(hwif, idev);
hwif->atapi_dma = 1;
@@ -589,27 +590,14 @@ static void __devinit init_hwif_it821x(ide_hwif_t *hwif)
hwif->drives[0].autotune = 1;
hwif->drives[1].autotune = 1;
- if (!hwif->dma_base)
- goto fallback;
+ if (hwif->dma_base == 0)
+ return;
hwif->ultra_mask = 0x7f;
hwif->mwdma_mask = 0x07;
if (hwif->cbl != ATA_CBL_PATA40_SHORT)
hwif->cbl = ata66_it821x(hwif);
-
- /*
- * The BIOS often doesn't set up DMA on this controller
- * so we always do it.
- */
-
- hwif->autodma = 1;
- hwif->drives[0].autodma = hwif->autodma;
- hwif->drives[1].autodma = hwif->autodma;
- return;
-fallback:
- hwif->autodma = 0;
- return;
}
static void __devinit it8212_disable_raid(struct pci_dev *dev)