Commit a53c8ceb authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'usb-3.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb

Pull USB fixes from Greg KH:
 "Here are 2 USB patches for 3.14-rc5, one a new device id, and the
  other fixes a reported problem with threaded irqs and the USB EHCI
  driver"

* tag 'usb-3.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
  usb: ehci: fix deadlock when threadirqs option is used
  USB: ftdi_sio: add Cressi Leonardo PID
parents 3751c970 a1227f3c
...@@ -685,8 +685,15 @@ static irqreturn_t ehci_irq (struct usb_hcd *hcd) ...@@ -685,8 +685,15 @@ static irqreturn_t ehci_irq (struct usb_hcd *hcd)
struct ehci_hcd *ehci = hcd_to_ehci (hcd); struct ehci_hcd *ehci = hcd_to_ehci (hcd);
u32 status, masked_status, pcd_status = 0, cmd; u32 status, masked_status, pcd_status = 0, cmd;
int bh; int bh;
unsigned long flags;
spin_lock (&ehci->lock); /*
* For threadirqs option we use spin_lock_irqsave() variant to prevent
* deadlock with ehci hrtimer callback, because hrtimer callbacks run
* in interrupt context even when threadirqs is specified. We can go
* back to spin_lock() variant when hrtimer callbacks become threaded.
*/
spin_lock_irqsave(&ehci->lock, flags);
status = ehci_readl(ehci, &ehci->regs->status); status = ehci_readl(ehci, &ehci->regs->status);
...@@ -704,7 +711,7 @@ static irqreturn_t ehci_irq (struct usb_hcd *hcd) ...@@ -704,7 +711,7 @@ static irqreturn_t ehci_irq (struct usb_hcd *hcd)
/* Shared IRQ? */ /* Shared IRQ? */
if (!masked_status || unlikely(ehci->rh_state == EHCI_RH_HALTED)) { if (!masked_status || unlikely(ehci->rh_state == EHCI_RH_HALTED)) {
spin_unlock(&ehci->lock); spin_unlock_irqrestore(&ehci->lock, flags);
return IRQ_NONE; return IRQ_NONE;
} }
...@@ -815,7 +822,7 @@ dead: ...@@ -815,7 +822,7 @@ dead:
if (bh) if (bh)
ehci_work (ehci); ehci_work (ehci);
spin_unlock (&ehci->lock); spin_unlock_irqrestore(&ehci->lock, flags);
if (pcd_status) if (pcd_status)
usb_hcd_poll_rh_status(hcd); usb_hcd_poll_rh_status(hcd);
return IRQ_HANDLED; return IRQ_HANDLED;
......
...@@ -907,6 +907,8 @@ static const struct usb_device_id id_table_combined[] = { ...@@ -907,6 +907,8 @@ static const struct usb_device_id id_table_combined[] = {
/* Crucible Devices */ /* Crucible Devices */
{ USB_DEVICE(FTDI_VID, FTDI_CT_COMET_PID) }, { USB_DEVICE(FTDI_VID, FTDI_CT_COMET_PID) },
{ USB_DEVICE(FTDI_VID, FTDI_Z3X_PID) }, { USB_DEVICE(FTDI_VID, FTDI_Z3X_PID) },
/* Cressi Devices */
{ USB_DEVICE(FTDI_VID, FTDI_CRESSI_PID) },
{ } /* Terminating entry */ { } /* Terminating entry */
}; };
......
...@@ -1320,3 +1320,9 @@ ...@@ -1320,3 +1320,9 @@
* Manufacturer: Smart GSM Team * Manufacturer: Smart GSM Team
*/ */
#define FTDI_Z3X_PID 0x0011 #define FTDI_Z3X_PID 0x0011
/*
* Product: Cressi PC Interface
* Manufacturer: Cressi
*/
#define FTDI_CRESSI_PID 0x87d0
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment