--- /dev/null
+From 91bf0c2dcb935a87e5c0795f5047456b965fd143 Mon Sep 17 00:00:00 2001
+From: Michael Gernoth <michael@gernoth.net>
+Date: Thu, 9 Apr 2015 23:42:15 +0200
+Subject: ALSA: emu10k1: don't deadlock in proc-functions
+
+From: Michael Gernoth <michael@gernoth.net>
+
+commit 91bf0c2dcb935a87e5c0795f5047456b965fd143 upstream.
+
+The functions snd_emu10k1_proc_spdif_read and snd_emu1010_fpga_read
+acquire the emu_lock before accessing the FPGA. The function used
+to access the FPGA (snd_emu1010_fpga_read) also tries to take
+the emu_lock which causes a deadlock.
+Remove the outer locking in the proc-functions (guarding only the
+already safe fpga read) to prevent this deadlock.
+
+[removed superfluous flags variables too -- tiwai]
+
+Signed-off-by: Michael Gernoth <michael@gernoth.net>
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/pci/emu10k1/emuproc.c | 12 ------------
+ 1 file changed, 12 deletions(-)
+
+--- a/sound/pci/emu10k1/emuproc.c
++++ b/sound/pci/emu10k1/emuproc.c
+@@ -241,31 +241,22 @@ static void snd_emu10k1_proc_spdif_read(
+ struct snd_emu10k1 *emu = entry->private_data;
+ u32 value;
+ u32 value2;
+- unsigned long flags;
+ u32 rate;
+
+ if (emu->card_capabilities->emu_model) {
+- spin_lock_irqsave(&emu->emu_lock, flags);
+ snd_emu1010_fpga_read(emu, 0x38, &value);
+- spin_unlock_irqrestore(&emu->emu_lock, flags);
+ if ((value & 0x1) == 0) {
+- spin_lock_irqsave(&emu->emu_lock, flags);
+ snd_emu1010_fpga_read(emu, 0x2a, &value);
+ snd_emu1010_fpga_read(emu, 0x2b, &value2);
+- spin_unlock_irqrestore(&emu->emu_lock, flags);
+ rate = 0x1770000 / (((value << 5) | value2)+1);
+ snd_iprintf(buffer, "ADAT Locked : %u\n", rate);
+ } else {
+ snd_iprintf(buffer, "ADAT Unlocked\n");
+ }
+- spin_lock_irqsave(&emu->emu_lock, flags);
+ snd_emu1010_fpga_read(emu, 0x20, &value);
+- spin_unlock_irqrestore(&emu->emu_lock, flags);
+ if ((value & 0x4) == 0) {
+- spin_lock_irqsave(&emu->emu_lock, flags);
+ snd_emu1010_fpga_read(emu, 0x28, &value);
+ snd_emu1010_fpga_read(emu, 0x29, &value2);
+- spin_unlock_irqrestore(&emu->emu_lock, flags);
+ rate = 0x1770000 / (((value << 5) | value2)+1);
+ snd_iprintf(buffer, "SPDIF Locked : %d\n", rate);
+ } else {
+@@ -410,14 +401,11 @@ static void snd_emu_proc_emu1010_reg_rea
+ {
+ struct snd_emu10k1 *emu = entry->private_data;
+ u32 value;
+- unsigned long flags;
+ int i;
+ snd_iprintf(buffer, "EMU1010 Registers:\n\n");
+
+ for(i = 0; i < 0x40; i+=1) {
+- spin_lock_irqsave(&emu->emu_lock, flags);
+ snd_emu1010_fpga_read(emu, i, &value);
+- spin_unlock_irqrestore(&emu->emu_lock, flags);
+ snd_iprintf(buffer, "%02X: %08X, %02X\n", i, value, (value >> 8) & 0x7f);
+ }
+ }
arm-s3c64xx-use-fixed-irq-bases-to-avoid-conflicts-on-cragganmore.patch
usb-phy-find-the-right-match-in-devm_usb_phy_match.patch
usb-define-a-generic-usb_resume_timeout-macro.patch
+usb-host-r8a66597-use-new-usb_resume_timeout.patch
+usb-host-isp116x-use-new-usb_resume_timeout.patch
+usb-host-xhci-use-new-usb_resume_timeout.patch
+usb-host-sl811-use-new-usb_resume_timeout.patch
+usb-core-hub-use-new-usb_resume_timeout.patch
+alsa-emu10k1-don-t-deadlock-in-proc-functions.patch
--- /dev/null
+From bbc78c07a51f6fd29c227b1220a9016e585358ba Mon Sep 17 00:00:00 2001
+From: Felipe Balbi <balbi@ti.com>
+Date: Fri, 13 Feb 2015 15:38:33 -0600
+Subject: usb: core: hub: use new USB_RESUME_TIMEOUT
+
+From: Felipe Balbi <balbi@ti.com>
+
+commit bbc78c07a51f6fd29c227b1220a9016e585358ba upstream.
+
+Make sure we're using the new macro, so our
+resume signaling will always pass certification.
+
+Signed-off-by: Felipe Balbi <balbi@ti.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/core/hub.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/usb/core/hub.c
++++ b/drivers/usb/core/hub.c
+@@ -3282,10 +3282,10 @@ int usb_port_resume(struct usb_device *u
+ dev_dbg(hub->intfdev, "can't resume port %d, status %d\n",
+ port1, status);
+ } else {
+- /* drive resume for at least 20 msec */
++ /* drive resume for USB_RESUME_TIMEOUT msec */
+ dev_dbg(&udev->dev, "usb %sresume\n",
+ (PMSG_IS_AUTO(msg) ? "auto-" : ""));
+- msleep(25);
++ msleep(USB_RESUME_TIMEOUT);
+
+ /* Virtual root hubs can trigger on GET_PORT_STATUS to
+ * stop resume signaling. Then finish the resume
--- /dev/null
+From 8c0ae6574ccfd3d619876a65829aad74c9d22ba5 Mon Sep 17 00:00:00 2001
+From: Felipe Balbi <balbi@ti.com>
+Date: Fri, 13 Feb 2015 14:50:10 -0600
+Subject: usb: host: isp116x: use new USB_RESUME_TIMEOUT
+
+From: Felipe Balbi <balbi@ti.com>
+
+commit 8c0ae6574ccfd3d619876a65829aad74c9d22ba5 upstream.
+
+Make sure we're using the new macro, so our
+resume signaling will always pass certification.
+
+Signed-off-by: Felipe Balbi <balbi@ti.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/host/isp116x-hcd.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/usb/host/isp116x-hcd.c
++++ b/drivers/usb/host/isp116x-hcd.c
+@@ -1488,7 +1488,7 @@ static int isp116x_bus_resume(struct usb
+ spin_unlock_irq(&isp116x->lock);
+
+ hcd->state = HC_STATE_RESUMING;
+- msleep(20);
++ msleep(USB_RESUME_TIMEOUT);
+
+ /* Go operational */
+ spin_lock_irq(&isp116x->lock);
--- /dev/null
+From 7a606ac29752a3e571b83f9b3fceb1eaa1d37781 Mon Sep 17 00:00:00 2001
+From: Felipe Balbi <balbi@ti.com>
+Date: Fri, 13 Feb 2015 14:58:53 -0600
+Subject: usb: host: r8a66597: use new USB_RESUME_TIMEOUT
+
+From: Felipe Balbi <balbi@ti.com>
+
+commit 7a606ac29752a3e571b83f9b3fceb1eaa1d37781 upstream.
+
+While this driver was already using a 50ms resume
+timeout, let's make sure everybody uses the same
+macro so it's easy to fix later should anything
+go wrong.
+
+It also gives a more "stable" expectation to Linux
+users.
+
+Signed-off-by: Felipe Balbi <balbi@ti.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/host/r8a66597-hcd.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/usb/host/r8a66597-hcd.c
++++ b/drivers/usb/host/r8a66597-hcd.c
+@@ -2301,7 +2301,7 @@ static int r8a66597_bus_resume(struct us
+ rh->port &= ~USB_PORT_STAT_SUSPEND;
+ rh->port |= USB_PORT_STAT_C_SUSPEND << 16;
+ r8a66597_mdfy(r8a66597, RESUME, RESUME | UACT, dvstctr_reg);
+- msleep(50);
++ msleep(USB_RESUME_TIMEOUT);
+ r8a66597_mdfy(r8a66597, UACT, RESUME | UACT, dvstctr_reg);
+ }
+
--- /dev/null
+From 08debfb13b199716da6153940c31968c556b195d Mon Sep 17 00:00:00 2001
+From: Felipe Balbi <balbi@ti.com>
+Date: Fri, 13 Feb 2015 15:00:38 -0600
+Subject: usb: host: sl811: use new USB_RESUME_TIMEOUT
+
+From: Felipe Balbi <balbi@ti.com>
+
+commit 08debfb13b199716da6153940c31968c556b195d upstream.
+
+Make sure we're using the new macro, so our
+resume signaling will always pass certification.
+
+Signed-off-by: Felipe Balbi <balbi@ti.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/host/sl811-hcd.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/usb/host/sl811-hcd.c
++++ b/drivers/usb/host/sl811-hcd.c
+@@ -1251,7 +1251,7 @@ sl811h_hub_control(
+ sl811_write(sl811, SL11H_CTLREG1, sl811->ctrl1);
+
+ mod_timer(&sl811->timer, jiffies
+- + msecs_to_jiffies(20));
++ + msecs_to_jiffies(USB_RESUME_TIMEOUT));
+ break;
+ case USB_PORT_FEAT_POWER:
+ port_power(sl811, 0);
--- /dev/null
+From b9e451885deb6262dbaf5cd14aa77d192d9ac759 Mon Sep 17 00:00:00 2001
+From: Felipe Balbi <balbi@ti.com>
+Date: Fri, 13 Feb 2015 14:39:13 -0600
+Subject: usb: host: xhci: use new USB_RESUME_TIMEOUT
+
+From: Felipe Balbi <balbi@ti.com>
+
+commit b9e451885deb6262dbaf5cd14aa77d192d9ac759 upstream.
+
+Make sure we're using the new macro, so our
+resume signaling will always pass certification.
+
+Acked-by: Mathias Nyman <mathias.nyman@linux.intel.com>
+Signed-off-by: Felipe Balbi <balbi@ti.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/host/xhci-ring.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/usb/host/xhci-ring.c
++++ b/drivers/usb/host/xhci-ring.c
+@@ -1697,7 +1697,7 @@ static void handle_port_status(struct xh
+ } else {
+ xhci_dbg(xhci, "resume HS port %d\n", port_id);
+ bus_state->resume_done[faked_port_index] = jiffies +
+- msecs_to_jiffies(20);
++ msecs_to_jiffies(USB_RESUME_TIMEOUT);
+ set_bit(faked_port_index, &bus_state->resuming_ports);
+ mod_timer(&hcd->rh_timer,
+ bus_state->resume_done[faked_port_index]);