From: Greg Kroah-Hartman Date: Tue, 3 Jun 2014 21:14:42 +0000 (-0700) Subject: 3.14-stable patches X-Git-Tag: v3.14.6~67 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=00c76ece1c595b52d9ecc45b2494593ab8befbe4;p=thirdparty%2Fkernel%2Fstable-queue.git 3.14-stable patches added patches: alsa-usb-audio-work-around-corrupted-teac-ud-h01-feedback-data.patch clk-tegra-fix-wrong-value-written-to-plle_aux.patch drm-tegra-remove-gratuitous-pad-field.patch fsl-usb-do-not-test-for-phy_clk_valid-bit-on-controller-version-1.6.patch iio-imu-mpu6050-fixed-segfault-in-invensens-mpu-driver-due-to-null-dereference.patch rt2x00-fix-beaconing-on-usb.patch usb-gadget-at91-udc-fix-irq-and-iomem-resource-retrieval.patch usb-nokia-305-should-be-treated-as-unusual-dev.patch usb-nokia-5300-should-be-treated-as-unusual-dev.patch usb-ohci-fix-problem-with-global-suspend-on-ati-controllers.patch usb-qcserial-add-a-number-of-dell-devices.patch usb-storage-shuttle_usbat-fix-discs-being-detected-twice.patch --- diff --git a/queue-3.14/alsa-usb-audio-work-around-corrupted-teac-ud-h01-feedback-data.patch b/queue-3.14/alsa-usb-audio-work-around-corrupted-teac-ud-h01-feedback-data.patch new file mode 100644 index 00000000000..f7b12c2bd6a --- /dev/null +++ b/queue-3.14/alsa-usb-audio-work-around-corrupted-teac-ud-h01-feedback-data.patch @@ -0,0 +1,69 @@ +From 7040b6d1febfdbd9c1595efb751d492cd2503f96 Mon Sep 17 00:00:00 2001 +From: Clemens Ladisch +Date: Thu, 1 May 2014 12:20:22 +0200 +Subject: ALSA: usb-audio: work around corrupted TEAC UD-H01 feedback data + +From: Clemens Ladisch + +commit 7040b6d1febfdbd9c1595efb751d492cd2503f96 upstream. + +The TEAC UD-H01 firmware sends wrong feedback frequency values, thus +causing the PC to send the samples at a wrong rate, which results in +clicks and crackles in the output. + +Add a workaround to detect and fix the corruption. + +Signed-off-by: Clemens Ladisch +[mick37@gmx.de: use sender->udh01_fb_quirk rather than + ep->udh01_fb_quirk in snd_usb_handle_sync_urb()] +Reported-and-tested-by: Mick +Reported-and-tested-by: Andrea Messa +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/usb/card.h | 1 + + sound/usb/endpoint.c | 15 ++++++++++++++- + 2 files changed, 15 insertions(+), 1 deletion(-) + +--- a/sound/usb/card.h ++++ b/sound/usb/card.h +@@ -92,6 +92,7 @@ struct snd_usb_endpoint { + unsigned int curframesize; /* current packet size in frames (for capture) */ + unsigned int syncmaxsize; /* sync endpoint packet size */ + unsigned int fill_max:1; /* fill max packet size always */ ++ unsigned int udh01_fb_quirk:1; /* corrupted feedback data */ + unsigned int datainterval; /* log_2 of data packet interval */ + unsigned int syncinterval; /* P for adaptive mode, 0 otherwise */ + unsigned char silence_value; +--- a/sound/usb/endpoint.c ++++ b/sound/usb/endpoint.c +@@ -469,6 +469,10 @@ struct snd_usb_endpoint *snd_usb_add_end + ep->syncinterval = 3; + + ep->syncmaxsize = le16_to_cpu(get_endpoint(alts, 1)->wMaxPacketSize); ++ ++ if (chip->usb_id == USB_ID(0x0644, 0x8038) /* TEAC UD-H01 */ && ++ ep->syncmaxsize == 4) ++ ep->udh01_fb_quirk = 1; + } + + list_add_tail(&ep->list, &chip->ep_list); +@@ -1099,7 +1103,16 @@ void snd_usb_handle_sync_urb(struct snd_ + if (f == 0) + return; + +- if (unlikely(ep->freqshift == INT_MIN)) { ++ if (unlikely(sender->udh01_fb_quirk)) { ++ /* ++ * The TEAC UD-H01 firmware sometimes changes the feedback value ++ * by +/- 0x1.0000. ++ */ ++ if (f < ep->freqn - 0x8000) ++ f += 0x10000; ++ else if (f > ep->freqn + 0x8000) ++ f -= 0x10000; ++ } else if (unlikely(ep->freqshift == INT_MIN)) { + /* + * The first time we see a feedback value, determine its format + * by shifting it left or right until it matches the nominal diff --git a/queue-3.14/clk-tegra-fix-wrong-value-written-to-plle_aux.patch b/queue-3.14/clk-tegra-fix-wrong-value-written-to-plle_aux.patch new file mode 100644 index 00000000000..f79ef2032bd --- /dev/null +++ b/queue-3.14/clk-tegra-fix-wrong-value-written-to-plle_aux.patch @@ -0,0 +1,36 @@ +From d2c834abe2b39a2d5a6c38ef44de87c97cbb34b4 Mon Sep 17 00:00:00 2001 +From: Tuomas Tynkkynen +Date: Fri, 16 May 2014 16:50:20 +0300 +Subject: clk: tegra: Fix wrong value written to PLLE_AUX + +From: Tuomas Tynkkynen + +commit d2c834abe2b39a2d5a6c38ef44de87c97cbb34b4 upstream. + +The value written to PLLE_AUX was incorrect due to a wrong variable +being used. Without this fix SATA does not work. + +Signed-off-by: Tuomas Tynkkynen +Tested-by: Mikko Perttunen +Reviewed-by: Thierry Reding +Tested-by: Thierry Reding +Acked-by: Thierry Reding +Signed-off-by: Mike Turquette +[mturquette@linaro.org: improved changelog] +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/clk/tegra/clk-pll.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/clk/tegra/clk-pll.c ++++ b/drivers/clk/tegra/clk-pll.c +@@ -1718,7 +1718,7 @@ struct clk *tegra_clk_register_plle_tegr + "pll_re_vco"); + } else { + val_aux &= ~(PLLE_AUX_PLLRE_SEL | PLLE_AUX_PLLP_SEL); +- pll_writel(val, pll_params->aux_reg, pll); ++ pll_writel(val_aux, pll_params->aux_reg, pll); + } + + clk = _tegra_clk_register_pll(pll, name, parent_name, flags, diff --git a/queue-3.14/drm-tegra-remove-gratuitous-pad-field.patch b/queue-3.14/drm-tegra-remove-gratuitous-pad-field.patch new file mode 100644 index 00000000000..5422b0e19a7 --- /dev/null +++ b/queue-3.14/drm-tegra-remove-gratuitous-pad-field.patch @@ -0,0 +1,42 @@ +From cbfbbabb89b37f6bad05f478d906a385149f288d Mon Sep 17 00:00:00 2001 +From: Thierry Reding +Date: Wed, 9 Apr 2014 14:26:59 +0200 +Subject: drm/tegra: Remove gratuitous pad field + +From: Thierry Reding + +commit cbfbbabb89b37f6bad05f478d906a385149f288d upstream. + +The version of the drm_tegra_submit structure that was merged all the +way back in 3.10 contains a pad field that was originally intended to +properly pad the following __u64 field. Unfortunately it seems like a +different field was dropped during review that caused this padding to +become unnecessary, but the pad field wasn't removed at that time. + +One possible side-effect of this is that since the __u64 following the +pad is now no longer properly aligned, the compiler may (or may not) +introduce padding itself, which results in no predictable ABI. + +Rectify this by removing the pad field so that all fields are again +naturally aligned. Technically this is breaking existing userspace ABI, +but given that there aren't any (released) userspace drivers that make +use of this yet, the fallout should be minimal. + +Fixes: d43f81cbaf43 ("drm/tegra: Add gr2d device") +Signed-off-by: Thierry Reding +Signed-off-by: Greg Kroah-Hartman + +--- + include/uapi/drm/tegra_drm.h | 1 - + 1 file changed, 1 deletion(-) + +--- a/include/uapi/drm/tegra_drm.h ++++ b/include/uapi/drm/tegra_drm.h +@@ -114,7 +114,6 @@ struct drm_tegra_submit { + __u32 num_waitchks; + __u32 waitchk_mask; + __u32 timeout; +- __u32 pad; + __u64 syncpts; + __u64 cmdbufs; + __u64 relocs; diff --git a/queue-3.14/fsl-usb-do-not-test-for-phy_clk_valid-bit-on-controller-version-1.6.patch b/queue-3.14/fsl-usb-do-not-test-for-phy_clk_valid-bit-on-controller-version-1.6.patch new file mode 100644 index 00000000000..da09488fcbe --- /dev/null +++ b/queue-3.14/fsl-usb-do-not-test-for-phy_clk_valid-bit-on-controller-version-1.6.patch @@ -0,0 +1,40 @@ +From d183c81929beeba842b74422f754446ef2b8b49c Mon Sep 17 00:00:00 2001 +From: Nikita Yushchenko +Date: Mon, 28 Apr 2014 19:23:44 +0400 +Subject: fsl-usb: do not test for PHY_CLK_VALID bit on controller version 1.6 + +From: Nikita Yushchenko + +commit d183c81929beeba842b74422f754446ef2b8b49c upstream. + +Per reference manuals of Freescale P1020 and P2020 SoCs, USB controller +present in these SoCs has bit 17 of USBx_CONTROL register marked as +Reserved - there is no PHY_CLK_VALID bit there. + +Testing for this bit in ehci_fsl_setup_phy() behaves differently on two +P1020RDB boards available here - on one board test passes and fsl-usb +init succeeds, but on other board test fails, causing fsl-usb init to +fail. + +This patch changes ehci_fsl_setup_phy() not to test PHY_CLK_VALID on +controller version 1.6 that (per manual) does not have this bit. + +Signed-off-by: Nikita Yushchenko +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/host/ehci-fsl.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/drivers/usb/host/ehci-fsl.c ++++ b/drivers/usb/host/ehci-fsl.c +@@ -248,7 +248,8 @@ static int ehci_fsl_setup_phy(struct usb + break; + } + +- if (pdata->have_sysif_regs && pdata->controller_ver && ++ if (pdata->have_sysif_regs && ++ pdata->controller_ver > FSL_USB_VER_1_6 && + (phy_mode == FSL_USB2_PHY_ULPI)) { + /* check PHY_CLK_VALID to get phy clk valid */ + if (!(spin_event_timeout(in_be32(non_ehci + FSL_SOC_USB_CTRL) & diff --git a/queue-3.14/iio-imu-mpu6050-fixed-segfault-in-invensens-mpu-driver-due-to-null-dereference.patch b/queue-3.14/iio-imu-mpu6050-fixed-segfault-in-invensens-mpu-driver-due-to-null-dereference.patch new file mode 100644 index 00000000000..4beb9739b17 --- /dev/null +++ b/queue-3.14/iio-imu-mpu6050-fixed-segfault-in-invensens-mpu-driver-due-to-null-dereference.patch @@ -0,0 +1,45 @@ +From b9b3a41893c3f1be67b5aacfa525969914bea0e9 Mon Sep 17 00:00:00 2001 +From: Atilla Filiz +Date: Fri, 11 Apr 2014 16:51:23 +0200 +Subject: iio:imu:mpu6050: Fixed segfault in Invensens MPU driver due to null dereference + +From: Atilla Filiz + +commit b9b3a41893c3f1be67b5aacfa525969914bea0e9 upstream. + +The driver segfaults when the kernel boots with device tree as the +platform data is then not present and the pointer is deferenced without +checking it is not null. This patch introduces such a check avoiding the +crash. + +Signed-off-by: Atilla Filiz +Signed-off-by: Jonathan Cameron +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/iio/imu/inv_mpu6050/inv_mpu_core.c | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +--- a/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c ++++ b/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c +@@ -661,6 +661,7 @@ static int inv_mpu_probe(struct i2c_clie + { + struct inv_mpu6050_state *st; + struct iio_dev *indio_dev; ++ struct inv_mpu6050_platform_data *pdata; + int result; + + if (!i2c_check_functionality(client->adapter, +@@ -673,8 +674,10 @@ static int inv_mpu_probe(struct i2c_clie + + st = iio_priv(indio_dev); + st->client = client; +- st->plat_data = *(struct inv_mpu6050_platform_data +- *)dev_get_platdata(&client->dev); ++ pdata = (struct inv_mpu6050_platform_data ++ *)dev_get_platdata(&client->dev); ++ if (pdata) ++ st->plat_data = *pdata; + /* power is turned on inside check chip type*/ + result = inv_check_and_setup_chip(st, id); + if (result) diff --git a/queue-3.14/rt2x00-fix-beaconing-on-usb.patch b/queue-3.14/rt2x00-fix-beaconing-on-usb.patch new file mode 100644 index 00000000000..93dc0e05c81 --- /dev/null +++ b/queue-3.14/rt2x00-fix-beaconing-on-usb.patch @@ -0,0 +1,67 @@ +From 8834d3608cc516f13e2e510f4057c263f3d2ce42 Mon Sep 17 00:00:00 2001 +From: Stanislaw Gruszka +Date: Thu, 17 Apr 2014 11:08:47 +0200 +Subject: rt2x00: fix beaconing on USB + +From: Stanislaw Gruszka + +commit 8834d3608cc516f13e2e510f4057c263f3d2ce42 upstream. + +When disable beaconing we clear register with beacon and newer set it +back, what make we stop send beacons infinitely. + +Signed-off-by: Stanislaw Gruszka +Signed-off-by: John W. Linville +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/wireless/rt2x00/rt2x00mac.c | 22 ++++++++++++---------- + 1 file changed, 12 insertions(+), 10 deletions(-) + +--- a/drivers/net/wireless/rt2x00/rt2x00mac.c ++++ b/drivers/net/wireless/rt2x00/rt2x00mac.c +@@ -621,20 +621,18 @@ void rt2x00mac_bss_info_changed(struct i + bss_conf->bssid); + + /* +- * Update the beacon. This is only required on USB devices. PCI +- * devices fetch beacons periodically. +- */ +- if (changes & BSS_CHANGED_BEACON && rt2x00_is_usb(rt2x00dev)) +- rt2x00queue_update_beacon(rt2x00dev, vif); +- +- /* + * Start/stop beaconing. + */ + if (changes & BSS_CHANGED_BEACON_ENABLED) { + if (!bss_conf->enable_beacon && intf->enable_beacon) { +- rt2x00queue_clear_beacon(rt2x00dev, vif); + rt2x00dev->intf_beaconing--; + intf->enable_beacon = false; ++ /* ++ * Clear beacon in the H/W for this vif. This is needed ++ * to disable beaconing on this particular interface ++ * and keep it running on other interfaces. ++ */ ++ rt2x00queue_clear_beacon(rt2x00dev, vif); + + if (rt2x00dev->intf_beaconing == 0) { + /* +@@ -645,11 +643,15 @@ void rt2x00mac_bss_info_changed(struct i + rt2x00queue_stop_queue(rt2x00dev->bcn); + mutex_unlock(&intf->beacon_skb_mutex); + } +- +- + } else if (bss_conf->enable_beacon && !intf->enable_beacon) { + rt2x00dev->intf_beaconing++; + intf->enable_beacon = true; ++ /* ++ * Upload beacon to the H/W. This is only required on ++ * USB devices. PCI devices fetch beacons periodically. ++ */ ++ if (rt2x00_is_usb(rt2x00dev)) ++ rt2x00queue_update_beacon(rt2x00dev, vif); + + if (rt2x00dev->intf_beaconing == 1) { + /* diff --git a/queue-3.14/series b/queue-3.14/series index 9c98c039530..a9d954c2bf0 100644 --- a/queue-3.14/series +++ b/queue-3.14/series @@ -80,3 +80,15 @@ drm-radeon-fix-count-in-cik_sdma_ring_test.patch drm-radeon-uvd-use-lower-clocks-on-old-uvd-to-boot-v2.patch drm-radeon-use-pflip-irq-on-r600-v2.patch drm-radeon-check-buffer-relocation-offset.patch +drm-tegra-remove-gratuitous-pad-field.patch +clk-tegra-fix-wrong-value-written-to-plle_aux.patch +iio-imu-mpu6050-fixed-segfault-in-invensens-mpu-driver-due-to-null-dereference.patch +fsl-usb-do-not-test-for-phy_clk_valid-bit-on-controller-version-1.6.patch +usb-gadget-at91-udc-fix-irq-and-iomem-resource-retrieval.patch +usb-ohci-fix-problem-with-global-suspend-on-ati-controllers.patch +usb-qcserial-add-a-number-of-dell-devices.patch +usb-storage-shuttle_usbat-fix-discs-being-detected-twice.patch +usb-nokia-305-should-be-treated-as-unusual-dev.patch +usb-nokia-5300-should-be-treated-as-unusual-dev.patch +rt2x00-fix-beaconing-on-usb.patch +alsa-usb-audio-work-around-corrupted-teac-ud-h01-feedback-data.patch diff --git a/queue-3.14/usb-gadget-at91-udc-fix-irq-and-iomem-resource-retrieval.patch b/queue-3.14/usb-gadget-at91-udc-fix-irq-and-iomem-resource-retrieval.patch new file mode 100644 index 00000000000..1e5f0fc020e --- /dev/null +++ b/queue-3.14/usb-gadget-at91-udc-fix-irq-and-iomem-resource-retrieval.patch @@ -0,0 +1,42 @@ +From 886c7c426d465732ec9d1b2bbdda5642fc2e7e05 Mon Sep 17 00:00:00 2001 +From: Jean-Jacques Hiblot +Date: Wed, 12 Mar 2014 17:30:08 +0100 +Subject: usb: gadget: at91-udc: fix irq and iomem resource retrieval + +From: Jean-Jacques Hiblot + +commit 886c7c426d465732ec9d1b2bbdda5642fc2e7e05 upstream. + +When using dt resources retrieval (interrupts and reg properties) there is +no predefined order for these resources in the platform dev resource +table. Also don't expect the number of resource to be always 2. + +Signed-off-by: Jean-Jacques Hiblot +Acked-by: Boris BREZILLON +Acked-by: Nicolas Ferre +Signed-off-by: Felipe Balbi +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/gadget/at91_udc.c | 10 ---------- + 1 file changed, 10 deletions(-) + +--- a/drivers/usb/gadget/at91_udc.c ++++ b/drivers/usb/gadget/at91_udc.c +@@ -1709,16 +1709,6 @@ static int at91udc_probe(struct platform + return -ENODEV; + } + +- if (pdev->num_resources != 2) { +- DBG("invalid num_resources\n"); +- return -ENODEV; +- } +- if ((pdev->resource[0].flags != IORESOURCE_MEM) +- || (pdev->resource[1].flags != IORESOURCE_IRQ)) { +- DBG("invalid resource type\n"); +- return -ENODEV; +- } +- + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); + if (!res) + return -ENXIO; diff --git a/queue-3.14/usb-nokia-305-should-be-treated-as-unusual-dev.patch b/queue-3.14/usb-nokia-305-should-be-treated-as-unusual-dev.patch new file mode 100644 index 00000000000..ee654423215 --- /dev/null +++ b/queue-3.14/usb-nokia-305-should-be-treated-as-unusual-dev.patch @@ -0,0 +1,32 @@ +From f0ef5d41792a46a1085dead9dfb0bdb2c574638e Mon Sep 17 00:00:00 2001 +From: "Victor A. Santos" +Date: Sat, 26 Apr 2014 23:20:14 -0300 +Subject: USB: Nokia 305 should be treated as unusual dev + +From: "Victor A. Santos" + +commit f0ef5d41792a46a1085dead9dfb0bdb2c574638e upstream. + +Signed-off-by: Victor A. Santos +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/storage/unusual_devs.h | 7 +++++++ + 1 file changed, 7 insertions(+) + +--- a/drivers/usb/storage/unusual_devs.h ++++ b/drivers/usb/storage/unusual_devs.h +@@ -234,6 +234,13 @@ UNUSUAL_DEV( 0x0421, 0x0495, 0x0370, 0x + USB_SC_DEVICE, USB_PR_DEVICE, NULL, + US_FL_MAX_SECTORS_64 ), + ++/* Patch submitted by Victor A. Santos */ ++UNUSUAL_DEV( 0x0421, 0x05af, 0x0742, 0x0742, ++ "Nokia", ++ "305", ++ USB_SC_DEVICE, USB_PR_DEVICE, NULL, ++ US_FL_MAX_SECTORS_64), ++ + /* Patch submitted by Mikhail Zolotaryov */ + UNUSUAL_DEV( 0x0421, 0x06aa, 0x1110, 0x1110, + "Nokia", diff --git a/queue-3.14/usb-nokia-5300-should-be-treated-as-unusual-dev.patch b/queue-3.14/usb-nokia-5300-should-be-treated-as-unusual-dev.patch new file mode 100644 index 00000000000..3a300722534 --- /dev/null +++ b/queue-3.14/usb-nokia-5300-should-be-treated-as-unusual-dev.patch @@ -0,0 +1,32 @@ +From 6ed07d45d09bc2aa60e27b845543db9972e22a38 Mon Sep 17 00:00:00 2001 +From: Daniele Forsi +Date: Mon, 28 Apr 2014 17:09:11 +0200 +Subject: USB: Nokia 5300 should be treated as unusual dev + +From: Daniele Forsi + +commit 6ed07d45d09bc2aa60e27b845543db9972e22a38 upstream. + +Signed-off-by: Daniele Forsi +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/storage/unusual_devs.h | 7 +++++++ + 1 file changed, 7 insertions(+) + +--- a/drivers/usb/storage/unusual_devs.h ++++ b/drivers/usb/storage/unusual_devs.h +@@ -234,6 +234,13 @@ UNUSUAL_DEV( 0x0421, 0x0495, 0x0370, 0x + USB_SC_DEVICE, USB_PR_DEVICE, NULL, + US_FL_MAX_SECTORS_64 ), + ++/* Reported by Daniele Forsi */ ++UNUSUAL_DEV( 0x0421, 0x04b9, 0x0350, 0x0350, ++ "Nokia", ++ "5300", ++ USB_SC_DEVICE, USB_PR_DEVICE, NULL, ++ US_FL_MAX_SECTORS_64 ), ++ + /* Patch submitted by Victor A. Santos */ + UNUSUAL_DEV( 0x0421, 0x05af, 0x0742, 0x0742, + "Nokia", diff --git a/queue-3.14/usb-ohci-fix-problem-with-global-suspend-on-ati-controllers.patch b/queue-3.14/usb-ohci-fix-problem-with-global-suspend-on-ati-controllers.patch new file mode 100644 index 00000000000..0c0d44344e7 --- /dev/null +++ b/queue-3.14/usb-ohci-fix-problem-with-global-suspend-on-ati-controllers.patch @@ -0,0 +1,95 @@ +From c1db30a2a79eb59997b13b8cabf2a50bea9f04e1 Mon Sep 17 00:00:00 2001 +From: Alan Stern +Date: Thu, 1 May 2014 15:21:42 -0400 +Subject: USB: OHCI: fix problem with global suspend on ATI controllers +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Alan Stern + +commit c1db30a2a79eb59997b13b8cabf2a50bea9f04e1 upstream. + +Some OHCI controllers from ATI/AMD seem to have difficulty with +"global" USB suspend, that is, suspending an entire USB bus without +setting the suspend feature for each port connected to a device. When +we try to resume the child devices, the controller gives timeout +errors on the unsuspended ports, requiring resets, and can even cause +ohci-hcd to hang; see + + http://marc.info/?l=linux-usb&m=139514332820398&w=2 + +and the following messages. + +This patch fixes the problem by adding a new quirk flag to ohci-hcd. +The flag causes the ohci_rh_suspend() routine to suspend each +unsuspended, enabled port before suspending the root hub. This +effectively converts the "global" suspend to an ordinary root-hub +suspend. There is no need to unsuspend these ports when the root hub +is resumed, because the child devices will be resumed anyway in the +course of a normal system resume ("global" suspend is never used for +runtime PM). + +This patch should be applied to all stable kernels which include +commit 0aa2832dd0d9 (USB: use "global suspend" for system sleep on +USB-2 buses) or a backported version thereof. + +Signed-off-by: Alan Stern +Reported-by: Peter Münster +Tested-by: Peter Münster +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/host/ohci-hub.c | 18 ++++++++++++++++++ + drivers/usb/host/ohci-pci.c | 1 + + drivers/usb/host/ohci.h | 2 ++ + 3 files changed, 21 insertions(+) + +--- a/drivers/usb/host/ohci-hub.c ++++ b/drivers/usb/host/ohci-hub.c +@@ -90,6 +90,24 @@ __acquires(ohci->lock) + dl_done_list (ohci); + finish_unlinks (ohci, ohci_frame_no(ohci)); + ++ /* ++ * Some controllers don't handle "global" suspend properly if ++ * there are unsuspended ports. For these controllers, put all ++ * the enabled ports into suspend before suspending the root hub. ++ */ ++ if (ohci->flags & OHCI_QUIRK_GLOBAL_SUSPEND) { ++ __hc32 __iomem *portstat = ohci->regs->roothub.portstatus; ++ int i; ++ unsigned temp; ++ ++ for (i = 0; i < ohci->num_ports; (++i, ++portstat)) { ++ temp = ohci_readl(ohci, portstat); ++ if ((temp & (RH_PS_PES | RH_PS_PSS)) == ++ RH_PS_PES) ++ ohci_writel(ohci, RH_PS_PSS, portstat); ++ } ++ } ++ + /* maybe resume can wake root hub */ + if (ohci_to_hcd(ohci)->self.root_hub->do_remote_wakeup || autostop) { + ohci->hc_control |= OHCI_CTRL_RWE; +--- a/drivers/usb/host/ohci-pci.c ++++ b/drivers/usb/host/ohci-pci.c +@@ -160,6 +160,7 @@ static int ohci_quirk_amd700(struct usb_ + ohci_dbg(ohci, "enabled AMD prefetch quirk\n"); + } + ++ ohci->flags |= OHCI_QUIRK_GLOBAL_SUSPEND; + return 0; + } + +--- a/drivers/usb/host/ohci.h ++++ b/drivers/usb/host/ohci.h +@@ -405,6 +405,8 @@ struct ohci_hcd { + #define OHCI_QUIRK_HUB_POWER 0x100 /* distrust firmware power/oc setup */ + #define OHCI_QUIRK_AMD_PLL 0x200 /* AMD PLL quirk*/ + #define OHCI_QUIRK_AMD_PREFETCH 0x400 /* pre-fetch for ISO transfer */ ++#define OHCI_QUIRK_GLOBAL_SUSPEND 0x800 /* must suspend ports */ ++ + // there are also chip quirks/bugs in init logic + + struct work_struct nec_work; /* Worker for NEC quirk */ diff --git a/queue-3.14/usb-qcserial-add-a-number-of-dell-devices.patch b/queue-3.14/usb-qcserial-add-a-number-of-dell-devices.patch new file mode 100644 index 00000000000..1ca9ef214ca --- /dev/null +++ b/queue-3.14/usb-qcserial-add-a-number-of-dell-devices.patch @@ -0,0 +1,65 @@ +From 4d7c0136a54f62501f8a34c4d08a5e0258d3d3ca Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Bj=C3=B8rn=20Mork?= +Date: Sun, 27 Apr 2014 16:47:42 +0200 +Subject: usb: qcserial: add a number of Dell devices +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: =?UTF-8?q?Bj=C3=B8rn=20Mork?= + +commit 4d7c0136a54f62501f8a34c4d08a5e0258d3d3ca upstream. + +Dan writes: + +"The Dell drivers use the same configuration for PIDs: + +81A2: Dell Wireless 5806 Gobi(TM) 4G LTE Mobile Broadband Card +81A3: Dell Wireless 5570 HSPA+ (42Mbps) Mobile Broadband Card +81A4: Dell Wireless 5570e HSPA+ (42Mbps) Mobile Broadband Card +81A8: Dell Wireless 5808 Gobi(TM) 4G LTE Mobile Broadband Card +81A9: Dell Wireless 5808e Gobi(TM) 4G LTE Mobile Broadband Card + +These devices are all clearly Sierra devices, but are also definitely +Gobi-based. The A8 might be the MC7700/7710 and A9 is likely a MC7750. + +>From DellGobi5kSetup.exe from the Dell drivers: + +usbif0: serial/firmware loader? +usbif2: nmea +usbif3: modem/ppp +usbif8: net/QMI" + +Reported-by: AceLan Kao +Reported-by: Dan Williams +Signed-off-by: Bjørn Mork +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/serial/qcserial.c | 15 +++++++++++++++ + 1 file changed, 15 insertions(+) + +--- a/drivers/usb/serial/qcserial.c ++++ b/drivers/usb/serial/qcserial.c +@@ -151,6 +151,21 @@ static const struct usb_device_id id_tab + {USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x9051, 0)}, /* Netgear AirCard 340U Device Management */ + {USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x9051, 2)}, /* Netgear AirCard 340U NMEA */ + {USB_DEVICE_INTERFACE_NUMBER(0x1199, 0x9051, 3)}, /* Netgear AirCard 340U Modem */ ++ {USB_DEVICE_INTERFACE_NUMBER(0x413c, 0x81a2, 0)}, /* Dell Wireless 5806 Gobi(TM) 4G LTE Mobile Broadband Card Device Management */ ++ {USB_DEVICE_INTERFACE_NUMBER(0x413c, 0x81a2, 2)}, /* Dell Wireless 5806 Gobi(TM) 4G LTE Mobile Broadband Card NMEA */ ++ {USB_DEVICE_INTERFACE_NUMBER(0x413c, 0x81a2, 3)}, /* Dell Wireless 5806 Gobi(TM) 4G LTE Mobile Broadband Card Modem */ ++ {USB_DEVICE_INTERFACE_NUMBER(0x413c, 0x81a3, 0)}, /* Dell Wireless 5570 HSPA+ (42Mbps) Mobile Broadband Card Device Management */ ++ {USB_DEVICE_INTERFACE_NUMBER(0x413c, 0x81a3, 2)}, /* Dell Wireless 5570 HSPA+ (42Mbps) Mobile Broadband Card NMEA */ ++ {USB_DEVICE_INTERFACE_NUMBER(0x413c, 0x81a3, 3)}, /* Dell Wireless 5570 HSPA+ (42Mbps) Mobile Broadband Card Modem */ ++ {USB_DEVICE_INTERFACE_NUMBER(0x413c, 0x81a4, 0)}, /* Dell Wireless 5570e HSPA+ (42Mbps) Mobile Broadband Card Device Management */ ++ {USB_DEVICE_INTERFACE_NUMBER(0x413c, 0x81a4, 2)}, /* Dell Wireless 5570e HSPA+ (42Mbps) Mobile Broadband Card NMEA */ ++ {USB_DEVICE_INTERFACE_NUMBER(0x413c, 0x81a4, 3)}, /* Dell Wireless 5570e HSPA+ (42Mbps) Mobile Broadband Card Modem */ ++ {USB_DEVICE_INTERFACE_NUMBER(0x413c, 0x81a8, 0)}, /* Dell Wireless 5808 Gobi(TM) 4G LTE Mobile Broadband Card Device Management */ ++ {USB_DEVICE_INTERFACE_NUMBER(0x413c, 0x81a8, 2)}, /* Dell Wireless 5808 Gobi(TM) 4G LTE Mobile Broadband Card NMEA */ ++ {USB_DEVICE_INTERFACE_NUMBER(0x413c, 0x81a8, 3)}, /* Dell Wireless 5808 Gobi(TM) 4G LTE Mobile Broadband Card Modem */ ++ {USB_DEVICE_INTERFACE_NUMBER(0x413c, 0x81a9, 0)}, /* Dell Wireless 5808e Gobi(TM) 4G LTE Mobile Broadband Card Device Management */ ++ {USB_DEVICE_INTERFACE_NUMBER(0x413c, 0x81a9, 2)}, /* Dell Wireless 5808e Gobi(TM) 4G LTE Mobile Broadband Card NMEA */ ++ {USB_DEVICE_INTERFACE_NUMBER(0x413c, 0x81a9, 3)}, /* Dell Wireless 5808e Gobi(TM) 4G LTE Mobile Broadband Card Modem */ + + { } /* Terminating entry */ + }; diff --git a/queue-3.14/usb-storage-shuttle_usbat-fix-discs-being-detected-twice.patch b/queue-3.14/usb-storage-shuttle_usbat-fix-discs-being-detected-twice.patch new file mode 100644 index 00000000000..2f44e984930 --- /dev/null +++ b/queue-3.14/usb-storage-shuttle_usbat-fix-discs-being-detected-twice.patch @@ -0,0 +1,32 @@ +From df602c2d2358f02c6e49cffc5b49b9daa16db033 Mon Sep 17 00:00:00 2001 +From: Daniele Forsi +Date: Tue, 29 Apr 2014 11:44:03 +0200 +Subject: usb: storage: shuttle_usbat: fix discs being detected twice + +From: Daniele Forsi + +commit df602c2d2358f02c6e49cffc5b49b9daa16db033 upstream. + +Even if the USB-to-ATAPI converter supported multiple LUNs, this +driver would always detect the same physical device or media because +it doesn't use srb->device->lun in any way. +Tested with an Hewlett-Packard CD-Writer Plus 8200e. + +Signed-off-by: Daniele Forsi +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/storage/shuttle_usbat.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/usb/storage/shuttle_usbat.c ++++ b/drivers/usb/storage/shuttle_usbat.c +@@ -1851,7 +1851,7 @@ static int usbat_probe(struct usb_interf + us->transport_name = "Shuttle USBAT"; + us->transport = usbat_flash_transport; + us->transport_reset = usb_stor_CB_reset; +- us->max_lun = 1; ++ us->max_lun = 0; + + result = usb_stor_probe2(us); + return result;