]> git.baikalelectronics.ru Git - kernel.git/commit
[SCSI] erase invalid data returned by device
authorAlan Stern <stern@rowland.harvard.edu>
Tue, 24 Jun 2008 18:03:14 +0000 (14:03 -0400)
committerJames Bottomley <James.Bottomley@HansenPartnership.com>
Sun, 6 Jul 2008 16:33:08 +0000 (11:33 -0500)
commitc774d99bf263079c1c08b6e7d0e612cb477ff54c
tree1d7804a10bc8af816af41a2e7d1ce73f9e0e72d3
parenta46110b56918754b7a82dc7816931ff8293656df
[SCSI] erase invalid data returned by device

This patch (as1108) fixes a problem that can occur with certain USB
mass-storage devices: They return invalid data together with a residue
indicating that the data should be ignored.  Rather than leave the
invalid data in a transfer buffer, where it can get misinterpreted,
the patch clears the invalid portion of the buffer.

This solves a problem (wrong write-protect setting detected) reported
by Maciej Rutecki and Peter Teoh.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Tested-by: Peter Teoh <htmldeveloper@gmail.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
drivers/scsi/scsi_lib.c