From c1dcb9f6e27cd8c956fb5ef7a80d2704ead54552 Mon Sep 17 00:00:00 2001 From: Borislav Petkov Date: Tue, 6 Jan 2009 17:20:57 +0100 Subject: [PATCH] --- yaml --- r: 126447 b: refs/heads/master c: 7a38f3cf019c4187d3d0e757e1c11b2b460e5b57 h: refs/heads/master i: 126445: 1395b15a66be677303bdca9c96b001049ff5ea6b 126443: dc37b63acac6aff558ff4d2769637a77347f0e46 126439: ec8eb0321d5a82f3cbfc814faeb52025fe2979f8 126431: 030a87e5539716a373d8671fdc4ce5bfec7f0a4a v: v3 --- [refs] | 2 +- trunk/drivers/ide/ide-cd.c | 21 +++++++-------------- 2 files changed, 8 insertions(+), 15 deletions(-) diff --git a/[refs] b/[refs] index 9d5ce48f406d..f51668fd3e5d 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 744a82b004b0a08d55f579daa55e32d963353edc +refs/heads/master: 7a38f3cf019c4187d3d0e757e1c11b2b460e5b57 diff --git a/trunk/drivers/ide/ide-cd.c b/trunk/drivers/ide/ide-cd.c index 6c7dd8fd8638..1c1ba43c263c 100644 --- a/trunk/drivers/ide/ide-cd.c +++ b/trunk/drivers/ide/ide-cd.c @@ -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__); - 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; + /* 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) { /* 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 */