Hi Takashi, Am 28.11.2014 um 12:33 schrieb Takashi Iwai:
This is a code path for the error recovery, so something went already wrong in the USB side, supposedly. In anyway, could you try the patch below?
Yes, and it helps!
The problem after reboot isn't cured by that, though. It's the hardware issue, somehow it's screwed up. You'd need to do some hard reset.
Sometimes the device just needs a second try to initialize after it got the firmware uploaded. I don't think this is related to this problem. It sometimes happens and sometimes it just works on first try.
Takashi
--- diff --git a/sound/usb/midi.c b/sound/usb/midi.c index d3d49525a16b..b604760cb7f0 100644 --- a/sound/usb/midi.c +++ b/sound/usb/midi.c @@ -353,11 +353,12 @@ static void snd_usbmidi_out_tasklet(unsigned long data) static void snd_usbmidi_error_timer(unsigned long data) { struct snd_usb_midi *umidi = (struct snd_usb_midi *)data; + unsigned long flags; unsigned int i, j;
- spin_lock(&umidi->disc_lock); + spin_lock_irqsave(&umidi->disc_lock, flags); if (umidi->disconnected) { - spin_unlock(&umidi->disc_lock); + spin_unlock_irqrestore(&umidi->disc_lock, flags); return; } for (i = 0; i < MIDI_MAX_ENDPOINTS; ++i) { @@ -365,6 +366,8 @@ static void snd_usbmidi_error_timer(unsigned long data) if (in && in->error_resubmit) { in->error_resubmit = 0; for (j = 0; j < INPUT_URBS; ++j) { + if (atomic_read(&in->urbs[j]->use_count)) + continue; in->urbs[j]->dev = umidi->dev; snd_usbmidi_submit_urb(in->urbs[j], GFP_ATOMIC); } @@ -372,7 +375,7 @@ static void snd_usbmidi_error_timer(unsigned long data) if (umidi->endpoints[i].out) snd_usbmidi_do_output(umidi->endpoints[i].out); } - spin_unlock(&umidi->disc_lock); + spin_unlock_irqrestore(&umidi->disc_lock, flags); }
/* helper function to send static data that may not DMA-able */
No URB errors anymore and no problems. I got one last usb urb message: [ 722.200526] usbcore: deregistering interface driver snd-usb-audio [ 873.469207] usbcore: registered new interface driver snd-usb-audio [ 954.790601] usb 4-2: urb status -75 But that was after running the unpatched module (with errors already triggered), unloading the unpatched module, loading the patched module and then starting to play. It is very well possible that the hardware (or USB stack) was confused by then. After rebooting, no URB messages are seen: wendy:~ # dmesg|grep -i usb.*status wendy:~ # dmesg|grep -i urb wendy:~ # So the Patch is Tested-By: Stefan Seyfried <stefan.seyfried@googlemail.com> :-) Best regards, Stefan -- Stefan Seyfried "For a successful technology, reality must take precedence over public relations, for nature cannot be fooled." -- Richard Feynman -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-kernel+owner@opensuse.org