[linux-usb-devel] Linux scsi / usb-mass-storage and HP printer cardreader bug + fix

Matthew Dharm mdharm-scsi at one-eyed-alien.net
Wed Jan 9 22:10:46 UTC 2008


On Wed, Jan 09, 2008 at 10:44:49PM +0100, Hans de Goede wrote:
> First of all sorry for the somewhat massive cross-posting, I've spend a 
> significant amount of time hunting down this bug, and so far the response 
> has been less the overwhelming.
 
> The cardreader of the multi function printers will "crash" and from that 
> moment on no longer communicate in any sane way, if you try to read the 
> last sector of an sdcard* in a read that is more then 1 sector, so trying 
> to read 8 sectors starting at sector capicity-8 will crash it, as will 
> reading 2 sectors starting at sector capicity-2, however reading the last 
> sector in a one 1 sector read will succeed! (* xdcards seem to be fine).

To continue the history on this.... we over in usb-storage land looked at
this and think it belongs in the SCSI layer.  We don't like changing
commands in-flight; it has, historically, caused us all sorts of issues in
the past.

Furthermore, this seems like the likely sort of off-by-one bug that can
affect many types of devices, not just USB.

I'd really like to see this in sd_mod -- I have no objection to requiring
an HCD to set a flag to indicate that it should be used, if really desired.
But, it seems to me to be a much easier change to make where the command
originated rather than in mid-flight.

Matt

-- 
Matthew Dharm                              Home: mdharm-usb at one-eyed-alien.net 
Maintainer, Linux USB Mass Storage Driver

P:  Nine more messages in admin.policy.
M: I know, I'm typing as fast as I can!
					-- Pitr and Mike
User Friendly, 11/27/97
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/fedora-kernel-list/attachments/20080109/fe7dc7b0/attachment.sig>


More information about the Fedora-kernel-list mailing list