[OpenWrt-Devel] issue: usb1.x not detected in CC

Luiz Angelo Daros de Luca luizluca at gmail.com
Thu Jan 22 23:57:43 EST 2015


Further information:

It was indeed the USB_OHCI_HCD_PCI option.
ohci-pci was split from ohci_hcd with:
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=c1117afb85890adf4073c7ff18ebcb4d0495e6af

In BB, the usb controller was detected by ohci_hcd. At some point after the
BB kernel version, the USB controller started to be detected only
by ohci-pci and not ohci_hcd.

In BB:root at OpenWrt:/# dmesg | grep ohci
[    0.543001] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    0.544195] ohci_hcd 0000:00:06.0: setting latency timer to 64
[    0.544203] ohci_hcd 0000:00:06.0: OHCI Host Controller
[    0.544910] ohci_hcd 0000:00:06.0: new USB bus registered, assigned bus
number 2
[    0.545964] ohci_hcd 0000:00:06.0: irq 11, io mem 0xf0804000
[    1.040235] usb 2-1: new full-speed USB device number 2 using ohci_hcd

In CC (without USB_OHCI_HCD_PCI):
root at OpenWrt:/# dmesg |grep ohci
[    0.884995] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    0.890242] ohci-platform: OHCI generic platform driver

In CC (with USB_OHCI_HCD_PCI):
[    0.884343] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    0.885535] ohci-pci: OHCI PCI platform driver
[    0.892110] ohci-pci 0000:00:06.0: OHCI PCI host controller
[    0.893716] ohci-pci 0000:00:06.0: new USB bus registered, assigned bus
number 2
[    0.895858] ohci-pci 0000:00:06.0: irq 11, io mem 0xf0804000
[    0.965726] ohci-platform: OHCI generic platform driver
[    1.400359] usb 2-1: new full-speed USB device number 2 using ohci-pci

I fixed my problem creating a new kmod-ohci-pci that includes ohci-pci.ko.
Probably, it should also be added to be built-in on every target that is
pci-based and already include CONFIG_USB_OHCI_HCD build-in, like
target/linux/x86/generic/config-default and others (which one?). However,
it loads nicely as a module.

I can submit the patch for the new kmod but I'm not sure about kernel
dependencies like LINUX_3_x as ohci-pci.ko seems to be present only after
3.10.

Looking the kernel commit log, it seems that ohci-pci wasn't the only one
driver that was split from ohci. It was an effort for multi-plataform
kernels on ARM. I guess every other one might need a kmod-ohci-xxx as well.
So, the problem might affect every OHCI controller that where split.
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/log/drivers/usb/host/ohci-hcd.c

In summary, no OHCI controller for CC on any target (except by some drivers
that still lives inside ohci-hcd like octeon and other exotic platforms).

BTW, CONFIG_USB_OHCI_ATH79, used for kmod-usb-ohci is deprecated at 3.14.x.

"This option is deprecated now and the driver was removed, use
      USB_OHCI_HCD_PLATFORM instead."

Regards,

Em Thu Jan 22 2015 at 02:19:48, Luiz Angelo Daros de Luca <
luizluca at gmail.com> escreveu:

Hello,
>
> I'm running OpenWRT in Virtualbox. I have no problem with BB. However,
> when testing trunk, I noticed that usb1.x functions simply does not work.
>
> For BB, in a clean install (+usbutils), I get:
> https://downloads.openwrt.org/barrier_breaker/14.07/x86/
> generic/openwrt-x86-generic-combined-ext4.img.gz
>
> root at OpenWrt:/# lsusb
> *Bus 002 Device 002: ID 80ee:0021 VirtualBox USB Tablet*
> Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
> *Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub*
>
> root at OpenWrt:/# dmesg | egrep -i '(usb|hci)'
> [    0.063968] ACPI: bus type USB registered
> [    0.064573] usbcore: registered new interface driver usbfs
> [    0.065292] usbcore: registered new interface driver hub
> [    0.065990] usbcore: registered new device driver usb
> [    0.511884] ahci 0000:00:0d.0: version 3.0
> [    0.513388] ahci: SSS flag set, parallel bus scan disabled
> [    0.514182] ahci 0000:00:0d.0: AHCI 0001.0100 32 slots 1 ports 3 Gbps
> 0x1 impl SATA mode
> [    0.515223] ahci 0000:00:0d.0: flags: 64bit ncq stag only ccc
> [    0.515945] ahci 0000:00:0d.0: setting latency timer to 64
> [    0.516085] scsi0 : ahci
> [    0.521108] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
> [    0.522068] ehci-pci: EHCI PCI platform driver
> [    0.523007] ehci-pci 0000:00:0b.0: setting latency timer to 64
> [    0.523015] ehci-pci 0000:00:0b.0: EHCI Host Controller
> [    0.523673] ehci-pci 0000:00:0b.0: new USB bus registered, assigned bus
> number 1
> [    0.524738] ehci-pci 0000:00:0b.0: irq 10, io mem 0xf0840000
> [    0.540886] ehci-pci 0000:00:0b.0: USB 2.0 started, EHCI 1.00
> *[    0.541668] hub 1-0:1.0: USB hub found*
> [    0.542882] ehci-platform: EHCI generic platform driver
> [    0.543609] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
> [    0.544824] ohci_hcd 0000:00:06.0: setting latency timer to 64
> [    0.544831] ohci_hcd 0000:00:06.0: OHCI Host Controller
> [    0.545495] ohci_hcd 0000:00:06.0: new USB bus registered, assigned bus
> number 2
> [    0.546662] ohci_hcd 0000:00:06.0: irq 11, io mem 0xf0804000
> *[    0.600350] hub 2-0:1.0: USB hub found*
> [    0.602055] uhci_hcd: USB Universal Host Controller Interface driver
> [    0.603133] usbcore: registered new interface driver usb-storage
> [    1.040233] usb 2-1: new full-speed USB device number 2 using ohci_hcd
>
> And for CC, in a clean install (+usbutils), I get:
> https://downloads.openwrt.org/snapshots/trunk/x86/openwrt-
> x86-generic-combined-ext4.img.gz
>
> root at OpenWrt:/# lsusb
> Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
>
> root at OpenWrt:/# dmesg | egrep -i '(usb|hci)'
> [    0.207085] ACPI: bus type USB registered
> [    0.208234] usbcore: registered new interface driver usbfs
> [    0.210038] usbcore: registered new interface driver hub
> [    0.211447] usbcore: registered new device driver usb
> [    0.846969] ahci 0000:00:0d.0: version 3.0
> [    0.850123] ahci 0000:00:0d.0: SSS flag set, parallel bus scan disabled
> [    0.851991] ahci 0000:00:0d.0: AHCI 0001.0100 32 slots 1 ports 3 Gbps
> 0x1 impl SATA mode
> [    0.854051] ahci 0000:00:0d.0: flags: 64bit ncq stag only ccc
> [    0.855726] scsi0 : ahci
> [    0.865267] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
> [    0.866641] ehci-pci: EHCI PCI platform driver
> [    0.868536] ehci-pci 0000:00:0b.0: EHCI Host Controller
> [    0.870011] ehci-pci 0000:00:0b.0: new USB bus registered, assigned bus
> number 1
> [    0.872088] ehci-pci 0000:00:0b.0: irq 10, io mem 0xf0806000
> [    0.890021] ehci-pci 0000:00:0b.0: USB 2.0 started, EHCI 1.00
> *[    0.891475] hub 1-0:1.0: USB hub found*
> [    0.910106] ehci-platform: EHCI generic platform driver
> [    0.911554] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
> [    0.913104] ohci-platform: OHCI generic platform driver
> [    0.914517] uhci_hcd: USB Universal Host Controller Interface driver
> [    0.916619] usbcore: registered new interface driver usb-storage
>
> In CC, there is no "Linux Foundation 1.1 root hub". Only EHCI hub is
> detected. ohci_hcd was expected to detect a new hub. If I disable usb2.0 in
> virtualbox config, OpenWRT gets no USB support in CC. Virtual machine
> configs are equal.
>
> kmod-usb-ohci is not installed by default in both system. However, both
> systems seems to have some usb modules (including usb-ohci) built in
> kernel. So, kmod-usb-ohci contains only control files (CC) or no files
> (BB). Anyway, installing kmod-usb-ohci does not fix the problem. BTW,
> shouldn't all "empty" packages for built-in modules be installed by
> default? (most of <1k kmod-*.ipk)
>
> I have already tested CC installing all kmod packages with no change on
> the USB problem.
>
> Checking my Ubuntu (with kernel newer than OpenWRT), I noticed that there
> is a new ohci-pci in dmesg:
>
> ohci-pci: OHCI PCI platform driver
>
> Maybe it is USB_OHCI_HCD_PCI that is missing.
>
> Any tips?
>
> Regards,
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150123/51385218/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list