Re: [2.5.50] odd SCSI messages on shutdown

GOTO Masanori (gotom@debian.or.jp)
Sun, 08 Dec 2002 14:09:43 +0900


At Fri, 6 Dec 2002 22:34:44 +0100,
Tobias Rittweiler wrote:
> on shutdown the following lines are displayed, but _not_ logged to
> /var/log/messages:
>
> Going to halt the system ...
> Synchronizing SCSI caches: sda FAILED
> status = 1, message = 00, host = 0, driver = 08
> Current sd?: sense = 70 5
> ASC=20 ASCQ= 0
> Raw sense data:0x70 0x00 0x05 0x00 0x00 0x00 0x00 0x0e 0x00 0x00 0x00
> 0x00 0x20 0x00 0x00 0xc0 0x00 0x00 0x00 0x00 0x00
> Power off.

Your device cannot handle SYNCHRONIZED_CACHE command which flushes
Seagate ST52160N device cache during shutdown introduced in recent 2.5.

I think the below patch for 2.5.50 (and current BK) suppresses such
failure message.

--- drivers/scsi/sd.c 2002-11-23 06:40:54.000000000 +0900
+++ drivers/scsi/sd.c.new 2002-12-08 13:14:13.000000000 +0900
@@ -865,8 +865,10 @@
if(status_byte(the_result) == CHECK_CONDITION
&& (SRpnt->sr_sense_buffer[0] & 0x70) == 0x70
&& (SRpnt->sr_sense_buffer[2] & 0x0f) == ILLEGAL_REQUEST
- /* The next are ASC 0x24 ASCQ 0x00: Invalid field in CDB */
- && SRpnt->sr_sense_buffer[12] == 0x24
+ /* The next are ASC 0x24 ASCQ 0x00: Invalid field in CDB,
+ or ASC 0x20 ASCQ 0x00: Invalid command operation code. */
+ && (SRpnt->sr_sense_buffer[12] == 0x24 ||
+ SRpnt->sr_sense_buffer[12] == 0x20)
&& SRpnt->sr_sense_buffer[13] == 0x00) {
printk(KERN_NOTICE "SCSI device %s: cache data unavailable\n", diskname);
} else {

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