]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 9 Jan 2017 08:35:57 +0000 (09:35 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 9 Jan 2017 08:35:57 +0000 (09:35 +0100)
added patches:
alsa-hda-apply-asus-mode8-fixup-to-asus-x71sl.patch
alsa-hda-fix-up-gpio-for-asus-rog-ranger.patch
alsa-usb-audio-fix-irq-process-data-synchronization.patch
arm-davinci-da850-don-t-add-emac-clock-to-lookup-table-twice.patch

queue-4.4/alsa-hda-apply-asus-mode8-fixup-to-asus-x71sl.patch [new file with mode: 0644]
queue-4.4/alsa-hda-fix-up-gpio-for-asus-rog-ranger.patch [new file with mode: 0644]
queue-4.4/alsa-usb-audio-fix-irq-process-data-synchronization.patch [new file with mode: 0644]
queue-4.4/arm-davinci-da850-don-t-add-emac-clock-to-lookup-table-twice.patch [new file with mode: 0644]
queue-4.4/series [new file with mode: 0644]
queue-4.9/series [new file with mode: 0644]

diff --git a/queue-4.4/alsa-hda-apply-asus-mode8-fixup-to-asus-x71sl.patch b/queue-4.4/alsa-hda-apply-asus-mode8-fixup-to-asus-x71sl.patch
new file mode 100644 (file)
index 0000000..aaf6eea
--- /dev/null
@@ -0,0 +1,31 @@
+From c7efff9284dfde95a11aaa811c9d8ec8167f0f6e Mon Sep 17 00:00:00 2001
+From: Takashi Iwai <tiwai@suse.de>
+Date: Wed, 4 Jan 2017 21:38:16 +0100
+Subject: ALSA: hda - Apply asus-mode8 fixup to ASUS X71SL
+
+From: Takashi Iwai <tiwai@suse.de>
+
+commit c7efff9284dfde95a11aaa811c9d8ec8167f0f6e upstream.
+
+Although the old quirk table showed ASUS X71SL with ALC663 codec being
+compatible with asus-mode3 fixup, the bugzilla reporter explained that
+asus-model8 fits better for the dual headphone controls.  So be it.
+
+Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=191781
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/pci/hda/patch_realtek.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/sound/pci/hda/patch_realtek.c
++++ b/sound/pci/hda/patch_realtek.c
+@@ -6893,6 +6893,7 @@ static const struct snd_pci_quirk alc662
+       SND_PCI_QUIRK(0x1043, 0x15a7, "ASUS UX51VZH", ALC662_FIXUP_BASS_16),
+       SND_PCI_QUIRK(0x1043, 0x177d, "ASUS N551", ALC668_FIXUP_ASUS_Nx51),
+       SND_PCI_QUIRK(0x1043, 0x17bd, "ASUS N751", ALC668_FIXUP_ASUS_Nx51),
++      SND_PCI_QUIRK(0x1043, 0x1963, "ASUS X71SL", ALC662_FIXUP_ASUS_MODE8),
+       SND_PCI_QUIRK(0x1043, 0x1b73, "ASUS N55SF", ALC662_FIXUP_BASS_16),
+       SND_PCI_QUIRK(0x1043, 0x1bf3, "ASUS N76VZ", ALC662_FIXUP_BASS_MODE4_CHMAP),
+       SND_PCI_QUIRK(0x1043, 0x8469, "ASUS mobo", ALC662_FIXUP_NO_JACK_DETECT),
diff --git a/queue-4.4/alsa-hda-fix-up-gpio-for-asus-rog-ranger.patch b/queue-4.4/alsa-hda-fix-up-gpio-for-asus-rog-ranger.patch
new file mode 100644 (file)
index 0000000..d063d89
--- /dev/null
@@ -0,0 +1,31 @@
+From 85bcf96caba8b4a7c0805555638629ba3c67ea0c Mon Sep 17 00:00:00 2001
+From: Takashi Iwai <tiwai@suse.de>
+Date: Tue, 6 Dec 2016 16:20:36 +0100
+Subject: ALSA: hda - Fix up GPIO for ASUS ROG Ranger
+
+From: Takashi Iwai <tiwai@suse.de>
+
+commit 85bcf96caba8b4a7c0805555638629ba3c67ea0c upstream.
+
+ASUS ROG Ranger VIII with ALC1150 codec requires the extra GPIO pin to
+up for the front panel.  Just use the existing fixup for setting up
+the GPIO pins.
+
+Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=189411
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/pci/hda/patch_realtek.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/sound/pci/hda/patch_realtek.c
++++ b/sound/pci/hda/patch_realtek.c
+@@ -2230,6 +2230,7 @@ static const struct snd_pci_quirk alc882
+       SND_PCI_QUIRK(0x1043, 0x1971, "Asus W2JC", ALC882_FIXUP_ASUS_W2JC),
+       SND_PCI_QUIRK(0x1043, 0x835f, "Asus Eee 1601", ALC888_FIXUP_EEE1601),
+       SND_PCI_QUIRK(0x1043, 0x84bc, "ASUS ET2700", ALC887_FIXUP_ASUS_BASS),
++      SND_PCI_QUIRK(0x1043, 0x8691, "ASUS ROG Ranger VIII", ALC882_FIXUP_GPIO3),
+       SND_PCI_QUIRK(0x104d, 0x9047, "Sony Vaio TT", ALC889_FIXUP_VAIO_TT),
+       SND_PCI_QUIRK(0x104d, 0x905a, "Sony Vaio Z", ALC882_FIXUP_NO_PRIMARY_HP),
+       SND_PCI_QUIRK(0x104d, 0x9043, "Sony Vaio VGC-LN51JGB", ALC882_FIXUP_NO_PRIMARY_HP),
diff --git a/queue-4.4/alsa-usb-audio-fix-irq-process-data-synchronization.patch b/queue-4.4/alsa-usb-audio-fix-irq-process-data-synchronization.patch
new file mode 100644 (file)
index 0000000..d24bdd4
--- /dev/null
@@ -0,0 +1,158 @@
+From 1d0f953086f090a022f2c0e1448300c15372db46 Mon Sep 17 00:00:00 2001
+From: Ioan-Adrian Ratiu <adi@adirat.com>
+Date: Thu, 5 Jan 2017 00:37:46 +0200
+Subject: ALSA: usb-audio: Fix irq/process data synchronization
+
+From: Ioan-Adrian Ratiu <adi@adirat.com>
+
+commit 1d0f953086f090a022f2c0e1448300c15372db46 upstream.
+
+Commit 16200948d83 ("ALSA: usb-audio: Fix race at stopping the stream") was
+incomplete causing another more severe kernel panic, so it got reverted.
+This fixes both the original problem and its fallout kernel race/crash.
+
+The original fix is to move the endpoint member NULL clearing logic inside
+wait_clear_urbs() so the irq triggering the urb completion doesn't call
+retire_capture/playback_urb() after the NULL clearing and generate a panic.
+
+However this creates a new race between snd_usb_endpoint_start()'s call
+to wait_clear_urbs() and the irq urb completion handler which again calls
+retire_capture/playback_urb() leading to a new NULL dereference.
+
+We keep the EP deactivation code in snd_usb_endpoint_start() because
+removing it will break the EP reference counting (see [1] [2] for info),
+however we don't need the "can_sleep" mechanism anymore because a new
+function was introduced (snd_usb_endpoint_sync_pending_stop()) which
+synchronizes pending stops and gets called inside the pcm prepare callback.
+
+It also makes sense to remove can_sleep because it was also removed from
+deactivate_urbs() signature in [3] so we benefit from more simplification.
+
+[1] commit 015618b90 ("ALSA: snd-usb: Fix URB cancellation at stream start")
+[2] commit e9ba389c5 ("ALSA: usb-audio: Fix scheduling-while-atomic bug in PCM capture stream")
+[3] commit ccc1696d5 ("ALSA: usb-audio: simplify endpoint deactivation code")
+
+Fixes: f8114f8583bb ("Revert "ALSA: usb-audio: Fix race at stopping the stream"")
+
+Signed-off-by: Ioan-Adrian Ratiu <adi@adirat.com>
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/usb/endpoint.c |   17 +++++++----------
+ sound/usb/endpoint.h |    2 +-
+ sound/usb/pcm.c      |   10 +++++-----
+ 3 files changed, 13 insertions(+), 16 deletions(-)
+
+--- a/sound/usb/endpoint.c
++++ b/sound/usb/endpoint.c
+@@ -538,6 +538,11 @@ static int wait_clear_urbs(struct snd_us
+                       alive, ep->ep_num);
+       clear_bit(EP_FLAG_STOPPING, &ep->flags);
++      ep->data_subs = NULL;
++      ep->sync_slave = NULL;
++      ep->retire_data_urb = NULL;
++      ep->prepare_data_urb = NULL;
++
+       return 0;
+ }
+@@ -902,9 +907,7 @@ int snd_usb_endpoint_set_params(struct s
+ /**
+  * snd_usb_endpoint_start: start an snd_usb_endpoint
+  *
+- * @ep:               the endpoint to start
+- * @can_sleep:        flag indicating whether the operation is executed in
+- *            non-atomic context
++ * @ep: the endpoint to start
+  *
+  * A call to this function will increment the use count of the endpoint.
+  * In case it is not already running, the URBs for this endpoint will be
+@@ -914,7 +917,7 @@ int snd_usb_endpoint_set_params(struct s
+  *
+  * Returns an error if the URB submission failed, 0 in all other cases.
+  */
+-int snd_usb_endpoint_start(struct snd_usb_endpoint *ep, bool can_sleep)
++int snd_usb_endpoint_start(struct snd_usb_endpoint *ep)
+ {
+       int err;
+       unsigned int i;
+@@ -928,8 +931,6 @@ int snd_usb_endpoint_start(struct snd_us
+       /* just to be sure */
+       deactivate_urbs(ep, false);
+-      if (can_sleep)
+-              wait_clear_urbs(ep);
+       ep->active_mask = 0;
+       ep->unlink_mask = 0;
+@@ -1010,10 +1011,6 @@ void snd_usb_endpoint_stop(struct snd_us
+       if (--ep->use_count == 0) {
+               deactivate_urbs(ep, false);
+-              ep->data_subs = NULL;
+-              ep->sync_slave = NULL;
+-              ep->retire_data_urb = NULL;
+-              ep->prepare_data_urb = NULL;
+               set_bit(EP_FLAG_STOPPING, &ep->flags);
+       }
+ }
+--- a/sound/usb/endpoint.h
++++ b/sound/usb/endpoint.h
+@@ -18,7 +18,7 @@ int snd_usb_endpoint_set_params(struct s
+                               struct audioformat *fmt,
+                               struct snd_usb_endpoint *sync_ep);
+-int  snd_usb_endpoint_start(struct snd_usb_endpoint *ep, bool can_sleep);
++int  snd_usb_endpoint_start(struct snd_usb_endpoint *ep);
+ void snd_usb_endpoint_stop(struct snd_usb_endpoint *ep);
+ void snd_usb_endpoint_sync_pending_stop(struct snd_usb_endpoint *ep);
+ int  snd_usb_endpoint_activate(struct snd_usb_endpoint *ep);
+--- a/sound/usb/pcm.c
++++ b/sound/usb/pcm.c
+@@ -218,7 +218,7 @@ int snd_usb_init_pitch(struct snd_usb_au
+       }
+ }
+-static int start_endpoints(struct snd_usb_substream *subs, bool can_sleep)
++static int start_endpoints(struct snd_usb_substream *subs)
+ {
+       int err;
+@@ -231,7 +231,7 @@ static int start_endpoints(struct snd_us
+               dev_dbg(&subs->dev->dev, "Starting data EP @%p\n", ep);
+               ep->data_subs = subs;
+-              err = snd_usb_endpoint_start(ep, can_sleep);
++              err = snd_usb_endpoint_start(ep);
+               if (err < 0) {
+                       clear_bit(SUBSTREAM_FLAG_DATA_EP_STARTED, &subs->flags);
+                       return err;
+@@ -260,7 +260,7 @@ static int start_endpoints(struct snd_us
+               dev_dbg(&subs->dev->dev, "Starting sync EP @%p\n", ep);
+               ep->sync_slave = subs->data_endpoint;
+-              err = snd_usb_endpoint_start(ep, can_sleep);
++              err = snd_usb_endpoint_start(ep);
+               if (err < 0) {
+                       clear_bit(SUBSTREAM_FLAG_SYNC_EP_STARTED, &subs->flags);
+                       return err;
+@@ -839,7 +839,7 @@ static int snd_usb_pcm_prepare(struct sn
+       /* for playback, submit the URBs now; otherwise, the first hwptr_done
+        * updates for all URBs would happen at the same time when starting */
+       if (subs->direction == SNDRV_PCM_STREAM_PLAYBACK)
+-              ret = start_endpoints(subs, true);
++              ret = start_endpoints(subs);
+  unlock:
+       snd_usb_unlock_shutdown(subs->stream->chip);
+@@ -1655,7 +1655,7 @@ static int snd_usb_substream_capture_tri
+       switch (cmd) {
+       case SNDRV_PCM_TRIGGER_START:
+-              err = start_endpoints(subs, false);
++              err = start_endpoints(subs);
+               if (err < 0)
+                       return err;
diff --git a/queue-4.4/arm-davinci-da850-don-t-add-emac-clock-to-lookup-table-twice.patch b/queue-4.4/arm-davinci-da850-don-t-add-emac-clock-to-lookup-table-twice.patch
new file mode 100644 (file)
index 0000000..6d01e90
--- /dev/null
@@ -0,0 +1,51 @@
+From ef37427ac5677331145ab27a17e6f5f1b43f0c11 Mon Sep 17 00:00:00 2001
+From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
+Date: Wed, 7 Dec 2016 16:22:16 +0100
+Subject: ARM: davinci: da850: don't add emac clock to lookup table twice
+
+From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
+
+commit ef37427ac5677331145ab27a17e6f5f1b43f0c11 upstream.
+
+Similarly to the aemif clock - this screws up the linked list of clock
+children. Create a separate clock for mdio inheriting the rate from
+emac_clk.
+
+Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
+[nsekhar@ti.com: add a comment over mdio_clk to explaing its existence +
+                commit headline updates]
+Signed-off-by: Sekhar Nori <nsekhar@ti.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/arm/mach-davinci/da850.c |   12 +++++++++++-
+ 1 file changed, 11 insertions(+), 1 deletion(-)
+
+--- a/arch/arm/mach-davinci/da850.c
++++ b/arch/arm/mach-davinci/da850.c
+@@ -298,6 +298,16 @@ static struct clk emac_clk = {
+       .gpsc           = 1,
+ };
++/*
++ * In order to avoid adding the emac_clk to the clock lookup table twice (and
++ * screwing up the linked list in the process) create a separate clock for
++ * mdio inheriting the rate from emac_clk.
++ */
++static struct clk mdio_clk = {
++      .name           = "mdio",
++      .parent         = &emac_clk,
++};
++
+ static struct clk mcasp_clk = {
+       .name           = "mcasp",
+       .parent         = &pll0_sysclk2,
+@@ -462,7 +472,7 @@ static struct clk_lookup da850_clks[] =
+       CLK(NULL,               "arm",          &arm_clk),
+       CLK(NULL,               "rmii",         &rmii_clk),
+       CLK("davinci_emac.1",   NULL,           &emac_clk),
+-      CLK("davinci_mdio.0",   "fck",          &emac_clk),
++      CLK("davinci_mdio.0",   "fck",          &mdio_clk),
+       CLK("davinci-mcasp.0",  NULL,           &mcasp_clk),
+       CLK("da8xx_lcdc.0",     "fck",          &lcdc_clk),
+       CLK("da830-mmc.0",      NULL,           &mmcsd0_clk),
diff --git a/queue-4.4/series b/queue-4.4/series
new file mode 100644 (file)
index 0000000..88a7a45
--- /dev/null
@@ -0,0 +1,4 @@
+alsa-hda-fix-up-gpio-for-asus-rog-ranger.patch
+alsa-hda-apply-asus-mode8-fixup-to-asus-x71sl.patch
+alsa-usb-audio-fix-irq-process-data-synchronization.patch
+arm-davinci-da850-don-t-add-emac-clock-to-lookup-table-twice.patch
diff --git a/queue-4.9/series b/queue-4.9/series
new file mode 100644 (file)
index 0000000..43d73b9
--- /dev/null
@@ -0,0 +1,12 @@
+iio-common-st_sensors-fix-channel-data-parsing.patch
+iio-max44000-correct-value-in-illuminance_integration_time_available.patch
+iio-bmi160-fix-time-needed-to-sleep-after-command-execution.patch
+staging-octeon-call-set_netdev_dev.patch
+alsa-hda-fix-up-gpio-for-asus-rog-ranger.patch
+alsa-hda-apply-asus-mode8-fixup-to-asus-x71sl.patch
+alsa-usb-audio-fix-irq-process-data-synchronization.patch
+fscrypt-fix-renaming-and-linking-special-files.patch
+parisc-add-line-break-when-printing-segfault-info.patch
+parisc-mark-cr16-clocksource-unstable-on-smp-systems.patch
+hid-sensor-hub-move-the-memset-to-sensor_hub_get_feature.patch
+arm-davinci-da850-don-t-add-emac-clock-to-lookup-table-twice.patch