From: Greg Kroah-Hartman Date: Sat, 2 May 2015 13:29:21 +0000 (+0200) Subject: 3.14-stable patches X-Git-Tag: v3.10.77~43 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c136bc172218d1b66502c76de9217318bdcb0907;p=thirdparty%2Fkernel%2Fstable-queue.git 3.14-stable patches added patches: alsa-emu10k1-don-t-deadlock-in-proc-functions.patch usb-core-hub-use-new-usb_resume_timeout.patch usb-dwc2-hcd-use-new-usb_resume_timeout.patch usb-host-fotg210-use-new-usb_resume_timeout.patch usb-host-fusbh200-use-new-usb_resume_timeout.patch usb-host-isp116x-use-new-usb_resume_timeout.patch usb-host-r8a66597-use-new-usb_resume_timeout.patch usb-host-sl811-use-new-usb_resume_timeout.patch usb-host-uhci-use-new-usb_resume_timeout.patch usb-host-xhci-use-new-usb_resume_timeout.patch --- diff --git a/queue-3.14/alsa-emu10k1-don-t-deadlock-in-proc-functions.patch b/queue-3.14/alsa-emu10k1-don-t-deadlock-in-proc-functions.patch new file mode 100644 index 00000000000..263b701de48 --- /dev/null +++ b/queue-3.14/alsa-emu10k1-don-t-deadlock-in-proc-functions.patch @@ -0,0 +1,75 @@ +From 91bf0c2dcb935a87e5c0795f5047456b965fd143 Mon Sep 17 00:00:00 2001 +From: Michael Gernoth +Date: Thu, 9 Apr 2015 23:42:15 +0200 +Subject: ALSA: emu10k1: don't deadlock in proc-functions + +From: Michael Gernoth + +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 +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + 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); + } + } diff --git a/queue-3.14/series b/queue-3.14/series index 2800641d709..c95d7f40ac4 100644 --- a/queue-3.14/series +++ b/queue-3.14/series @@ -27,3 +27,13 @@ arm-at91-dt-sama5d3-xplained-add-phy-address-for-macb1.patch arm-dts-dove-fix-uart-reg-property.patch usb-phy-find-the-right-match-in-devm_usb_phy_match.patch usb-define-a-generic-usb_resume_timeout-macro.patch +usb-host-fusbh200-use-new-usb_resume_timeout.patch +usb-host-uhci-use-new-usb_resume_timeout.patch +usb-host-fotg210-use-new-usb_resume_timeout.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-dwc2-hcd-use-new-usb_resume_timeout.patch +usb-core-hub-use-new-usb_resume_timeout.patch +alsa-emu10k1-don-t-deadlock-in-proc-functions.patch diff --git a/queue-3.14/usb-core-hub-use-new-usb_resume_timeout.patch b/queue-3.14/usb-core-hub-use-new-usb_resume_timeout.patch new file mode 100644 index 00000000000..ee30859c5d5 --- /dev/null +++ b/queue-3.14/usb-core-hub-use-new-usb_resume_timeout.patch @@ -0,0 +1,34 @@ +From bbc78c07a51f6fd29c227b1220a9016e585358ba Mon Sep 17 00:00:00 2001 +From: Felipe Balbi +Date: Fri, 13 Feb 2015 15:38:33 -0600 +Subject: usb: core: hub: use new USB_RESUME_TIMEOUT + +From: Felipe Balbi + +commit bbc78c07a51f6fd29c227b1220a9016e585358ba upstream. + +Make sure we're using the new macro, so our +resume signaling will always pass certification. + +Signed-off-by: Felipe Balbi +Signed-off-by: Greg Kroah-Hartman + +--- + 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 +@@ -3289,10 +3289,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 diff --git a/queue-3.14/usb-dwc2-hcd-use-new-usb_resume_timeout.patch b/queue-3.14/usb-dwc2-hcd-use-new-usb_resume_timeout.patch new file mode 100644 index 00000000000..af7a4d3e758 --- /dev/null +++ b/queue-3.14/usb-dwc2-hcd-use-new-usb_resume_timeout.patch @@ -0,0 +1,30 @@ +From 74bd7b69801819707713b88e9d0bc074efa2f5e7 Mon Sep 17 00:00:00 2001 +From: Felipe Balbi +Date: Fri, 13 Feb 2015 15:03:13 -0600 +Subject: usb: dwc2: hcd: use new USB_RESUME_TIMEOUT + +From: Felipe Balbi + +commit 74bd7b69801819707713b88e9d0bc074efa2f5e7 upstream. + +Make sure we're using the new macro, so our +resume signaling will always pass certification. + +Signed-off-by: Felipe Balbi +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/dwc2/hcd.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/usb/dwc2/hcd.c ++++ b/drivers/usb/dwc2/hcd.c +@@ -1501,7 +1501,7 @@ static int dwc2_hcd_hub_control(struct d + dev_dbg(hsotg->dev, + "ClearPortFeature USB_PORT_FEAT_SUSPEND\n"); + writel(0, hsotg->regs + PCGCTL); +- usleep_range(20000, 40000); ++ msleep(USB_RESUME_TIMEOUT); + + hprt0 = dwc2_read_hprt0(hsotg); + hprt0 |= HPRT0_RES; diff --git a/queue-3.14/usb-host-fotg210-use-new-usb_resume_timeout.patch b/queue-3.14/usb-host-fotg210-use-new-usb_resume_timeout.patch new file mode 100644 index 00000000000..1d9eed48902 --- /dev/null +++ b/queue-3.14/usb-host-fotg210-use-new-usb_resume_timeout.patch @@ -0,0 +1,30 @@ +From 7e136bb71a08e8b8be3bc492f041d9b0bea3856d Mon Sep 17 00:00:00 2001 +From: Felipe Balbi +Date: Fri, 13 Feb 2015 14:54:38 -0600 +Subject: usb: host: fotg210: use new USB_RESUME_TIMEOUT + +From: Felipe Balbi + +commit 7e136bb71a08e8b8be3bc492f041d9b0bea3856d upstream. + +Make sure we're using the new macro, so our +resume signaling will always pass certification. + +Signed-off-by: Felipe Balbi +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/host/fotg210-hcd.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/usb/host/fotg210-hcd.c ++++ b/drivers/usb/host/fotg210-hcd.c +@@ -1595,7 +1595,7 @@ static int fotg210_hub_control( + /* resume signaling for 20 msec */ + fotg210_writel(fotg210, temp | PORT_RESUME, status_reg); + fotg210->reset_done[wIndex] = jiffies +- + msecs_to_jiffies(20); ++ + msecs_to_jiffies(USB_RESUME_TIMEOUT); + break; + case USB_PORT_FEAT_C_SUSPEND: + clear_bit(wIndex, &fotg210->port_c_suspend); diff --git a/queue-3.14/usb-host-fusbh200-use-new-usb_resume_timeout.patch b/queue-3.14/usb-host-fusbh200-use-new-usb_resume_timeout.patch new file mode 100644 index 00000000000..73ae07d9ec0 --- /dev/null +++ b/queue-3.14/usb-host-fusbh200-use-new-usb_resume_timeout.patch @@ -0,0 +1,33 @@ +From 595227db1f2d98bfc33f02a55842f268e12b247d Mon Sep 17 00:00:00 2001 +From: Felipe Balbi +Date: Fri, 13 Feb 2015 14:55:34 -0600 +Subject: usb: host: fusbh200: use new USB_RESUME_TIMEOUT + +From: Felipe Balbi + +commit 595227db1f2d98bfc33f02a55842f268e12b247d upstream. + +Make sure we're using the new macro, so our +resume signaling will always pass certification. + +Signed-off-by: Felipe Balbi +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/host/fusbh200-hcd.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +--- a/drivers/usb/host/fusbh200-hcd.c ++++ b/drivers/usb/host/fusbh200-hcd.c +@@ -1550,10 +1550,9 @@ static int fusbh200_hub_control ( + if ((temp & PORT_PE) == 0) + goto error; + +- /* resume signaling for 20 msec */ + fusbh200_writel(fusbh200, temp | PORT_RESUME, status_reg); + fusbh200->reset_done[wIndex] = jiffies +- + msecs_to_jiffies(20); ++ + msecs_to_jiffies(USB_RESUME_TIMEOUT); + break; + case USB_PORT_FEAT_C_SUSPEND: + clear_bit(wIndex, &fusbh200->port_c_suspend); diff --git a/queue-3.14/usb-host-isp116x-use-new-usb_resume_timeout.patch b/queue-3.14/usb-host-isp116x-use-new-usb_resume_timeout.patch new file mode 100644 index 00000000000..4001313667d --- /dev/null +++ b/queue-3.14/usb-host-isp116x-use-new-usb_resume_timeout.patch @@ -0,0 +1,30 @@ +From 8c0ae6574ccfd3d619876a65829aad74c9d22ba5 Mon Sep 17 00:00:00 2001 +From: Felipe Balbi +Date: Fri, 13 Feb 2015 14:50:10 -0600 +Subject: usb: host: isp116x: use new USB_RESUME_TIMEOUT + +From: Felipe Balbi + +commit 8c0ae6574ccfd3d619876a65829aad74c9d22ba5 upstream. + +Make sure we're using the new macro, so our +resume signaling will always pass certification. + +Signed-off-by: Felipe Balbi +Signed-off-by: Greg Kroah-Hartman + +--- + 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 +@@ -1487,7 +1487,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); diff --git a/queue-3.14/usb-host-r8a66597-use-new-usb_resume_timeout.patch b/queue-3.14/usb-host-r8a66597-use-new-usb_resume_timeout.patch new file mode 100644 index 00000000000..f16b92443d2 --- /dev/null +++ b/queue-3.14/usb-host-r8a66597-use-new-usb_resume_timeout.patch @@ -0,0 +1,35 @@ +From 7a606ac29752a3e571b83f9b3fceb1eaa1d37781 Mon Sep 17 00:00:00 2001 +From: Felipe Balbi +Date: Fri, 13 Feb 2015 14:58:53 -0600 +Subject: usb: host: r8a66597: use new USB_RESUME_TIMEOUT + +From: Felipe Balbi + +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 +Signed-off-by: Greg Kroah-Hartman + +--- + 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 +@@ -2300,7 +2300,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); + } + diff --git a/queue-3.14/usb-host-sl811-use-new-usb_resume_timeout.patch b/queue-3.14/usb-host-sl811-use-new-usb_resume_timeout.patch new file mode 100644 index 00000000000..7402fa59aba --- /dev/null +++ b/queue-3.14/usb-host-sl811-use-new-usb_resume_timeout.patch @@ -0,0 +1,30 @@ +From 08debfb13b199716da6153940c31968c556b195d Mon Sep 17 00:00:00 2001 +From: Felipe Balbi +Date: Fri, 13 Feb 2015 15:00:38 -0600 +Subject: usb: host: sl811: use new USB_RESUME_TIMEOUT + +From: Felipe Balbi + +commit 08debfb13b199716da6153940c31968c556b195d upstream. + +Make sure we're using the new macro, so our +resume signaling will always pass certification. + +Signed-off-by: Felipe Balbi +Signed-off-by: Greg Kroah-Hartman + +--- + 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 +@@ -1259,7 +1259,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); diff --git a/queue-3.14/usb-host-uhci-use-new-usb_resume_timeout.patch b/queue-3.14/usb-host-uhci-use-new-usb_resume_timeout.patch new file mode 100644 index 00000000000..d6709304678 --- /dev/null +++ b/queue-3.14/usb-host-uhci-use-new-usb_resume_timeout.patch @@ -0,0 +1,40 @@ +From b8fb6f79f76f478acbbffccc966daa878f172a0a Mon Sep 17 00:00:00 2001 +From: Felipe Balbi +Date: Fri, 13 Feb 2015 14:44:17 -0600 +Subject: usb: host: uhci: use new USB_RESUME_TIMEOUT + +From: Felipe Balbi + +commit b8fb6f79f76f478acbbffccc966daa878f172a0a upstream. + +Make sure we're using the new macro, so our +resume signaling will always pass certification. + +Signed-off-by: Felipe Balbi +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/host/uhci-hub.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +--- a/drivers/usb/host/uhci-hub.c ++++ b/drivers/usb/host/uhci-hub.c +@@ -165,7 +165,7 @@ static void uhci_check_ports(struct uhci + /* Port received a wakeup request */ + set_bit(port, &uhci->resuming_ports); + uhci->ports_timeout = jiffies + +- msecs_to_jiffies(25); ++ msecs_to_jiffies(USB_RESUME_TIMEOUT); + usb_hcd_start_port_resume( + &uhci_to_hcd(uhci)->self, port); + +@@ -337,7 +337,8 @@ static int uhci_hub_control(struct usb_h + uhci_finish_suspend(uhci, port, port_addr); + + /* USB v2.0 7.1.7.5 */ +- uhci->ports_timeout = jiffies + msecs_to_jiffies(50); ++ uhci->ports_timeout = jiffies + ++ msecs_to_jiffies(USB_RESUME_TIMEOUT); + break; + case USB_PORT_FEAT_POWER: + /* UHCI has no power switching */ diff --git a/queue-3.14/usb-host-xhci-use-new-usb_resume_timeout.patch b/queue-3.14/usb-host-xhci-use-new-usb_resume_timeout.patch new file mode 100644 index 00000000000..9b3f9dcd950 --- /dev/null +++ b/queue-3.14/usb-host-xhci-use-new-usb_resume_timeout.patch @@ -0,0 +1,31 @@ +From b9e451885deb6262dbaf5cd14aa77d192d9ac759 Mon Sep 17 00:00:00 2001 +From: Felipe Balbi +Date: Fri, 13 Feb 2015 14:39:13 -0600 +Subject: usb: host: xhci: use new USB_RESUME_TIMEOUT + +From: Felipe Balbi + +commit b9e451885deb6262dbaf5cd14aa77d192d9ac759 upstream. + +Make sure we're using the new macro, so our +resume signaling will always pass certification. + +Acked-by: Mathias Nyman +Signed-off-by: Felipe Balbi +Signed-off-by: Greg Kroah-Hartman + +--- + 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 +@@ -1768,7 +1768,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]);