mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 19:56:18 +00:00
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>
This commit is contained in:
parent
392de1d53d
commit
5f25843fa7
1 changed files with 7 additions and 0 deletions
|
@ -511,6 +511,11 @@ static ide_startstop_t ide_transfer_pc(ide_drive_t *drive)
|
||||||
return startstop;
|
return startstop;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (drive->atapi_flags & IDE_AFLAG_DRQ_INTERRUPT) {
|
||||||
|
if (drive->dma)
|
||||||
|
drive->waiting_for_dma = 1;
|
||||||
|
}
|
||||||
|
|
||||||
ireason = ide_read_ireason(drive);
|
ireason = ide_read_ireason(drive);
|
||||||
if (drive->media == ide_tape &&
|
if (drive->media == ide_tape &&
|
||||||
(drive->dev_flags & IDE_DFLAG_SCSI) == 0)
|
(drive->dev_flags & IDE_DFLAG_SCSI) == 0)
|
||||||
|
@ -605,6 +610,8 @@ ide_startstop_t ide_issue_pc(ide_drive_t *drive, unsigned int timeout,
|
||||||
|
|
||||||
/* Issue the packet command */
|
/* Issue the packet command */
|
||||||
if (drive->atapi_flags & IDE_AFLAG_DRQ_INTERRUPT) {
|
if (drive->atapi_flags & IDE_AFLAG_DRQ_INTERRUPT) {
|
||||||
|
if (drive->dma)
|
||||||
|
drive->waiting_for_dma = 0;
|
||||||
ide_execute_command(drive, ATA_CMD_PACKET, ide_transfer_pc,
|
ide_execute_command(drive, ATA_CMD_PACKET, ide_transfer_pc,
|
||||||
timeout, NULL);
|
timeout, NULL);
|
||||||
return ide_started;
|
return ide_started;
|
||||||
|
|
Loading…
Reference in a new issue