@@ -552,8 +552,10 @@ static ide_startstop_t cdrom_newpc_intr(ide_drive_t *drive)
if (!OK_STAT(stat, 0, BAD_R_STAT)) {
rc = cdrom_decode_status(drive, stat);
if (rc) {
- if (rc == 2)
+ if (rc == 2) {
+ printk(KERN_EMERG "%s: bad status with a sense rq\n", __func__);
goto out_end;
+ }
return ide_stopped;
}
}
@@ -667,8 +669,10 @@ out_end:
blk_end_request_all(rq, 0);
hwif->rq = NULL;
} else {
- if (sense && uptodate)
+ if (sense && uptodate) {
+ printk(KERN_EMERG "%s: complete failed rq: %p\n", __func__, rq);
ide_cd_complete_failed_rq(drive, rq);
+ }
if (blk_fs_request(rq)) {
if (cmd->nleft == 0)
@@ -688,10 +692,13 @@ out_end:
rq->resid_len += cmd->last_xfer_len;
}
+ printk(KERN_EMERG "%s: completing rq %p\n", __func__, rq);
ide_complete_rq(drive, uptodate ? 0 : -EIO, blk_rq_bytes(rq));
- if (sense && rc == 2)
+ if (sense && rc == 2) {
+ printk(KERN_EMERG "%s: request sense failure, rq: %p\n", __func__, rq);
ide_error(drive, "request sense failure", stat);
+ }
}
return ide_stopped;
}
@@ -57,6 +57,9 @@
int ide_end_rq(ide_drive_t *drive, struct request *rq, int error,
unsigned int nr_bytes)
{
+
+ dump_stack();
+
/*
* decide whether to reenable DMA -- 3 is a random magic for now,
* if we DMA timeout more than 3 times, just stay in PIO
@@ -118,6 +121,8 @@ int ide_complete_rq(ide_drive_t *drive, int error, unsigned int nr_bytes)
struct request *rq = hwif->rq;
int rc;
+ dump_stack();
+
/*
* if failfast is set on a request, override number of sectors
* and complete the whole request right now