Re: ehci_hcd: fatal error, HC died with usbaudio

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 1 Apr 2010, Nate Case wrote:

> On Thu, 2010-04-01 at 12:16 -0400, Alan Stern wrote:
> > > When I set SYNC_URBS to 3 and apply your ehci-sched fix, I get the
> > > following results:
> > > 
> > > http://xes-inc.com/sources/debug/test-with-syncurbs-3.txt
> > 
> > The resubmission should not have failed.  Please repeat this test with
> > CONFIG_USB_DEBUG enabled in the kernel.  Also, you can remove the stack
> > dump you added to ehci_irq(), and insert the following in 
> > iso_stream_schedule():
> 
> Even though it sounds like you figured this out already, I went ahead
> anyway and repeated this test with USB debug enabled and your debug
> message.  Here are the results:
> 
> http://xes-inc.com/sources/debug/test-with-syncurbs-3-usb-debug.txt
> 
> (yes, there are still submission errors like you'd expect based on your
> last e-mail)

Yeah, it confirms what I figured out.

> > Everything there looks normal.  I get the definite feeling that there's 
> > something wrong with your EHCI controller.  Exactly the same thing 
> > works on a normal PC, right?
> 
> I assume so, though it's hard for me to test this with a regular PC EHCI
> controller (using the same hubs and audio CODECS).  A controller problem
> doesn't seem too unlikely.

The hub certainly doesn't have to be the same, and even using a 
different USB audio codec might not make any difference.  If you've got 
another one available, could you try it on both a regular PC and on the 
custom board?

> When I switch to SYNC_URBS = 2, aplay seems to work fine, and I don't
> see any submission errors.  EHCI controller still dies for unknown
> reasons.  Results are here:
> 
> http://xes-inc.com/sources/debug/test-with-syncurbs-2.txt
> 
> As you'll see, there are no real clues from the kernel log even with
> CONFIG_USB_DEBUG enabled.  From the usbmon trace, the last iso out event
> happens at 48820935, then an iso input happens at ~30ms later (48850692)
> which is around the same time the controller dies.

Right.  Something must go wrong when the Iso-OUT stream ends.  So let's
eliminate the sync URBs from the picture; take them back out of the
audio driver.

It's possible that the problem has something to do with the way EHCI's
schedule wraps around after 256 frames.  Does the same thing happen
when you send over just a handful of samples?  Try sending only enough
for 8 ms; that's 8 buffers of length 96 (48 samples per ms and 2
bytes/sample).  It works out to a total of 768 bytes of zeros.

Also, we might want to figure out why the last one or two Iso-OUT URBs 
get cancelled.  Although I doubt it will make any difference, we should 
try letting them complete normally.

Alan Stern

--
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

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux