]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 4 Feb 2014 01:34:21 +0000 (02:34 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 4 Feb 2014 01:34:21 +0000 (02:34 +0100)
added patches:
alsa-enable-config_zone_dma-for-smaller-pci-dma-masks.patch
alsa-rme9652-fix-a-missing-comma-in-channel_map_9636_ds.patch
asoc-adau1701-fix-adau1701_seroctl_word_len_16-constant.patch
ata-sata_mv-fix-disk-hotplug-for-armada-370-xp-socs.patch
hp_accel-add-a-new-pnp-id-hpq6007-for-new-hp-laptops.patch
parport-parport_pc-remove-double-pci-id-for-netmos.patch
rtc-cmos-add-an-alarm-disable-quirk.patch

queue-3.4/alsa-enable-config_zone_dma-for-smaller-pci-dma-masks.patch [new file with mode: 0644]
queue-3.4/alsa-rme9652-fix-a-missing-comma-in-channel_map_9636_ds.patch [new file with mode: 0644]
queue-3.4/asoc-adau1701-fix-adau1701_seroctl_word_len_16-constant.patch [new file with mode: 0644]
queue-3.4/ata-sata_mv-fix-disk-hotplug-for-armada-370-xp-socs.patch [new file with mode: 0644]
queue-3.4/hp_accel-add-a-new-pnp-id-hpq6007-for-new-hp-laptops.patch [new file with mode: 0644]
queue-3.4/parport-parport_pc-remove-double-pci-id-for-netmos.patch [new file with mode: 0644]
queue-3.4/rtc-cmos-add-an-alarm-disable-quirk.patch [new file with mode: 0644]
queue-3.4/series

diff --git a/queue-3.4/alsa-enable-config_zone_dma-for-smaller-pci-dma-masks.patch b/queue-3.4/alsa-enable-config_zone_dma-for-smaller-pci-dma-masks.patch
new file mode 100644 (file)
index 0000000..47b701f
--- /dev/null
@@ -0,0 +1,122 @@
+From 80ab8eae70e51d578ebbeb228e0f7a562471b8b7 Mon Sep 17 00:00:00 2001
+From: Takashi Iwai <tiwai@suse.de>
+Date: Fri, 10 Jan 2014 14:20:42 +0100
+Subject: ALSA: Enable CONFIG_ZONE_DMA for smaller PCI DMA masks
+
+From: Takashi Iwai <tiwai@suse.de>
+
+commit 80ab8eae70e51d578ebbeb228e0f7a562471b8b7 upstream.
+
+The PCI devices with DMA masks smaller than 32bit should enable
+CONFIG_ZONE_DMA.  Since the recent change of page allocator, page
+allocations via dma_alloc_coherent() with the limited DMA mask bits
+may fail more frequently, ended up with no available buffers, when
+CONFIG_ZONE_DMA isn't enabled.  With CONFIG_ZONE_DMA, the system has
+much more chance to obtain such pages.
+
+Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=68221
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/pci/Kconfig |   12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+
+--- a/sound/pci/Kconfig
++++ b/sound/pci/Kconfig
+@@ -30,6 +30,7 @@ config SND_ALS300
+       select SND_PCM
+       select SND_AC97_CODEC
+       select SND_OPL3_LIB
++      select ZONE_DMA
+       help
+         Say 'Y' or 'M' to include support for Avance Logic ALS300/ALS300+
+@@ -54,6 +55,7 @@ config SND_ALI5451
+       tristate "ALi M5451 PCI Audio Controller"
+       select SND_MPU401_UART
+       select SND_AC97_CODEC
++      select ZONE_DMA
+       help
+         Say Y here to include support for the integrated AC97 sound
+         device on motherboards using the ALi M5451 Audio Controller
+@@ -158,6 +160,7 @@ config SND_AZT3328
+       select SND_PCM
+       select SND_RAWMIDI
+       select SND_AC97_CODEC
++      select ZONE_DMA
+       help
+         Say Y here to include support for Aztech AZF3328 (PCI168)
+         soundcards.
+@@ -463,6 +466,7 @@ config SND_EMU10K1
+       select SND_HWDEP
+       select SND_RAWMIDI
+       select SND_AC97_CODEC
++      select ZONE_DMA
+       help
+         Say Y to include support for Sound Blaster PCI 512, Live!,
+         Audigy and E-mu APS (partially supported) soundcards.
+@@ -478,6 +482,7 @@ config SND_EMU10K1X
+       tristate "Emu10k1X (Dell OEM Version)"
+       select SND_AC97_CODEC
+       select SND_RAWMIDI
++      select ZONE_DMA
+       help
+         Say Y here to include support for the Dell OEM version of the
+         Sound Blaster Live!.
+@@ -511,6 +516,7 @@ config SND_ES1938
+       select SND_OPL3_LIB
+       select SND_MPU401_UART
+       select SND_AC97_CODEC
++      select ZONE_DMA
+       help
+         Say Y here to include support for soundcards based on ESS Solo-1
+         (ES1938, ES1946, ES1969) chips.
+@@ -522,6 +528,7 @@ config SND_ES1968
+       tristate "ESS ES1968/1978 (Maestro-1/2/2E)"
+       select SND_MPU401_UART
+       select SND_AC97_CODEC
++      select ZONE_DMA
+       help
+         Say Y here to include support for soundcards based on ESS Maestro
+         1/2/2E chips.
+@@ -602,6 +609,7 @@ config SND_ICE1712
+       select SND_MPU401_UART
+       select SND_AC97_CODEC
+       select BITREVERSE
++      select ZONE_DMA
+       help
+         Say Y here to include support for soundcards based on the
+         ICE1712 (Envy24) chip.
+@@ -688,6 +696,7 @@ config SND_LX6464ES
+ config SND_MAESTRO3
+       tristate "ESS Allegro/Maestro3"
+       select SND_AC97_CODEC
++      select ZONE_DMA
+       help
+         Say Y here to include support for soundcards based on ESS Maestro 3
+         (Allegro) chips.
+@@ -782,6 +791,7 @@ config SND_SIS7019
+       tristate "SiS 7019 Audio Accelerator"
+       depends on X86 && !X86_64
+       select SND_AC97_CODEC
++      select ZONE_DMA
+       help
+         Say Y here to include support for the SiS 7019 Audio Accelerator.
+@@ -793,6 +803,7 @@ config SND_SONICVIBES
+       select SND_OPL3_LIB
+       select SND_MPU401_UART
+       select SND_AC97_CODEC
++      select ZONE_DMA
+       help
+         Say Y here to include support for soundcards based on the S3
+         SonicVibes chip.
+@@ -804,6 +815,7 @@ config SND_TRIDENT
+       tristate "Trident 4D-Wave DX/NX; SiS 7018"
+       select SND_MPU401_UART
+       select SND_AC97_CODEC
++      select ZONE_DMA
+       help
+         Say Y here to include support for soundcards based on Trident
+         4D-Wave DX/NX or SiS 7018 chips.
diff --git a/queue-3.4/alsa-rme9652-fix-a-missing-comma-in-channel_map_9636_ds.patch b/queue-3.4/alsa-rme9652-fix-a-missing-comma-in-channel_map_9636_ds.patch
new file mode 100644 (file)
index 0000000..56583cb
--- /dev/null
@@ -0,0 +1,32 @@
+From 770bd4bf2e664939a9dacd3d26ec9ff7a3933210 Mon Sep 17 00:00:00 2001
+From: Takashi Iwai <tiwai@suse.de>
+Date: Fri, 27 Dec 2013 00:13:08 +0200
+Subject: ALSA: rme9652: fix a missing comma in channel_map_9636_ds[]
+
+From: Takashi Iwai <tiwai@suse.de>
+
+commit 770bd4bf2e664939a9dacd3d26ec9ff7a3933210 upstream.
+
+The lack of comma leads to the wrong channel for an SPDIF channel.
+Unfortunately this wasn't caught by compiler because it's still a
+valid expression.
+
+Reported-by: Alexander Aristov <aristov.alexander@gmail.com>
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/pci/rme9652/rme9652.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/sound/pci/rme9652/rme9652.c
++++ b/sound/pci/rme9652/rme9652.c
+@@ -285,7 +285,7 @@ static char channel_map_9636_ds[26] = {
+       /* ADAT channels are remapped */
+       1, 3, 5, 7, 9, 11, 13, 15,
+       /* channels 8 and 9 are S/PDIF */
+-      24, 25
++      24, 25,
+       /* others don't exist */
+       -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1
+ };
diff --git a/queue-3.4/asoc-adau1701-fix-adau1701_seroctl_word_len_16-constant.patch b/queue-3.4/asoc-adau1701-fix-adau1701_seroctl_word_len_16-constant.patch
new file mode 100644 (file)
index 0000000..cb5d925
--- /dev/null
@@ -0,0 +1,32 @@
+From e20970ada3f699c113fe64b04492af083d11a7d8 Mon Sep 17 00:00:00 2001
+From: Lars-Peter Clausen <lars@metafoo.de>
+Date: Wed, 8 Jan 2014 11:22:25 +0100
+Subject: ASoC: adau1701: Fix ADAU1701_SEROCTL_WORD_LEN_16 constant
+
+From: Lars-Peter Clausen <lars@metafoo.de>
+
+commit e20970ada3f699c113fe64b04492af083d11a7d8 upstream.
+
+The driver defines ADAU1701_SEROCTL_WORD_LEN_16 as 0x10 while it should be b10,
+so 0x2. This patch fixes it.
+
+Reported-by: Magnus Reftel <magnus.reftel@lockless.no>
+Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
+Signed-off-by: Mark Brown <broonie@linaro.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/soc/codecs/adau1701.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/sound/soc/codecs/adau1701.c
++++ b/sound/soc/codecs/adau1701.c
+@@ -64,7 +64,7 @@
+ #define ADAU1701_SEROCTL_WORD_LEN_24  0x0000
+ #define ADAU1701_SEROCTL_WORD_LEN_20  0x0001
+-#define ADAU1701_SEROCTL_WORD_LEN_16  0x0010
++#define ADAU1701_SEROCTL_WORD_LEN_16  0x0002
+ #define ADAU1701_SEROCTL_WORD_LEN_MASK        0x0003
+ #define ADAU1701_AUXNPOW_VBPD         0x40
diff --git a/queue-3.4/ata-sata_mv-fix-disk-hotplug-for-armada-370-xp-socs.patch b/queue-3.4/ata-sata_mv-fix-disk-hotplug-for-armada-370-xp-socs.patch
new file mode 100644 (file)
index 0000000..7dbc81f
--- /dev/null
@@ -0,0 +1,95 @@
+From 9013d64e661fc2a37a1742670202171c27fef4b5 Mon Sep 17 00:00:00 2001
+From: Lior Amsalem <alior@marvell.com>
+Date: Tue, 14 Jan 2014 20:09:57 +0100
+Subject: ata: sata_mv: fix disk hotplug for Armada 370/XP SoCs
+
+From: Lior Amsalem <alior@marvell.com>
+
+commit 9013d64e661fc2a37a1742670202171c27fef4b5 upstream.
+
+On Armada 370/XP SoCs, once a disk is removed from a SATA port, then the
+re-plug events are not detected by the sata_mv driver. This patch fixes
+the issue by updating the PHY speed in the LP_PHY_CTL register (0x58)
+according to the SControl speed.
+
+Note that this fix is only applied if the compatible string
+"marvell,armada-370-sata" is found in the SATA DT node.
+
+Fixes: 9ae6f740b49f ("arm: mach-mvebu: add support for Armada 370 and Armada XP with DT")
+Signed-off-by: Lior Amsalem <alior@marvell.com>
+Signed-off-by: Nadav Haklai <nadavh@marvell.com>
+Signed-off-by: Simon Guinot <simon.guinot@sequanux.org>
+Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+Cc: Jason Cooper <jason@lakedaemon.net>
+Cc: Andrew Lunn <andrew@lunn.ch>
+Cc: Gregory Clement <gregory.clement@free-electrons.com>
+Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
+Acked-by: Jason Cooper <jason@lakedaemon.net>
+Signed-off-by: Tejun Heo <tj@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/ata/sata_mv.c |   24 ++++++++++++++++++++++++
+ 1 file changed, 24 insertions(+)
+
+--- a/drivers/ata/sata_mv.c
++++ b/drivers/ata/sata_mv.c
+@@ -302,6 +302,7 @@ enum {
+       MV5_LTMODE              = 0x30,
+       MV5_PHY_CTL             = 0x0C,
+       SATA_IFCFG              = 0x050,
++      LP_PHY_CTL              = 0x058,
+       MV_M2_PREAMP_MASK       = 0x7e0,
+@@ -429,6 +430,7 @@ enum {
+       MV_HP_CUT_THROUGH       = (1 << 10),    /* can use EDMA cut-through */
+       MV_HP_FLAG_SOC          = (1 << 11),    /* SystemOnChip, no PCI */
+       MV_HP_QUIRK_LED_BLINK_EN = (1 << 12),   /* is led blinking enabled? */
++      MV_HP_FIX_LP_PHY_CTL    = (1 << 13),    /* fix speed in LP_PHY_CTL ? */
+       /* Port private flags (pp_flags) */
+       MV_PP_FLAG_EDMA_EN      = (1 << 0),     /* is EDMA engine enabled? */
+@@ -1348,6 +1350,7 @@ static int mv_scr_write(struct ata_link
+       if (ofs != 0xffffffffU) {
+               void __iomem *addr = mv_ap_base(link->ap) + ofs;
++              struct mv_host_priv *hpriv = link->ap->host->private_data;
+               if (sc_reg_in == SCR_CONTROL) {
+                       /*
+                        * Workaround for 88SX60x1 FEr SATA#26:
+@@ -1364,6 +1367,18 @@ static int mv_scr_write(struct ata_link
+                        */
+                       if ((val & 0xf) == 1 || (readl(addr) & 0xf) == 1)
+                               val |= 0xf000;
++
++                      if (hpriv->hp_flags & MV_HP_FIX_LP_PHY_CTL) {
++                              void __iomem *lp_phy_addr =
++                                      mv_ap_base(link->ap) + LP_PHY_CTL;
++                              /*
++                               * Set PHY speed according to SControl speed.
++                               */
++                              if ((val & 0xf0) == 0x10)
++                                      writelfl(0x7, lp_phy_addr);
++                              else
++                                      writelfl(0x227, lp_phy_addr);
++                      }
+               }
+               writelfl(val, addr);
+               return 0;
+@@ -4082,6 +4097,15 @@ static int mv_platform_probe(struct plat
+       if (rc)
+               goto err;
++      /*
++       * To allow disk hotplug on Armada 370/XP SoCs, the PHY speed must be
++       * updated in the LP_PHY_CTL register.
++       */
++      if (pdev->dev.of_node &&
++              of_device_is_compatible(pdev->dev.of_node,
++                                      "marvell,armada-370-sata"))
++              hpriv->hp_flags |= MV_HP_FIX_LP_PHY_CTL;
++
+       /* initialize adapter */
+       rc = mv_init_host(host);
+       if (rc)
diff --git a/queue-3.4/hp_accel-add-a-new-pnp-id-hpq6007-for-new-hp-laptops.patch b/queue-3.4/hp_accel-add-a-new-pnp-id-hpq6007-for-new-hp-laptops.patch
new file mode 100644 (file)
index 0000000..2c2ea17
--- /dev/null
@@ -0,0 +1,34 @@
+From b0ad4ff35d479a46a3b995a299db9aeb097acfce Mon Sep 17 00:00:00 2001
+From: Takashi Iwai <tiwai@suse.de>
+Date: Mon, 13 Jan 2014 12:32:44 +0100
+Subject: hp_accel: Add a new PnP ID HPQ6007 for new HP laptops
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Takashi Iwai <tiwai@suse.de>
+
+commit b0ad4ff35d479a46a3b995a299db9aeb097acfce upstream.
+
+The DriveGuard chips on the new HP laptops are with a new PnP ID
+"HPQ6007".  It should be compatible with older chips.
+
+Acked-by: Éric Piel <eric.piel@tremplin-utc.net>
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/platform/x86/hp_accel.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/platform/x86/hp_accel.c
++++ b/drivers/platform/x86/hp_accel.c
+@@ -77,6 +77,7 @@ static inline void delayed_sysfs_set(str
+ static struct acpi_device_id lis3lv02d_device_ids[] = {
+       {"HPQ0004", 0}, /* HP Mobile Data Protection System PNP */
+       {"HPQ6000", 0}, /* HP Mobile Data Protection System PNP */
++      {"HPQ6007", 0}, /* HP Mobile Data Protection System PNP */
+       {"", 0},
+ };
+ MODULE_DEVICE_TABLE(acpi, lis3lv02d_device_ids);
diff --git a/queue-3.4/parport-parport_pc-remove-double-pci-id-for-netmos.patch b/queue-3.4/parport-parport_pc-remove-double-pci-id-for-netmos.patch
new file mode 100644 (file)
index 0000000..0c61567
--- /dev/null
@@ -0,0 +1,74 @@
+From d6a484520c5572a4170fa915109ccfc0c38f5008 Mon Sep 17 00:00:00 2001
+From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+Date: Wed, 27 Nov 2013 17:43:43 +0100
+Subject: parport: parport_pc: remove double PCI ID for NetMos
+
+From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+
+commit d6a484520c5572a4170fa915109ccfc0c38f5008 upstream.
+
+In commit 85747f ("PATCH] parport: add NetMOS 9805 support") Max added
+the PCI ID for NetMOS 9805 based on a Debian bug report from 2k4 which
+was at the v2.4.26 time frame. The patch made into 2.6.14.
+Shortly before that patch akpm merged commit 296d3c783b ("[PATCH] Support
+NetMOS based PCI cards providing serial and parallel ports") which made
+into v2.6.9-rc1.
+Now we have two different entries for the same PCI id.
+I have here the NetMos 9805 which claims to support SPP/EPP/ECP mode.
+This patch takes Max's entry for titan_1284p1 (base != -1 specifies the
+ioport for ECP mode) and replaces akpm's entry for netmos_9805 which
+specified -1 (=none). Both share the same PCI-ID (my card has subsystem
+0x1000 / 0x0020 so it should match PCI_ANY).
+
+While here I also drop the entry for titan_1284p2 which is the same as
+netmos_9815.
+
+Cc: Maximilian Attems <maks@stro.at>
+Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/parport/parport_pc.c |   10 ++--------
+ 1 file changed, 2 insertions(+), 8 deletions(-)
+
+--- a/drivers/parport/parport_pc.c
++++ b/drivers/parport/parport_pc.c
+@@ -2875,8 +2875,6 @@ enum parport_pc_pci_cards {
+       syba_2p_epp,
+       syba_1p_ecp,
+       titan_010l,
+-      titan_1284p1,
+-      titan_1284p2,
+       avlab_1p,
+       avlab_2p,
+       oxsemi_952,
+@@ -2935,8 +2933,6 @@ static struct parport_pc_pci {
+       /* syba_2p_epp AP138B */        { 2, { { 0, 0x078 }, { 0, 0x178 }, } },
+       /* syba_1p_ecp W83787 */        { 1, { { 0, 0x078 }, } },
+       /* titan_010l */                { 1, { { 3, -1 }, } },
+-      /* titan_1284p1 */              { 1, { { 0, 1 }, } },
+-      /* titan_1284p2 */              { 2, { { 0, 1 }, { 2, 3 }, } },
+       /* avlab_1p             */      { 1, { { 0, 1}, } },
+       /* avlab_2p             */      { 2, { { 0, 1}, { 2, 3 },} },
+       /* The Oxford Semi cards are unusual: 954 doesn't support ECP,
+@@ -2952,8 +2948,8 @@ static struct parport_pc_pci {
+       /* netmos_9705 */               { 1, { { 0, -1 }, } },
+       /* netmos_9715 */               { 2, { { 0, 1 }, { 2, 3 },} },
+       /* netmos_9755 */               { 2, { { 0, 1 }, { 2, 3 },} },
+-      /* netmos_9805 */               { 1, { { 0, -1 }, } },
+-      /* netmos_9815 */               { 2, { { 0, -1 }, { 2, -1 }, } },
++      /* netmos_9805 */               { 1, { { 0, 1 }, } },
++      /* netmos_9815 */               { 2, { { 0, 1 }, { 2, 3 }, } },
+       /* netmos_9901 */               { 1, { { 0, -1 }, } },
+       /* netmos_9865 */               { 1, { { 0, -1 }, } },
+       /* quatech_sppxp100 */          { 1, { { 0, 1 }, } },
+@@ -2997,8 +2993,6 @@ static const struct pci_device_id parpor
+         PCI_ANY_ID, PCI_ANY_ID, 0, 0, syba_1p_ecp },
+       { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_010L,
+         PCI_ANY_ID, PCI_ANY_ID, 0, 0, titan_010l },
+-      { 0x9710, 0x9805, 0x1000, 0x0010, 0, 0, titan_1284p1 },
+-      { 0x9710, 0x9815, 0x1000, 0x0020, 0, 0, titan_1284p2 },
+       /* PCI_VENDOR_ID_AVLAB/Intek21 has another bunch of cards ...*/
+       /* AFAVLAB_TK9902 */
+       { 0x14db, 0x2120, PCI_ANY_ID, PCI_ANY_ID, 0, 0, avlab_1p},
diff --git a/queue-3.4/rtc-cmos-add-an-alarm-disable-quirk.patch b/queue-3.4/rtc-cmos-add-an-alarm-disable-quirk.patch
new file mode 100644 (file)
index 0000000..73da285
--- /dev/null
@@ -0,0 +1,125 @@
+From d5a1c7e3fc38d9c7d629e1e47f32f863acbdec3d Mon Sep 17 00:00:00 2001
+From: Borislav Petkov <bp@alien8.de>
+Date: Sat, 20 Jul 2013 19:00:23 +0200
+Subject: rtc-cmos: Add an alarm disable quirk
+
+From: Borislav Petkov <bp@alien8.de>
+
+commit d5a1c7e3fc38d9c7d629e1e47f32f863acbdec3d upstream.
+
+41c7f7424259f ("rtc: Disable the alarm in the hardware (v2)") added the
+functionality to disable the RTC wake alarm when shutting down the box.
+
+However, there are at least two b0rked BIOSes we know about:
+
+https://bugzilla.novell.com/show_bug.cgi?id=812592
+https://bugzilla.novell.com/show_bug.cgi?id=805740
+
+where, when wakeup alarm is enabled in the BIOS, the machine reboots
+automatically right after shutdown, regardless of what wakeup time is
+programmed.
+
+Bisecting the issue lead to this patch so disable its functionality with
+a DMI quirk only for those boxes.
+
+Cc: Brecht Machiels <brecht@mos6581.org>
+Cc: Thomas Gleixner <tglx@linutronix.de>
+Cc: John Stultz <john.stultz@linaro.org>
+Cc: Rabin Vincent <rabin.vincent@stericsson.com>
+Signed-off-by: Borislav Petkov <bp@suse.de>
+[jstultz: Changed variable name for clarity, added extra dmi entry]
+Tested-by: Brecht Machiels <brecht@mos6581.org>
+Tested-by: Borislav Petkov <bp@suse.de>
+Signed-off-by: John Stultz <john.stultz@linaro.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/rtc/rtc-cmos.c |   52 ++++++++++++++++++++++++++++++++++++++++++++++++-
+ 1 file changed, 51 insertions(+), 1 deletion(-)
+
+--- a/drivers/rtc/rtc-cmos.c
++++ b/drivers/rtc/rtc-cmos.c
+@@ -34,11 +34,11 @@
+ #include <linux/interrupt.h>
+ #include <linux/spinlock.h>
+ #include <linux/platform_device.h>
+-#include <linux/mod_devicetable.h>
+ #include <linux/log2.h>
+ #include <linux/pm.h>
+ #include <linux/of.h>
+ #include <linux/of_platform.h>
++#include <linux/dmi.h>
+ /* this is for "generic access to PC-style RTC" using CMOS_READ/CMOS_WRITE */
+ #include <asm-generic/rtc.h>
+@@ -377,6 +377,51 @@ static int cmos_set_alarm(struct device
+       return 0;
+ }
++/*
++ * Do not disable RTC alarm on shutdown - workaround for b0rked BIOSes.
++ */
++static bool alarm_disable_quirk;
++
++static int __init set_alarm_disable_quirk(const struct dmi_system_id *id)
++{
++      alarm_disable_quirk = true;
++      pr_info("rtc-cmos: BIOS has alarm-disable quirk. ");
++      pr_info("RTC alarms disabled\n");
++      return 0;
++}
++
++static const struct dmi_system_id rtc_quirks[] __initconst = {
++      /* https://bugzilla.novell.com/show_bug.cgi?id=805740 */
++      {
++              .callback = set_alarm_disable_quirk,
++              .ident    = "IBM Truman",
++              .matches  = {
++                      DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
++                      DMI_MATCH(DMI_PRODUCT_NAME, "4852570"),
++              },
++      },
++      /* https://bugzilla.novell.com/show_bug.cgi?id=812592 */
++      {
++              .callback = set_alarm_disable_quirk,
++              .ident    = "Gigabyte GA-990XA-UD3",
++              .matches  = {
++                      DMI_MATCH(DMI_SYS_VENDOR,
++                                      "Gigabyte Technology Co., Ltd."),
++                      DMI_MATCH(DMI_PRODUCT_NAME, "GA-990XA-UD3"),
++              },
++      },
++      /* http://permalink.gmane.org/gmane.linux.kernel/1604474 */
++      {
++              .callback = set_alarm_disable_quirk,
++              .ident    = "Toshiba Satellite L300",
++              .matches  = {
++                      DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
++                      DMI_MATCH(DMI_PRODUCT_NAME, "Satellite L300"),
++              },
++      },
++      {}
++};
++
+ static int cmos_alarm_irq_enable(struct device *dev, unsigned int enabled)
+ {
+       struct cmos_rtc *cmos = dev_get_drvdata(dev);
+@@ -385,6 +430,9 @@ static int cmos_alarm_irq_enable(struct
+       if (!is_valid_irq(cmos->irq))
+               return -EINVAL;
++      if (alarm_disable_quirk)
++              return 0;
++
+       spin_lock_irqsave(&rtc_lock, flags);
+       if (enabled)
+@@ -1166,6 +1214,8 @@ static int __init cmos_init(void)
+                       platform_driver_registered = true;
+       }
++      dmi_check_system(rtc_quirks);
++
+       if (retval == 0)
+               return 0;
index ed47ffdc091a44ac109ee56b21782640867e26df..90a662db945e6a477bfacea55adfdbeb40fdc865 100644 (file)
@@ -24,3 +24,10 @@ tty-serial-at91-handle-shutdown-more-safely.patch
 arm-at91-smc-bug-fix-in-sam9_smc_cs_read.patch
 serial-add-support-for-200-v3-series-titan-card.patch
 kvm-s390-fix-diagnose-code-extraction.patch
+parport-parport_pc-remove-double-pci-id-for-netmos.patch
+rtc-cmos-add-an-alarm-disable-quirk.patch
+asoc-adau1701-fix-adau1701_seroctl_word_len_16-constant.patch
+alsa-rme9652-fix-a-missing-comma-in-channel_map_9636_ds.patch
+alsa-enable-config_zone_dma-for-smaller-pci-dma-masks.patch
+ata-sata_mv-fix-disk-hotplug-for-armada-370-xp-socs.patch
+hp_accel-add-a-new-pnp-id-hpq6007-for-new-hp-laptops.patch