]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.14-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 2 May 2016 23:51:19 +0000 (16:51 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 2 May 2016 23:51:19 +0000 (16:51 -0700)
added patches:
arm-omap3-add-cpuidle-parameters-table-for-omap3430.patch
bus-imx-weim-take-the-status-property-value-into-account.patch
jme-do-not-enable-nic-wol-functions-on-s0.patch
jme-fix-device-pm-wakeup-api-usage.patch

queue-3.14/arm-omap3-add-cpuidle-parameters-table-for-omap3430.patch [new file with mode: 0644]
queue-3.14/bus-imx-weim-take-the-status-property-value-into-account.patch [new file with mode: 0644]
queue-3.14/jme-do-not-enable-nic-wol-functions-on-s0.patch [new file with mode: 0644]
queue-3.14/jme-fix-device-pm-wakeup-api-usage.patch [new file with mode: 0644]
queue-3.14/series

diff --git a/queue-3.14/arm-omap3-add-cpuidle-parameters-table-for-omap3430.patch b/queue-3.14/arm-omap3-add-cpuidle-parameters-table-for-omap3430.patch
new file mode 100644 (file)
index 0000000..a6fa1eb
--- /dev/null
@@ -0,0 +1,122 @@
+From 98f42221501353067251fbf11e732707dbb68ce3 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Pali=20Roh=C3=A1r?= <pali.rohar@gmail.com>
+Date: Fri, 19 Feb 2016 10:35:39 -0800
+Subject: ARM: OMAP3: Add cpuidle parameters table for omap3430
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Pali Rohár <pali.rohar@gmail.com>
+
+commit 98f42221501353067251fbf11e732707dbb68ce3 upstream.
+
+Based on CPU type choose generic omap3 or omap3430 specific cpuidle
+parameters. Parameters for omap3430 were measured on Nokia N900 device and
+added by commit 5a1b1d3a9efa ("OMAP3: RX-51: Pass cpu idle parameters")
+which were later removed by commit 231900afba52 ("ARM: OMAP3: cpuidle -
+remove rx51 cpuidle parameters table") due to huge code complexity.
+
+This patch brings cpuidle parameters for omap3430 devices again, but uses
+simple condition based on CPU type.
+
+Fixes: 231900afba52 ("ARM: OMAP3: cpuidle - remove rx51 cpuidle
+parameters table")
+Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
+Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
+Signed-off-by: Tony Lindgren <tony@atomide.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/arm/mach-omap2/cpuidle34xx.c |   69 +++++++++++++++++++++++++++++++++++++-
+ 1 file changed, 68 insertions(+), 1 deletion(-)
+
+--- a/arch/arm/mach-omap2/cpuidle34xx.c
++++ b/arch/arm/mach-omap2/cpuidle34xx.c
+@@ -34,6 +34,7 @@
+ #include "pm.h"
+ #include "control.h"
+ #include "common.h"
++#include "soc.h"
+ /* Mach specific information to be recorded in the C-state driver_data */
+ struct omap3_idle_statedata {
+@@ -322,6 +323,69 @@ static struct cpuidle_driver omap3_idle_
+       .safe_state_index = 0,
+ };
++/*
++ * Numbers based on measurements made in October 2009 for PM optimized kernel
++ * with CPU freq enabled on device Nokia N900. Assumes OPP2 (main idle OPP,
++ * and worst case latencies).
++ */
++static struct cpuidle_driver omap3430_idle_driver = {
++      .name             = "omap3430_idle",
++      .owner            = THIS_MODULE,
++      .states = {
++              {
++                      .enter            = omap3_enter_idle_bm,
++                      .exit_latency     = 110 + 162,
++                      .target_residency = 5,
++                      .name             = "C1",
++                      .desc             = "MPU ON + CORE ON",
++              },
++              {
++                      .enter            = omap3_enter_idle_bm,
++                      .exit_latency     = 106 + 180,
++                      .target_residency = 309,
++                      .name             = "C2",
++                      .desc             = "MPU ON + CORE ON",
++              },
++              {
++                      .enter            = omap3_enter_idle_bm,
++                      .exit_latency     = 107 + 410,
++                      .target_residency = 46057,
++                      .name             = "C3",
++                      .desc             = "MPU RET + CORE ON",
++              },
++              {
++                      .enter            = omap3_enter_idle_bm,
++                      .exit_latency     = 121 + 3374,
++                      .target_residency = 46057,
++                      .name             = "C4",
++                      .desc             = "MPU OFF + CORE ON",
++              },
++              {
++                      .enter            = omap3_enter_idle_bm,
++                      .exit_latency     = 855 + 1146,
++                      .target_residency = 46057,
++                      .name             = "C5",
++                      .desc             = "MPU RET + CORE RET",
++              },
++              {
++                      .enter            = omap3_enter_idle_bm,
++                      .exit_latency     = 7580 + 4134,
++                      .target_residency = 484329,
++                      .name             = "C6",
++                      .desc             = "MPU OFF + CORE RET",
++              },
++              {
++                      .enter            = omap3_enter_idle_bm,
++                      .exit_latency     = 7505 + 15274,
++                      .target_residency = 484329,
++                      .name             = "C7",
++                      .desc             = "MPU OFF + CORE OFF",
++              },
++      },
++      .state_count = ARRAY_SIZE(omap3_idle_data),
++      .safe_state_index = 0,
++};
++
+ /* Public functions */
+ /**
+@@ -340,5 +404,8 @@ int __init omap3_idle_init(void)
+       if (!mpu_pd || !core_pd || !per_pd || !cam_pd)
+               return -ENODEV;
+-      return cpuidle_register(&omap3_idle_driver, NULL);
++      if (cpu_is_omap3430())
++              return cpuidle_register(&omap3430_idle_driver, NULL);
++      else
++              return cpuidle_register(&omap3_idle_driver, NULL);
+ }
diff --git a/queue-3.14/bus-imx-weim-take-the-status-property-value-into-account.patch b/queue-3.14/bus-imx-weim-take-the-status-property-value-into-account.patch
new file mode 100644 (file)
index 0000000..bb4dd5e
--- /dev/null
@@ -0,0 +1,58 @@
+From 33b96d2c9579213cf3f36d7b29841b1e464750c4 Mon Sep 17 00:00:00 2001
+From: Fabio Estevam <fabio.estevam@nxp.com>
+Date: Mon, 22 Feb 2016 09:01:53 -0300
+Subject: bus: imx-weim: Take the 'status' property value into account
+
+From: Fabio Estevam <fabio.estevam@nxp.com>
+
+commit 33b96d2c9579213cf3f36d7b29841b1e464750c4 upstream.
+
+Currently we have an incorrect behaviour when multiple devices
+are present under the weim node. For example:
+
+&weim {
+       ...
+       status = "okay";
+
+       sram@0,0 {
+               ...
+               status = "okay";
+       };
+
+       mram@0,0 {
+               ...
+               status = "disabled";
+       };
+};
+
+In this case only the 'sram' device should be probed and not 'mram'.
+
+However what happens currently is that the status variable is ignored,
+causing the 'sram' device to be disabled and 'mram' to be enabled.
+
+Change the weim_parse_dt() function to use
+for_each_available_child_of_node()so that the devices marked with
+'status = disabled' are not probed.
+
+Suggested-by: Wolfgang Netbal <wolfgang.netbal@sigmatek.at>
+Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
+Reviewed-by: Sascha Hauer <s.hauer@pengutronix.de>
+Acked-by: Shawn Guo <shawnguo@kernel.org>
+Signed-off-by: Olof Johansson <olof@lixom.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/bus/imx-weim.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/bus/imx-weim.c
++++ b/drivers/bus/imx-weim.c
+@@ -92,7 +92,7 @@ static int __init weim_parse_dt(struct p
+       struct device_node *child;
+       int ret;
+-      for_each_child_of_node(pdev->dev.of_node, child) {
++      for_each_available_child_of_node(pdev->dev.of_node, child) {
+               if (!child->name)
+                       continue;
diff --git a/queue-3.14/jme-do-not-enable-nic-wol-functions-on-s0.patch b/queue-3.14/jme-do-not-enable-nic-wol-functions-on-s0.patch
new file mode 100644 (file)
index 0000000..91c8ac7
--- /dev/null
@@ -0,0 +1,86 @@
+From 0772a99b818079e628a1da122ac7ee023faed83e Mon Sep 17 00:00:00 2001
+From: Guo-Fu Tseng <cooldavid@cooldavid.org>
+Date: Sat, 5 Mar 2016 08:11:55 +0800
+Subject: jme: Do not enable NIC WoL functions on S0
+
+From: Guo-Fu Tseng <cooldavid@cooldavid.org>
+
+commit 0772a99b818079e628a1da122ac7ee023faed83e upstream.
+
+Otherwise it might be back on resume right after going to suspend in
+some hardware.
+
+Reported-by: Diego Viola <diego.viola@gmail.com>
+Signed-off-by: Guo-Fu Tseng <cooldavid@cooldavid.org>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/net/ethernet/jme.c |   17 +++++++++++------
+ 1 file changed, 11 insertions(+), 6 deletions(-)
+
+--- a/drivers/net/ethernet/jme.c
++++ b/drivers/net/ethernet/jme.c
+@@ -270,11 +270,17 @@ jme_reset_mac_processor(struct jme_adapt
+ }
+ static inline void
+-jme_clear_pm(struct jme_adapter *jme)
++jme_clear_pm_enable_wol(struct jme_adapter *jme)
+ {
+       jwrite32(jme, JME_PMCS, PMCS_STMASK | jme->reg_pmcs);
+ }
++static inline void
++jme_clear_pm_disable_wol(struct jme_adapter *jme)
++{
++      jwrite32(jme, JME_PMCS, PMCS_STMASK);
++}
++
+ static int
+ jme_reload_eeprom(struct jme_adapter *jme)
+ {
+@@ -1857,7 +1863,7 @@ jme_open(struct net_device *netdev)
+       struct jme_adapter *jme = netdev_priv(netdev);
+       int rc;
+-      jme_clear_pm(jme);
++      jme_clear_pm_disable_wol(jme);
+       JME_NAPI_ENABLE(jme);
+       tasklet_init(&jme->linkch_task, jme_link_change_tasklet,
+@@ -1933,7 +1939,7 @@ jme_powersave_phy(struct jme_adapter *jm
+               jme_set_100m_half(jme);
+               if (jme->reg_pmcs & (PMCS_LFEN | PMCS_LREN))
+                       jme_wait_link(jme);
+-              jme_clear_pm(jme);
++              jme_clear_pm_enable_wol(jme);
+       } else {
+               jme_phy_off(jme);
+       }
+@@ -2621,7 +2627,6 @@ jme_set_wol(struct net_device *netdev,
+       if (wol->wolopts & WAKE_MAGIC)
+               jme->reg_pmcs |= PMCS_MFEN;
+-      jwrite32(jme, JME_PMCS, jme->reg_pmcs);
+       device_set_wakeup_enable(&jme->pdev->dev, !!(jme->reg_pmcs));
+       return 0;
+@@ -3147,7 +3152,7 @@ jme_init_one(struct pci_dev *pdev,
+       jme->mii_if.mdio_read = jme_mdio_read;
+       jme->mii_if.mdio_write = jme_mdio_write;
+-      jme_clear_pm(jme);
++      jme_clear_pm_disable_wol(jme);
+       device_set_wakeup_enable(&pdev->dev, true);
+       jme_set_phyfifo_5level(jme);
+@@ -3279,7 +3284,7 @@ jme_resume(struct device *dev)
+       if (!netif_running(netdev))
+               return 0;
+-      jme_clear_pm(jme);
++      jme_clear_pm_disable_wol(jme);
+       jme_phy_on(jme);
+       if (test_bit(JME_FLAG_SSET, &jme->flags))
+               jme_set_settings(netdev, &jme->old_ecmd);
diff --git a/queue-3.14/jme-fix-device-pm-wakeup-api-usage.patch b/queue-3.14/jme-fix-device-pm-wakeup-api-usage.patch
new file mode 100644 (file)
index 0000000..d529287
--- /dev/null
@@ -0,0 +1,58 @@
+From 81422e672f8181d7ad1ee6c60c723aac649f538f Mon Sep 17 00:00:00 2001
+From: Guo-Fu Tseng <cooldavid@cooldavid.org>
+Date: Sat, 5 Mar 2016 08:11:56 +0800
+Subject: jme: Fix device PM wakeup API usage
+
+From: Guo-Fu Tseng <cooldavid@cooldavid.org>
+
+commit 81422e672f8181d7ad1ee6c60c723aac649f538f upstream.
+
+According to Documentation/power/devices.txt
+
+The driver should not use device_set_wakeup_enable() which is the policy
+for user to decide.
+
+Using device_init_wakeup() to initialize dev->power.should_wakeup and
+dev->power.can_wakeup on driver initialization.
+
+And use device_may_wakeup() on suspend to decide if WoL function should
+be enabled on NIC.
+
+Reported-by: Diego Viola <diego.viola@gmail.com>
+Signed-off-by: Guo-Fu Tseng <cooldavid@cooldavid.org>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/net/ethernet/jme.c |    6 ++----
+ 1 file changed, 2 insertions(+), 4 deletions(-)
+
+--- a/drivers/net/ethernet/jme.c
++++ b/drivers/net/ethernet/jme.c
+@@ -1935,7 +1935,7 @@ jme_wait_link(struct jme_adapter *jme)
+ static void
+ jme_powersave_phy(struct jme_adapter *jme)
+ {
+-      if (jme->reg_pmcs) {
++      if (jme->reg_pmcs && device_may_wakeup(&jme->pdev->dev)) {
+               jme_set_100m_half(jme);
+               if (jme->reg_pmcs & (PMCS_LFEN | PMCS_LREN))
+                       jme_wait_link(jme);
+@@ -2627,8 +2627,6 @@ jme_set_wol(struct net_device *netdev,
+       if (wol->wolopts & WAKE_MAGIC)
+               jme->reg_pmcs |= PMCS_MFEN;
+-      device_set_wakeup_enable(&jme->pdev->dev, !!(jme->reg_pmcs));
+-
+       return 0;
+ }
+@@ -3153,7 +3151,7 @@ jme_init_one(struct pci_dev *pdev,
+       jme->mii_if.mdio_write = jme_mdio_write;
+       jme_clear_pm_disable_wol(jme);
+-      device_set_wakeup_enable(&pdev->dev, true);
++      device_init_wakeup(&pdev->dev, true);
+       jme_set_phyfifo_5level(jme);
+       jme->pcirev = pdev->revision;
index e32fce389af8ce69bda1af46f51b237f70d3fa85..52d041496f2543148b671c4c0fcbe46d25981d35 100644 (file)
@@ -30,3 +30,7 @@ serial-sh-sci-remove-cpufreq-notifier-to-fix-crash-deadlock.patch
 include-linux-poison.h-fix-list_poison-1-2-offset.patch
 drivers-hv-vmbus-prevent-cpu-offlining-on-newer-hypervisors.patch
 perf-stat-document-detailed-option.patch
+arm-omap3-add-cpuidle-parameters-table-for-omap3430.patch
+bus-imx-weim-take-the-status-property-value-into-account.patch
+jme-do-not-enable-nic-wol-functions-on-s0.patch
+jme-fix-device-pm-wakeup-api-usage.patch