diff options
Diffstat (limited to 'drivers/ide')
-rw-r--r-- | drivers/ide/pci/sgiioc4.c | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/drivers/ide/pci/sgiioc4.c b/drivers/ide/pci/sgiioc4.c index 083c7afe1162..290697e09e55 100644 --- a/drivers/ide/pci/sgiioc4.c +++ b/drivers/ide/pci/sgiioc4.c | |||
@@ -275,21 +275,6 @@ sgiioc4_ide_dma_end(ide_drive_t * drive) | |||
275 | } | 275 | } |
276 | 276 | ||
277 | static int | 277 | static int |
278 | sgiioc4_ide_dma_check(ide_drive_t * drive) | ||
279 | { | ||
280 | if (ide_config_drive_speed(drive, XFER_MW_DMA_2) != 0) { | ||
281 | printk(KERN_INFO | ||
282 | "Couldnot set %s in Multimode-2 DMA mode | " | ||
283 | "Drive %s using PIO instead\n", | ||
284 | drive->name, drive->name); | ||
285 | drive->using_dma = 0; | ||
286 | } else | ||
287 | drive->using_dma = 1; | ||
288 | |||
289 | return 0; | ||
290 | } | ||
291 | |||
292 | static int | ||
293 | sgiioc4_ide_dma_on(ide_drive_t * drive) | 278 | sgiioc4_ide_dma_on(ide_drive_t * drive) |
294 | { | 279 | { |
295 | drive->using_dma = 1; | 280 | drive->using_dma = 1; |
@@ -305,6 +290,17 @@ sgiioc4_ide_dma_off_quietly(ide_drive_t * drive) | |||
305 | return HWIF(drive)->ide_dma_host_off(drive); | 290 | return HWIF(drive)->ide_dma_host_off(drive); |
306 | } | 291 | } |
307 | 292 | ||
293 | static int sgiioc4_ide_dma_check(ide_drive_t *drive) | ||
294 | { | ||
295 | /* FIXME: check for available DMA modes */ | ||
296 | if (ide_config_drive_speed(drive, XFER_MW_DMA_2) != 0) { | ||
297 | printk(KERN_WARNING "%s: couldn't set MWDMA2 mode, " | ||
298 | "using PIO instead\n", drive->name); | ||
299 | return sgiioc4_ide_dma_off_quietly(drive); | ||
300 | } else | ||
301 | return sgiioc4_ide_dma_on(drive); | ||
302 | } | ||
303 | |||
308 | /* returns 1 if dma irq issued, 0 otherwise */ | 304 | /* returns 1 if dma irq issued, 0 otherwise */ |
309 | static int | 305 | static int |
310 | sgiioc4_ide_dma_test_irq(ide_drive_t * drive) | 306 | sgiioc4_ide_dma_test_irq(ide_drive_t * drive) |