镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

usb: dwc2: regression in split interrupt handling breaks FIDO (YubiKey) behind hub #7282

Closed

Description

@jose1711

Describe the bug

Commit 5329a41 ("usb: dwc2: masquerade split-interrupt transfers") introduces a regression that makes communication with a YubiKey (FIDO2) unreliable to the point of being unusable.

The issue was observed on a ClockworkPi uConsole (CM4-based), where the YubiKey is connected via the internal USB hub.

Symptoms

  • HID device enumerates correctly (/dev/hidrawX exists)
  • Interrupt transfers intermittently fail
  • FIDO operations (CTAPHID) frequently time out
  • Userspace tools (e.g. ykman) fail to communicate reliably

Reverting the above commit restores fully stable operation.

Hardware

  • Device: ClockworkPi uConsole (CM4 module)
  • USB topology: YubiKey connected via internal hub (Genesys Logic)
  • YubiKey: 1050:0407 (YubiKey 5 series)

Steps to reproduce the behaviour

Test preparation

  • clone repository, get extra patches for uConsole hardware (display, battery..)
    git clone https://github.com/raspberrypi/linux.git
    wget -O clockworkdrivers1.patch https://github.com/ak-rex/ClockworkPi-linux/commit/5633aedcb3fd632d64c54db0184880d1954de62b.patch
    wget -O clockworkdrivers2.patch https://github.com/ak-rex/ClockworkPi-linux/commit/4b5b5fe35abbbf4193ddbeab149833172096066b.patch
    
  • apply patches to the tree
    cd linux
    git apply ../clockworkdrivers*.patch
    
  • compile the kernel
    make clean
    make bcm7211_defconfig
    make -j$(nproc) Image module dtbs
    
  • copy generated dtb, overlays, module and kernel image to microSD card
  • boot the uConsole device
  • plug in YubiKey to USB and initiate the test procedure:
    • run sudo ykman fido info multiple times
    • invoke python script 10 times

Test results

Output with current head + clockwork hw patches:

jose@clockworkpi:~ $ sudo ykman fido info
WARNING: Failed opening device
ERROR: Failed to connect to YubiKey.
jose@clockworkpi:~ $ sudo ykman fido info
WARNING: Failed opening device
ERROR: Failed to connect to YubiKey.

jose@clockworkpi:~ $ for i in $(seq 10); do sudo ./write_test.py ; sleep 1; done
write failed: [Errno 32] Broken pipe
write ok
write failed: [Errno 32] Broken pipe
write ok
write failed: [Errno 32] Broken pipe
write ok
write failed: [Errno 32] Broken pipe
write ok
write failed: [Errno 32] Broken pipe
write ok

Output with current head + clockwork patches + reverted commit 5329a41

jose@clockworkpi:~ $ sudo ykman fido info
AAGUID:             2fc0579f-8113-47ea-b116-bb5a8db9202a
PIN:                8 attempt(s) remaining
Minimum PIN length: 4
jose@clockworkpi:~ $ sudo ykman fido info
AAGUID:             2fc0579f-8113-47ea-b116-bb5a8db9202a
PIN:                8 attempt(s) remaining
Minimum PIN length: 4
jose@clockworkpi:~ $ sudo ykman fido info
AAGUID:             2fc0579f-8113-47ea-b116-bb5a8db9202a
PIN:                8 attempt(s) remaining
Minimum PIN length: 4

jose@clockworkpi:~ $ for i in $(seq 10); do sudo ./write_test.py ; sleep 1; done
write ok
write ok
write ok
write ok
write ok
write ok
write ok
write ok
write ok
write ok

Device (s)

Other, Raspberry Pi CM4 Lite

System

jose@clockworkpi:~ $ lsb_release -a
No LSB modules are available.
Distributor ID:	Debian
Description:	Debian GNU/Linux 13 (trixie)
Release:	13
Codename:	trixie

jose@clockworkpi:~ $ cat /etc/rpi-issue 
Raspberry Pi reference 2026-02-25
Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, , stage2

jose@clockworkpi:~ $ vcgencmd version 
Feb 17 2025 20:03:07 
Copyright (c) 2012 Broadcom
version da7125f985dfe3cb0cf91e3c47f1ace88018e466 (clean) (release) (start)

jose@clockworkpi:~ $ uname -a
Linux clockworkpi 6.12.77-v8+ #3 SMP PREEMPT Sat Mar 21 11:58:25 CET 2026 aarch64 GNU/Linux

jose@clockworkpi:~ $ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 05e3:0608 Genesys Logic, Inc. Hub
Bus 001 Device 005: ID feed:0000 Clockwork uConsole Keyboard
Bus 001 Device 006: ID 1050:0407 Yubico.com Yubikey 4/5 OTP+U2F+CCID

Logs

No response

Additional context

  • issue is reproducible 100%
  • not observed on earlier kernels
  • not resolved by HID quirks
  • likely specific to DWC2 + hub + interrupt transfer interaction

Activity

  1. P33M commented on Mar 23, 2026

    @P33M
    Contributor

    Please post the full output of sudo lsusb -v.

  2. added
    Close within 30 daysIssue will be closed within 30 days unless requested to stay open
    on Mar 26, 2026
  3. jose1711 commented on Mar 26, 2026

    @jose1711
    Author

    Please post the full output of sudo lsusb -v.

    yubikey_lsusb_v.txt

  4. P33M commented on Mar 27, 2026

    @P33M
    Contributor

    I think this is a recurrence of a failure case that was fixed in dwc_otg in #2077

    Your device uses the same endpoint index for IN/OUT interrupt, but the hub hardware is different to the original issue report. With the FIQ microscheduler it was relatively easy to reschedule transfers to the same TT, but dwc2 will probably need more invasive changes.

  5. P33M commented on Mar 27, 2026

    @P33M
    Contributor

    Can you try updating with sudo rpi-update pulls/7290 and test. A quick check with a Pi 3B+, dwc2 and keyboard confirms that USB still works, but I don't have any devices with the yubikey's quirk.

  6. jose1711 commented on Mar 30, 2026

    @jose1711
    Author

    I've applied your patch to current head + clockwork patches and recompiled. Then I ran a loop of 20 write tests, 1 second apart, followed by another loop with ykman fido info command.
    Not a single issue was encountered.

  7. P33M commented on Mar 31, 2026

    @P33M
    Contributor

    Thanks for testing. I've rebased the PR to rpi-6.18.y as that is now under active development, with rpi-6.12.y only receiving critical fixes. I would recommend updating your OS to target 6.18.

  8. pelwell commented on Apr 27, 2026

    @pelwell
    Contributor

    I think this has been dealt with.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Close within 30 daysIssue will be closed within 30 days unless requested to stay open

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions