From: Greg Kroah-Hartman Date: Sun, 16 Jun 2013 16:18:25 +0000 (-0700) Subject: 3.9-stable patches X-Git-Tag: v3.0.83~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6efb6b926c1b98c14c08d87ee6ec716da3503923;p=thirdparty%2Fkernel%2Fstable-queue.git 3.9-stable patches added patches: arm-kirkwood-handle-mv88f6282-cpu-in-__kirkwood_variant.patch tg3-wait-for-boot-code-to-finish-after-power-on.patch --- diff --git a/queue-3.9/arm-kirkwood-handle-mv88f6282-cpu-in-__kirkwood_variant.patch b/queue-3.9/arm-kirkwood-handle-mv88f6282-cpu-in-__kirkwood_variant.patch new file mode 100644 index 00000000000..3f8c8ac88a2 --- /dev/null +++ b/queue-3.9/arm-kirkwood-handle-mv88f6282-cpu-in-__kirkwood_variant.patch @@ -0,0 +1,39 @@ +From 4089fe95bfed295c8ad38251d5fe02b6b0ba684c Mon Sep 17 00:00:00 2001 +From: Nicolas Schichan +Date: Thu, 6 Jun 2013 19:00:46 +0200 +Subject: ARM: Kirkwood: handle mv88f6282 cpu in __kirkwood_variant(). + +From: Nicolas Schichan + +commit 4089fe95bfed295c8ad38251d5fe02b6b0ba684c upstream. + +MPP_F6281_MASK would be previously be returned when on mv88f6282, +which would disallow some valid MPP configurations. + +Commit 830f8b91 (arm: plat-orion: fix printing of "MPP config +unavailable on this hardware") made this problem visible as an invalid +MPP configuration is now correctly detected and not applied. + +Signed-off-by: Nicolas Schichan +Signed-off-by: Jason Cooper +Signed-off-by: Greg Kroah-Hartman + +--- + arch/arm/mach-kirkwood/mpp.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +--- a/arch/arm/mach-kirkwood/mpp.c ++++ b/arch/arm/mach-kirkwood/mpp.c +@@ -22,9 +22,10 @@ static unsigned int __init kirkwood_vari + + kirkwood_pcie_id(&dev, &rev); + +- if ((dev == MV88F6281_DEV_ID && rev >= MV88F6281_REV_A0) || +- (dev == MV88F6282_DEV_ID)) ++ if (dev == MV88F6281_DEV_ID && rev >= MV88F6281_REV_A0) + return MPP_F6281_MASK; ++ if (dev == MV88F6282_DEV_ID) ++ return MPP_F6282_MASK; + if (dev == MV88F6192_DEV_ID && rev >= MV88F6192_REV_A0) + return MPP_F6192_MASK; + if (dev == MV88F6180_DEV_ID) diff --git a/queue-3.9/series b/queue-3.9/series index a19b8ec16e6..b8fb50d6247 100644 --- a/queue-3.9/series +++ b/queue-3.9/series @@ -44,3 +44,5 @@ usb-chipidea-fix-id-change-handling.patch usb-pl2303-fix-device-initialisation-at-open.patch usb-f81232-fix-device-initialisation-at-open.patch usb-spcp8x5-fix-device-initialisation-at-open.patch +tg3-wait-for-boot-code-to-finish-after-power-on.patch +arm-kirkwood-handle-mv88f6282-cpu-in-__kirkwood_variant.patch diff --git a/queue-3.9/tg3-wait-for-boot-code-to-finish-after-power-on.patch b/queue-3.9/tg3-wait-for-boot-code-to-finish-after-power-on.patch new file mode 100644 index 00000000000..b4b2c37bac8 --- /dev/null +++ b/queue-3.9/tg3-wait-for-boot-code-to-finish-after-power-on.patch @@ -0,0 +1,57 @@ +From df465abfe06f7dc4f33f4a96d17f096e9e8ac917 Mon Sep 17 00:00:00 2001 +From: Nithin Sujir +Date: Wed, 12 Jun 2013 11:08:59 -0700 +Subject: tg3: Wait for boot code to finish after power on + +From: Nithin Sujir + +commit df465abfe06f7dc4f33f4a96d17f096e9e8ac917 upstream. + +Some systems that don't need wake-on-lan may choose to power down the +chip on system standby. Upon resume, the power on causes the boot code +to startup and initialize the hardware. On one new platform, this is +causing the device to go into a bad state due to a race between the +driver and boot code, once every several hundred resumes. The same race +exists on open since we come up from a power on. + +This patch adds a wait for boot code signature at the beginning of +tg3_init_hw() which is common to both cases. If there has not been a +power-off or the boot code has already completed, the signature will be +present and poll_fw() returns immediately. Also return immediately if +the device does not have firmware. + +Signed-off-by: Nithin Nayak Sujir +Signed-off-by: Michael Chan +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/ethernet/broadcom/tg3.c | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +--- a/drivers/net/ethernet/broadcom/tg3.c ++++ b/drivers/net/ethernet/broadcom/tg3.c +@@ -1799,6 +1799,9 @@ static int tg3_poll_fw(struct tg3 *tp) + int i; + u32 val; + ++ if (tg3_flag(tp, NO_FWARE_REPORTED)) ++ return 0; ++ + if (tg3_flag(tp, IS_SSB_CORE)) { + /* We don't use firmware. */ + return 0; +@@ -10016,6 +10019,13 @@ static int tg3_reset_hw(struct tg3 *tp, + */ + static int tg3_init_hw(struct tg3 *tp, int reset_phy) + { ++ /* Chip may have been just powered on. If so, the boot code may still ++ * be running initialization. Wait for it to finish to avoid races in ++ * accessing the hardware. ++ */ ++ tg3_enable_register_access(tp); ++ tg3_poll_fw(tp); ++ + tg3_switch_clocks(tp); + + tw32(TG3PCI_MEM_WIN_BASE_ADDR, 0);