android_kernel_google_msm/sound/usb
Takashi Iwai db84e0afa4 ALSA: usb-audio: Don't resubmit pending URBs at MIDI error recovery
commit 66139a48cee1530c91f37c145384b4ee7043f0b7 upstream.

In snd_usbmidi_error_timer(), the driver tries to resubmit MIDI input
URBs to reactivate the MIDI stream, but this causes the error when
some of URBs are still pending like:

 WARNING: CPU: 0 PID: 0 at ../drivers/usb/core/urb.c:339 usb_submit_urb+0x5f/0x70()
 URB ef705c40 submitted while active
 CPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.16.6-2-desktop #1
 Hardware name: FOXCONN TPS01/TPS01, BIOS 080015  03/23/2010
  c0984bfa f4009ed4 c078deaf f4009ee4 c024c884 c09a135c f4009f00 00000000
  c0984bfa 00000153 c061ac4f c061ac4f 00000009 00000001 ef705c40 e854d1c0
  f4009eec c024c8d3 00000009 f4009ee4 c09a135c f4009f00 f4009f04 c061ac4f
 Call Trace:
  [<c0205df6>] try_stack_unwind+0x156/0x170
  [<c020482a>] dump_trace+0x5a/0x1b0
  [<c0205e56>] show_trace_log_lvl+0x46/0x50
  [<c02049d1>] show_stack_log_lvl+0x51/0xe0
  [<c0205eb7>] show_stack+0x27/0x50
  [<c078deaf>] dump_stack+0x45/0x65
  [<c024c884>] warn_slowpath_common+0x84/0xa0
  [<c024c8d3>] warn_slowpath_fmt+0x33/0x40
  [<c061ac4f>] usb_submit_urb+0x5f/0x70
  [<f7974104>] snd_usbmidi_submit_urb+0x14/0x60 [snd_usbmidi_lib]
  [<f797483a>] snd_usbmidi_error_timer+0x6a/0xa0 [snd_usbmidi_lib]
  [<c02570c0>] call_timer_fn+0x30/0x130
  [<c0257442>] run_timer_softirq+0x1c2/0x260
  [<c0251493>] __do_softirq+0xc3/0x270
  [<c0204732>] do_softirq_own_stack+0x22/0x30
  [<c025186d>] irq_exit+0x8d/0xa0
  [<c0795228>] smp_apic_timer_interrupt+0x38/0x50
  [<c0794a3c>] apic_timer_interrupt+0x34/0x3c
  [<c0673d9e>] cpuidle_enter_state+0x3e/0xd0
  [<c028bb8d>] cpu_idle_loop+0x29d/0x3e0
  [<c028bd23>] cpu_startup_entry+0x53/0x60
  [<c0bfac1e>] start_kernel+0x415/0x41a

For avoiding these errors, check the pending URBs and skip
resubmitting such ones.

Reported-and-tested-by: Stefan Seyfried <stefan.seyfried@googlemail.com>
Acked-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Zefan Li <lizefan@huawei.com>
2015-04-14 17:33:45 +08:00
..
6fire ALSA: 6fire: make buffers DMA-able (midi) 2014-04-14 06:44:30 -07:00
caiaq ALSA: snd-usb-caiaq: initialize card pointer 2012-12-03 11:46:36 -08:00
misc ALSA: ua101: Fix unlocked snd_pcm_stop() call 2014-03-11 16:10:08 -07:00
usx2y ALSA: usx2y: Fix unlocked snd_pcm_stop() call 2014-03-11 16:10:08 -07:00
card.c ALSA: usb-audio: Fix device_del() sysfs warnings at disconnect 2015-02-02 17:05:14 +08:00
card.h ALSA: usb: Add quirk for 192KHz recording on E-Mu devices 2014-04-14 06:44:22 -07:00
clock.c ALSA: snd-usb: fix clock source validity index 2012-08-09 08:31:51 -07:00
clock.h
debug.h
endpoint.c ALSA: usb: Add quirk for 192KHz recording on E-Mu devices 2014-04-14 06:44:22 -07:00
endpoint.h
format.c
format.h
helper.c
helper.h
Kconfig ALSA: snd-usb-6fire: Select missing SND_VMASTER option in Kconfig 2012-02-25 11:07:19 +01:00
Makefile
midi.c ALSA: usb-audio: Don't resubmit pending URBs at MIDI error recovery 2015-04-14 17:33:45 +08:00
midi.h
mixer.c ALSA: usb: Parse UAC2 extension unit like for UAC1 2014-04-14 06:44:30 -07:00
mixer.h
mixer_maps.c ALSA: usb-audio: work around KEF X300A firmware bug 2014-03-11 16:09:59 -07:00
mixer_quirks.c ALSA: usb-audio: fix endianness bug in snd_nativeinstruments_* 2013-04-16 21:27:25 -07:00
mixer_quirks.h
pcm.c ALSA: usb-audio: Use rwsem for disconnect protection 2012-11-17 13:16:12 -08:00
pcm.h
power.h
proc.c ALSA: usb-audio: Fix races at disconnection 2012-11-17 13:16:12 -08:00
proc.h
quirks-table.h ALSA: usb-audio: Add support for Steinberg UR22 USB interface 2015-02-02 17:04:54 +08:00
quirks.c ALSA: usb: Add quirk for 192KHz recording on E-Mu devices 2014-04-14 06:44:22 -07:00
quirks.h
stream.c ALSA: snd-usb: try harder to find USB_DT_CS_ENDPOINT 2013-05-07 19:51:55 -07:00
stream.h
usbaudio.h ALSA: usb-audio: Use rwsem for disconnect protection 2012-11-17 13:16:12 -08:00