diff options
Diffstat (limited to 'drivers/ide/pci/aec62xx.c')
-rw-r--r-- | drivers/ide/pci/aec62xx.c | 36 |
1 files changed, 10 insertions, 26 deletions
diff --git a/drivers/ide/pci/aec62xx.c b/drivers/ide/pci/aec62xx.c index d6cb2d5143c8..3a4c2c26a77e 100644 --- a/drivers/ide/pci/aec62xx.c +++ b/drivers/ide/pci/aec62xx.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/drivers/ide/pci/aec62xx.c Version 0.24 May 24, 2007 | 2 | * linux/drivers/ide/pci/aec62xx.c Version 0.25 Aug 1, 2007 |
3 | * | 3 | * |
4 | * Copyright (C) 1999-2002 Andre Hedrick <andre@linux-ide.org> | 4 | * Copyright (C) 1999-2002 Andre Hedrick <andre@linux-ide.org> |
5 | * Copyright (C) 2007 MontaVista Software, Inc. <source@mvista.com> | 5 | * Copyright (C) 2007 MontaVista Software, Inc. <source@mvista.com> |
@@ -141,17 +141,6 @@ static void aec_set_pio_mode(ide_drive_t *drive, const u8 pio) | |||
141 | drive->hwif->set_dma_mode(drive, pio + XFER_PIO_0); | 141 | drive->hwif->set_dma_mode(drive, pio + XFER_PIO_0); |
142 | } | 142 | } |
143 | 143 | ||
144 | static int aec62xx_config_drive_xfer_rate (ide_drive_t *drive) | ||
145 | { | ||
146 | if (ide_tune_dma(drive)) | ||
147 | return 0; | ||
148 | |||
149 | if (ide_use_fast_pio(drive)) | ||
150 | ide_set_max_pio(drive); | ||
151 | |||
152 | return -1; | ||
153 | } | ||
154 | |||
155 | static void aec62xx_dma_lost_irq (ide_drive_t *drive) | 144 | static void aec62xx_dma_lost_irq (ide_drive_t *drive) |
156 | { | 145 | { |
157 | switch (HWIF(drive)->pci_dev->device) { | 146 | switch (HWIF(drive)->pci_dev->device) { |
@@ -207,15 +196,14 @@ static void __devinit init_hwif_aec62xx(ide_hwif_t *hwif) | |||
207 | } else | 196 | } else |
208 | hwif->set_dma_mode = &aec6260_set_mode; | 197 | hwif->set_dma_mode = &aec6260_set_mode; |
209 | 198 | ||
210 | if (!hwif->dma_base) { | 199 | hwif->drives[0].autotune = hwif->drives[1].autotune = 1; |
211 | hwif->drives[0].autotune = hwif->drives[1].autotune = 1; | 200 | |
201 | if (hwif->dma_base == 0) | ||
212 | return; | 202 | return; |
213 | } | ||
214 | 203 | ||
215 | hwif->ultra_mask = hwif->cds->udma_mask; | 204 | hwif->ultra_mask = hwif->cds->udma_mask; |
216 | hwif->mwdma_mask = 0x07; | 205 | hwif->mwdma_mask = 0x07; |
217 | 206 | ||
218 | hwif->ide_dma_check = &aec62xx_config_drive_xfer_rate; | ||
219 | hwif->dma_lost_irq = &aec62xx_dma_lost_irq; | 207 | hwif->dma_lost_irq = &aec62xx_dma_lost_irq; |
220 | 208 | ||
221 | if (dev->device == PCI_DEVICE_ID_ARTOP_ATP850UF) { | 209 | if (dev->device == PCI_DEVICE_ID_ARTOP_ATP850UF) { |
@@ -230,10 +218,6 @@ static void __devinit init_hwif_aec62xx(ide_hwif_t *hwif) | |||
230 | 218 | ||
231 | hwif->cbl = (ata66 & mask) ? ATA_CBL_PATA40 : ATA_CBL_PATA80; | 219 | hwif->cbl = (ata66 & mask) ? ATA_CBL_PATA40 : ATA_CBL_PATA80; |
232 | } | 220 | } |
233 | |||
234 | if (!noautodma) | ||
235 | hwif->autodma = 1; | ||
236 | hwif->drives[0].autodma = hwif->drives[1].autodma = hwif->autodma; | ||
237 | } | 221 | } |
238 | 222 | ||
239 | 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) |
@@ -325,12 +309,12 @@ static int __devinit aec62xx_init_one(struct pci_dev *dev, const struct pci_devi | |||
325 | return d.init_setup(dev, &d); | 309 | return d.init_setup(dev, &d); |
326 | } | 310 | } |
327 | 311 | ||
328 | static struct pci_device_id aec62xx_pci_tbl[] = { | 312 | static const struct pci_device_id aec62xx_pci_tbl[] = { |
329 | { PCI_VENDOR_ID_ARTOP, PCI_DEVICE_ID_ARTOP_ATP850UF, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, | 313 | { PCI_VDEVICE(ARTOP, PCI_DEVICE_ID_ARTOP_ATP850UF), 0 }, |
330 | { PCI_VENDOR_ID_ARTOP, PCI_DEVICE_ID_ARTOP_ATP860, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1 }, | 314 | { PCI_VDEVICE(ARTOP, PCI_DEVICE_ID_ARTOP_ATP860), 1 }, |
331 | { PCI_VENDOR_ID_ARTOP, PCI_DEVICE_ID_ARTOP_ATP860R, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 2 }, | 315 | { PCI_VDEVICE(ARTOP, PCI_DEVICE_ID_ARTOP_ATP860R), 2 }, |
332 | { PCI_VENDOR_ID_ARTOP, PCI_DEVICE_ID_ARTOP_ATP865, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 3 }, | 316 | { PCI_VDEVICE(ARTOP, PCI_DEVICE_ID_ARTOP_ATP865), 3 }, |
333 | { PCI_VENDOR_ID_ARTOP, PCI_DEVICE_ID_ARTOP_ATP865R, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 4 }, | 317 | { PCI_VDEVICE(ARTOP, PCI_DEVICE_ID_ARTOP_ATP865R), 4 }, |
334 | { 0, }, | 318 | { 0, }, |
335 | }; | 319 | }; |
336 | MODULE_DEVICE_TABLE(pci, aec62xx_pci_tbl); | 320 | MODULE_DEVICE_TABLE(pci, aec62xx_pci_tbl); |