Skip to content

fix(90kernel-modules): explicitly include xhci-pci-renesas (bsc#1238258)#406

Merged
aafeijoo-suse merged 2 commits intoopenSUSE:SUSE/059from
aafeijoo-suse:059-bsc1238258
Mar 4, 2025
Merged

fix(90kernel-modules): explicitly include xhci-pci-renesas (bsc#1238258)#406
aafeijoo-suse merged 2 commits intoopenSUSE:SUSE/059from
aafeijoo-suse:059-bsc1238258

Conversation

@aafeijoo-suse
Copy link
Collaborator

Since Linux v6.12-rc1 (commit 25f51b76f90f), xhci-pci no longer depends on xhci-pci-renesas, causing the Renesas driver to be omitted during initramfs generation (when built as a module).

This makes platforms with such xHCI controllers unavailable during initrd, and unable to boot from a USB drive. There are SuperSpeed ports routed through such controller on some platforms, too, which also renders the USB keyboard and mouse unusable.

Here's a snippet of the kernel log from such platform, showing a keyboard and a mouse being detected only after the initrd switched root:

[    9.352608] systemd-journald[187]: Received SIGTERM from PID 1 (systemd).
[    9.500146] systemd[1]: systemd 257.2 running in system mode (OMITTED)
...
[   11.187756] xhci-pci-renesas 0000:04:00.0: xHCI Host Controller
[   11.187870] xhci-pci-renesas 0000:04:00.0: new USB bus registered, assigned bus number 7
[   11.193261] xhci-pci-renesas 0000:04:00.0: hcc params 0x014051cf hci version 0x100 quirks 0x0000000100000010
[   11.194806] xhci-pci-renesas 0000:04:00.0: xHCI Host Controller
[   11.196601] xhci-pci-renesas 0000:04:00.0: new USB bus registered, assigned bus number 8
[   11.196613] xhci-pci-renesas 0000:04:00.0: Host supports USB 3.0 SuperSpeed
[   11.196927] usb usb7: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 6.13
[   11.196931] usb usb7: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[   11.196935] usb usb7: Product: xHCI Host Controller
[   11.196938] usb usb7: Manufacturer: Linux 6.13.3-aosc-main xhci-hcd
[   11.196941] usb usb7: SerialNumber: 0000:04:00.0
[   11.199598] hub 7-0:1.0: USB hub found
[   11.199630] hub 7-0:1.0: 4 ports detected
...
[   11.439561] usb 7-2: new high-speed USB device number 2 using xhci-pci-renesas
[   11.568361] usb 7-2: New USB device found, idVendor=1532, idProduct=0114, bcdDevice= 1.00
[   11.568369] usb 7-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[   11.568372] usb 7-2: Product: DeathStalker Ultimate
[   11.568376] usb 7-2: Manufacturer: Razer
[   11.600474] input: Razer DeathStalker Ultimate as /devices/pci0000:00/0000:00:0e.0/0000:04:00.0/usb7/7-2/7-2:1.0/0003:1532:0114.0001/input/input12
[   11.600686] hid-generic 0003:1532:0114.0001: input,hidraw0: USB HID v1.11 Mouse [Razer DeathStalker Ultimate] on usb-0000:04:00.0-2/input0
[   11.601137] input: Razer DeathStalker Ultimate Keyboard as /devices/pci0000:00/0000:00:0e.0/0000:04:00.0/usb7/7-2/7-2:1.1/0003:1532:0114.0002/input/input13
[   11.652148] input: Razer DeathStalker Ultimate as /devices/pci0000:00/0000:00:0e.0/0000:04:00.0/usb7/7-2/7-2:1.1/0003:1532:0114.0002/input/input14
[   11.652409] hid-generic 0003:1532:0114.0002: input,hidraw1: USB HID v1.11 Keyboard [Razer DeathStalker Ultimate] on usb-0000:04:00.0-2/input1
[   11.653054] input: Razer DeathStalker Ultimate as /devices/pci0000:00/0000:00:0e.0/0000:04:00.0/usb7/7-2/7-2:1.2/0003:1532:0114.0003/input/input15
[   11.703768] hid-generic 0003:1532:0114.0003: input,hidraw2: USB HID v1.11 Keyboard [Razer DeathStalker Ultimate] on usb-0000:04:00.0-2/input2

(cherry picked from commit dracut-ng/dracut-ng@20cc20d)

Cyanoxygen and others added 2 commits March 3, 2025 16:46
Since Linux v6.12-rc1 (commit 25f51b76f90f), xhci-pci no longer depends
on xhci-pci-renesas, causing the Renesas driver to be omitted during
initramfs generation (when built as a module).

This makes platforms with such xHCI controllers unavailable during
initrd, and unable to boot from a USB drive. There are SuperSpeed ports
routed through such controller on some platforms, too, which also
renders the USB keyboard and mouse unusable.

Here's a snippet of the kernel log from such platform, showing a
keyboard and a mouse being detected only after the initrd switched root:

[    9.352608] systemd-journald[187]: Received SIGTERM from PID 1 (systemd).
[    9.500146] systemd[1]: systemd 257.2 running in system mode (OMITTED)
...
[   11.187756] xhci-pci-renesas 0000:04:00.0: xHCI Host Controller
[   11.187870] xhci-pci-renesas 0000:04:00.0: new USB bus registered, assigned bus number 7
[   11.193261] xhci-pci-renesas 0000:04:00.0: hcc params 0x014051cf hci version 0x100 quirks 0x0000000100000010
[   11.194806] xhci-pci-renesas 0000:04:00.0: xHCI Host Controller
[   11.196601] xhci-pci-renesas 0000:04:00.0: new USB bus registered, assigned bus number 8
[   11.196613] xhci-pci-renesas 0000:04:00.0: Host supports USB 3.0 SuperSpeed
[   11.196927] usb usb7: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 6.13
[   11.196931] usb usb7: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[   11.196935] usb usb7: Product: xHCI Host Controller
[   11.196938] usb usb7: Manufacturer: Linux 6.13.3-aosc-main xhci-hcd
[   11.196941] usb usb7: SerialNumber: 0000:04:00.0
[   11.199598] hub 7-0:1.0: USB hub found
[   11.199630] hub 7-0:1.0: 4 ports detected
...
[   11.439561] usb 7-2: new high-speed USB device number 2 using xhci-pci-renesas
[   11.568361] usb 7-2: New USB device found, idVendor=1532, idProduct=0114, bcdDevice= 1.00
[   11.568369] usb 7-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[   11.568372] usb 7-2: Product: DeathStalker Ultimate
[   11.568376] usb 7-2: Manufacturer: Razer
[   11.600474] input: Razer DeathStalker Ultimate as /devices/pci0000:00/0000:00:0e.0/0000:04:00.0/usb7/7-2/7-2:1.0/0003:1532:0114.0001/input/input12
[   11.600686] hid-generic 0003:1532:0114.0001: input,hidraw0: USB HID v1.11 Mouse [Razer DeathStalker Ultimate] on usb-0000:04:00.0-2/input0
[   11.601137] input: Razer DeathStalker Ultimate Keyboard as /devices/pci0000:00/0000:00:0e.0/0000:04:00.0/usb7/7-2/7-2:1.1/0003:1532:0114.0002/input/input13
[   11.652148] input: Razer DeathStalker Ultimate as /devices/pci0000:00/0000:00:0e.0/0000:04:00.0/usb7/7-2/7-2:1.1/0003:1532:0114.0002/input/input14
[   11.652409] hid-generic 0003:1532:0114.0002: input,hidraw1: USB HID v1.11 Keyboard [Razer DeathStalker Ultimate] on usb-0000:04:00.0-2/input1
[   11.653054] input: Razer DeathStalker Ultimate as /devices/pci0000:00/0000:00:0e.0/0000:04:00.0/usb7/7-2/7-2:1.2/0003:1532:0114.0003/input/input15
[   11.703768] hid-generic 0003:1532:0114.0003: input,hidraw2: USB HID v1.11 Keyboard [Razer DeathStalker Ultimate] on usb-0000:04:00.0-2/input2

(cherry picked from commit dracut-ng/dracut-ng@20cc20d)
Copy link
Collaborator

@tblume tblume left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@aafeijoo-suse aafeijoo-suse merged commit 73dd12b into openSUSE:SUSE/059 Mar 4, 2025
2 checks passed
lslezak added a commit to agama-project/agama that referenced this pull request Apr 28, 2025
## Problem

- The installer does not boot via PXE on ppc64le architecture
- https://bugzilla.suse.com/show_bug.cgi?id=1241887
- During boot this error message is printed and booting is aborted:
  ```
dracut-pre-mount[1075]: modprobe: FATAL: Module brd not found in
directory
  /usr/lib/modules/6.12.0-160000.5-default
  ```
- The generated initrd does not contain the `brd` driver which is need
by Kiwi for PXE boot
- The build log contains this error:
  ```
dracut[E]: FAILED: /usr/lib/dracut/dracut-install -D
/var/tmp/dracut.ZzQ4qS/initramfs
-N ^i2o_scsi$ --kerneldir /lib/modules/6.12.0-160000.9-default/ -m
xhci_pci-renesas
acpi_ipmi ipmi_devintf ipmi_poweroff ipmi_si ipmi_ssif ipmi_watchdog brd
  ```
- Despite the error dracut reports success so the problem can be easily
overlooked 😟

## Solution

- It turned out that dracut gives up at the first missing driver
(`acpi_ipmi`) and does not add the other remaining drivers
- The original check tested only the presence of the `ipmi` directory
but the content can be actually different on different architectures
- So rather explicitly check presence of each driver

## Additional fix

- Removed the workaround for adding the `xhci-pci-renesas` driver, now
it is included in the default dracut drivers
- See openSUSE/dracut#406

## Testing

- Build tested in
https://build.opensuse.org/package/show/systemsmanagement:Agama:branches:pxe_build_fix_ppc64/agama-installer
- The build output snippet on ppc64le, the `acpi_ipmi` driver was
skipped (on x86_64 all drivers are found and added to initrd)
```
[  314s] [ DEBUG   ]: 14:11:17 | Skipping driver acpi_ipmi, not found in the system
[  314s] [ DEBUG   ]: 14:11:17 | Adding ipmi_devintf driver to initrd...
[  314s] [ DEBUG   ]: 14:11:17 | Adding ipmi_poweroff driver to initrd...
[  314s] [ DEBUG   ]: 14:11:17 | Adding ipmi_si driver to initrd...
[  314s] [ DEBUG   ]: 14:11:17 | Adding ipmi_ssif driver to initrd...
[  314s] [ DEBUG   ]: 14:11:17 | Adding ipmi_watchdog driver to initrd...
```
- All required drivers are present in the created initrd:
```
[  611s] dracut[D]: drwxr-xr-x   2 root     root            0 Apr 28 16:12 usr/lib/modules/6.14.2-1-default/kernel/drivers/char/ipmi
[  611s] dracut[D]: -rw-r--r--   1 root     root        29763 Apr 14 08:05 usr/lib/modules/6.14.2-1-default/kernel/drivers/char/ipmi/ipmi_devintf.ko
[  611s] dracut[D]: -rw-r--r--   1 root     root       146051 Apr 14 08:05 usr/lib/modules/6.14.2-1-default/kernel/drivers/char/ipmi/ipmi_msghandler.ko
[  611s] dracut[D]: -rw-r--r--   1 root     root        33211 Apr 14 08:05 usr/lib/modules/6.14.2-1-default/kernel/drivers/char/ipmi/ipmi_poweroff.ko
[  611s] dracut[D]: -rw-r--r--   1 root     root       178883 Apr 14 08:05 usr/lib/modules/6.14.2-1-default/kernel/drivers/char/ipmi/ipmi_si.ko
[  611s] dracut[D]: -rw-r--r--   1 root     root        77371 Apr 14 08:05 usr/lib/modules/6.14.2-1-default/kernel/drivers/char/ipmi/ipmi_ssif.ko
[  611s] dracut[D]: -rw-r--r--   1 root     root        59123 Apr 14 08:05 usr/lib/modules/6.14.2-1-default/kernel/drivers/char/ipmi/ipmi_watchdog.ko
...
[  611s] dracut[D]: -rw-r--r--   1 root     root        38395 Apr 14 08:05 usr/lib/modules/6.14.2-1-default/kernel/drivers/usb/host/xhci-pci-renesas.ko
...
[  611s] dracut[D]: -rw-r--r--   1 root     root        23387 Apr 14 08:05 usr/lib/modules/6.14.2-1-default/kernel/drivers/block/brd.ko
```

---------

Co-authored-by: Imobach González Sosa <igonzalezsosa@suse.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants