LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   mkinitrd_command_generator and ehci_hcd (https://www.linuxquestions.org/questions/slackware-14/mkinitrd_command_generator-and-ehci_hcd-4175524648/)

pdi 11-07-2014 02:20 AM

mkinitrd_command_generator and ehci_hcd
 
In Slackware64-14.1, the huge kernel has both echi_hcd and ehci_pci configured as modules. After booting with the huge kernel, lsmod suggests ehci_hcd is used by ehci_pci, and lspci -k shows the USB controller using ehci_pci, not ehci_hcd.

Code:

# grep -i ehci /boot/config-huge-3.10.17
CONFIG_USB_ARCH_HAS_EHCI=y
CONFIG_USB_EHCI_HCD=m
CONFIG_USB_EHCI_ROOT_HUB_TT=y
CONFIG_USB_EHCI_TT_NEWSCHED=y
CONFIG_USB_EHCI_PCI=m
CONFIG_USB_EHCI_HCD_PLATFORM=m
# lsmod | grep ehci
echi_pci            3688  0
ehci_hcd            39725  1 ehci_pci
# lspci -k | grep -B 2 ehci
00:1a.7 USB controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #2 (rev 03)
  Subsystem: Hewlett-Packard Company Device 30e7
  Kernel driver in use: ehci-pci
  Kernel modules: ehci_pci
--
00:1d.7 USB controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #1 (rev 03)
  Subsystem: Hewlett-Packard Company Device 30e7
  Kernel driver in use: ehci-pci
  Kernel modules: ehci_pci

If mkinitrd_command_generator.sh is run in this setting, it gives a cmdline which misses echi_hcd:
Code:

mkinitrd -c -k 3.10.17 -f ext4 -r /dev/sda1 -m usbhid:hid_generic:uhci-hcd:mbcache:jbd2:ext4 -u -o /boot/initrd.gz
It misses echi_hcd, because it uses ls -Ld /sys/module/*_hcd/drivers/* to pick modules for the USB Host Controller, and there is no /sys/module/ehci_hcd/drivers/ subdir, only a /sys/module/ehci_pci/drivers/.

After booting with this initrd, without the ehci_hcd, and the generic kernel, the kernel issues a warning in dmesg:
Code:

<4>[    5.640786] Warning! ehci_hcd should always be loaded before uhci_hcd and ohci_hcd, not after
Of course, including manually the ehci_hcd module in the above cmdline results in an initrd which boots without repeating the kernel warning.

It seems kernel 3.10.17 handles ehci differently from previous Slackware kernels and hopefully a next version of the mkinitrd_command_generator.sh will address this. This is not intended as criticism, I am indebted to alienBOB for his on-going contribution to Slackware. :hattip:

Two similar threads I could locate, here, and here.

Didier Spaier 11-07-2014 02:48 AM

I don't remember if I used the script mkinitrd_command_generator.sh at that time but I had a similar issue, closed in including the module ehci-pci in the initrd.

brianL 11-07-2014 04:41 AM

I used the mkinitrd_command_generator script on my Slackware64, and don't get that warning in dmesg.
Code:

root@slackdesk:~# dmesg | grep ehci_hcd
[    4.829959] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    5.456474] usb usb1: Manufacturer: Linux 3.10.17 ehci_hcd


pdi 11-07-2014 11:14 AM

@didier Thanks, I didn't come across your thread when I looked.
@brianL If a usb disk, or stick, is plugged-in while running mkinitrd_command_generator.sh, the usb storage modules are included and with them usb_hcd, resulting in no dmesg warning. Perhaps other similar cases also exist.


All times are GMT -5. The time now is 05:39 PM.