Bug 5682

Summary: USB hard drive disconnects (2.6.7-2.6.13) or is never recognized (2.6.14) with ehci_hcd
Product: Drivers Reporter: David Faure (faure)
Component: USBAssignee: David Brownell (dbrownell)
Status: REJECTED INSUFFICIENT_DATA    
Severity: normal CC: bunk, greg, scott
Priority: P2    
Hardware: i386   
OS: Linux   
Kernel Version: 2.6.14.3 Subsystem:
Regression: --- Bisected commit-id:
Bug Depends on:    
Bug Blocks: 5089    

Description David Faure 2005-11-30 03:24:47 UTC
Most recent kernel where this bug did not occur: 2.6.14.3 behaves     
differently from earlier versions (I tried 2.6.7, 2.6.11 and 2.6.13), but both 
have bugs when using ehci_hcd. I didn't try with older kernels than 2.6.7. 
  
Distribution: Mandrake Linux, but those kernels were self-compiled from    
kernel.org sources    
Hardware Environment: IBM Thinkpad R50 laptop, Pentium M.    
Software Environment: hmm... gcc-3.4.3, x.org, kde-3.5, was that the question?    
Problem Description:     
  This is about a 160G USB-2.0 external hard drive, in a 3.5" case.   
 
  With 2.6.7, 2.6.11 or 2.6.13 the drive is recognized using ehci_hcd, I mount 
it, but when using the drive I get a USB disconnect very soon (as mentionned in 
Bug 4057, but the comments in that bug ask for separate reports to be filed for 
specific problems).  
  
 Nov 25 10:37:31 Asterix kernel: Linux version 2.6.13.2 (root@Asterix) (gcc 
version 3.4.3 (Mandrakelinux 10.2 3.4.3-7mdk)) #2 Sat Sep 24 21:08:35 CEST 2005 
[...] 
Nov 25 10:37:31 Asterix kernel: ehci_hcd 0000:00:1d.7: Intel Corporation 
82801DB/DBM (ICH4/ICH4-M) USB2 EHCI Controller 
Nov 25 10:37:31 Asterix kernel: ehci_hcd 0000:00:1d.7: debug port 1 
Nov 25 10:37:31 Asterix kernel: ehci_hcd 0000:00:1d.7: new USB bus registered, 
assigned bus number 4 
Nov 25 10:37:31 Asterix kernel: ehci_hcd 0000:00:1d.7: irq 11, io mem 
0xc0000000 
Nov 25 10:37:31 Asterix kernel: PCI: cache line size of 32 is not supported by 
device 0000:00:1d.7 
Nov 25 10:37:31 Asterix kernel: ehci_hcd 0000:00:1d.7: USB 2.0 initialized, 
EHCI 1.00, driver 10 Dec 2004 
[...] 
 
Nov 25 17:01:33 Asterix kernel: usb 4-4: new high speed USB device using 
ehci_hcd and address 2 
Nov 25 17:01:34 Asterix kernel: SCSI subsystem initialized 
Nov 25 17:01:34 Asterix kernel: Initializing USB Mass Storage driver... 
Nov 25 17:01:34 Asterix kernel: scsi0 : SCSI emulation for USB Mass Storage 
devices 
Nov 25 17:01:34 Asterix kernel: usbcore: registered new driver usb-storage 
Nov 25 17:01:34 Asterix kernel: USB Mass Storage support registered. 
Nov 25 17:01:34 Asterix kernel: usb-storage: device found at 2 
Nov 25 17:01:34 Asterix kernel: usb-storage: waiting for device to settle 
before scanning 
Nov 25 17:01:40 Asterix kernel:   Vendor: SAMSUNG   Model: SP1604N           
Rev:  0 0 
Nov 25 17:01:40 Asterix kernel:   Type:   Direct-Access                      
ANSI SCSI revision: 00 
Nov 25 17:01:40 Asterix kernel: usb-storage: device scan complete 
Nov 25 17:01:40 Asterix scsi.agent[4278]: disk 
at /devices/pci0000:00/0000:00:1d.7/usb4/4-4/4-4:1.0/host0/target0:0:0/0:0:0:0 
Nov 25 17:01:40 Asterix kernel: SCSI device sda: 312581808 512-byte hdwr 
sectors (160042 MB) 
Nov 25 17:01:40 Asterix kernel: sda: assuming drive cache: write through 
Nov 25 17:01:40 Asterix kernel: SCSI device sda: 312581808 512-byte hdwr 
sectors (160042 MB) 
Nov 25 17:01:40 Asterix kernel: sda: assuming drive cache: write through 
Nov 25 17:01:40 Asterix kernel:  sda: sda1 
Nov 25 17:01:40 Asterix kernel: Attached scsi disk sda at scsi0, channel 0, id 
0, lun 0 
[but later on: ] 
Nov 25 17:32:25 Asterix kernel: usb 4-4: USB disconnect, address 2 
Nov 25 17:32:25 Asterix kernel: scsi0 (0:0): rejecting I/O to device being 
removed 
Nov 25 17:32:25 Asterix kernel: Buffer I/O error on device sda1, logical block 
592 
Nov 25 17:32:25 Asterix kernel: lost page write due to I/O error on sda1 
Nov 25 17:32:25 Asterix kernel: Aborting journal on device sda1. 
Nov 25 17:32:25 Asterix kernel: journal commit I/O error 
(and then this is repeated for other logical blocks)  
   
With 2.6.14.3 (and verbose debug enabled for usb in kernel config), things are 
different: 
Nov 30 11:36:53 Asterix kernel: hub 4-0:1.0: state 5 ports 6 chg 0000 evt 0010 
Nov 30 11:36:53 Asterix kernel: ehci_hcd 0000:00:1d.7: GetStatus port 4 status 
001803 POWER sig=j CSC CONNECT 
Nov 30 11:36:53 Asterix kernel: hub 4-0:1.0: port 4, status 0501, change 0001, 
480 Mb/s 
Nov 30 11:36:53 Asterix kernel: hub 4-0:1.0: debounce: port 4: total 100ms 
stable 100ms status 0x501 
Nov 30 11:36:53 Asterix kernel: ehci_hcd 0000:00:1d.7: GetStatus port 4 status 
001002 POWER sig=se0 CSC 
Nov 30 11:36:53 Asterix kernel: hub 4-0:1.0: state 5 ports 6 chg 0000 evt 0010 
Nov 30 11:36:53 Asterix kernel: ehci_hcd 0000:00:1d.7: GetStatus port 4 status 
001803 POWER sig=j CSC CONNECT 
Nov 30 11:36:53 Asterix kernel: hub 4-0:1.0: port 4, status 0501, change 0001, 
480 Mb/s 
Nov 30 11:36:53 Asterix kernel: hub 4-0:1.0: debounce: port 4: total 100ms 
stable 100ms status 0x501 
Nov 30 11:36:53 Asterix kernel: ehci_hcd 0000:00:1d.7: GetStatus port 4 status 
001002 POWER sig=se0 CSC 
Nov 30 11:36:53 Asterix kernel: hub 4-0:1.0: state 5 ports 6 chg 0000 evt 0010 
Nov 30 11:36:53 Asterix kernel: ehci_hcd 0000:00:1d.7: GetStatus port 4 status 
001803 POWER sig=j CSC CONNECT 
 
in syslog (going on for ever), and in messages: 
 
Nov 30 11:37:03 Asterix kernel: usb 4-4: new high speed USB device using 
ehci_hcd and address 42 
Nov 30 11:37:04 Asterix kernel: usb 4-4: new high speed USB device using 
ehci_hcd and address 45 
Nov 30 11:37:06 Asterix kernel: usb 4-4: new high speed USB device using 
ehci_hcd and address 50 
Nov 30 11:37:06 Asterix kernel: usb 4-4: new high speed USB device using 
ehci_hcd and address 52 
Nov 30 11:37:09 Asterix kernel: usb 4-4: new high speed USB device using 
ehci_hcd and address 60 
Nov 30 11:37:10 Asterix kernel: usb 4-4: new high speed USB device using 
ehci_hcd and address 64 
 
Since I read about ehci_hcd being the problem, I did rmmod ehci_hcd, and then 
it all works fine: 
 
Nov 30 11:39:01 Asterix kernel: ehci_hcd 0000:00:1d.7: USB bus 4 deregistered 
Nov 30 11:39:01 Asterix kernel: ACPI: PCI interrupt for device 0000:00:1d.7 
disabled 
Nov 30 11:39:01 Asterix kernel: usb 2-2: new full speed USB device using 
uhci_hcd and address 2 
Nov 30 11:39:01 Asterix kernel: usb 2-2: Product: USB2.0 Storage Device 
[etc. it proceeded to the normal initialization] 
 
Feel free to ask for more info if needed.
Comment 1 Greg Kroah-Hartman 2006-02-14 17:48:39 UTC
Does this still happen on 2.6.15 or 2.6.16-rc3?
Comment 2 Adrian Bunk 2006-04-22 13:03:12 UTC
Please reopen this bug if it's still present in kernel 2.6.16.
Comment 3 Scott Courtney 2007-06-22 06:08:33 UTC
I can replicate this exact behavior under kernel 2.6.18-4-686 from a stock Debian 4.0 installation, on a ThinkPad R50. The ehci_hcd driver and all my USB 2.0 devices were working flawlessly under whatever kernel is in SuSE OpenLinux 10.0, but after upgrading to Debian 4.0, I can only use the uhci_hcd driver and all my USB devices are treated as the much slower USB 1.1.

I've tested this behavior with drives from Maxtor, LG, and others, with an audio I/O device from a company called ADS, and with a Creative Zen MP3 player. All the devices behave the same way. Also, inserting a brand-new USB 2.0 hub (Belkin) between the Thinkpad R50 and the devices does not change the behavior.

It boils down to, if ehci_hcd is loaded, then USB 2.0 devices repeatedly connect and disconnect but don't otherwise function. If I unload ehci_hcd, then everything works but only as USB 1.1.

I'm willing to run additional tests if requested, but am refraining from posting large lsusb or other data here because it largely duplicates what David Faure already posted.

Kind regards,

Scott Courtney
scott at 4th dot com