[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.44L0.0805170933530.22979-100000@netrider.rowland.org>
Date: Sat, 17 May 2008 09:49:03 -0400 (EDT)
From: Alan Stern <stern@...land.harvard.edu>
To: Maciej Rutecki <maciej.rutecki@...il.com>
cc: Boaz Harrosh <bharrosh@...asas.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
USB list <linux-usb@...r.kernel.org>,
USB Storage list <usb-storage@...ts.one-eyed-alien.net>,
SCSI development list <linux-scsi@...r.kernel.org>
Subject: Re: [Re: Linux 2.6.26-rc2] Write protect on on
Summary: 2.6.26-rc2 doesn't detect a USB drive's write-protect setting
correctly.
On Sat, 17 May 2008, Maciej Rutecki wrote:
> 2.6.25.4 (works fine):
> http://unixy.pl/maciek/download/kernel/2.6.25.4/syslog_debug.txt
> http://unixy.pl/maciek/download/kernel/2.6.25.4/usbmon.txt
>
> 2.6.26-rc2 ("write protect is on" problem; can't mount device):
> http://unixy.pl/maciek/download/kernel/2.6.26-rc2/syslog_debug.txt
> http://unixy.pl/maciek/download/kernel/2.6.26-rc2/usbmon.txt
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
error.
Alan Stern
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists