On Wed, 30 Jan 2008, Peter Korsgaard wrote:

>  >> +static void c67x00_sched_done(unsigned long __c67x00)
>  >> +{
>  >> + struct c67x00_hcd *c67x00 = (struct c67x00_hcd *)__c67x00;
>  >> + struct c67x00_urb_priv *urbp, *tmp;
>  >> + struct urb *urb;
>  >> +
>  >> + spin_lock(&c67x00->lock);
>  >> +
>  >> + /* Loop over the done list and give back all the urbs */
>  >> + list_for_each_entry_safe(urbp, tmp, &c67x00->done_list, hep_node) {
>  >> +         urb = urbp->urb;
>  >> +         c67x00_release_urb(c67x00, urb);
>  >> +         if (!usb_hcd_check_unlink_urb(c67x00_hcd_to_hcd(c67x00),
>  >> +                                       urb, urbp->status)) {
> 
>  Alan> The function call above is completely wrong.  It is meant to be used 
> only
>  Alan> from within the dequeue method.
> 
> Ahh, so should I just unconditionally do the unlink_urb_from_ep and
> giveback_urb?

Yes, that's right.  The check_unlink_urb routine merely verifies that 
an unlink is valid.  If you're about to giveback an URB then you 
already know it's valid to do so.

Alan Stern

_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev

Reply via email to