Skip to content

Commit a53c8ce

Browse files
committed
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
2 parents 3751c97 + a1227f3 commit a53c8ce

File tree

3 files changed

+18
-3
lines changed

3 files changed

+18
-3
lines changed

drivers/usb/host/ehci-hcd.c

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -685,8 +685,15 @@ static irqreturn_t ehci_irq (struct usb_hcd *hcd)
685685
struct ehci_hcd *ehci = hcd_to_ehci (hcd);
686686
u32 status, masked_status, pcd_status = 0, cmd;
687687
int bh;
688+
unsigned long flags;
688689

689-
spin_lock (&ehci->lock);
690+
/*
691+
* For threadirqs option we use spin_lock_irqsave() variant to prevent
692+
* deadlock with ehci hrtimer callback, because hrtimer callbacks run
693+
* in interrupt context even when threadirqs is specified. We can go
694+
* back to spin_lock() variant when hrtimer callbacks become threaded.
695+
*/
696+
spin_lock_irqsave(&ehci->lock, flags);
690697

691698
status = ehci_readl(ehci, &ehci->regs->status);
692699

@@ -704,7 +711,7 @@ static irqreturn_t ehci_irq (struct usb_hcd *hcd)
704711

705712
/* Shared IRQ? */
706713
if (!masked_status || unlikely(ehci->rh_state == EHCI_RH_HALTED)) {
707-
spin_unlock(&ehci->lock);
714+
spin_unlock_irqrestore(&ehci->lock, flags);
708715
return IRQ_NONE;
709716
}
710717

@@ -815,7 +822,7 @@ static irqreturn_t ehci_irq (struct usb_hcd *hcd)
815822

816823
if (bh)
817824
ehci_work (ehci);
818-
spin_unlock (&ehci->lock);
825+
spin_unlock_irqrestore(&ehci->lock, flags);
819826
if (pcd_status)
820827
usb_hcd_poll_rh_status(hcd);
821828
return IRQ_HANDLED;

drivers/usb/serial/ftdi_sio.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -907,6 +907,8 @@ static const struct usb_device_id id_table_combined[] = {
907907
/* Crucible Devices */
908908
{ USB_DEVICE(FTDI_VID, FTDI_CT_COMET_PID) },
909909
{ USB_DEVICE(FTDI_VID, FTDI_Z3X_PID) },
910+
/* Cressi Devices */
911+
{ USB_DEVICE(FTDI_VID, FTDI_CRESSI_PID) },
910912
{ } /* Terminating entry */
911913
};
912914

drivers/usb/serial/ftdi_sio_ids.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1320,3 +1320,9 @@
13201320
* Manufacturer: Smart GSM Team
13211321
*/
13221322
#define FTDI_Z3X_PID 0x0011
1323+
1324+
/*
1325+
* Product: Cressi PC Interface
1326+
* Manufacturer: Cressi
1327+
*/
1328+
#define FTDI_CRESSI_PID 0x87d0

0 commit comments

Comments
 (0)