diff options
author | Borislav Petkov <petkovbb@googlemail.com> | 2009-01-02 10:12:53 -0500 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-01-02 10:12:53 -0500 |
commit | 5f25843fa79b7c35097b0ffe8b2c5cc2428d6495 (patch) | |
tree | 6d3c445e97390645c85a678542d5fc16a46b50ce /drivers/ide/ide-atapi.c | |
parent | 392de1d53dd40e2eebee3a0a26aa647a3865ca78 (diff) |
ide-atapi: teach ide atapi about drive->waiting_for_dma
In addition, we wait for DRQ to be asserted by repeatedly polling
device status no matter what DRQ type each device implements.
Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-atapi.c')
-rw-r--r-- | drivers/ide/ide-atapi.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/ide/ide-atapi.c b/drivers/ide/ide-atapi.c index 8884877bd2b5..8c5cf68fbd79 100644 --- a/drivers/ide/ide-atapi.c +++ b/drivers/ide/ide-atapi.c | |||
@@ -511,6 +511,11 @@ static ide_startstop_t ide_transfer_pc(ide_drive_t *drive) | |||
511 | return startstop; | 511 | return startstop; |
512 | } | 512 | } |
513 | 513 | ||
514 | if (drive->atapi_flags & IDE_AFLAG_DRQ_INTERRUPT) { | ||
515 | if (drive->dma) | ||
516 | drive->waiting_for_dma = 1; | ||
517 | } | ||
518 | |||
514 | ireason = ide_read_ireason(drive); | 519 | ireason = ide_read_ireason(drive); |
515 | if (drive->media == ide_tape && | 520 | if (drive->media == ide_tape && |
516 | (drive->dev_flags & IDE_DFLAG_SCSI) == 0) | 521 | (drive->dev_flags & IDE_DFLAG_SCSI) == 0) |
@@ -605,6 +610,8 @@ ide_startstop_t ide_issue_pc(ide_drive_t *drive, unsigned int timeout, | |||
605 | 610 | ||
606 | /* Issue the packet command */ | 611 | /* Issue the packet command */ |
607 | if (drive->atapi_flags & IDE_AFLAG_DRQ_INTERRUPT) { | 612 | if (drive->atapi_flags & IDE_AFLAG_DRQ_INTERRUPT) { |
613 | if (drive->dma) | ||
614 | drive->waiting_for_dma = 0; | ||
608 | ide_execute_command(drive, ATA_CMD_PACKET, ide_transfer_pc, | 615 | ide_execute_command(drive, ATA_CMD_PACKET, ide_transfer_pc, |
609 | timeout, NULL); | 616 | timeout, NULL); |
610 | return ide_started; | 617 | return ide_started; |