diff options
| author | Stjepan Poljak <stjepan.poljak@gmail.com> | 2026-10-29 17:57:01 +0100 |
|---|---|---|
| committer | Takashi Iwai <tiwai@suse.de> | 2026-11-05 08:54:45 +0100 |
| commit | 316768d7e3fd77855ccf460918152d0f4ca21e45 (patch) | |
| tree | 76817b5f5b30c7e8ab48b7aad38f09b2630bfc7c /scripts/stackusage | |
| parent | a04a1a820f3735fb9c8acc66ce1c05e354296ebe (diff) | |
ALSA: usb-audio: don't resubmit MIDI URBs at once on -EPIPE
When a USB MIDI device answers with a stall, as a bus-powered keyboard
does while it is being switched off, snd_usbmidi_urb_error() falls
through to the default case: it logs "urb status -32" and returns 0, so
the completion handler resubmits the URB at once. That fails the same
way, so the URBs loop, logging every failure, until the disconnect is
processed.
On a Raspberry Pi 3B+ with a keyboard behind the onboard hub, that
disconnect is never processed. Printing to the framebuffer and serial
consoles holds the loop to about 250 messages a second, and all
interrupts are handled on CPU 0, so the hub's port change isn't handled:
the keyboard stays silent until it is replugged. With loglevel=3, the
same kernel processes the disconnect 0.04-0.24 s after the first error
and the keyboard works again.
Treat -EPIPE like the other errors seen while a device goes away: retry
from the error timer after ERROR_DELAY_JIFFIES, without a message. An
endpoint that is really halted wasn't cleared before either; it is now
retried every 100 ms instead of continuously.
Tested on the Raspberry Pi 3B+ (rpi-6.12.y, dwc_otg) with the default
console settings: after each off/on the disconnect is processed, the
keyboard re-enumerates and plays, and nothing is logged for the stall.
Assisted-by: LLM
Signed-off-by: Stjepan Poljak <stjepan.poljak@gmail.com>
Link: https://patch.msgid.link/20261029165701.2004391-1-stjepan.poljak@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'scripts/stackusage')
0 files changed, 0 insertions, 0 deletions
