Messages in this thread | | | Date | Tue, 29 Jul 2008 22:21:39 -0700 | From | Matthew Dharm <> | Subject | Re: [usb-storage] BUG: SCSI: usb storage SDHC card doesn't work in 2.6.27-rc1 |
| |
On Tue, Jul 29, 2008 at 11:08:42PM -0500, James Bottomley wrote: > On Tue, 2008-07-29 at 17:06 -0700, Matthew Frost wrote: > > James and co., > > > > Bug report: regression in 2.6.27-rc1 -- scsi WRT usb-storage > > Origin: Commit de72aa4c2b82a6cffe15d86a8d391ded4fb57602, "[SCSI] erase > > invalid data returned by device" > > Location: drivers/scsi_lib.c > > Device: Secure Digital HC 4GB card in USB 2.0 card reader > > Actually, this is a USB issue ... I've added the correct cc's
Well, it's both a SCSI and USB issue.
The patch in question clears sections of a data buffer that a device reports as invalid. Basically, the usb storage spec allows devices to transfer "garbage" data into buffers; instead of leaving the data there (which could be leakage from something sensitive), the SCSI core now zeros out the section of buffers that are reported as 'unused' (aka 'residue').
It does this for all devices, not just USB ones. USB devices, however, seem especially prone to not reporting this 'residue' correctly.
Honestly, given the problems this has caused, and the (apparently) relatively high number of devices that don't report residue correctly, I'm starting to seriously think this should be reverted.
Actually, I'm seriously starting to think that US_FL_IGNORE_RESIDUE should just become a sysfs parameter which defaults to the 'ignore' state...
Matt
-- Matthew Dharm Home: mdharm-usb@one-eyed-alien.net Maintainer, Linux USB Mass Storage Driver
You suck Stef. -- Greg User Friendly, 11/29/97 [unhandled content-type:application/pgp-signature] | |