From: Greg Kroah-Hartman Date: Tue, 4 Feb 2014 17:20:31 +0000 (-0800) Subject: 3.10-stable patches X-Git-Tag: v3.4.79~1^2~24 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2714f4b236102b024beabc77e7702b29a44210d2;p=thirdparty%2Fkernel%2Fstable-queue.git 3.10-stable patches added patches: iwlwifi-pcie-enable-oscillator-for-l1-exit.patch --- diff --git a/queue-3.10/iwlwifi-pcie-enable-oscillator-for-l1-exit.patch b/queue-3.10/iwlwifi-pcie-enable-oscillator-for-l1-exit.patch new file mode 100644 index 00000000000..441037060a5 --- /dev/null +++ b/queue-3.10/iwlwifi-pcie-enable-oscillator-for-l1-exit.patch @@ -0,0 +1,76 @@ +From 2d93aee152b1758a94a18fe15d72153ba73b5679 Mon Sep 17 00:00:00 2001 +From: Emmanuel Grumbach +Date: Tue, 24 Dec 2013 14:15:41 +0200 +Subject: iwlwifi: pcie: enable oscillator for L1 exit + +From: Emmanuel Grumbach + +commit 2d93aee152b1758a94a18fe15d72153ba73b5679 upstream. + +Enabling the oscillator consumes slightly more power (100uA) +but allows to make sure that we exit from L1 on time. + +Not doing so might lead to a PCIe specification violation +since we might wake up from L1 at the wrong time. +This issue has been identified on 3160 and 7260 only. +On older NICs L1 off is not enabled, on newer NICs (7265), +the issue is fixed. + +When the bug occurs the user sees that the NIC has +disappeared from the PCI bridge, any access to the device +returns 0xff. + +This fixes: + https://bugzilla.kernel.org/show_bug.cgi?id=64541 + +and has been extensively discussed here: + http://markmail.org/thread/mfmpzqt3r333n4bo + +Fixes: 99cd47142399 ("iwlwifi: add 7000 series device configuration") +Reported-and-tested-by: wzyboy +Reviewed-by: Johannes Berg +Signed-off-by: Emmanuel Grumbach +Signed-off-by: Greg Kroah-Hartman + + +--- + drivers/net/wireless/iwlwifi/iwl-prph.h | 4 ++++ + drivers/net/wireless/iwlwifi/pcie/trans.c | 16 ++++++++++++++++ + 2 files changed, 20 insertions(+) + +--- a/drivers/net/wireless/iwlwifi/iwl-prph.h ++++ b/drivers/net/wireless/iwlwifi/iwl-prph.h +@@ -260,4 +260,8 @@ static inline unsigned int SCD_QUEUE_STA + + /*********************** END TX SCHEDULER *************************************/ + ++/* Oscillator clock */ ++#define OSC_CLK (0xa04068) ++#define OSC_CLK_FORCE_CONTROL (0x8) ++ + #endif /* __iwl_prph_h__ */ +--- a/drivers/net/wireless/iwlwifi/pcie/trans.c ++++ b/drivers/net/wireless/iwlwifi/pcie/trans.c +@@ -207,6 +207,22 @@ static int iwl_pcie_apm_init(struct iwl_ + } + + /* ++ * Enable the oscillator to count wake up time for L1 exit. This ++ * consumes slightly more power (100uA) - but allows to be sure ++ * that we wake up from L1 on time. ++ * ++ * This looks weird: read twice the same register, discard the ++ * value, set a bit, and yet again, read that same register ++ * just to discard the value. But that's the way the hardware ++ * seems to like it. ++ */ ++ iwl_read_prph(trans, OSC_CLK); ++ iwl_read_prph(trans, OSC_CLK); ++ iwl_set_bits_prph(trans, OSC_CLK, OSC_CLK_FORCE_CONTROL); ++ iwl_read_prph(trans, OSC_CLK); ++ iwl_read_prph(trans, OSC_CLK); ++ ++ /* + * Enable DMA clock and wait for it to stabilize. + * + * Write to "CLK_EN_REG"; "1" bits enable clocks, while "0" bits diff --git a/queue-3.10/series b/queue-3.10/series index ad0ca5308bb..35be5d4219d 100644 --- a/queue-3.10/series +++ b/queue-3.10/series @@ -87,3 +87,4 @@ xen-netfront-fix-resource-leak-in-netfront.patch sit-fix-double-free-of-fb_tunnel_dev-on-exit.patch revert-ip6tnl-fix-use-after-free-of-fb_tnl_dev.patch ip6tnl-fix-double-free-of-fb_tnl_dev-on-exit.patch +iwlwifi-pcie-enable-oscillator-for-l1-exit.patch