mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-11-01 17:08:10 +00:00
ide-cd: wait for DRQ to get set per default
... instead of assuming it is set for accelerated DRQ type devices. Signed-off-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
This commit is contained in:
parent
744a82b004
commit
7a38f3cf01
1 changed files with 7 additions and 14 deletions
|
@ -572,24 +572,17 @@ static ide_startstop_t cdrom_transfer_packet_command(ide_drive_t *drive)
|
|||
|
||||
ide_debug_log(IDE_DBG_PC, "Call %s\n", __func__);
|
||||
|
||||
/* we must wait for DRQ to get set */
|
||||
if (ide_wait_stat(&startstop, drive, ATA_DRQ, ATA_BUSY, WAIT_READY)) {
|
||||
printk(KERN_ERR "%s: timeout while waiting for DRQ to assert\n",
|
||||
drive->name);
|
||||
return startstop;
|
||||
}
|
||||
|
||||
if (drive->atapi_flags & IDE_AFLAG_DRQ_INTERRUPT) {
|
||||
/*
|
||||
* Here we should have been called after receiving an interrupt
|
||||
* from the device. DRQ should how be set.
|
||||
*/
|
||||
|
||||
/* check for errors */
|
||||
if (cdrom_decode_status(drive, ATA_DRQ, NULL))
|
||||
return ide_stopped;
|
||||
|
||||
/* ok, next interrupt will be DMA interrupt */
|
||||
if (drive->dma)
|
||||
drive->waiting_for_dma = 1;
|
||||
} else {
|
||||
/* otherwise, we must wait for DRQ to get set */
|
||||
if (ide_wait_stat(&startstop, drive, ATA_DRQ,
|
||||
ATA_BUSY, WAIT_READY))
|
||||
return startstop;
|
||||
}
|
||||
|
||||
/* arm the interrupt handler */
|
||||
|
|
Loading…
Reference in a new issue