Bug 113827

Summary: usb_storage USB2.0 ehci_hcd kernel bug: lost page write, new high speed USB device
Product: [openSUSE] SUSE LINUX 10.0 Reporter: Janos Toberling <tobi>
Component: KernelAssignee: Olaf Hering <ohering>
Status: RESOLVED DUPLICATE QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None    
Version: Beta 3   
Target Milestone: ---   
Hardware: i386   
OS: All   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: logs

Description Janos Toberling 2005-08-29 12:26:08 UTC
On my ThinkPad T40 I have an USB2.0 interface. I have an external storage on a   
IDE2USB device  uPD720130 (Bus 004 Device 003: ID 14c2:0001 Gemlight Computer,  
Ltd ).    
   
Under heavy bus usage the USB device drops the connection, the disk is lost.  
I found some information that can be related the problem:  
http://kerneltrap.org/node/3844   
  
Kernel: 2.6.13-rc6-git13-4-default  
Some log:  
Aug 27 10:40:14 linux kernel: usb 2-2: USB disconnect, address 5  
Aug 27 10:40:21 linux kernel: usb 4-4: new high speed USB device using  
ehci_hcd and address 4  
Aug 27 10:40:22 linux kernel: SCSI subsystem initialized  
Aug 27 10:40:22 linux kernel: Initializing USB Mass Storage driver...  
Aug 27 10:40:22 linux kernel: scsi0 : SCSI emulation for USB Mass Storage  
devices  
Aug 27 10:40:22 linux kernel: usb-storage: device found at 4  
Aug 27 10:40:22 linux kernel: usb-storage: waiting for device to settle before  
scanning  
Aug 27 10:40:22 linux kernel: usbcore: registered new driver usb-storage  
Aug 27 10:40:22 linux kernel: USB Mass Storage support registered.  
Aug 27 10:40:27 linux kernel:   Vendor: HTS54804  Model: 0M9AT00            
Rev: MG2O  
Aug 27 10:40:27 linux kernel:   Type:   Direct-Access                       
ANSI SCSI revision: 02  
Aug 27 10:40:27 linux kernel: usb-storage: device scan complete  
Aug 27 10:40:27 linux kernel: SCSI device sda: 78140160 512-byte hdwr sectors  
(40008 MB)  
Aug 27 10:40:27 linux kernel: sda: assuming drive cache: write through  
Aug 27 10:40:27 linux kernel: SCSI device sda: 78140160 512-byte hdwr sectors  
(40008 MB)  
Aug 27 10:40:27 linux kernel: sda: assuming drive cache: write through  
Aug 27 10:40:27 linux kernel:  sda: sda1 sda2 sda3  
Aug 27 10:40:27 linux kernel: Attached scsi disk sda at scsi0, channel 0, id  
0, lun 0  
 
...  
 
Aug 27 10:48:36 linux kernel: usb 4-4: USB disconnect, address 4  
Aug 27 10:48:36 linux resmgr[4123]: set_facl() - ACL error on /dev/sda3,  
acl_set_file: No such file or directory  
Aug 27 10:48:36 linux hal-subfs-mount[7341]: Mount point /media/usbdisk got  
removed.  
Aug 27 10:48:36 linux resmgr[4123]: set_facl() - ACL error on /dev/sda1,  
acl_set_file: No such file or directory  
Aug 27 10:48:36 linux kernel: usb 4-4: new high speed USB device using  
ehci_hcd and address 5  
Aug 27 10:48:45 linux kernel: usb 4-4: new high speed USB device using  
ehci_hcd and address 38  
Aug 27 10:48:46 linux kernel: usb 4-4: new high speed USB device using  
ehci_hcd and address 41  
Aug 27 10:48:46 linux kernel: usb 4-4: new high speed USB device using  
ehci_hcd and address 43  
Aug 27 10:48:47 linux kernel: usb 4-4: new high speed USB device using  
ehci_hcd and address 44  
Aug 27 10:48:50 linux kernel: usb 4-4: new high speed USB device using  
ehci_hcd and address 55  
Aug 27 10:48:51 linux kernel: usb 4-4: new high speed USB device using  
ehci_hcd and address 60  
Aug 27 10:48:55 linux kernel: usb 4-4: new high speed USB device using  
ehci_hcd and address 73  
Aug 27 10:48:58 linux kernel: usb 4-4: new high speed USB device using  
ehci_hcd and address 83  
Aug 27 10:49:01 linux kernel: usb 4-4: new high speed USB device using  
ehci_hcd and address 94  
Aug 27 10:49:03 linux kernel: usb 4-4: new high speed USB device using  
ehci_hcd and address 104  
Aug 27 10:49:05 linux kernel: usb 4-4: new high speed USB device using  
ehci_hcd and address 109  
  
I have found a circumvention that by removing ehci_hcd module the device  
connects to the uhci_hcd driver with a lower speed and it's ok, however it's  
extermly slow (USB1).  
  
After playing with the USB parameters of my kernel I found that changing  
2660,2661c2660,2661  
< # CONFIG_USB_EHCI_SPLIT_ISO is not set  
< # CONFIG_USB_EHCI_ROOT_HUB_TT is not set  
---  
> CONFIG_USB_EHCI_SPLIT_ISO=y  
> CONFIG_USB_EHCI_ROOT_HUB_TT=y  
consolidates the situation but the device names are changed srom sd? -> ub? .
Comment 1 Olaf Hering 2005-09-01 21:49:21 UTC
are you saying that enabling CONFIG_USB_EHCI_SPLIT_ISO=y does fix it for you? 
We do have this option enabled in our kernel rpms, likely since a very long time.

If  
Comment 2 Olaf Hering 2005-09-01 21:54:22 UTC
... you enable CONFIG_BLK_DEV_UB, then CONFIG_USB_STORAGE will not recognize
certain types of USB devices, the 'ub' driver will be used instead.
It is slightly slower and supports only few devices, but appears to work ok for
them.
So if you are using ub and it fixes all the issues you are seeing, then its
likely the different device driver. Can you measure the transfer speed of ub and
usb-storage?

try this command:

mount /dev/sda3 /mnt
dd if=/dev/zero of=/mnt/bigfile bs=4M count=123

umount /mnt

mount /dev/ub3 /mnt
dd ...

Comment 3 Janos Toberling 2005-09-09 13:06:57 UTC
Created attachment 49381 [details]
logs
Comment 4 Janos Toberling 2005-09-09 13:08:14 UTC
Comment on attachment 49381 [details]
logs

Seems that CONFIG_BLK_DEV_UB does not solve the problem. EHCI is still
unstable/unusable. please see attached logs.
Comment 5 Janos Toberling 2005-09-09 13:19:06 UTC
Bug #105585 seems to relate to this problem (see attached log #46853). 
Comment 6 Olaf Hering 2005-09-15 15:48:27 UTC

*** This bug has been marked as a duplicate of 105585 ***