diff options
Diffstat (limited to 'drivers/ide/mips')
-rw-r--r-- | drivers/ide/mips/au1xxx-ide.c | 34 |
1 files changed, 6 insertions, 28 deletions
diff --git a/drivers/ide/mips/au1xxx-ide.c b/drivers/ide/mips/au1xxx-ide.c index 11b7f61aae40..0ec8fd1e4dcb 100644 --- a/drivers/ide/mips/au1xxx-ide.c +++ b/drivers/ide/mips/au1xxx-ide.c | |||
@@ -322,11 +322,7 @@ static int auide_dma_setup(ide_drive_t *drive) | |||
322 | } | 322 | } |
323 | 323 | ||
324 | static int auide_dma_test_irq(ide_drive_t *drive) | 324 | static int auide_dma_test_irq(ide_drive_t *drive) |
325 | { | 325 | { |
326 | if (drive->waiting_for_dma == 0) | ||
327 | printk(KERN_WARNING "%s: ide_dma_test_irq \ | ||
328 | called while not waiting\n", drive->name); | ||
329 | |||
330 | /* If dbdma didn't execute the STOP command yet, the | 326 | /* If dbdma didn't execute the STOP command yet, the |
331 | * active bit is still set | 327 | * active bit is still set |
332 | */ | 328 | */ |
@@ -344,11 +340,6 @@ static void auide_dma_host_set(ide_drive_t *drive, int on) | |||
344 | { | 340 | { |
345 | } | 341 | } |
346 | 342 | ||
347 | static void auide_dma_lost_irq(ide_drive_t *drive) | ||
348 | { | ||
349 | printk(KERN_ERR "%s: IRQ lost\n", drive->name); | ||
350 | } | ||
351 | |||
352 | static void auide_ddma_tx_callback(int irq, void *param) | 343 | static void auide_ddma_tx_callback(int irq, void *param) |
353 | { | 344 | { |
354 | _auide_hwif *ahwif = (_auide_hwif*)param; | 345 | _auide_hwif *ahwif = (_auide_hwif*)param; |
@@ -375,18 +366,6 @@ static void auide_init_dbdma_dev(dbdev_tab_t *dev, u32 dev_id, u32 tsize, u32 de | |||
375 | } | 366 | } |
376 | 367 | ||
377 | #ifdef CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA | 368 | #ifdef CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA |
378 | static void auide_dma_timeout(ide_drive_t *drive) | ||
379 | { | ||
380 | ide_hwif_t *hwif = HWIF(drive); | ||
381 | |||
382 | printk(KERN_ERR "%s: DMA timeout occurred: ", drive->name); | ||
383 | |||
384 | if (auide_dma_test_irq(drive)) | ||
385 | return; | ||
386 | |||
387 | auide_dma_end(drive); | ||
388 | } | ||
389 | |||
390 | static const struct ide_dma_ops au1xxx_dma_ops = { | 369 | static const struct ide_dma_ops au1xxx_dma_ops = { |
391 | .dma_host_set = auide_dma_host_set, | 370 | .dma_host_set = auide_dma_host_set, |
392 | .dma_setup = auide_dma_setup, | 371 | .dma_setup = auide_dma_setup, |
@@ -394,8 +373,8 @@ static const struct ide_dma_ops au1xxx_dma_ops = { | |||
394 | .dma_start = auide_dma_start, | 373 | .dma_start = auide_dma_start, |
395 | .dma_end = auide_dma_end, | 374 | .dma_end = auide_dma_end, |
396 | .dma_test_irq = auide_dma_test_irq, | 375 | .dma_test_irq = auide_dma_test_irq, |
397 | .dma_lost_irq = auide_dma_lost_irq, | 376 | .dma_lost_irq = ide_dma_lost_irq, |
398 | .dma_timeout = auide_dma_timeout, | 377 | .dma_timeout = ide_dma_timeout, |
399 | }; | 378 | }; |
400 | 379 | ||
401 | static int auide_ddma_init(ide_hwif_t *hwif, const struct ide_port_info *d) | 380 | static int auide_ddma_init(ide_hwif_t *hwif, const struct ide_port_info *d) |
@@ -448,10 +427,9 @@ static int auide_ddma_init(ide_hwif_t *hwif, const struct ide_port_info *d) | |||
448 | NUM_DESCRIPTORS); | 427 | NUM_DESCRIPTORS); |
449 | auide->rx_desc_head = (void*)au1xxx_dbdma_ring_alloc(auide->rx_chan, | 428 | auide->rx_desc_head = (void*)au1xxx_dbdma_ring_alloc(auide->rx_chan, |
450 | NUM_DESCRIPTORS); | 429 | NUM_DESCRIPTORS); |
451 | 430 | ||
452 | hwif->dmatable_cpu = dma_alloc_coherent(hwif->dev, | 431 | /* FIXME: check return value */ |
453 | PRD_ENTRIES * PRD_BYTES, /* 1 Page */ | 432 | (void)ide_allocate_dma_engine(hwif); |
454 | &hwif->dmatable_dma, GFP_KERNEL); | ||
455 | 433 | ||
456 | au1xxx_dbdma_start( auide->tx_chan ); | 434 | au1xxx_dbdma_start( auide->tx_chan ); |
457 | au1xxx_dbdma_start( auide->rx_chan ); | 435 | au1xxx_dbdma_start( auide->rx_chan ); |