Re: [PATCH] ALSA: usb-audio: reset a MIDI device whose input is stuck

From: Stjepan Poljak

Date: Thu Oct 29 2026 - 13:03:26 EST


On Wed, Oct 28, 2026 at 11:38 AM Stjepan Poljak
<stjepan.poljak@xxxxxxxxx> wrote:
> Hi Takashi,
>
> Thanks for your time, and agreed. The host should have seen the
> disconnect and on xHCI it does. The Pi uses the downstream dwc_otg
> host driver, so I'll first check whether mainline dwc2 has the same
> problem and take it to the Raspberry Pi kernel or to linux-usb
> depending on that.
>
> Sorry for the noise: I sent a v2 yesterday, fixing the review bot's
> findings, before I had seen your reply. Please disregard it.

Please drop this patch. Takashi was right that resetting the device is
the wrong fix. The cause is in snd_usbmidi_urb_error(): -EPIPE falls
into the default case, so every stalled URB is logged and resubmitted at
once, and on the Pi that loop keeps the hub's disconnect from being
processed. I've sent a one-line fix for that instead:
https://lore.kernel.org/linux-sound/20261029165701.2004391-1-stjepan.poljak@xxxxxxxxx/

Stjepan