Bug 11260
Summary: | Regression: USB memory stick triggers several USB resets before settling with bogus capacity | ||
---|---|---|---|
Product: | Drivers | Reporter: | Alex Villacis Lasso (avillaci) |
Component: | USB | Assignee: | Greg Kroah-Hartman (greg) |
Status: | CLOSED CODE_FIX | ||
Severity: | normal | CC: | stern |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 2.6.27-rc2 | Subsystem: | |
Regression: | Yes | Bisected commit-id: | |
Bug Depends on: | |||
Bug Blocks: | 11167 | ||
Attachments: |
bzipped dmesg output with USB_DEBUG, USB_ANNOUNCE_NEW_DEVICES and USB_STORAGE_DEBUG when inserting USB stick
Stick inserted, manually modprobe usb-storage usbmon trace with stick inserted, and manually modprobe usb-storage |
Description
Alex Villacis Lasso
2008-08-06 13:33:35 UTC
Created attachment 17109 [details]
bzipped dmesg output with USB_DEBUG, USB_ANNOUNCE_NEW_DEVICES and USB_STORAGE_DEBUG when inserting USB stick
Created attachment 17110 [details]
Stick inserted, manually modprobe usb-storage
The bug can be triggered merely by rmmod usb-storage, followed by modprobe usb-storage, with the stick in place in the root hub. Resulting trace attached.
It would be helpful to verify if 2.6.26 is affected. Created attachment 17111 [details]
usbmon trace with stick inserted, and manually modprobe usb-storage
This is a usbmon trace of the traffic sent when stick is already inserted, with manual loading of usb-storage. Kernel is 2.6.27-rc2
Apparently this problem is already known and fixed (though not yet pulled into mainline): Message http://marc.info/?l=linux-kernel&m=121804333614405&w=2 contains a fix, and http://marc.info/?l=linux-kernel&m=121804127910374&w=2 discusses what happened in the regression. Currently compiling kernel in order to test the patch. (In reply to comment #5) > Apparently this problem is already known and fixed (though not yet pulled > into > mainline): > > Message http://marc.info/?l=linux-kernel&m=121804333614405&w=2 contains a > fix, > and http://marc.info/?l=linux-kernel&m=121804127910374&w=2 discusses what > happened in the regression. > > Currently compiling kernel in order to test the patch. > I hereby confirm that the proposed fix actually works and fixes the errors in my case too. For the record, the fix is the following patch: diff -ur /home/alex/checkouts/linux-2.6-git/include/scsi/scsi_device.h linux-2.6.27-rc2/include/scsi/scsi_device.h --- /home/alex/checkouts/linux-2.6-git/include/scsi/scsi_device.h 2008-08-06 10:12:46.000000000 -0500 +++ linux-2.6.27-rc2/include/scsi/scsi_device.h 2008-08-06 18:28:05.000000000 -0500 @@ -6,6 +6,7 @@ #include <linux/spinlock.h> #include <linux/workqueue.h> #include <linux/blkdev.h> +#include <scsi/scsi.h> #include <asm/atomic.h> struct request_queue; @@ -426,7 +427,7 @@ static inline int scsi_device_protection(struct scsi_device *sdev) { - return sdev->inquiry[5] & (1<<0); + return sdev->scsi_level > SCSI_2 && sdev->inquiry[5] & (1<<0); } #define MODULE_ALIAS_SCSI_DEVICE(type) \ Handled-By : Hugh Dickins <hugh@veritas.com> Patch : http://marc.info/?l=linux-kernel&m=121804333614405&w=2 On Monday, 11 of August 2008, Alex Villacís Lasso wrote:
> Rafael J. Wysocki escribió:
> > This message has been generated automatically as a part of a report
> > of recent regressions.
> >
> > The following bug entry is on the current list of known regressions
> > from 2.6.26. Please verify if it still should be listed and let me know
> > (either way).
> >
> >
> > Bug-Entry : http://bugzilla.kernel.org/show_bug.cgi?id=11260
> > Subject : Regression: USB memory stick triggers several USB
> resets before settling with bogus capacity
> > Submitter : Alex Villacis Lasso <avillaci@ceibo.fiec.espol.edu.ec>
> > Date : 2008-08-06 13:33 (4 days old)
> > Handled-By : Hugh Dickins <hugh@veritas.com>
> > Patch :
> http://marc.info/?l=linux-kernel&m=121804333614405&w=2
> >
> >
> >
> >
> As of 12:01 GMT -5 with git tree at commit
> 796aadeb1b2db9b5d463946766c5bbfd7717158c , the patch has not yet been
> merged into mainline.
On Sunday, 17 of August 2008, Hugh Dickins wrote: > On Sat, 16 Aug 2008, Rafael J. Wysocki wrote: > > > > Bug-Entry : http://bugzilla.kernel.org/show_bug.cgi?id=11260 > > Subject : Regression: USB memory stick triggers several USB > resets before settling with bogus capacity > > Submitter : Alex Villacis Lasso <avillaci@ceibo.fiec.espol.edu.ec> > > Date : 2008-08-06 13:33 (11 days old) > > Handled-By : Hugh Dickins <hugh@veritas.com> > > Patch : > http://marc.info/?l=linux-kernel&m=121804333614405&w=2 > > James has this fix queued in his scsi-rc-fixes for 2.6.27 > > > http://git.kernel.org/?p=linux/kernel/git/jejb/scsi-rc-fixes-2.6.git;a=commit;h=d211f052fa58a053639bc51501cb64421157d362 > > but hasn't asked Linus to pull for a while: I'm hoping it'll get into -rc4. |