Re: [BUG] Linux-2.6.31-rc1-git9 Cannot Recognize Empty DVD Media

From: James Bottomley
Date: Wed Jul 08 2009 - 10:27:40 EST


On Wed, 2009-07-08 at 15:09 +0200, Maciej Rutecki wrote:
> Similar issue on 2 machines. 2.6.31-rc1-git3 works ok. 2.6.31-rc2
> cannot recognize *any* DVD media with K3b. No messages in dmesg or
> syslog.
>
> Unfortunately I can't try bisection, because I don't have more time
> (work). I try do it at the end of week.

Also were there any tools upgrades around this? The messages:

> [ 4526.750295] sr 0:0:0:0: [sr0] Result: hostbyte=DID_OK
> driverbyte=DRIVER_SENSE
> [ 4526.750302] sr 0:0:0:0: [sr0] Sense Key : Illegal Request [current]
> [ 4526.750308] sr 0:0:0:0: [sr0] Add. Sense: Illegal mode for this track
> [ 4526.750316] end_request: I/O error, dev sr0, sector 0
> [ 4526.750321] Buffer I/O error on device sr0, logical block 0

Clearly imply the errors are coming from the device: The sense code is
generated by it. So this means that either the DVD has been put into
some type of wrong mode or something in sr is sending the wrong command.

You might also try this patch from martin petersen: it will print out
the actual command that's causing the problems ... that might give a
clue.

James

---

Subject: [PATCH] SCSI: Print failed commands
From: "Martin K. Petersen" <martin.petersen@xxxxxxxxxx>

When a request fails we print the sense data but not the actual command
that failed. Add a printout of the operation + CDB for failed commands.

Signed-off-by: Martin K. Petersen <martin.petersen@xxxxxxxxxx>

---

diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index 30f3275..79ea5be 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -896,6 +896,7 @@ void scsi_io_completion(struct scsi_cmnd *cmd, unsigned int good_bytes)
scsi_print_result(cmd);
if (driver_byte(result) & DRIVER_SENSE)
scsi_print_sense("", cmd);
+ scsi_print_command(cmd);
}
blk_end_request_all(req, -EIO);
scsi_next_command(cmd);



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/