Bug 10852

Summary: reset high speed USB device using ehci_hcd
Product: Drivers Reporter: Julien Valroff (julien)
Component: USBAssignee: Greg Kroah-Hartman (greg)
Status: REJECTED INVALID    
Severity: normal CC: the.ridikulus.rat
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 2.6.25.4 Subsystem:
Regression: --- Bisected commit-id:

Description Julien Valroff 2008-06-04 09:24:04 UTC
Latest working kernel version: ?
Earliest failing kernel version: ?
Distribution: Debian GNU/Linux sid
Hardware Environment:

$ lsusb 
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 003: ID 046d:c505 Logitech, Inc. Cordless Mouse+Keyboard Receiver
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 002: ID 058f:6362 Alcor Micro Corp. Hi-Speed 21-in-1 Flash Card Reader/Writer (Internal/External)
Bus 007 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub


tail /var/log/messages:
Jun  4 18:19:51 athyr kernel: [  585.689363] usb 7-3: new high speed USB device using ehci_hcd and address 5
Jun  4 18:19:52 athyr kernel: [  585.723547] usb 7-3: configuration #1 chosen from 1 choice
Jun  4 18:19:52 athyr kernel: [  585.723895] scsi8 : SCSI emulation for USB Mass Storage devices
Jun  4 18:19:52 athyr kernel: [  585.724055] usb 7-3: New USB device found, idVendor=058f, idProduct=6362
Jun  4 18:19:52 athyr kernel: [  585.724058] usb 7-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Jun  4 18:19:52 athyr kernel: [  585.724062] usb 7-3: Product: Mass Storage Device
Jun  4 18:19:52 athyr kernel: [  585.724064] usb 7-3: Manufacturer: Generic
Jun  4 18:19:52 athyr kernel: [  585.724066] usb 7-3: SerialNumber: 058F312D81B
Jun  4 18:19:57 athyr kernel: [  586.729415] scsi 8:0:0:0: Direct-Access     Generic  USB SD Reader    1.00 PQ: 0 ANSI: 0
Jun  4 18:19:57 athyr kernel: [  586.729415] scsi 8:0:0:1: Direct-Access     Generic  USB CF Reader    1.01 PQ: 0 ANSI: 0
Jun  4 18:19:57 athyr kernel: [  586.729415] scsi 8:0:0:2: Direct-Access     Generic  USB SM Reader    1.02 PQ: 0 ANSI: 0
Jun  4 18:19:57 athyr kernel: [  586.729415] scsi 8:0:0:3: Direct-Access     Generic  USB MS Reader    1.03 PQ: 0 ANSI: 0
Jun  4 18:19:57 athyr kernel: [  586.730267] sd 8:0:0:0: [sdb] Attached SCSI removable disk
Jun  4 18:19:57 athyr kernel: [  586.732122] sd 8:0:0:1: [sdc] Attached SCSI removable disk
Jun  4 18:19:57 athyr kernel: [  586.744093] sd 8:0:0:2: [sdd] Attached SCSI removable disk
Jun  4 18:19:57 athyr kernel: [  586.746113] sd 8:0:0:3: [sde] Attached SCSI removable disk


Problem Description:

Several Debian users have recently complained about frequent errors in their log related to the ehci_hcd module.
I will only talk about my own experience, others have detailed theirs on the original bug report on Debian BTS: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=473800

When I plug my USB card reader, I notice several entries in my log files as follows:

Jun  1 08:22:08 athyr kernel: [ 1412.134045] usb 6-2: reset high speed USB device using ehci_hcd and address 3

After a while (I haven't counted exactly, but it is at least several minutes), I see:
[ 2478.872720] usb 2-3: reset high speed USB device using ehci_hcd and address 2
[ 2478.901695] usb 2-3: can’t restore configuration #1 (error=-71)
[ 2478.901716] usb 2-3: USB disconnect, address 2
[ 2478.901880] sd 0:0:0:3: [sde] READ CAPACITY failed
[ 2478.901881] sd 0:0:0:3: [sde] Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK,SUGGEST_OK
[ 2478.901885] sd 0:0:0:3: [sde] Sense not available.
[ 2478.901923] sd 0:0:0:3: [sde] Write Protect is off
[ 2478.901926] sd 0:0:0:3: [sde] Mode Sense: 00 00 00 00
[ 2478.901928] sd 0:0:0:3: [sde] Assuming drive cache: write through
[ 2478.902078] sd 0:0:0:3: [sde] READ CAPACITY failed
[ 2478.902079] sd 0:0:0:3: [sde] Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK,SUGGEST_OK
[ 2478.902082] sd 0:0:0:3: [sde] Sense not available.
[ 2478.902119] sd 0:0:0:3: [sde] Write Protect is off
[ 2478.902121] sd 0:0:0:3: [sde] Mode Sense: 00 00 00 00
[ 2478.902123] sd 0:0:0:3: [sde] Assuming drive cache: write through
[ 2478.992731] usb 2-3: new high speed USB device using ehci_hcd and address 4

After this, no other log entries.

If I unplug the card reader and connect it again, the errors do not appear anymore.

The card reader seems however to work OK (only tested with CF, ie. sdc, there is no other card elsewhere).
This is however not the case for other users who report system crash following to these errors.

I have tried to disable USB auto-suspend, and changing the idle-delay time (default is 2 seconds), but it doesn’t help at all.

Unloading ehci_hcd is a workaround, as uhci_hcd is automatically loaded.

Note that the Debian kernel maintainers do not have any Debian specific usb ehci patches.

Cheers,
Julien
Comment 1 Anonymous Emailer 2008-06-04 12:18:00 UTC
Reply-To: akpm@linux-foundation.org

On Wed,  4 Jun 2008 09:24:06 -0700 (PDT) bugme-daemon@bugzilla.kernel.org wrote:

> http://bugzilla.kernel.org/show_bug.cgi?id=10852
> 
>            Summary: reset high speed USB device using ehci_hcd
>            Product: Drivers
>            Version: 2.5
>      KernelVersion: 2.6.25.4
>           Platform: All
>         OS/Version: Linux
>               Tree: Mainline
>             Status: NEW
>           Severity: normal
>           Priority: P1
>          Component: USB
>         AssignedTo: greg@kroah.com
>         ReportedBy: julien@kirya.net
> 
> 
> Latest working kernel version: ?
> Earliest failing kernel version: ?
> Distribution: Debian GNU/Linux sid
> Hardware Environment:
> 
> $ lsusb 
> Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
> Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
> Bus 004 Device 003: ID 046d:c505 Logitech, Inc. Cordless Mouse+Keyboard
> Receiver
> Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
> Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
> Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
> Bus 007 Device 002: ID 058f:6362 Alcor Micro Corp. Hi-Speed 21-in-1 Flash
> Card
> Reader/Writer (Internal/External)
> Bus 007 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
> Bus 006 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
> 
> 
> tail /var/log/messages:
> Jun  4 18:19:51 athyr kernel: [  585.689363] usb 7-3: new high speed USB
> device
> using ehci_hcd and address 5
> Jun  4 18:19:52 athyr kernel: [  585.723547] usb 7-3: configuration #1 chosen
> from 1 choice
> Jun  4 18:19:52 athyr kernel: [  585.723895] scsi8 : SCSI emulation for USB
> Mass Storage devices
> Jun  4 18:19:52 athyr kernel: [  585.724055] usb 7-3: New USB device found,
> idVendor=058f, idProduct=6362
> Jun  4 18:19:52 athyr kernel: [  585.724058] usb 7-3: New USB device strings:
> Mfr=1, Product=2, SerialNumber=3
> Jun  4 18:19:52 athyr kernel: [  585.724062] usb 7-3: Product: Mass Storage
> Device
> Jun  4 18:19:52 athyr kernel: [  585.724064] usb 7-3: Manufacturer: Generic
> Jun  4 18:19:52 athyr kernel: [  585.724066] usb 7-3: SerialNumber:
> 058F312D81B
> Jun  4 18:19:57 athyr kernel: [  586.729415] scsi 8:0:0:0: Direct-Access    
> Generic  USB SD Reader    1.00 PQ: 0 ANSI: 0
> Jun  4 18:19:57 athyr kernel: [  586.729415] scsi 8:0:0:1: Direct-Access    
> Generic  USB CF Reader    1.01 PQ: 0 ANSI: 0
> Jun  4 18:19:57 athyr kernel: [  586.729415] scsi 8:0:0:2: Direct-Access    
> Generic  USB SM Reader    1.02 PQ: 0 ANSI: 0
> Jun  4 18:19:57 athyr kernel: [  586.729415] scsi 8:0:0:3: Direct-Access    
> Generic  USB MS Reader    1.03 PQ: 0 ANSI: 0
> Jun  4 18:19:57 athyr kernel: [  586.730267] sd 8:0:0:0: [sdb] Attached SCSI
> removable disk
> Jun  4 18:19:57 athyr kernel: [  586.732122] sd 8:0:0:1: [sdc] Attached SCSI
> removable disk
> Jun  4 18:19:57 athyr kernel: [  586.744093] sd 8:0:0:2: [sdd] Attached SCSI
> removable disk
> Jun  4 18:19:57 athyr kernel: [  586.746113] sd 8:0:0:3: [sde] Attached SCSI
> removable disk
> 
> 
> Problem Description:
> 
> Several Debian users have recently complained about frequent errors in their
> log related to the ehci_hcd module.
> I will only talk about my own experience, others have detailed theirs on the
> original bug report on Debian BTS:
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=473800
> 
> When I plug my USB card reader, I notice several entries in my log files as
> follows:
> 
> Jun  1 08:22:08 athyr kernel: [ 1412.134045] usb 6-2: reset high speed USB
> device using ehci_hcd and address 3
> 
> After a while (I haven't counted exactly, but it is at least several
> minutes),
> I see:
> [ 2478.872720] usb 2-3: reset high speed USB device using ehci_hcd and
> address
> 2
> [ 2478.901695] usb 2-3: can’t restore configuration #1 (error=-71)
> [ 2478.901716] usb 2-3: USB disconnect, address 2
> [ 2478.901880] sd 0:0:0:3: [sde] READ CAPACITY failed
> [ 2478.901881] sd 0:0:0:3: [sde] Result: hostbyte=DID_ERROR
> driverbyte=DRIVER_OK,SUGGEST_OK
> [ 2478.901885] sd 0:0:0:3: [sde] Sense not available.
> [ 2478.901923] sd 0:0:0:3: [sde] Write Protect is off
> [ 2478.901926] sd 0:0:0:3: [sde] Mode Sense: 00 00 00 00
> [ 2478.901928] sd 0:0:0:3: [sde] Assuming drive cache: write through
> [ 2478.902078] sd 0:0:0:3: [sde] READ CAPACITY failed
> [ 2478.902079] sd 0:0:0:3: [sde] Result: hostbyte=DID_ERROR
> driverbyte=DRIVER_OK,SUGGEST_OK
> [ 2478.902082] sd 0:0:0:3: [sde] Sense not available.
> [ 2478.902119] sd 0:0:0:3: [sde] Write Protect is off
> [ 2478.902121] sd 0:0:0:3: [sde] Mode Sense: 00 00 00 00
> [ 2478.902123] sd 0:0:0:3: [sde] Assuming drive cache: write through
> [ 2478.992731] usb 2-3: new high speed USB device using ehci_hcd and address
> 4
> 
> After this, no other log entries.
> 
> If I unplug the card reader and connect it again, the errors do not appear
> anymore.
> 
> The card reader seems however to work OK (only tested with CF, ie. sdc, there
> is no other card elsewhere).
> This is however not the case for other users who report system crash
> following
> to these errors.
> 
> I have tried to disable USB auto-suspend, and changing the idle-delay time
> (default is 2 seconds), but it doesn’t help at all.
> 
> Unloading ehci_hcd is a workaround, as uhci_hcd is automatically loaded.
> 
> Note that the Debian kernel maintainers do not have any Debian specific usb
> ehci patches.
> 
> Cheers,
> Julien
Comment 2 Alan Stern 2008-06-04 14:03:01 UTC
On Wed, 4 Jun 2008, Andrew Morton wrote:

> On Wed,  4 Jun 2008 09:24:06 -0700 (PDT) bugme-daemon@bugzilla.kernel.org
> wrote:
> 
> > http://bugzilla.kernel.org/show_bug.cgi?id=10852
> > 
> >            Summary: reset high speed USB device using ehci_hcd

> > Several Debian users have recently complained about frequent errors in
> their
> > log related to the ehci_hcd module.
> > I will only talk about my own experience, others have detailed theirs on
> the
> > original bug report on Debian BTS:
> > http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=473800
> > 
> > When I plug my USB card reader, I notice several entries in my log files as
> > follows:
> > 
> > Jun  1 08:22:08 athyr kernel: [ 1412.134045] usb 6-2: reset high speed USB
> > device using ehci_hcd and address 3

These sorts of errors generally indicate a problem in the device's USB
interface.  For example, it might be accepting data faster than the
card can handle.  You may find that decreasing max_sectors to 128 helps
(see <http://www.linux-usb.org/FAQ.html#i5>).

> > If I unplug the card reader and connect it again, the errors do not appear
> > anymore.

This suggests an easy workaround: Always unplug the card reader when 
you start up your computer and then connect it again.  Then you should 
never see any errors!  :-)

Alan Stern
Comment 3 Julien Valroff 2008-06-05 10:51:25 UTC
Thanks Alan for your answer.

> > Jun  1 08:22:08 athyr kernel: [ 1412.134045] usb 6-2: reset high speed USB
> > device using ehci_hcd and address 3

> These sorts of errors generally indicate a problem in the device's USB
> interface.  For example, it might be accepting data faster than the
> card can handle.  You may find that decreasing max_sectors to 128 helps
> (see <http://www.linux-usb.org/FAQ.html#i5>).

I have forgotten to mention I had already tried that. Reducing max_sectors to 128 for all devices (sdb to sde in my case) hasn't changed anything.

Note that these errors show when no card is inserted in any slots of the card reader.

> > If I unplug the card reader and connect it again, the errors do not appear
> > anymore.

> This suggests an easy workaround: Always unplug the card reader when 
> you start up your computer and then connect it again.  Then you should 
> never see any errors!  :-)

I could also switch off my computer, but I do not think it would help much ;-)

Cheers,
Julien
Comment 4 Yakov Mindelis 2008-06-12 07:28:01 UTC
I have same probelem with usb hub (both in externally and bus powered mode, works fine without the hub).
With wd mybook  I get 
"reset high speed USB device using ehci_hcd and address..." 

with sandisk crizer micro 4GB I get:
"device descriptor read/64, error -110 "
and then lot of mess from fat fs.
The test was duplicating a 300MB file on the same drive.

Changing the /sys/block/sdX/device/max_sectors doesn't help (120/128/64)

System:
IBM TP r50e with 2.6.25.6 (custom buit, the only patch is tuxonice3.0r7)
gpt "hub 004A"
debian 4.0 testing


Jack
Comment 5 Yakov Mindelis 2008-06-19 09:36:24 UTC
Erm... (blush) just did a wild shot and it proved to be right. Replaced the (brand new short shielded) cable that came with the hub by a (long, not shielded  old one, with two big cylinders near the edges). Made couple of tests, and viola.  With  device/max_sectors=240. Using bus power. Al works (hd to itself, hd to cruzer, cruzer to cruzer, several times, not a blip in the /var/log/messages)
Go figure.

Apologies for the noise.

Jack
Comment 6 Greg Kroah-Hartman 2008-06-19 20:46:59 UTC
heh, no problem, thanks for letting us know, will close this out now.