[PATCH 12/63] ide-cd: fix "missing data" handling in cdrom_pc_intr()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If drive still wants to transfer the data we need to pad the transfer
instead of just finishing the request.

Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]>
---
 drivers/ide/ide-cd.c |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

Index: b/drivers/ide/ide-cd.c
===================================================================
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.c
@@ -1500,9 +1500,11 @@ static ide_startstop_t cdrom_pc_intr (id
 
 	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 (id
 		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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux