2005/9/12, Alan Stern <[EMAIL PROTECTED]>:
> On Mon, 12 Sep 2005, Franck wrote:
> 
> > Hi,
> >
> > I have a question about "usb_release_bandwidth":
> >
> > "usb_release_bandwidth" needs an urb as parameters. If I understand,
> > this function is called when periodic pipes is released ie when an ep
> > is disabled.
> 
> No.  The bandwidth is released when there are no more URBs queued for the
> endpoint.  That happens when usb_hcd_giveback_urb returns.
> usb_release_bandwidth should not be called when the endpoint is disabled.
> 

Hm, this is strange...the bandwidth seems to be released whenever
urb_unlink is called. This means that bandwidth is released even if
there are still URBs queued for the endpoint. Here is the call tree of
usb_release_bandwidth:
usb_hcd_giveback_urb -> urb_unlink -> usb_release_bandwidth

Does it mean that the hcd should call usb_claim_bandwidth but should
not call usb_release_bandwidth ?

> >  This is normally done in "xxx_endpoint_disable" where xxx
> > is an hcd. But this function doesn't have any urb reference since the
> > endpoint should be empty (is it always true ?). If this is correct,
> > can we change the prototype of "usb_release_bandwidth" into:
> >
> >       void usb_release_bandwidth (struct usb_device *dev, int bustime, int 
> > isoc)
> >
> 
> It's certainly true that the bandwidth management in usbcore is pretty
> bad.  We need a thorough revision, not just this single change.
> 

I agree this _single_ change is useless.

I've another question regarding hcd_unlink_urb which calls hcd's
urb_dequeue routine. When "dequeueing" a no-active URB (meaning it's
not being transfered), what urb->status value should "urb_dequeue" set
before calling usb_hcd_giveback_urb ? If it is an active URB, can I
wait for the next interrupt before calling "usb_hcd_giveback_urb" ? If
so what return value should be returned in hcd's "xxx_urb_dequeue" ?

Thanks.
-- 
               Franck


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to