Re: Possible bug in isp116x-hcd

Olav Kongas <[email protected]>
Newsgroups gmane.linux.usb.devel
Message-ID <[email protected]>
Hi Alan,

> Index: usb-2.6/drivers/usb/host/isp116x-hcd.c
> ===================================================================
> --- usb-2.6.orig/drivers/usb/host/isp116x-hcd.c
> +++ usb-2.6/drivers/usb/host/isp116x-hcd.c
> @@ -583,12 +583,15 @@ static void 
> finish_atl_transfers(struct
>        unpack_fifo(isp116x);
>        postproc_atl_queue(isp116x);

I think it is guaranteed that at this point all the ep's in 
active ATL queue have their urb_list non-empty. There's a 
relevant BUG_ON() in postproc_atl_queue(). The list_empty() 
check below would be unnecessary.

>        for (ep = isp116x->atl_active; ep; ep = ep->active) 
> {
> +               if (list_empty(&ep->hep->urb_list))
> +                       continue;
>                urb =
>                    container_of(ep->hep->urb_list.next, 
> struct urb, urb_list);
> +
>                 /* USB_PID_ACK check here avoids finishing of
>                    control transfers, for which TD_DATAUNDERRUN
>                    occured, while URB_SHORT_NOT_OK was set */
> -               if (urb && urb->status != -EINPROGRESS
                       ^^^
Yes, this is wrong. Thanks. As you are already at it, please 
remove it.

> +               if (urb->status != -EINPROGRESS
>                     && ep->nextpid != USB_PID_ACK)
>                         finish_request(isp116x, ep, urb);
>         }

Olav

-------------------------------------------------------------------------
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.