Skip to content
Commit 2db2be56 authored by Chris Down's avatar Chris Down Committed by Takashi Iwai
Browse files

ALSA: usb-audio: Rate limit usb_set_interface error reporting



When an error occurs during USB disconnection sometimes things can go
wrong as endpoint_set_interface may end up being called repeatedly. For
example:

% dmesg --notime | grep 'usb 3-7.1.4' | sort | uniq -c | head -2
   3069 usb 3-7.1.4: 1:1: usb_set_interface failed (-19)
    908 usb 3-7.1.4: 1:1: usb_set_interface failed (-71)

In my case, there sometimes are hundreds of these usb_set_interface
failure messages a second when I disconnect the hub that has my USB
audio device.

These messages can take a huge amount of the kmsg ringbuffer and don't
provide any extra information over the previous ones, so ratelimit them.

Signed-off-by: default avatarChris Down <chris@chrisdown.name>
Link: https://lore.kernel.org/r/ZEKf8UYBYa1h4JWR@chrisdown.name


Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 4d421eeb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment