Bug 472326

Summary: ehci_hcd doesn't work with SB600 when various USB hubs are present
Product: [Fedora] Fedora Reporter: Per Nystrom <centaur>
Component: kernelAssignee: Pete Zaitcev <zaitcev>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 9CC: ayurtsev, kernel-maint, quintela, rm+brc
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-02-25 23:32:27 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Errors from /var/log/messages
none
Patch from 2.6.28-rc6 to fix SB700 bug
none
Patch to expand SB700 bug fix to SB600 none

Description Per Nystrom 2008-11-20 03:36:54 UTC
Created attachment 324135 [details]
Errors from /var/log/messages

Description of problem:

Reading and writing to USB storage doesn't work with ATI SB600 USB when certain hubs are present.  This happens regardless of where the storage is plugged in, even if it's not on the hub; the hub screws up every USB port.

Version-Release number of selected component (if applicable):

Present in at least these kernels:
kernel-2.6.26.5-45.fc9.x86_64
kernel-2.6.26.6-79.fc9.x86_64
kernel-2.6.27.5-37.fc9.x86_64

How reproducible:
100%


Steps to Reproduce:
1. Have a motherboard with the ATI SB600 USB controller
2. Attach one of these hubs (maybe others too, but these are what I have):
ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB
ID 0409:005a NEC Corp. HighSpeed Hub

3. Attach a USB storage device to ANY port (doesn't matter if it's on the hub)
4. Start reading or writing the device
5. Eventually you will have failures and get messages like in the attachment
  
If I modprobe -r ehci_hcd and then use the storage, it works fine.  But of course then it's running much slower.

These bugs in bugzilla.kernel.org seem to be related:
http://bugzilla.kernel.org/show_bug.cgi?id=11599
http://bugzilla.kernel.org/show_bug.cgi?id=11456

Comment 1 Per Nystrom 2008-11-28 03:09:31 UTC
Created attachment 324932 [details]
Patch from 2.6.28-rc6 to fix SB700 bug

Comment 2 Per Nystrom 2008-11-28 03:10:58 UTC
Created attachment 324933 [details]
Patch to expand SB700 bug fix to SB600

Comment 3 Per Nystrom 2008-11-28 03:11:44 UTC
I have applied the above attached patches to the latest -- 2.6.27.5-41 -- fc9 kernel SRPM, built it, installed it, and I am running it now.  The problem seems to be fixed.

References:

sb700usb-for-2.6.27.patch
-------------------------
from 2.6.28-rc6 Changelog and vger.kernel.org mailing list:

Author: Andiry Xu <andiry.xu>
Date:   Fri Nov 14 11:42:29 2008 +0800

    USB: fix SB700 usb subsystem hang bug
    
    This patch is required for AMD SB700 south bridge revision A12 and A13 to avoid
    USB subsystem hang symptom. The USB subsystem hang symptom is observed when the
    system has multiple USB devices connected to it. In some cases a USB hub may be
    required to observe this symptom.
    
    This patch works around the problem by correcting the internal register setting
    that will help by changing the behavior of the internal logic to avoid the
    USB subsystem hang issue. The change in the behavior of the logic does not
    impact the normal operation of the USB subsystem.
    
    Reported-by: Volker Armin Hemmann <volker.armin.hemmann>
    Tested-by: Volker Armin Hemmann <volker.armin.hemmann>
    Signed-off-by: Andiry Xu <andiry.xu>
    Signed-off-by: Libin Yang <libin.yang>
    Cc: stable <stable>
    Signed-off-by: Greg Kroah-Hartman <gregkh>

sb600usb-for-2.6.28-rc6.patch
-----------------------------
from http://bugzilla.kernel.org/show_bug.cgi?id=11599

Comment  #24 From Roman Mamedov  2008-11-21 13:45:53 and patch file attached to the kernel.org bug.

Comment 4 Alexander Yurtsev 2009-02-23 19:10:34 UTC
It seems I am experiencing the similar bug:
A USB Flash drive inserted into a hub connected to the M3A Asus motherboard(SB600) is being reset sometimes. And some files written to the drive become corrupted.

kernel 2.6.27.15-170.2.24.fc10.x86_64

lsusb
Bus 001 Device 010: ID 058f:6387 Alcor Micro Corp. Transcend JetFlash Flash Drive
Bus 001 Device 009: ID 2001:f103 D-Link Corp. [hex] 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 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 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 002: ID 046d:c510 Logitech, Inc. Cordless Mouse
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub


dmesg | tail -n 7
sd 10:0:0:0: [sdc] Attached SCSI removable disk
sd 10:0:0:0: Attached scsi generic sg3 type 0
SELinux: initialized (dev sdc1, type fuseblk), uses genfs_contexts
usb 1-3.6: reset high speed USB device using ehci_hcd and address 10
usb 1-3.6: reset high speed USB device using ehci_hcd and address 10
usb 1-3.6: reset high speed USB device using ehci_hcd and address 10
usb 1-3.6: reset high speed USB device using ehci_hcd and address 10

Comment 5 rm+brc 2009-02-23 20:21:18 UTC
(In reply to comment #4)
> It seems I am experiencing the similar bug:
> A USB Flash drive inserted into a hub connected to the M3A Asus
> motherboard(SB600) is being reset sometimes. And some files written to the
> drive become corrupted.

This does not seem to be the same bug at all, and btw this bug is fixed long ago, so it should be closed.

As for the flash drive issue, did you try it on another computer? Does it work fine when plugged directly into the motherboard?

Comment 6 Alexander Yurtsev 2009-02-24 06:54:41 UTC
(In reply to comment #5)
> (In reply to comment #4)
> > It seems I am experiencing the similar bug:
> > A USB Flash drive inserted into a hub connected to the M3A Asus
> > motherboard(SB600) is being reset sometimes. And some files written to the
> > drive become corrupted.
> 
> This does not seem to be the same bug at all, and btw this bug is fixed long
> ago, so it should be closed.

May be this is not exactly the same problem, but I think it's a similar one. As 
it is also related to SB600 USB.
Should I re-file this as a separate issue then?

> 
> As for the flash drive issue, did you try it on another computer? Does it work
> fine when plugged directly into the motherboard?

Yes, the flash drive works fine on another computer with the same USB hub.
In addition, the flash drive seems to work fine also when plugged right into the M3A motherboard without a hub in the middle.

Comment 7 Pete Zaitcev 2009-02-24 14:49:51 UTC
So, it's just a duff hub. Nothing to do with this bug, like Roman said.

Comment 8 Alexander Yurtsev 2009-02-25 08:41:50 UTC
(In reply to comment #7)
> So, it's just a duff hub. Nothing to do with this bug, like Roman said.

Looks like you are right: I've obtained a hub of another brand and the flash drive works through it. So, the problem is in my hub. Thanks.

Comment 9 Chuck Ebbert 2009-02-25 23:32:27 UTC
(In reply to comment #3)
> I have applied the above attached patches to the latest -- 2.6.27.5-41 -- fc9
> kernel SRPM, built it, installed it, and I am running it now.  The problem
> seems to be fixed.

Those fixes are in the current Fedora 9 and 10 kernels.