At Sun, 24 Jun 2012 22:12:35 -0300, Sergio Correia wrote: > > On Fri, Jun 22, 2012 at 2:56 AM, Takashi Iwai <tiwai@xxxxxxx> wrote: > > At Thu, 21 Jun 2012 13:47:00 -0300, > > Sergio Correia wrote: > >> > >> Hi Takashi, Sarah, > >> > >> On Thu, Jun 21, 2012 at 9:43 AM, Takashi Iwai <tiwai@xxxxxxx> wrote: > >> > At Wed, 20 Jun 2012 11:36:36 -0700, > >> > Sarah Sharp wrote: > >> >> > >> >> On Wed, Jun 20, 2012 at 02:49:10PM -0300, Sergio Correia wrote: > >> >> > Sarah, I also see messages like these on the dmesg output: > >> >> > > >> >> > input: Sony Computer Entertainment Wireless Stereo Headset as > >> >> > /devices/pci0000:00/0000:00:1c.3/0000:04:00.0/usb3/3-1/3-1:1.3/input/input10 > >> >> > hid-generic 0003:12BA:0030.0005: input,hiddev0,hidraw2: USB HID v1.01 > >> >> > Device [Sony Computer Entertainment Wireless Stereo Headset > >> >> > usbcore: registered new interface driver snd-usb-audio > >> >> > xhci_hcd 0000:04:00.0: ERROR Transfer event for disabled endpoint or > >> >> > incorrect stream ring > >> >> > xhci_hcd 0000:04:00.0: @00000000a683f620 9ed7c580 00000000 1a000000 02058001 > >> >> > xhci_hcd 0000:04:00.0: ERROR Transfer event for disabled endpoint or > >> >> > incorrect stream ring > >> >> > xhci_hcd 0000:04:00.0: @00000000a683f6b0 9ed7caa0 00000000 1a000000 02058001 > >> >> > sock: process `skype' is using obsolete setsockopt SO_BSDCOMPAT > >> >> > xhci_hcd 0000:04:00.0: ERROR Transfer event for disabled endpoint or > >> >> > incorrect stream ring > >> >> > xhci_hcd 0000:04:00.0: @00000000a683f450 a6932410 00000000 1a000000 02058000 > >> >> > xhci_hcd 0000:04:00.0: ERROR Transfer event for disabled endpoint or > >> >> > incorrect stream ring > >> >> > xhci_hcd 0000:04:00.0: @00000000a683f600 a6854580 00000000 1a000000 02058000 > >> >> > xhci_hcd 0000:04:00.0: ERROR Transfer event for disabled endpoint or > >> >> > incorrect stream ring > >> >> > xhci_hcd 0000:04:00.0: @00000000a683f550 a6854810 00000000 1a000000 02058001 > >> >> > xhci_hcd 0000:04:00.0: WARN Set TR Deq Ptr cmd failed due to > >> >> > incorrect slot or ep state. > >> >> > >> >> Yeah, those are pretty bad messages. They mean the host controller is > >> >> giving us transfers for an endpoint that hasn't been configured through > >> >> a usb_set_interface() call (or was removed in a call to > >> >> usb_set_interface()). > >> >> > >> >> Can you recompile your kernel with CONFIG_USB_DEBUG and > >> >> CONFIG_USB_XHCI_HCD_DEBUGGING turned on, and then use netconsole to > >> >> capture the oops? I need more info about what endpoints were set up at > >> >> the time. > >> >> > >> >> My first hypothesis is the xHCI hardware is broken (highly > >> >> likely, since it's a Fresco Logic chip and those have a lot of quirks). > >> >> > >> >> A second hypothesis is that the USB sound driver is switching alt > >> >> settings without bothering to wait until all the URBs for the old alt > >> >> setting complete or are canceled. That will probably work under EHCI, > >> >> but that won't work under xHCI because we need to tear down internal > >> >> structures whenever a new alt setting is installed. That doesn't > >> >> look to be the case from a quick glance at the commit ID though. > >> >> > >> >> Takashi, can you explain what new functionality was added in that patch? > >> >> I'm not very familiar with the sound stack, but maybe if you explained > >> >> what the code is trying to do on the USB level that would help. > >> > > >> > The specific commit Sergio reached via bisection is for changing the > >> > assignment of endpoint with sync or not. > >> > > >> > The oneliner below should disable the change effectively. If this > >> > fixes the problem, we need to take a deeper look at the code there. > >> > > >> > Before that commit, there are a series of commits to change the > >> > endpoint handling logic. But judging from the bisection, this > >> > shouldn't be the issue... > >> > > >> > > >> > Takashi > >> > > >> > --- > >> > diff --git a/sound/usb/pcm.c b/sound/usb/pcm.c > >> > index 54607f8..9cbf9ea 100644 > >> > --- a/sound/usb/pcm.c > >> > +++ b/sound/usb/pcm.c > >> > @@ -376,6 +376,7 @@ static int set_format(struct snd_usb_substream *subs, struct audioformat *fmt) > >> > == USB_ENDPOINT_USAGE_IMPLICIT_FB; > >> > > >> > add_sync_ep: > >> > + implicit_fb = 0; /* XXX */ > >> > subs->sync_endpoint = snd_usb_add_endpoint(subs->stream->chip, > >> > alts, ep, !subs->direction, > >> > implicit_fb ? > >> > >> this didn't fix it, I still get the same oops. Maybe I made some > >> mistake in the bisection and that wasn't the actual offending commit? > > > > Possibly. The switching to the new streaming logic was done at the > > former commit, edcd3633e72a1590c4cf46befe5e6cd03b5aec3e > > ALSA: snd-usb: switch over to new endpoint streaming logic > > > > Double-check whether the problem really happens at this point. > > > > I am redoing the bisect and I currently have this: > > bad: [d399ff9593e088d33fb38f5206c6427825892baa] ALSA: snd-usb: remove > old streaming logic > good: [8fdff6a319e7dac757c558bd283dc4577e68cde7] ALSA: snd-usb: > implement new endpoint streaming model That's fine. The commit d399ff just removes the obsolete unused code, which caused the compile error below. > there's one last commit to verify, which sits in between these two and > is the one you mentioned, edcd3633e72a1590c4cf46befe5e6cd03b5aec3e, > but I am unable to compile it, getting this error: > > > CC [M] sound/usb/stream.o > sound/usb/stream.c:80:13: error: static declaration of > ‘snd_usb_init_substream’ follows non-static declaration > In file included from sound/usb/stream.c:31:0: > sound/usb/endpoint.h:4:6: note: previous declaration of > ‘snd_usb_init_substream’ was here > make[2]: *** [sound/usb/stream.o] Error 1 > make[1]: *** [sound/usb] Error 2 > make: *** [sound] Error 2 > > snd_usb_init_substream() is declared as static in stream.c but is also > exported in endpoint.h (and implemented in endpoint.c). How do I fix > this to test whether this commit is good/bad? So, it's basically the new endpoint streaming stuff that might break something for xhci. Daniel, any clue? Takashi -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html