On Friday 13 April 2007 2:11 pm, Matt Reimer wrote:
> I'm getting a hang in s3c2410_udc.c's nuke() function which is due to
> the same usb_request being queued back-to-back, with the result that
> the request on the endpoint's queue points to itself, thus causing
> nuke() to loop infinitely. (See below for a pseudo-trace for
> illustration.)

Evidently it hasn't been properly de-queued before the completion
function is called.  If it's taken off the queue, there will be
no way for that bug to happen...

Note that when your testing graduates from "gadget zero" to the
network driver, there are two classes of bugs that you immediately
become eligible to report.  One is queueing bugs -- like this.
There can be blatant ones (works with single-packet queues but
not multi-packet queues, try updating the queue length module
parameter) as well as subtle races.  The other class of bugs
partially overlaps that ... races associated with the fact that
traffic is now bi-directional, with the IRQ arrival rate being
much less predictable.


> In trying to figure out what the root problem is, I came across this
> code in ether.c:rx_complete():
> 
>         if (req)
>                 rx_submit (dev, req, GFP_ATOMIC);
> 
> What is the purpose of this code? Under what circumstance would we
> want to resubmit the usb_request we're completing?

Request that has *ALREADY COMPLETED* ... the UDC no longer has
any reference to that request.  It's now a "different" request,
associated with a different SKB.

Normal operation.  The goal is to *always* have some requests
queued, so that you never have a situation where the host wants
to send data and the peripheral isn't able to receive it.  The
same thing is true on the host side, too ... unless that host
runs MS-Windows.

- Dave

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to