On Wednesday 23 March 2005 12:23 am, Olav Kongas wrote:
> Hi David,
>
> Isn't there a chance of dequeuing already given-back URBs in
> sl811h_urb_dequeue()? The following patch explains, what I
> mean.
Looks right to me.
> Olav
>
> diff -purN linux-2.6.12-rc1-mm1-or/drivers/usb/host/sl811-hcd.c
> linux-2.6.12-rc1-mm1/drivers/usb/host/sl811-hcd.c
> --- linux-2.6.12-rc1-mm1-or/drivers/usb/host/sl811-hcd.c 2005-03-23
> 09:59:27.000000000 +0200
> +++ linux-2.6.12-rc1-mm1/drivers/usb/host/sl811-hcd.c 2005-03-23
> 10:08:10.000000000 +0200
> @@ -961,15 +961,17 @@ fail:
> static int sl811h_urb_dequeue(struct usb_hcd *hcd, struct urb *urb)
> {
> struct sl811 *sl811 = hcd_to_sl811(hcd);
> - struct usb_host_endpoint *hep = urb->hcpriv;
> + struct usb_host_endpoint *hep;
> unsigned long flags;
> struct sl811h_ep *ep;
> int retval = 0;
>
> - if (!hep)
> - return -EINVAL;
> -
> spin_lock_irqsave(&sl811->lock, flags);
> + hep = urb->hcpriv;
> + if (!hep){
> + spin_unlock_irqrestore(&sl811->lock, flags);
> + return -EINVAL;
> + }
> ep = hep->hcpriv;
> if (ep) {
> /* finish right away if this urb can't be active ...
>
-------------------------------------------------------
This SF.net email is sponsored by Microsoft Mobile & Embedded DevCon 2005
Attend MEDC 2005 May 9-12 in Vegas. Learn more about the latest Windows
Embedded(r) & Windows Mobile(tm) platforms, applications & content. Register
by 3/29 & save $300 http://ads.osdn.com/?ad_id=6883&alloc_id=15149&op=click
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel