From 9f671e0490d6e21217c8ef1e46f5267d211006a2 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 13 Jan 2017 11:56:56 +0100 Subject: [PATCH] 4.4-stable patches added patches: alsa-usb-audio-add-a-quirk-for-plantronics-bt600.patch mm-init-fix-zone-boundary-creation.patch --- ...io-add-a-quirk-for-plantronics-bt600.patch | 32 +++++++ .../mm-init-fix-zone-boundary-creation.patch | 85 +++++++++++++++++++ queue-4.4/series | 2 + 3 files changed, 119 insertions(+) create mode 100644 queue-4.4/alsa-usb-audio-add-a-quirk-for-plantronics-bt600.patch create mode 100644 queue-4.4/mm-init-fix-zone-boundary-creation.patch diff --git a/queue-4.4/alsa-usb-audio-add-a-quirk-for-plantronics-bt600.patch b/queue-4.4/alsa-usb-audio-add-a-quirk-for-plantronics-bt600.patch new file mode 100644 index 00000000000..43fe57dd592 --- /dev/null +++ b/queue-4.4/alsa-usb-audio-add-a-quirk-for-plantronics-bt600.patch @@ -0,0 +1,32 @@ +From 2e40795c3bf344cfb5220d94566205796e3ef19a Mon Sep 17 00:00:00 2001 +From: Dennis Kadioglu +Date: Mon, 9 Jan 2017 17:10:46 +0100 +Subject: ALSA: usb-audio: Add a quirk for Plantronics BT600 + +From: Dennis Kadioglu + +commit 2e40795c3bf344cfb5220d94566205796e3ef19a upstream. + +Plantronics BT600 does not support reading the sample rate which leads +to many lines of "cannot get freq at ep 0x1" and "cannot get freq at +ep 0x82". This patch adds the USB ID of the BT600 to quirks.c and +avoids those error messages. + +Signed-off-by: Dennis Kadioglu +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/usb/quirks.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/sound/usb/quirks.c ++++ b/sound/usb/quirks.c +@@ -1136,6 +1136,7 @@ bool snd_usb_get_sample_rate_quirk(struc + case USB_ID(0x045E, 0x076F): /* MS Lifecam HD-6000 */ + case USB_ID(0x045E, 0x0772): /* MS Lifecam Studio */ + case USB_ID(0x045E, 0x0779): /* MS Lifecam HD-3000 */ ++ case USB_ID(0x047F, 0x02F7): /* Plantronics BT-600 */ + case USB_ID(0x047F, 0x0415): /* Plantronics BT-300 */ + case USB_ID(0x047F, 0xAA05): /* Plantronics DA45 */ + case USB_ID(0x04D8, 0xFEEA): /* Benchmark DAC1 Pre */ diff --git a/queue-4.4/mm-init-fix-zone-boundary-creation.patch b/queue-4.4/mm-init-fix-zone-boundary-creation.patch new file mode 100644 index 00000000000..26414e68985 --- /dev/null +++ b/queue-4.4/mm-init-fix-zone-boundary-creation.patch @@ -0,0 +1,85 @@ +From 90cae1fe1c3540f791d5b8e025985fa5e699b2bb Mon Sep 17 00:00:00 2001 +From: Oliver O'Halloran +Date: Tue, 26 Jul 2016 15:22:17 -0700 +Subject: mm/init: fix zone boundary creation + +From: Oliver O'Halloran + +commit 90cae1fe1c3540f791d5b8e025985fa5e699b2bb upstream. + +As a part of memory initialisation the architecture passes an array to +free_area_init_nodes() which specifies the max PFN of each memory zone. +This array is not necessarily monotonic (due to unused zones) so this +array is parsed to build monotonic lists of the min and max PFN for each +zone. ZONE_MOVABLE is special cased here as its limits are managed by +the mm subsystem rather than the architecture. Unfortunately, this +special casing is broken when ZONE_MOVABLE is the not the last zone in +the zone list. The core of the issue is: + + if (i == ZONE_MOVABLE) + continue; + arch_zone_lowest_possible_pfn[i] = + arch_zone_highest_possible_pfn[i-1]; + +As ZONE_MOVABLE is skipped the lowest_possible_pfn of the next zone will +be set to zero. This patch fixes this bug by adding explicitly tracking +where the next zone should start rather than relying on the contents +arch_zone_highest_possible_pfn[]. + +Thie is low priority. To get bitten by this you need to enable a zone +that appears after ZONE_MOVABLE in the zone_type enum. As far as I can +tell this means running a kernel with ZONE_DEVICE or ZONE_CMA enabled, +so I can't see this affecting too many people. + +I only noticed this because I've been fiddling with ZONE_DEVICE on +powerpc and 4.6 broke my test kernel. This bug, in conjunction with the +changes in Taku Izumi's kernelcore=mirror patch (d91749c1dda71) and +powerpc being the odd architecture which initialises max_zone_pfn[] to +~0ul instead of 0 caused all of system memory to be placed into +ZONE_DEVICE at boot, followed a panic since device memory cannot be used +for kernel allocations. I've already submitted a patch to fix the +powerpc specific bits, but I figured this should be fixed too. + +Link: http://lkml.kernel.org/r/1462435033-15601-1-git-send-email-oohall@gmail.com +Signed-off-by: Oliver O'Halloran +Cc: Anton Blanchard +Cc: Benjamin Herrenschmidt +Cc: Paul Mackerras +Cc: Mel Gorman +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Cc: Arnd Bergmann +Signed-off-by: Greg Kroah-Hartman + +--- + mm/page_alloc.c | 17 ++++++++++------- + 1 file changed, 10 insertions(+), 7 deletions(-) + +--- a/mm/page_alloc.c ++++ b/mm/page_alloc.c +@@ -5696,15 +5696,18 @@ void __init free_area_init_nodes(unsigne + sizeof(arch_zone_lowest_possible_pfn)); + memset(arch_zone_highest_possible_pfn, 0, + sizeof(arch_zone_highest_possible_pfn)); +- arch_zone_lowest_possible_pfn[0] = find_min_pfn_with_active_regions(); +- arch_zone_highest_possible_pfn[0] = max_zone_pfn[0]; +- for (i = 1; i < MAX_NR_ZONES; i++) { ++ ++ start_pfn = find_min_pfn_with_active_regions(); ++ ++ for (i = 0; i < MAX_NR_ZONES; i++) { + if (i == ZONE_MOVABLE) + continue; +- arch_zone_lowest_possible_pfn[i] = +- arch_zone_highest_possible_pfn[i-1]; +- arch_zone_highest_possible_pfn[i] = +- max(max_zone_pfn[i], arch_zone_lowest_possible_pfn[i]); ++ ++ end_pfn = max(max_zone_pfn[i], start_pfn); ++ arch_zone_lowest_possible_pfn[i] = start_pfn; ++ arch_zone_highest_possible_pfn[i] = end_pfn; ++ ++ start_pfn = end_pfn; + } + arch_zone_lowest_possible_pfn[ZONE_MOVABLE] = 0; + arch_zone_highest_possible_pfn[ZONE_MOVABLE] = 0; diff --git a/queue-4.4/series b/queue-4.4/series index 2813fdf7785..ab7ffde87f4 100644 --- a/queue-4.4/series +++ b/queue-4.4/series @@ -23,3 +23,5 @@ powerpc-fix-build-warning-on-32-bit-ppc.patch arm-zynq-reserve-correct-amount-of-non-dma-ram.patch arm-omap4-fix-bad-fallthrough-for-cpuidle.patch spi-mvebu-fix-baudrate-calculation-for-armada-variant.patch +alsa-usb-audio-add-a-quirk-for-plantronics-bt600.patch +mm-init-fix-zone-boundary-creation.patch -- 2.47.3