]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: usb-audio: not submit urb for stopped endpoint
authorHenry Lin <henryl@nvidia.com>
Wed, 13 Nov 2019 02:14:19 +0000 (10:14 +0800)
committerTakashi Iwai <tiwai@suse.de>
Wed, 13 Nov 2019 09:49:31 +0000 (10:49 +0100)
commitf4883836c940c81451e2703052a51bf4aff1fd00
tree9b584d372975ea20ecc3012fdb713f7a4b241aa2
parent856b352239b4d10f71f1755600da42b906f8fc22
ALSA: usb-audio: not submit urb for stopped endpoint

While output urb's snd_complete_urb() is executing, calling
prepare_outbound_urb() may cause endpoint stopped before
prepare_outbound_urb() returns and result in next urb submitted
to stopped endpoint. usb-audio driver cannot re-use it afterwards as
the urb is still hold by usb stack.

This change checks EP_FLAG_RUNNING flag after prepare_outbound_urb() again
to let snd_complete_urb() know the endpoint already stopped and does not
submit next urb. Below kind of error will be fixed:

[  213.153103] usb 1-2: timeout: still 1 active urbs on EP #1
[  213.164121] usb 1-2: cannot submit urb 0, error -16: unknown error

Signed-off-by: Henry Lin <henryl@nvidia.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20191113021420.13377-1-henryl@nvidia.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/usb/endpoint.c