On Fri, 28 Dec 2007, Grant Likely wrote:
> From: Grant Likely <grant.likely@xxxxxxxxxxxx>
>
> This patch adds HDC support for the Cypress c67x00 family of devices.
One minor correction:
> +static void c67x00_sched_done(unsigned long __c67x00)
> +{
> + struct c67x00_hcd *c67x00 = (struct c67x00_hcd *)__c67x00;
> + struct c67x00_urb_priv *urbp, *tmp;
> + struct usb_hcd *hcd = c67x00_hcd_to_hcd(c67x00);
> + struct urb *urb;
> + int status;
> + unsigned long flags;
> +
> + spin_lock_irqsave(&c67x00->lock, flags);
> +
> + /* 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;
> + status = urbp->status;
> +
> + c67x00_release_urb(c67x00, urb);
> +
> + usb_hcd_unlink_urb_from_ep(hcd, urb);
> +
> + spin_unlock_irqrestore(&c67x00->lock, flags);
> + usb_hcd_giveback_urb(hcd, urb, status);
> + spin_lock_irqsave(&c67x00->lock, flags);
The giveback routine is supposed to be called with interrupts disabled.
Consequently you should use spin_unlock() and spin_lock() here, not the
_irqsave/_irqrestore variants.
> + }
> + spin_unlock_irqrestore(&c67x00->lock, flags);
> +}
Alan Stern
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
linux-usb-devel@xxxxxxxxxxxxxxxxxxxxx
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
[Home]
[Video for Linux]
[Photo]
[Yosemite Forum]
[Yosemite Photos]
[Video Projectors]
[PDAs]
[Hacking TiVo]
[Linux Kernel]
[Linux SCSI]
[XFree86]
[Devices]
[Big List of Linux Books]
[Free Dating]