diff options
Diffstat (limited to 'drivers/ide/pci')
-rw-r--r-- | drivers/ide/pci/cs5530.c | 8 | ||||
-rw-r--r-- | drivers/ide/pci/hpt34x.c | 6 | ||||
-rw-r--r-- | drivers/ide/pci/ns87415.c | 9 | ||||
-rw-r--r-- | drivers/ide/pci/pdc202xx_new.c | 10 | ||||
-rw-r--r-- | drivers/ide/pci/pdc202xx_old.c | 9 | ||||
-rw-r--r-- | drivers/ide/pci/triflex.c | 3 |
6 files changed, 26 insertions, 19 deletions
diff --git a/drivers/ide/pci/cs5530.c b/drivers/ide/pci/cs5530.c index acaf71fd4c09..e5949b1d3fb0 100644 --- a/drivers/ide/pci/cs5530.c +++ b/drivers/ide/pci/cs5530.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/drivers/ide/pci/cs5530.c Version 0.73 Mar 10 2007 | 2 | * linux/drivers/ide/pci/cs5530.c Version 0.74 Jul 28 2007 |
3 | * | 3 | * |
4 | * Copyright (C) 2000 Andre Hedrick <andre@linux-ide.org> | 4 | * Copyright (C) 2000 Andre Hedrick <andre@linux-ide.org> |
5 | * Copyright (C) 2000 Mark Lord <mlord@pobox.com> | 5 | * Copyright (C) 2000 Mark Lord <mlord@pobox.com> |
@@ -207,6 +207,9 @@ static unsigned int __devinit init_chipset_cs5530 (struct pci_dev *dev, const ch | |||
207 | struct pci_dev *master_0 = NULL, *cs5530_0 = NULL; | 207 | struct pci_dev *master_0 = NULL, *cs5530_0 = NULL; |
208 | unsigned long flags; | 208 | unsigned long flags; |
209 | 209 | ||
210 | if (pci_resource_start(dev, 4) == 0) | ||
211 | return -EFAULT; | ||
212 | |||
210 | dev = NULL; | 213 | dev = NULL; |
211 | while ((dev = pci_get_device(PCI_VENDOR_ID_CYRIX, PCI_ANY_ID, dev)) != NULL) { | 214 | while ((dev = pci_get_device(PCI_VENDOR_ID_CYRIX, PCI_ANY_ID, dev)) != NULL) { |
212 | switch (dev->device) { | 215 | switch (dev->device) { |
@@ -325,6 +328,9 @@ static void __devinit init_hwif_cs5530 (ide_hwif_t *hwif) | |||
325 | /* needs autotuning later */ | 328 | /* needs autotuning later */ |
326 | } | 329 | } |
327 | 330 | ||
331 | if (hwif->dma_base == 0) | ||
332 | return; | ||
333 | |||
328 | hwif->atapi_dma = 1; | 334 | hwif->atapi_dma = 1; |
329 | hwif->ultra_mask = 0x07; | 335 | hwif->ultra_mask = 0x07; |
330 | hwif->mwdma_mask = 0x07; | 336 | hwif->mwdma_mask = 0x07; |
diff --git a/drivers/ide/pci/hpt34x.c b/drivers/ide/pci/hpt34x.c index 19778c5fe711..cb8fe5643d3b 100644 --- a/drivers/ide/pci/hpt34x.c +++ b/drivers/ide/pci/hpt34x.c | |||
@@ -89,11 +89,7 @@ static int hpt34x_config_drive_xfer_rate (ide_drive_t *drive) | |||
89 | drive->init_speed = 0; | 89 | drive->init_speed = 0; |
90 | 90 | ||
91 | if (ide_tune_dma(drive)) | 91 | if (ide_tune_dma(drive)) |
92 | #ifndef CONFIG_HPT34X_AUTODMA | ||
93 | return -1; | 92 | return -1; |
94 | #else | ||
95 | return 0; | ||
96 | #endif | ||
97 | 93 | ||
98 | if (ide_use_fast_pio(drive)) | 94 | if (ide_use_fast_pio(drive)) |
99 | hpt34x_tune_drive(drive, 255); | 95 | hpt34x_tune_drive(drive, 255); |
@@ -160,9 +156,11 @@ static void __devinit init_hwif_hpt34x(ide_hwif_t *hwif) | |||
160 | if (!hwif->dma_base) | 156 | if (!hwif->dma_base) |
161 | return; | 157 | return; |
162 | 158 | ||
159 | #ifdef CONFIG_HPT34X_AUTODMA | ||
163 | hwif->ultra_mask = 0x07; | 160 | hwif->ultra_mask = 0x07; |
164 | hwif->mwdma_mask = 0x07; | 161 | hwif->mwdma_mask = 0x07; |
165 | hwif->swdma_mask = 0x07; | 162 | hwif->swdma_mask = 0x07; |
163 | #endif | ||
166 | 164 | ||
167 | hwif->ide_dma_check = &hpt34x_config_drive_xfer_rate; | 165 | hwif->ide_dma_check = &hpt34x_config_drive_xfer_rate; |
168 | if (!noautodma) | 166 | if (!noautodma) |
diff --git a/drivers/ide/pci/ns87415.c b/drivers/ide/pci/ns87415.c index 09941f37d635..465c935fdf25 100644 --- a/drivers/ide/pci/ns87415.c +++ b/drivers/ide/pci/ns87415.c | |||
@@ -187,14 +187,6 @@ static int ns87415_ide_dma_setup(ide_drive_t *drive) | |||
187 | return 1; | 187 | return 1; |
188 | } | 188 | } |
189 | 189 | ||
190 | static int ns87415_ide_dma_check (ide_drive_t *drive) | ||
191 | { | ||
192 | if (drive->media != ide_disk) | ||
193 | return -1; | ||
194 | |||
195 | return __ide_dma_check(drive); | ||
196 | } | ||
197 | |||
198 | static void __devinit init_hwif_ns87415 (ide_hwif_t *hwif) | 190 | static void __devinit init_hwif_ns87415 (ide_hwif_t *hwif) |
199 | { | 191 | { |
200 | struct pci_dev *dev = hwif->pci_dev; | 192 | struct pci_dev *dev = hwif->pci_dev; |
@@ -266,7 +258,6 @@ static void __devinit init_hwif_ns87415 (ide_hwif_t *hwif) | |||
266 | 258 | ||
267 | outb(0x60, hwif->dma_status); | 259 | outb(0x60, hwif->dma_status); |
268 | hwif->dma_setup = &ns87415_ide_dma_setup; | 260 | hwif->dma_setup = &ns87415_ide_dma_setup; |
269 | hwif->ide_dma_check = &ns87415_ide_dma_check; | ||
270 | hwif->ide_dma_end = &ns87415_ide_dma_end; | 261 | hwif->ide_dma_end = &ns87415_ide_dma_end; |
271 | 262 | ||
272 | if (!noautodma) | 263 | if (!noautodma) |
diff --git a/drivers/ide/pci/pdc202xx_new.c b/drivers/ide/pci/pdc202xx_new.c index 8a66a2871b3a..f6db2f37efad 100644 --- a/drivers/ide/pci/pdc202xx_new.c +++ b/drivers/ide/pci/pdc202xx_new.c | |||
@@ -378,6 +378,9 @@ static unsigned int __devinit init_chipset_pdcnew(struct pci_dev *dev, const cha | |||
378 | int f, r; | 378 | int f, r; |
379 | u8 pll_ctl0, pll_ctl1; | 379 | u8 pll_ctl0, pll_ctl1; |
380 | 380 | ||
381 | if (dma_base == 0) | ||
382 | return -EFAULT; | ||
383 | |||
381 | #ifdef CONFIG_PPC_PMAC | 384 | #ifdef CONFIG_PPC_PMAC |
382 | apple_kiwi_init(dev); | 385 | apple_kiwi_init(dev); |
383 | #endif | 386 | #endif |
@@ -494,15 +497,18 @@ static void __devinit init_hwif_pdc202new(ide_hwif_t *hwif) | |||
494 | hwif->speedproc = &pdcnew_tune_chipset; | 497 | hwif->speedproc = &pdcnew_tune_chipset; |
495 | hwif->resetproc = &pdcnew_reset; | 498 | hwif->resetproc = &pdcnew_reset; |
496 | 499 | ||
500 | hwif->err_stops_fifo = 1; | ||
501 | |||
497 | hwif->drives[0].autotune = hwif->drives[1].autotune = 1; | 502 | hwif->drives[0].autotune = hwif->drives[1].autotune = 1; |
498 | 503 | ||
504 | if (hwif->dma_base == 0) | ||
505 | return; | ||
506 | |||
499 | hwif->atapi_dma = 1; | 507 | hwif->atapi_dma = 1; |
500 | 508 | ||
501 | hwif->ultra_mask = hwif->cds->udma_mask; | 509 | hwif->ultra_mask = hwif->cds->udma_mask; |
502 | hwif->mwdma_mask = 0x07; | 510 | hwif->mwdma_mask = 0x07; |
503 | 511 | ||
504 | hwif->err_stops_fifo = 1; | ||
505 | |||
506 | hwif->ide_dma_check = &pdcnew_config_drive_xfer_rate; | 512 | hwif->ide_dma_check = &pdcnew_config_drive_xfer_rate; |
507 | 513 | ||
508 | if (hwif->cbl != ATA_CBL_PATA40_SHORT) | 514 | if (hwif->cbl != ATA_CBL_PATA40_SHORT) |
diff --git a/drivers/ide/pci/pdc202xx_old.c b/drivers/ide/pci/pdc202xx_old.c index fbcb0bb9c956..e19a891171cb 100644 --- a/drivers/ide/pci/pdc202xx_old.c +++ b/drivers/ide/pci/pdc202xx_old.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/drivers/ide/pci/pdc202xx_old.c Version 0.50 Mar 3, 2007 | 2 | * linux/drivers/ide/pci/pdc202xx_old.c Version 0.51 Jul 27, 2007 |
3 | * | 3 | * |
4 | * Copyright (C) 1998-2002 Andre Hedrick <andre@linux-ide.org> | 4 | * Copyright (C) 1998-2002 Andre Hedrick <andre@linux-ide.org> |
5 | * Copyright (C) 2006-2007 MontaVista Software, Inc. | 5 | * Copyright (C) 2006-2007 MontaVista Software, Inc. |
@@ -337,15 +337,18 @@ static void __devinit init_hwif_pdc202xx(ide_hwif_t *hwif) | |||
337 | 337 | ||
338 | hwif->speedproc = &pdc202xx_tune_chipset; | 338 | hwif->speedproc = &pdc202xx_tune_chipset; |
339 | 339 | ||
340 | hwif->err_stops_fifo = 1; | ||
341 | |||
340 | hwif->drives[0].autotune = hwif->drives[1].autotune = 1; | 342 | hwif->drives[0].autotune = hwif->drives[1].autotune = 1; |
341 | 343 | ||
344 | if (hwif->dma_base == 0) | ||
345 | return; | ||
346 | |||
342 | hwif->ultra_mask = hwif->cds->udma_mask; | 347 | hwif->ultra_mask = hwif->cds->udma_mask; |
343 | hwif->mwdma_mask = 0x07; | 348 | hwif->mwdma_mask = 0x07; |
344 | hwif->swdma_mask = 0x07; | 349 | hwif->swdma_mask = 0x07; |
345 | hwif->atapi_dma = 1; | 350 | hwif->atapi_dma = 1; |
346 | 351 | ||
347 | hwif->err_stops_fifo = 1; | ||
348 | |||
349 | hwif->ide_dma_check = &pdc202xx_config_drive_xfer_rate; | 352 | hwif->ide_dma_check = &pdc202xx_config_drive_xfer_rate; |
350 | hwif->dma_lost_irq = &pdc202xx_dma_lost_irq; | 353 | hwif->dma_lost_irq = &pdc202xx_dma_lost_irq; |
351 | hwif->dma_timeout = &pdc202xx_dma_timeout; | 354 | hwif->dma_timeout = &pdc202xx_dma_timeout; |
diff --git a/drivers/ide/pci/triflex.c b/drivers/ide/pci/triflex.c index 024bbfae0429..098692a6d615 100644 --- a/drivers/ide/pci/triflex.c +++ b/drivers/ide/pci/triflex.c | |||
@@ -115,6 +115,9 @@ static void __devinit init_hwif_triflex(ide_hwif_t *hwif) | |||
115 | hwif->tuneproc = &triflex_tune_drive; | 115 | hwif->tuneproc = &triflex_tune_drive; |
116 | hwif->speedproc = &triflex_tune_chipset; | 116 | hwif->speedproc = &triflex_tune_chipset; |
117 | 117 | ||
118 | if (hwif->dma_base == 0) | ||
119 | return; | ||
120 | |||
118 | hwif->atapi_dma = 1; | 121 | hwif->atapi_dma = 1; |
119 | hwif->mwdma_mask = 0x07; | 122 | hwif->mwdma_mask = 0x07; |
120 | hwif->swdma_mask = 0x07; | 123 | hwif->swdma_mask = 0x07; |