none
USB Hub issue RRS feed

  • Question

  • Hi,

    I am working on USB HUb in WEC7. Host controller is not of EHCI, OHCI and UHCI. 

    All ports of the hub are getting detected by the controller. But at a time only one port is working, I mean only one high speed device which is connected to the hub would work. I am facing following couple of issues:

    1. No response if I connect another device to any of the ports other than already detected and working port.

    2. Transfer error interrupt to the host controller from the hub if I remove the already mounted device.

    Any response would be very much helpful.

    Seetharam


    Seeth

    • Changed type Seeth Tuesday, June 24, 2014 1:51 PM
    Tuesday, June 24, 2014 12:56 PM

All replies

  • Can you answer few things :

    1. Does the power comes on the other port of the hub or you are getting vbus error ?

    2. How are you handling the interrupt (shared irq using GISSR ) if yes please check and tell us the configuration

    3. When the USB device is inserted on the other port are you getting the detection and removal interrupt (ennumeration is happening) ?

    --- Misbah


    Please mark it as answer or vote as helpful if my reply helps.

    Project Leader

    T.E.S Electroni Solutions (Bangalore-India)

    www.tes-dst.com email-misbah.khan@tes-dst.com

    • Edited by Misbah Khan Wednesday, June 25, 2014 5:31 AM
    Wednesday, June 25, 2014 5:30 AM
  • Hi Misbah,

    1. Initially all the ports of the hub are getting powered. SetOrclearfeature is getting done for all the ports. Once I connect to one port of the hub and it will get mounted and read/write works fine, but if I connect different pen drive to other port, no response on debug terminal. 

    2. Interrupt handling with GISSR is I am not sure of. Please explain what configuration you are talking about, I will provide immediately.

    3. No, Usbhubstatuschangethread is not at all giving any debug prints.

    Below is the log from the beginning till the detection in one port.

    PID:00400002 TID:00A50022 CHW::Initialize - signalling global reset
    PID:00400002 TID:00A50022 Number of ports is 3
    PID:00400002 TID:00A50022 MUSB: +CRootHub::EnterOperationalState
    PID:00400002 TID:0144004E  CHW::Full Speed Device
    PID:00400003 TID:0144004E  CHW::Full Speed Device
    PID:00400003 TID:0144004E  CHW::Full Speed Device
    PID:00400003 TID:0144004E MUSB: +CRootHub::SetOrClearFeature - port = 1, set/clear = 0x1, feature = 0x10
    PID:00400003 TID:0144004E MUSB: CHub(Root tier 0)::HubStatusChangeThread - port 1, change = 0x0001, status = 0x0101
    PID:00400003 TID:0144004E hubStatus PortEnableChange = 0
    PID:00400003 TID:0144004E hubStatus PortEnabled = 0
    PID:00400003 TID:0144004E hubStatus PortConnected = 1
    PID:00400003 TID:0144004E hubStatus ForceDetach = 0
    PID:00400003 TID:0144004E hubStatus.change.port.ConnectStatusChange = 1
    PID:00400002 TID:02190012 PDDTouchIST: IST thread started
    PID:00CF0033 TID:0390001A MSIM: IM_ReadRegistry read KB 5
    PID:00400002 TID:0144004E       UsbHost : New Hub [address(1) / layer(0)]
    PID:00400003 TID:0144004E       AttachDevice : INSERT DEVICE
    PID:00400003 TID:0144004E       AttachDevice : ENTER OPER MODE
    PID:00400003 TID:0144004E MUSB: +CExternalHub::EnterOperationalState
    PID:00400002 TID:02CB003E MUSB: +CExternalHub::SetOrClearFeature - port = 1, set/clear = 0x3, feature = 0x8
    PID:00400002 TID:0144004E MUSB: CHub(Root tier 0)::HubStatusChangeThread - port 1, change = 0x0000, status = 0x0503
    PID:00400003 TID:0144004E hubStatus PortEnableChange = 0
    PID:00400003 TID:0144004E hubStatus PortEnabled = 1
    PID:00400003 TID:0144004E hubStatus PortConnected = 1
    PID:00400003 TID:0144004E hubStatus ForceDetach = 0
    PID:00400003 TID:0144004E hubStatus.change.port.ConnectStatusChange = 0
    PID:00400003 TID:02CB003E MUSB: +CExternalHub::SetOrClearFeature - port = 1, set/clear = 0x3, feature = 0x16
    PID:00400003 TID:02CB003E MUSB: +CExternalHub::SetOrClearFeature - port = 2, set/clear = 0x3, feature = 0x8
    PID:00400003 TID:02CB003E MUSB: +CExternalHub::SetOrClearFeature - port = 2, set/clear = 0x3, feature = 0x16
    PID:00400002 TID:02CB003E MUSB: +CExternalHub::SetOrClearFeature - port = 3, set/clear = 0x3, feature = 0x8
    PID:00400003 TID:02CB003E MUSB: +CExternalHub::SetOrClearFeature - port = 3, set/clear = 0x3, feature = 0x16
    PID:00400002 TID:02CB003E MUSB: +CExternalHub::SetOrClearFeature - port = 4, set/clear = 0x3, feature = 0x8
    PID:00400002 TID:02CB003E MUSB: +CExternalHub::SetOrClearFeature - port = 4, set/clear = 0x3, feature = 0x16
    PID:00400002 TID:02CB003E Suspending Hub and all the activities and closing status thread
    PID:00400003 TID:02CB003E MUSB: +CRootHub::SetOrClearFeature - port = 1, set/clear = 0x3, feature = 0x2
    PID:00400002 TID:0144004E MUSB: +CRootHub::SetOrClearFeature - port = 1, set/clear = 0x1, feature = 0x11
    PID:00400002 TID:0144004E MUSB: CHub(Root tier 0)::HubStatusChangeThread - port 1, change = 0x0002, status = 0x0501
    PID:00400003 TID:0144004E hubStatus PortEnableChange = 1
    PID:00400003 TID:0144004E hubStatus PortEnabled = 0
    PID:00400003 TID:0144004E hubStatus PortConnected = 1
    PID:00400003 TID:0144004E hubStatus ForceDetach = 0
    PID:00400003 TID:0144004E hubStatus.change.port.ConnectStatusChange = 0
    PID:00400002 TID:02FA005A MUSB: +CHub::DetachDownstreamDeviceThread
    PID:00400003 TID:02FA005A HandleDetach CHub
    PID:00400003 TID:02FA005A MUSB: CHub(Root tier 1)::HandleDetach - status change thread closed in 0 ms
    PID:00400002 TID:01D6004E Wait for PHY to complete............
    PID:00400003 TID:01D6004E PHY done
    PID:00400003 TID:01D6004E 1000 Mbps speed Detected
    PID:00400003 TID:0144004E       UsbHost : New Hub [address(1) / layer(0)]
    PID:00400003 TID:0144004E       AttachDevice : INSERT DEVICE
    PID:00400003 TID:0144004E       AttachDevice : ENTER OPER MODE
    PID:00400003 TID:0144004E MUSB: +CExternalHub::EnterOperationalState
    PID:00400002 TID:03B80062 MUSB: +CExternalHub::SetOrClearFeature - port = 1, set/clear = 0x3, feature = 0x8
    PID:00400003 TID:0144004E MUSB: CHub(Root tier 0)::HubStatusChangeThread - port 1, change = 0x0000, status = 0x0503
    PID:00400003 TID:0144004E hubStatus PortEnableChange = 0
    PID:00400003 TID:0144004E hubStatus PortEnabled = 1
    PID:00400003 TID:0144004E hubStatus PortConnected = 1
    PID:00400003 TID:0144004E hubStatus ForceDetach = 0
    PID:00400003 TID:0144004E hubStatus.change.port.ConnectStatusChange = 0
    PID:00400003 TID:03B80062 MUSB: +CExternalHub::SetOrClearFeature - port = 1, set/clear = 0x3, feature = 0x16
    PID:00400003 TID:03B80062 MUSB: +CExternalHub::SetOrClearFeature - port = 2, set/clear = 0x3, feature = 0x8
    PID:00400003 TID:03B80062 MUSB: +CExternalHub::SetOrClearFeature - port = 2, set/clear = 0x3, feature = 0x16
    PID:00400003 TID:03B80062 MUSB: +CExternalHub::SetOrClearFeature - port = 3, set/clear = 0x3, feature = 0x8
    PID:00400003 TID:03B80062 MUSB: +CExternalHub::SetOrClearFeature - port = 3, set/clear = 0x3, feature = 0x16
    PID:00400003 TID:03B80062 MUSB: +CExternalHub::SetOrClearFeature - port = 4, set/clear = 0x3, feature = 0x8
    PID:00400003 TID:03B80062 MUSB: +CExternalHub::SetOrClearFeature - port = 4, set/clear = 0x3, feature = 0x16
    PID:00400003 TID:03B80062 Suspending Hub and all the activities and closing status thread
    PID:00400003 TID:03B80062 MUSB: +CRootHub::SetOrClearFeature - port = 1, set/clear = 0x3, feature = 0x2
    PID:00400002 TID:0144004E MUSB: +CRootHub::SetOrClearFeature - port = 1, set/clear = 0x1, feature = 0x11
    PID:00400002 TID:0144004E MUSB: CHub(Root tier 0)::HubStatusChangeThread - port 1, change = 0x0002, status = 0x0501
    PID:00400003 TID:0144004E hubStatus PortEnableChange = 1
    PID:00400003 TID:0144004E hubStatus PortEnabled = 0
    PID:00400003 TID:0144004E hubStatus PortConnected = 1
    PID:00400003 TID:0144004E hubStatus ForceDetach = 0
    PID:00400003 TID:0144004E hubStatus.change.port.ConnectStatusChange = 0
    PID:00400002 TID:036A0062 MUSB: +CHub::DetachDownstreamDeviceThread
    PID:00400003 TID:036A0062 HandleDetach CHub
    PID:00400003 TID:036A0062 MUSB: CHub(Root tier 1)::HandleDetach - status change thread closed in 0 ms
    PID:00400003 TID:0144004E       UsbHost : New Hub [address(1) / layer(0)]
    PID:00400003 TID:0144004E       AttachDevice : INSERT DEVICE
    PID:00400003 TID:0144004E       AttachDevice : ENTER OPER MODE
    PID:00400003 TID:0144004E MUSB: +CExternalHub::EnterOperationalState
    PID:00400002 TID:03E70062 MUSB: +CExternalHub::SetOrClearFeature - port = 1, set/clear = 0x3, feature = 0x8
    PID:00400003 TID:0144004E MUSB: CHub(Root tier 0)::HubStatusChangeThread - port 1, change = 0x0000, status = 0x0503
    PID:00400003 TID:0144004E hubStatus PortEnableChange = 0
    PID:00400003 TID:0144004E hubStatus PortEnabled = 1
    PID:00400003 TID:0144004E hubStatus PortConnected = 1
    PID:00400003 TID:0144004E hubStatus ForceDetach = 0
    PID:00400003 TID:0144004E hubStatus.change.port.ConnectStatusChange = 0
    PID:00400003 TID:03E70062 MUSB: +CExternalHub::SetOrClearFeature - port = 1, set/clear = 0x3, feature = 0x16
    PID:00400003 TID:03E70062 MUSB: +CExternalHub::SetOrClearFeature - port = 2, set/clear = 0x3, feature = 0x8
    PID:00400003 TID:03E70062 MUSB: +CExternalHub::SetOrClearFeature - port = 2, set/clear = 0x3, feature = 0x16
    PID:00400003 TID:03E70062 MUSB: +CExternalHub::SetOrClearFeature - port = 3, set/clear = 0x3, feature = 0x8
    PID:00400003 TID:03E70062 MUSB: +CExternalHub::SetOrClearFeature - port = 3, set/clear = 0x3, feature = 0x16
    PID:00400003 TID:03E70062 MUSB: +CExternalHub::SetOrClearFeature - port = 4, set/clear = 0x3, feature = 0x8
    PID:00400003 TID:03E70062 MUSB: +CExternalHub::SetOrClearFeature - port = 4, set/clear = 0x3, feature = 0x16
    PID:00400003 TID:03E70062 Suspending Hub and all the activities and closing status thread
    PID:00400003 TID:03E70062 MUSB: +CRootHub::SetOrClearFeature - port = 1, set/clear = 0x3, feature = 0x2
    PID:00400002 TID:0144004E MUSB: +CRootHub::SetOrClearFeature - port = 1, set/clear = 0x1, feature = 0x11
    PID:00400003 TID:0144004E MUSB: CHub(Root tier 0)::HubStatusChangeThread - port 1, change = 0x0002, status = 0x0501
    PID:00400003 TID:0144004E hubStatus PortEnableChange = 1
    PID:00400003 TID:0144004E hubStatus PortEnabled = 0
    PID:00400003 TID:0144004E hubStatus PortConnected = 1
    PID:00400003 TID:0144004E hubStatus ForceDetach = 0
    PID:00400003 TID:0144004E hubStatus.change.port.ConnectStatusChange = 0
    PID:00400002 TID:03C9005E MUSB: +CHub::DetachDownstreamDeviceThread
    PID:00400003 TID:03C9005E HandleDetach CHub
    PID:00400003 TID:03C9005E MUSB: CHub(Root tier 1)::HandleDetach - status change thread closed in 0 ms
    PID:00400003 TID:0144004E       UsbHost : New Hub [address(1) / layer(0)]
    PID:00400003 TID:0144004E       AttachDevice : INSERT DEVICE
    PID:00400003 TID:0144004E       AttachDevice : ENTER OPER MODE
    PID:00400003 TID:0144004E MUSB: +CExternalHub::EnterOperationalState
    PID:00400002 TID:026B0066 MUSB: +CExternalHub::SetOrClearFeature - port = 1, set/clear = 0x3, feature = 0x8
    PID:00400003 TID:0144004E MUSB: CHub(Root tier 0)::HubStatusChangeThread - port 1, change = 0x0000, status = 0x0503
    PID:00400003 TID:0144004E hubStatus PortEnableChange = 0
    PID:00400003 TID:0144004E hubStatus PortEnabled = 1
    PID:00400003 TID:0144004E hubStatus PortConnected = 1
    PID:00400003 TID:0144004E hubStatus ForceDetach = 0
    PID:00400003 TID:0144004E hubStatus.change.port.ConnectStatusChange = 0
    PID:00400003 TID:026B0066 MUSB: +CExternalHub::SetOrClearFeature - port = 1, set/clear = 0x3, feature = 0x16
    PID:00400003 TID:026B0066 MUSB: +CExternalHub::SetOrClearFeature - port = 2, set/clear = 0x3, feature = 0x8
    PID:00400003 TID:026B0066 MUSB: +CExternalHub::SetOrClearFeature - port = 2, set/clear = 0x3, feature = 0x16
    PID:00400003 TID:026B0066 MUSB: +CExternalHub::SetOrClearFeature - port = 3, set/clear = 0x3, feature = 0x8
    PID:00400003 TID:026B0066 MUSB: +CExternalHub::SetOrClearFeature - port = 3, set/clear = 0x3, feature = 0x16
    PID:00400003 TID:026B0066 MUSB: +CExternalHub::SetOrClearFeature - port = 4, set/clear = 0x3, feature = 0x8
    PID:00400003 TID:026B0066 MUSB: +CExternalHub::SetOrClearFeature - port = 4, set/clear = 0x3, feature = 0x16
    PID:00400003 TID:026B0066 MUSB: +CExternalHub::SetOrClearFeature - port = 2, set/clear = 0x1, feature = 0x10
    PID:00400003 TID:026B0066 Waitforstatuschange returns TRUE
    PID:00400003 TID:026B0066 MUSB: CHub(Root tier 1)::HubStatusChangeThread - port 2, change = 0x0001, status = 0x0101
    PID:00400003 TID:026B0066 hubStatus PortEnableChange = 0
    PID:00400003 TID:026B0066 hubStatus PortEnabled = 0
    PID:00400003 TID:026B0066 hubStatus PortConnected = 1
    PID:00400003 TID:026B0066 hubStatus ForceDetach = 0
    PID:00400003 TID:026B0066 hubStatus.change.port.ConnectStatusChange = 1
    PID:00400003 TID:026B0066 MUSB: +CExternalHub::SetOrClearFeature - port = 2, set/clear = 0x3, feature = 0x4
    PID:00400003 TID:026B0066 MUSB: +CExternalHub::SetOrClearFeature - port = 2, set/clear = 0x1, feature = 0x14
    PID:00400003 TID:026B0066 MUSB: +CExternalHub::SetOrClearFeature - port = 2, set/clear = 0x3, feature = 0x4
    PID:00400003 TID:026B0066 MUSB: +CExternalHub::SetOrClearFeature - port = 2, set/clear = 0x1, feature = 0x14
    PID:00400003 TID:026B0066       AttachDevice : NEW FUNC
    PID:00400003 TID:026B0066       UsbHost : New Function [address(2) / layer(1)]
    PID:00400003 TID:026B0066       AttachDevice : INSERT DEVICE
    PID:00400003 TID:026B0066       AttachDevice : ENTER OPER MODE
    PID:00400003 TID:026B0066 MUSB: +CFunction(tier 2)::EnterOperationalState
    PID:00400003 TID:026B0066 MUSB: +CFunction(tier 2)::OpenPipe - address = 2
    PID:00400003 TID:026B0066 MUSB: +CFunction(tier 2)::OpenPipe - address = 2

    After this If I connect any device to any other port, no response.

    Thank you for your help.

    Seetharam


    Seeth

    Wednesday, June 25, 2014 5:57 AM
  • How many USB ports do you have ?

    Example If you have two ports you should have two instance of the USB host driver supported :

    The reg setting should be there for two (n number of ports ) as

    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\HCD_HSH1]
       "Prefix"="HCD"
       "Dll"="hcd_hsh1.dll"
       "Order"=dword:15
       "Class"=dword:0c
       "SubClass"=dword:03
       "ProgIF"=dword:20
       "InterfaceType"=dword:0        ;Internal
       "MemBase"=dword:02184000
       "MemLen"=dword:00001000
       "irq"=dword:48
       "IsrDll"="giisr.dll"
       "IsrHandler"="ISRHandler"
       "HcdCapability"=dword:4      ;HCD_SUSPEND_ON_REQUEST
       "OTGSupport"=dword:0
       "OTGGroup"="02"

    [-HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\USBHDProfile]
    [HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\USBHDProfile]
        "Name"="USB Storage"
        "Folder"="USB Storage"

    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\HCD_HSH2]
       "Prefix"="HCD"
       "Dll"="hcd_hsh2.dll"
       "Order"=dword:15
       "Class"=dword:0c
       "SubClass"=dword:03
       "ProgIF"=dword:20
       "InterfaceType"=dword:0        ;Internal
       "MemBase"=dword:53F80000
       "MemLen"=dword:00001000
       "irq"=dword:10
       "IsrDll"="giisr.dll"
       "IsrHandler"="ISRHandler"
       "HcdCapability"=dword:4      ;HCD_SUSPEND_ON_REQUEST
       "OTGSupport"=dword:0
       "OTGGroup"="02"

    Here i was using GIISR.dll for shared irq.

    Can you Check this ?

    --- Misbah


    Please mark it as answer or vote as helpful if my reply helps.

    Project Leader

    T.E.S Electronic Solutions (Bangalore-India)

    www.tes-dst.com email-misbah.khan@tes-dst.com


    • Edited by Misbah Khan Wednesday, June 25, 2014 6:16 AM
    Wednesday, June 25, 2014 6:16 AM
  • Thank you.

    This registry settings should be used when there are two host controllers or we should use it according to number of ports. (My doubt)

    In my processor we have USB 2.0 OTG controller and I am using OTG as a host controller. This is connected to Hub. 

    What values for Membase and irq to be used? I know one value for IRQ which is given in the processor datasheet.

    Regards,

    Seetharam


    Seeth

    Wednesday, June 25, 2014 6:37 AM
  • Hi Seeth,

    Usually Membase would be base address for your OTG Controller.

    In the past we had used OMAP44xx + Compact 7. As I remember we tested USB Hub and connected Mice and Keyboard to the hub. The result is it worked.

    Are you trying with a self powered hub or Bus powered hub. Try to use self powered hub and try with a different vendor.

    What is the processor and BSP are you using?

    Regards,

    GSR

    Wednesday, June 25, 2014 10:35 AM
  • Hi ,

    Yes, Membase is base address and  I am using this address correctly. 

    Great to hear your results. I am using bus powered hub and its mounted on the platform, its not external hub. 

    And the OTG controller is not of UHCI/OHCI/EHCI. Processor Altera Cyclone V and BSP is our own. 

    Regards,

    Seetharam


    Seeth

    Wednesday, June 25, 2014 10:50 AM
  • With respect to the number of ports you need to have different instance of the driver and reg settings.

    Each port should have common irq for usb_otg but your shared interrupt handler "gissr" should be able to decode the port associated to the interrupt.

    You still didnt replied if gissr is being used or not ...

    You can post your reg setting for all the ports

    --- Misbah


    Senior Design Engineer T.E.S Electroni Solutions (Bangalore-India) www.tes-dst.com email-misbah.khan@tes-dst.com

    Wednesday, June 25, 2014 12:46 PM
  • Hi, 

    Alright, Yes, I am using gissr for interrupt handling.

    My registry setting is as below:

       "Prefix"="HCD"
       "Dll"="otghs.dll"
       "Order"=dword:15
       "Class"=dword:0c
       "SubClass"=dword:03
       "ProgIF"=dword:20
       "MemBase"=dword:FFB40000
       "MemLen"=dword:00040000
       "irq"=dword:A0
       "Dma"=dword:1
       "IsrDll"="giisr.dll"
       "IsrHandler"="ISRHandler"
       "HcdCapability"=dword:4      ;HCD_SUSPEND_ON_REQUEST
       "OTGSupport"=dword:0
       "OTGGroup"="02"

    Please let me know What needs to be changed if I need to make it used for 3 ports and I am using gissr from public folder.


    Seeth


    • Edited by Seeth Wednesday, June 25, 2014 1:00 PM
    Wednesday, June 25, 2014 12:57 PM
  • Hi ,

    With this registry settings through OTG port without High speed hub all devices work fine. 

    What might be the issue?

    Seetharam

    Seeth

    Wednesday, June 25, 2014 2:07 PM
  • Hi all,

    Is it possible to make only one port work in a hub without Installable ISR concept?

    As of now I am getting transfer error while removing without any interrupt to the OTG controller. Actually when removed OTG controller should set disconnect bit in Interrupt status/control register according to register definitions. But I do not see that bit getting set. My interrupt thread is in an while loop which continuously checks for the event registered for IRQ. But once one device (memory stick) gets detected, after that it stops polling for that event. Anything is missing ?

    Regards,

    Seetharam


    Seeth

    Friday, June 27, 2014 8:48 AM