aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-io.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/ide-io.c')
-rw-r--r--drivers/ide/ide-io.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c
index 2614f41b5074..c193553f6fe7 100644
--- a/drivers/ide/ide-io.c
+++ b/drivers/ide/ide-io.c
@@ -226,7 +226,7 @@ static ide_startstop_t ide_start_power_step(ide_drive_t *drive, struct request *
226 break; 226 break;
227 if (drive->hwif->ide_dma_check == NULL) 227 if (drive->hwif->ide_dma_check == NULL)
228 break; 228 break;
229 drive->hwif->ide_dma_check(drive); 229 ide_set_dma(drive);
230 break; 230 break;
231 } 231 }
232 pm->pm_step = ide_pm_state_completed; 232 pm->pm_step = ide_pm_state_completed;
@@ -1351,7 +1351,7 @@ static ide_startstop_t ide_dma_timeout_retry(ide_drive_t *drive, int error)
1351 */ 1351 */
1352 drive->retry_pio++; 1352 drive->retry_pio++;
1353 drive->state = DMA_PIO_RETRY; 1353 drive->state = DMA_PIO_RETRY;
1354 (void) hwif->ide_dma_off_quietly(drive); 1354 hwif->dma_off_quietly(drive);
1355 1355
1356 /* 1356 /*
1357 * un-busy drive etc (hwgroup->busy is cleared on return) and 1357 * un-busy drive etc (hwgroup->busy is cleared on return) and
@@ -1646,6 +1646,17 @@ irqreturn_t ide_intr (int irq, void *dev_id)
1646 del_timer(&hwgroup->timer); 1646 del_timer(&hwgroup->timer);
1647 spin_unlock(&ide_lock); 1647 spin_unlock(&ide_lock);
1648 1648
1649 /* Some controllers might set DMA INTR no matter DMA or PIO;
1650 * bmdma status might need to be cleared even for
1651 * PIO interrupts to prevent spurious/lost irq.
1652 */
1653 if (hwif->ide_dma_clear_irq && !(drive->waiting_for_dma))
1654 /* ide_dma_end() needs bmdma status for error checking.
1655 * So, skip clearing bmdma status here and leave it
1656 * to ide_dma_end() if this is dma interrupt.
1657 */
1658 hwif->ide_dma_clear_irq(drive);
1659
1649 if (drive->unmask) 1660 if (drive->unmask)
1650 local_irq_enable_in_hardirq(); 1661 local_irq_enable_in_hardirq();
1651 /* service this interrupt, may set handler for next interrupt */ 1662 /* service this interrupt, may set handler for next interrupt */