aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide
diff options
context:
space:
mode:
authorBorislav Petkov <petkovbb@gmail.com>2009-01-06 11:20:57 -0500
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-01-06 11:20:57 -0500
commit7a38f3cf019c4187d3d0e757e1c11b2b460e5b57 (patch)
tree1b0b815c1daa9e4a1de6b839d09e8eafa755f165 /drivers/ide
parent744a82b004b0a08d55f579daa55e32d963353edc (diff)
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>
Diffstat (limited to 'drivers/ide')
-rw-r--r--drivers/ide/ide-cd.c21
1 files changed, 7 insertions, 14 deletions
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
index 6c7dd8fd863..1c1ba43c263 100644
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.c
@@ -572,24 +572,17 @@ static ide_startstop_t cdrom_transfer_packet_command(ide_drive_t *drive)
572 572
573 ide_debug_log(IDE_DBG_PC, "Call %s\n", __func__); 573 ide_debug_log(IDE_DBG_PC, "Call %s\n", __func__);
574 574
575 if (drive->atapi_flags & IDE_AFLAG_DRQ_INTERRUPT) { 575 /* we must wait for DRQ to get set */
576 /* 576 if (ide_wait_stat(&startstop, drive, ATA_DRQ, ATA_BUSY, WAIT_READY)) {
577 * Here we should have been called after receiving an interrupt 577 printk(KERN_ERR "%s: timeout while waiting for DRQ to assert\n",
578 * from the device. DRQ should how be set. 578 drive->name);
579 */ 579 return startstop;
580 580 }
581 /* check for errors */
582 if (cdrom_decode_status(drive, ATA_DRQ, NULL))
583 return ide_stopped;
584 581
582 if (drive->atapi_flags & IDE_AFLAG_DRQ_INTERRUPT) {
585 /* ok, next interrupt will be DMA interrupt */ 583 /* ok, next interrupt will be DMA interrupt */
586 if (drive->dma) 584 if (drive->dma)
587 drive->waiting_for_dma = 1; 585 drive->waiting_for_dma = 1;
588 } else {
589 /* otherwise, we must wait for DRQ to get set */
590 if (ide_wait_stat(&startstop, drive, ATA_DRQ,
591 ATA_BUSY, WAIT_READY))
592 return startstop;
593 } 586 }
594 587
595 /* arm the interrupt handler */ 588 /* arm the interrupt handler */