public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Matthew Dharm <mdharm-kernel@one-eyed-alien.net>
To: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Matthew Frost <artusemrys@yahoo.com>,
	USB Storage list <usb-storage@lists.one-eyed-alien.net>,
	linux-kernel@vger.kernel.org,
	linux-scsi <linux-scsi@vger.kernel.org>,
	Matt Frost <artusemrys@sbcglobal.net>
Subject: Re: [usb-storage] BUG: SCSI: usb storage SDHC card doesn't work in 2.6.27-rc1
Date: Tue, 29 Jul 2008 22:21:39 -0700	[thread overview]
Message-ID: <20080730052139.GG6091@one-eyed-alien.net> (raw)
In-Reply-To: <1217390922.6103.79.camel@localhost.localdomain>

[-- Attachment #1: Type: text/plain, Size: 1594 bytes --]

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

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2008-07-30  5:21 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-30  0:06 BUG: SCSI: usb storage SDHC card doesn't work in 2.6.27-rc1 Matthew Frost
2008-07-30  4:08 ` James Bottomley
2008-07-30  5:21   ` Matthew Dharm [this message]
2008-07-30 14:17     ` [usb-storage] " Alan Stern
2008-07-30 14:55       ` James Bottomley
2008-07-30 15:27         ` Alan Stern
2008-07-30 19:50         ` Douglas Gilbert
2008-07-30 21:00           ` Alan Stern
2008-07-30 21:09             ` Pete Zaitcev
2008-07-30 21:28               ` Alan Stern
2008-07-30 21:58                 ` Pete Zaitcev
2008-07-31 15:10                   ` Alan Stern
2008-08-01 18:46             ` [usb-storage] " Matthew Frost
2008-08-01 22:22               ` Matthew Frost
2008-08-03 11:56                 ` Douglas Gilbert
2008-08-08 21:07                 ` Matthew Frost
2008-08-08 21:30                   ` Alan Stern
2008-08-09 15:51                     ` Matthew Frost
2008-07-30 14:15   ` Alan Stern
2008-07-30 15:39     ` Matthew Frost

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080730052139.GG6091@one-eyed-alien.net \
    --to=mdharm-kernel@one-eyed-alien.net \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=artusemrys@sbcglobal.net \
    --cc=artusemrys@yahoo.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=usb-storage@lists.one-eyed-alien.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox