From 859decb59590617c8cdacef212b1e70eded3bb7d Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Sat, 17 Oct 2015 16:32:32 -0700 Subject: [PATCH] 3.10-stable patches added patches: md-flush-event_work-before-stopping-array.patch mips-dma-default-fix-32-bit-fall-back-to-gfp_dma.patch usb-add-device-quirk-for-logitech-ptz-cameras.patch usb-add-reset-resume-quirk-for-two-plantronics-usb-headphones.patch usb-use-the-usb_ss_mult-macro-to-get-the-burst-multiplier.patch --- ...ush-event_work-before-stopping-array.patch | 35 ++++++++++++++ ...ault-fix-32-bit-fall-back-to-gfp_dma.patch | 41 ++++++++++++++++ queue-3.10/series | 5 ++ ...evice-quirk-for-logitech-ptz-cameras.patch | 45 ++++++++++++++++++ ...k-for-two-plantronics-usb-headphones.patch | 34 ++++++++++++++ ...lt-macro-to-get-the-burst-multiplier.patch | 47 +++++++++++++++++++ 6 files changed, 207 insertions(+) create mode 100644 queue-3.10/md-flush-event_work-before-stopping-array.patch create mode 100644 queue-3.10/mips-dma-default-fix-32-bit-fall-back-to-gfp_dma.patch create mode 100644 queue-3.10/usb-add-device-quirk-for-logitech-ptz-cameras.patch create mode 100644 queue-3.10/usb-add-reset-resume-quirk-for-two-plantronics-usb-headphones.patch create mode 100644 queue-3.10/usb-use-the-usb_ss_mult-macro-to-get-the-burst-multiplier.patch diff --git a/queue-3.10/md-flush-event_work-before-stopping-array.patch b/queue-3.10/md-flush-event_work-before-stopping-array.patch new file mode 100644 index 00000000000..703c1d8e671 --- /dev/null +++ b/queue-3.10/md-flush-event_work-before-stopping-array.patch @@ -0,0 +1,35 @@ +From ee5d004fd0591536a061451eba2b187092e9127c Mon Sep 17 00:00:00 2001 +From: NeilBrown +Date: Wed, 22 Jul 2015 10:20:07 +1000 +Subject: md: flush ->event_work before stopping array. + +From: NeilBrown + +commit ee5d004fd0591536a061451eba2b187092e9127c upstream. + +The 'event_work' worker used by dm-raid may still be running +when the array is stopped. This can result in an oops. + +So flush the workqueue on which it is run after detaching +and before destroying the device. + +Reported-by: Heinz Mauelshagen +Signed-off-by: NeilBrown +Fixes: 9d09e663d550 ("dm: raid456 basic support") +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/md/md.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/drivers/md/md.c ++++ b/drivers/md/md.c +@@ -5306,6 +5306,8 @@ EXPORT_SYMBOL_GPL(md_stop_writes); + static void __md_stop(struct mddev *mddev) + { + mddev->ready = 0; ++ /* Ensure ->event_work is done */ ++ flush_workqueue(md_misc_wq); + mddev->pers->stop(mddev); + if (mddev->pers->sync_request && mddev->to_remove == NULL) + mddev->to_remove = &md_redundancy_group; diff --git a/queue-3.10/mips-dma-default-fix-32-bit-fall-back-to-gfp_dma.patch b/queue-3.10/mips-dma-default-fix-32-bit-fall-back-to-gfp_dma.patch new file mode 100644 index 00000000000..e9fb463a867 --- /dev/null +++ b/queue-3.10/mips-dma-default-fix-32-bit-fall-back-to-gfp_dma.patch @@ -0,0 +1,41 @@ +From 53960059d56ecef67d4ddd546731623641a3d2d1 Mon Sep 17 00:00:00 2001 +From: James Hogan +Date: Fri, 27 Mar 2015 08:33:43 +0000 +Subject: MIPS: dma-default: Fix 32-bit fall back to GFP_DMA + +From: James Hogan + +commit 53960059d56ecef67d4ddd546731623641a3d2d1 upstream. + +If there is a DMA zone (usually 24bit = 16MB I believe), but no DMA32 +zone, as is the case for some 32-bit kernels, then massage_gfp_flags() +will cause DMA memory allocated for devices with a 32..63-bit +coherent_dma_mask to fall back to using __GFP_DMA, even though there may +only be 32-bits of physical address available anyway. + +Correct that case to compare against a mask the size of phys_addr_t +instead of always using a 64-bit mask. + +Signed-off-by: James Hogan +Fixes: a2e715a86c6d ("MIPS: DMA: Fix computation of DMA flags from device's coherent_dma_mask.") +Cc: Ralf Baechle +Cc: linux-mips@linux-mips.org +Patchwork: https://patchwork.linux-mips.org/patch/9610/ +Signed-off-by: Ralf Baechle +Signed-off-by: Greg Kroah-Hartman + +--- + arch/mips/mm/dma-default.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/mips/mm/dma-default.c ++++ b/arch/mips/mm/dma-default.c +@@ -91,7 +91,7 @@ static gfp_t massage_gfp_flags(const str + else + #endif + #if defined(CONFIG_ZONE_DMA) && !defined(CONFIG_ZONE_DMA32) +- if (dev->coherent_dma_mask < DMA_BIT_MASK(64)) ++ if (dev->coherent_dma_mask < DMA_BIT_MASK(sizeof(phys_addr_t) * 8)) + dma_flag = __GFP_DMA; + else + #endif diff --git a/queue-3.10/series b/queue-3.10/series index 7f4fdf92507..f34efa19d97 100644 --- a/queue-3.10/series +++ b/queue-3.10/series @@ -32,3 +32,8 @@ udf-check-length-of-extended-attributes-and-allocation-descriptors.patch regmap-debugfs-ensure-we-don-t-underflow-when-printing-access-masks.patch regmap-debugfs-don-t-bother-actually-printing-when-calculating-max-length.patch security-fix-typo-in-security_task_prctl.patch +usb-use-the-usb_ss_mult-macro-to-get-the-burst-multiplier.patch +usb-add-device-quirk-for-logitech-ptz-cameras.patch +usb-add-reset-resume-quirk-for-two-plantronics-usb-headphones.patch +mips-dma-default-fix-32-bit-fall-back-to-gfp_dma.patch +md-flush-event_work-before-stopping-array.patch diff --git a/queue-3.10/usb-add-device-quirk-for-logitech-ptz-cameras.patch b/queue-3.10/usb-add-device-quirk-for-logitech-ptz-cameras.patch new file mode 100644 index 00000000000..af24b1dc51d --- /dev/null +++ b/queue-3.10/usb-add-device-quirk-for-logitech-ptz-cameras.patch @@ -0,0 +1,45 @@ +From 72194739f54607bbf8cfded159627a2015381557 Mon Sep 17 00:00:00 2001 +From: Vincent Palatin +Date: Thu, 1 Oct 2015 14:10:22 -0700 +Subject: usb: Add device quirk for Logitech PTZ cameras + +From: Vincent Palatin + +commit 72194739f54607bbf8cfded159627a2015381557 upstream. + +Add a device quirk for the Logitech PTZ Pro Camera and its sibling the +ConferenceCam CC3000e Camera. +This fixes the failed camera enumeration on some boot, particularly on +machines with fast CPU. + +Tested by connecting a Logitech PTZ Pro Camera to a machine with a +Haswell Core i7-4600U CPU @ 2.10GHz, and doing thousands of reboot cycles +while recording the kernel logs and taking camera picture after each boot. +Before the patch, more than 7% of the boots show some enumeration transfer +failures and in a few of them, the kernel is giving up before actually +enumerating the webcam. After the patch, the enumeration has been correct +on every reboot. + +Signed-off-by: Vincent Palatin +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/core/quirks.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +--- a/drivers/usb/core/quirks.c ++++ b/drivers/usb/core/quirks.c +@@ -53,6 +53,13 @@ static const struct usb_device_id usb_qu + { USB_DEVICE(0x046d, 0x082d), .driver_info = USB_QUIRK_DELAY_INIT }, + { USB_DEVICE(0x046d, 0x0843), .driver_info = USB_QUIRK_DELAY_INIT }, + ++ /* Logitech ConferenceCam CC3000e */ ++ { USB_DEVICE(0x046d, 0x0847), .driver_info = USB_QUIRK_DELAY_INIT }, ++ { USB_DEVICE(0x046d, 0x0848), .driver_info = USB_QUIRK_DELAY_INIT }, ++ ++ /* Logitech PTZ Pro Camera */ ++ { USB_DEVICE(0x046d, 0x0853), .driver_info = USB_QUIRK_DELAY_INIT }, ++ + /* Logitech Quickcam Fusion */ + { USB_DEVICE(0x046d, 0x08c1), .driver_info = USB_QUIRK_RESET_RESUME }, + diff --git a/queue-3.10/usb-add-reset-resume-quirk-for-two-plantronics-usb-headphones.patch b/queue-3.10/usb-add-reset-resume-quirk-for-two-plantronics-usb-headphones.patch new file mode 100644 index 00000000000..89ba4d6c6f2 --- /dev/null +++ b/queue-3.10/usb-add-reset-resume-quirk-for-two-plantronics-usb-headphones.patch @@ -0,0 +1,34 @@ +From 8484bf2981b3d006426ac052a3642c9ce1d8d980 Mon Sep 17 00:00:00 2001 +From: Yao-Wen Mao +Date: Mon, 31 Aug 2015 14:24:09 +0800 +Subject: USB: Add reset-resume quirk for two Plantronics usb headphones. + +From: Yao-Wen Mao + +commit 8484bf2981b3d006426ac052a3642c9ce1d8d980 upstream. + +These two headphones need a reset-resume quirk to properly resume to +original volume level. + +Signed-off-by: Yao-Wen Mao +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/core/quirks.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +--- a/drivers/usb/core/quirks.c ++++ b/drivers/usb/core/quirks.c +@@ -84,6 +84,12 @@ static const struct usb_device_id usb_qu + /* Philips PSC805 audio device */ + { USB_DEVICE(0x0471, 0x0155), .driver_info = USB_QUIRK_RESET_RESUME }, + ++ /* Plantronic Audio 655 DSP */ ++ { USB_DEVICE(0x047f, 0xc008), .driver_info = USB_QUIRK_RESET_RESUME }, ++ ++ /* Plantronic Audio 648 USB */ ++ { USB_DEVICE(0x047f, 0xc013), .driver_info = USB_QUIRK_RESET_RESUME }, ++ + /* Artisman Watchdog Dongle */ + { USB_DEVICE(0x04b4, 0x0526), .driver_info = + USB_QUIRK_CONFIG_INTF_STRINGS }, diff --git a/queue-3.10/usb-use-the-usb_ss_mult-macro-to-get-the-burst-multiplier.patch b/queue-3.10/usb-use-the-usb_ss_mult-macro-to-get-the-burst-multiplier.patch new file mode 100644 index 00000000000..cb0fbe259df --- /dev/null +++ b/queue-3.10/usb-use-the-usb_ss_mult-macro-to-get-the-burst-multiplier.patch @@ -0,0 +1,47 @@ +From ff30cbc8da425754e8ab96904db1d295bd034f27 Mon Sep 17 00:00:00 2001 +From: Mathias Nyman +Date: Mon, 21 Sep 2015 17:46:09 +0300 +Subject: usb: Use the USB_SS_MULT() macro to get the burst multiplier. + +From: Mathias Nyman + +commit ff30cbc8da425754e8ab96904db1d295bd034f27 upstream. + +Bits 1:0 of the bmAttributes are used for the burst multiplier. +The rest of the bits used to be reserved (zero), but USB3.1 takes bit 7 +into use. + +Use the existing USB_SS_MULT() macro instead to make sure the mult value +and hence max packet calculations are correct for USB3.1 devices. + +Note that burst multiplier in bmAttributes is zero based and that +the USB_SS_MULT() macro adds one. + +Signed-off-by: Mathias Nyman +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/core/config.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +--- a/drivers/usb/core/config.c ++++ b/drivers/usb/core/config.c +@@ -114,7 +114,7 @@ static void usb_parse_ss_endpoint_compan + cfgno, inum, asnum, ep->desc.bEndpointAddress); + ep->ss_ep_comp.bmAttributes = 16; + } else if (usb_endpoint_xfer_isoc(&ep->desc) && +- desc->bmAttributes > 2) { ++ USB_SS_MULT(desc->bmAttributes) > 3) { + dev_warn(ddev, "Isoc endpoint has Mult of %d in " + "config %d interface %d altsetting %d ep %d: " + "setting to 3\n", desc->bmAttributes + 1, +@@ -123,7 +123,8 @@ static void usb_parse_ss_endpoint_compan + } + + if (usb_endpoint_xfer_isoc(&ep->desc)) +- max_tx = (desc->bMaxBurst + 1) * (desc->bmAttributes + 1) * ++ max_tx = (desc->bMaxBurst + 1) * ++ (USB_SS_MULT(desc->bmAttributes)) * + usb_endpoint_maxp(&ep->desc); + else if (usb_endpoint_xfer_int(&ep->desc)) + max_tx = usb_endpoint_maxp(&ep->desc) * -- 2.47.2