aboutsummaryrefslogtreecommitdiff
path: root/drivers/ide/ide-cd.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-02-01 23:09:17 +0100
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-02-01 23:09:17 +0100
commitf1071e628bc769174c3e2df7827a2a8ad05aea67 (patch)
tree537f3bd1368530deaeeaa908f91d544116dfb0fc /drivers/ide/ide-cd.c
parent5a5222d9fa4aa7ae3b1d5c126cb9c83124d75af5 (diff)
ide-cd: fix "missing data" handling in cdrom_pc_intr()
If drive still wants to transfer the data we need to pad the transfer instead of just finishing the request. Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-cd.c')
-rw-r--r--drivers/ide/ide-cd.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
index 75539fd0829..cbe4f1a04c1 100644
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.c
@@ -1500,9 +1500,11 @@ static ide_startstop_t cdrom_pc_intr (ide_drive_t *drive)
if (xferfunc) {
if (!rq->data) {
+ printk(KERN_ERR "%s: confused, missing data\n",
+ drive->name);
blk_dump_rq_flags(rq, write ? "cdrom_pc_intr, write"
: "cdrom_pc_intr, read");
- goto confused;
+ goto pad;
}
/* Transfer the data. */
xferfunc(drive, rq->data, thislen);
@@ -1515,7 +1517,6 @@ static ide_startstop_t cdrom_pc_intr (ide_drive_t *drive)
if (write && blk_sense_request(rq))
rq->sense_len += thislen;
} else {
-confused:
printk (KERN_ERR "%s: cdrom_pc_intr: The drive "
"appears confused (ireason = 0x%02x). "
"Trying to recover by ending request.\n",
@@ -1524,7 +1525,7 @@ confused:
cdrom_end_request(drive, 0);
return ide_stopped;
}
-
+pad:
/*
* If we haven't moved enough data to satisfy the drive,
* add some padding.