Re: [Re: Linux 2.6.26-rc2] Write protect on on

From: Alan Stern
Date: Sat May 17 2008 - 09:49:21 EST

Summary: 2.6.26-rc2 doesn't detect a USB drive's write-protect setting

On Sat, 17 May 2008, Maciej Rutecki wrote:

> (works fine):
> 2.6.26-rc2 ("write protect is on" problem; can't mount device):

I'm not sure exactly what changed to cause this regression, but the
problem lies in the SCSI layer, not the USB layer.

The logs show that in response to the 192-byte MODE SENSE command (used
to read the write-protect status), the device sends back no data, good
status, and Residue = 192. The SCSI core ignores the Residue and
thinks that the old left-over data in the buffer (in this case left
over from the READ CAPACITY command) actually indicates the
write-protect status -- which it obviously doesn't.

Boaz, is scsi_mode_sense() the right place to check for this sort of
thing? It probably should be treated the same as an Illegal Request

Alan Stern

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at