On Fri, 11 Feb 2005, Steve Hosgood wrote:

> > Why do things get wedged instead of failing gracefully?
> > 
> 
> Well, assuming you hadn't intended to put a smiley on that, they get
> "wedged" because that's how I describe submitting a URB (8 of them
> actually) and none ever calls me back with data after some given point
> (receiving a short URB signalling end-of-frame). It's also graceful in
> that the kernel doesn't crash, and I can escape from the problem without
> rebooting, but it's still a "wedge" as far as my camera driver is
> concerned. Maybe a better word should be thought up...

What I actually meant was, why doesn't your driver expect and cope with
the possibility that an URB might not complete in a timely manner?  And
why doesn't your program cope with that possibility without the need for
someone to do "kill -9"?  But neither question is really relevant for your
problem...

> > > However, I also get no messages in /var/log/messages and nothing from
> > > the output of 'dmesg' either. What did I miss?
> > 
> > Nothing at all?  Not even the normal kernel boot-up messages?
> > 
> 
> Sorry, no, of course I get all that stuff. Just no new debug messages
> from anywhere in the USB layers to tell me (or you) what's going on.

It's safe to assume then that nothing appears amiss to the USB layers.

> > Is it possible that the camera stopped transmitting data on its own, and 
> > that's why your completion routine doesn't get called?
> > 
> 
> I'd always assumed it was camera firmware until I saw the results from
> the USB logger. That's where it started to look like linux stopped
> polling.

If that turns out to be the case (URB submitted successfully, doesn't
complete), then yes, quite likely the lower-level USB drivers or hardware
are at fault.

> I was rather hoping that the driver's maintainer might wade in here with
> suggestions as to how we might home in on this problem. It may well not
> be as far down as ehci-hcd. Where else can I put a "debug=X" at module
> load time, and what values of X would be useful do you think?

David can answer you better with respect to ehci-hcd.  As for anything
else, I don't know of any additional debugging you could do.  However you
could improve your "Resubmit URB" message by having it print the return
code from the usb_submit_urb, and improve your "Receive X bytes from
camera"  message by having the completion handler say that it is running
and print the value of urb->status.  In each case maybe also print the 
URB's address, so you can match up submissions with completions.

Alan Stern



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to