Re: [PATCH] USB: core: Enable root_hub's remote wakeup for wakeup sources

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Alan,

<snip>

This all makes sense. Since Huacai's patch was originally intended to fix Loongson's OHCI implementation, I was beginning to suspect if it exists for OHCI implementations found on older x86 platforms, say, AMD's SB600/700 series south bridges. Also to see if this issue is shared between OHCI and UHCI.

I have purchased a motherboard to test this and will report back as soon as I get my hands on it.


I have since purchased a Gigabyte GA-78LMT-S2 motherboard with an SB710 south bridge, the USB OHCI controllers and USB device tree are as follows:

00:12.0 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB OHCI0 Controller [1002:4397] 00:12.1 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0 USB OHCI1 Controller [1002:4398] 00:13.0 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB OHCI0 Controller [1002:4397] 00:13.1 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0 USB OHCI1 Controller [1002:4398] 00:14.5 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB OHCI2 Controller [1002:4399]

/:  Bus 001.Port 001: Dev 001, Class=root_hub, Driver=ohci-pci/3p, 12M
    ID 1d6b:0001 Linux Foundation 1.1 root hub
/:  Bus 002.Port 001: Dev 001, Class=root_hub, Driver=ehci-pci/6p, 480M
    ID 1d6b:0002 Linux Foundation 2.0 root hub
/:  Bus 003.Port 001: Dev 001, Class=root_hub, Driver=ehci-pci/6p, 480M
    ID 1d6b:0002 Linux Foundation 2.0 root hub
/:  Bus 004.Port 001: Dev 001, Class=root_hub, Driver=ohci-pci/3p, 12M
    ID 1d6b:0001 Linux Foundation 1.1 root hub
/:  Bus 005.Port 001: Dev 001, Class=root_hub, Driver=ohci-pci/3p, 12M
    ID 1d6b:0001 Linux Foundation 1.1 root hub
/:  Bus 006.Port 001: Dev 001, Class=root_hub, Driver=ohci-pci/3p, 12M
    ID 1d6b:0001 Linux Foundation 1.1 root hub
|__ Port 002: Dev 004, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
        ID 17ef:6099 Lenovo
|__ Port 003: Dev 003, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
        ID 046d:c077 Logitech, Inc. Mouse
/:  Bus 007.Port 001: Dev 001, Class=root_hub, Driver=ohci-pci/2p, 12M
    ID 1d6b:0001 Linux Foundation 1.1 root hub

Long story short - wake from keyboard via OHCI works (as opposed to what we have found with the Loongson XA61200 motherboard, which also has an OHCI controller, but in its 7A2000 bridge chip).

Huacai, I suspect that we are looking at a Loongson-specific issue.

For your reference, here are the equivalent logs which I have supplied for the ThinkPad X200s (which, according to my previous testing, failed to wake up from an external keyboard plugged into its UHCI interface). The OHCI to which the keyboard is connected to on this motherboard corresponds to PCI device 0000:00:13.1:

`grep . /sys/bus/usb/devices/*/serial`:

/sys/bus/usb/devices/usb1/serial:0000:00:12.0
/sys/bus/usb/devices/usb2/serial:0000:00:12.2
/sys/bus/usb/devices/usb3/serial:0000:00:13.2
/sys/bus/usb/devices/usb4/serial:0000:00:12.1
/sys/bus/usb/devices/usb5/serial:0000:00:13.0
/sys/bus/usb/devices/usb6/serial:0000:00:13.1
/sys/bus/usb/devices/usb7/serial:0000:00:14.5

`cat /sys/kernel/debug/usb/ohci/0000:00:13.1/*`:

size = 32
 0 [117]: ed8/00000000dd878181 (ls dev4 ep1in-int qlen 1 max 8 00083084)
 1 [ 92]: ed8/000000001f1ee77f (ls dev3 ep1in-int qlen 1 max 4 00043083)
 8 [117]: ed8/00000000dd878181
 9 [ 92]: ed8/000000001f1ee77f
16 [117]: ed8/00000000dd878181
17 [ 92]: ed8/000000001f1ee77f
24 [117]: ed8/00000000dd878181
25 [ 92]: ed8/000000001f1ee77f
bus pci, device 0000:00:13.1
OHCI PCI host controller
ohci_hcd
OHCI 1.0, NO legacy support registers, rh state running
control 0x28f RWC HCFS=operational IE PLE CBSR=3
cmdstatus 0x00000 SOC=0
intrstatus 0x00000024 FNO SF
intrenable 0x8000005a MIE RHSC UE RD WDH
ed_controlhead 0108d0e0
hcca frame 0x6d8a
fmintvl 0xa7782edf FIT FSMPS=0xa778 FI=0x2edf
fmremaining 0x80001dd1 FRT FR=0x1dd1
periodicstart 0x2a2f
lsthresh 0x0628
hub poll timer off
roothub.a 02000b03 POTPGT=2 OCPM NPS PSM NDP=3(3)
roothub.b 00000000 PPCM=0000 DR=0000
roothub.status 00008000 DRWE
roothub.portstatus [0] 0x00000100 PPS
roothub.portstatus [1] 0x00000303 LSDA PPS PES CCS
roothub.portstatus [2] 0x00000303 LSDA PPS PES CCS

`lspci -vv -s 13.0`:

00:13.0 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB OHCI0 Controller (prog-if 10 [OHCI])
	Subsystem: Gigabyte Technology Co., Ltd GA-78/880-series motherboard
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx- Status: Cap- 66MHz+ UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 32, Cache Line Size: 64 bytes
	Interrupt: pin A routed to IRQ 18
	NUMA node: 0
	Region 0: Memory at fe02b000 (32-bit, non-prefetchable) [size=4K]
	Kernel driver in use: ohci-pci

`lspci -vv -s 13.1`:

00:13.1 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0 USB OHCI1 Controller (prog-if 10 [OHCI])
	Subsystem: Gigabyte Technology Co., Ltd GA-MA78GM-S2H motherboard
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx- Status: Cap- 66MHz+ UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 32, Cache Line Size: 64 bytes
	Interrupt: pin A routed to IRQ 18
	NUMA node: 0
	Region 0: Memory at fe02a000 (32-bit, non-prefetchable) [size=4K]
	Kernel driver in use: ohci-pci

Best Regards,
Mingcong Bai




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux