From: Greg Kroah-Hartman Date: Fri, 10 Apr 2015 13:12:19 +0000 (+0200) Subject: 3.10-stable patches X-Git-Tag: v3.10.74~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d07e82bcfbdc9658e31b63e83d2fc17383134b50;p=thirdparty%2Fkernel%2Fstable-queue.git 3.10-stable patches added patches: net-ethernet-pcnet32-setup-the-sram-and-nouflo-on-am79c97-3-5.patch powerpc-mpc85xx-add-ranges-to-etsec2-nodes.patch --- diff --git a/queue-3.10/net-ethernet-pcnet32-setup-the-sram-and-nouflo-on-am79c97-3-5.patch b/queue-3.10/net-ethernet-pcnet32-setup-the-sram-and-nouflo-on-am79c97-3-5.patch new file mode 100644 index 00000000000..2e49269ed77 --- /dev/null +++ b/queue-3.10/net-ethernet-pcnet32-setup-the-sram-and-nouflo-on-am79c97-3-5.patch @@ -0,0 +1,96 @@ +From 87f966d97b89774162df04d2106c6350c8fe4cb3 Mon Sep 17 00:00:00 2001 +From: Markos Chandras +Date: Thu, 19 Mar 2015 10:28:14 +0000 +Subject: net: ethernet: pcnet32: Setup the SRAM and NOUFLO on Am79C97{3, 5} + +From: Markos Chandras + +commit 87f966d97b89774162df04d2106c6350c8fe4cb3 upstream. + +On a MIPS Malta board, tons of fifo underflow errors have been observed +when using u-boot as bootloader instead of YAMON. The reason for that +is that YAMON used to set the pcnet device to SRAM mode but u-boot does +not. As a result, the default Tx threshold (64 bytes) is now too small to +keep the fifo relatively used and it can result to Tx fifo underflow errors. +As a result of which, it's best to setup the SRAM on supported controllers +so we can always use the NOUFLO bit. + +Cc: +Cc: +Cc: Don Fry +Signed-off-by: Markos Chandras +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/ethernet/amd/pcnet32.c | 31 +++++++++++++++++++++++++++++-- + 1 file changed, 29 insertions(+), 2 deletions(-) + +--- a/drivers/net/ethernet/amd/pcnet32.c ++++ b/drivers/net/ethernet/amd/pcnet32.c +@@ -1516,7 +1516,7 @@ pcnet32_probe1(unsigned long ioaddr, int + { + struct pcnet32_private *lp; + int i, media; +- int fdx, mii, fset, dxsuflo; ++ int fdx, mii, fset, dxsuflo, sram; + int chip_version; + char *chipname; + struct net_device *dev; +@@ -1553,7 +1553,7 @@ pcnet32_probe1(unsigned long ioaddr, int + } + + /* initialize variables */ +- fdx = mii = fset = dxsuflo = 0; ++ fdx = mii = fset = dxsuflo = sram = 0; + chip_version = (chip_version >> 12) & 0xffff; + + switch (chip_version) { +@@ -1586,6 +1586,7 @@ pcnet32_probe1(unsigned long ioaddr, int + chipname = "PCnet/FAST III 79C973"; /* PCI */ + fdx = 1; + mii = 1; ++ sram = 1; + break; + case 0x2626: + chipname = "PCnet/Home 79C978"; /* PCI */ +@@ -1609,6 +1610,7 @@ pcnet32_probe1(unsigned long ioaddr, int + chipname = "PCnet/FAST III 79C975"; /* PCI */ + fdx = 1; + mii = 1; ++ sram = 1; + break; + case 0x2628: + chipname = "PCnet/PRO 79C976"; +@@ -1637,6 +1639,31 @@ pcnet32_probe1(unsigned long ioaddr, int + dxsuflo = 1; + } + ++ /* ++ * The Am79C973/Am79C975 controllers come with 12K of SRAM ++ * which we can use for the Tx/Rx buffers but most importantly, ++ * the use of SRAM allow us to use the BCR18:NOUFLO bit to avoid ++ * Tx fifo underflows. ++ */ ++ if (sram) { ++ /* ++ * The SRAM is being configured in two steps. First we ++ * set the SRAM size in the BCR25:SRAM_SIZE bits. According ++ * to the datasheet, each bit corresponds to a 512-byte ++ * page so we can have at most 24 pages. The SRAM_SIZE ++ * holds the value of the upper 8 bits of the 16-bit SRAM size. ++ * The low 8-bits start at 0x00 and end at 0xff. So the ++ * address range is from 0x0000 up to 0x17ff. Therefore, ++ * the SRAM_SIZE is set to 0x17. The next step is to set ++ * the BCR26:SRAM_BND midway through so the Tx and Rx ++ * buffers can share the SRAM equally. ++ */ ++ a->write_bcr(ioaddr, 25, 0x17); ++ a->write_bcr(ioaddr, 26, 0xc); ++ /* And finally enable the NOUFLO bit */ ++ a->write_bcr(ioaddr, 18, a->read_bcr(ioaddr, 18) | (1 << 11)); ++ } ++ + dev = alloc_etherdev(sizeof(*lp)); + if (!dev) { + ret = -ENOMEM; diff --git a/queue-3.10/powerpc-mpc85xx-add-ranges-to-etsec2-nodes.patch b/queue-3.10/powerpc-mpc85xx-add-ranges-to-etsec2-nodes.patch new file mode 100644 index 00000000000..ad46810d71d --- /dev/null +++ b/queue-3.10/powerpc-mpc85xx-add-ranges-to-etsec2-nodes.patch @@ -0,0 +1,55 @@ +From bb344ca5b90df62b1a3b7a35c6a9d00b306a170d Mon Sep 17 00:00:00 2001 +From: Scott Wood +Date: Wed, 17 Dec 2014 19:06:31 -0600 +Subject: powerpc/mpc85xx: Add ranges to etsec2 nodes + +From: Scott Wood + +commit bb344ca5b90df62b1a3b7a35c6a9d00b306a170d upstream. + +Commit 746c9e9f92dd "of/base: Fix PowerPC address parsing hack" limited +the applicability of the workaround whereby a missing ranges is treated +as an empty ranges. This workaround was hiding a bug in the etsec2 +device tree nodes, which have children with reg, but did not have +ranges. + +Signed-off-by: Scott Wood +Reported-by: Alexander Graf +Signed-off-by: Greg Kroah-Hartman + +--- + arch/powerpc/boot/dts/fsl/pq3-etsec2-0.dtsi | 1 + + arch/powerpc/boot/dts/fsl/pq3-etsec2-1.dtsi | 1 + + arch/powerpc/boot/dts/fsl/pq3-etsec2-2.dtsi | 1 + + 3 files changed, 3 insertions(+) + +--- a/arch/powerpc/boot/dts/fsl/pq3-etsec2-0.dtsi ++++ b/arch/powerpc/boot/dts/fsl/pq3-etsec2-0.dtsi +@@ -50,6 +50,7 @@ ethernet@b0000 { + fsl,num_tx_queues = <0x8>; + fsl,magic-packet; + local-mac-address = [ 00 00 00 00 00 00 ]; ++ ranges; + + queue-group@b0000 { + #address-cells = <1>; +--- a/arch/powerpc/boot/dts/fsl/pq3-etsec2-1.dtsi ++++ b/arch/powerpc/boot/dts/fsl/pq3-etsec2-1.dtsi +@@ -50,6 +50,7 @@ ethernet@b1000 { + fsl,num_tx_queues = <0x8>; + fsl,magic-packet; + local-mac-address = [ 00 00 00 00 00 00 ]; ++ ranges; + + queue-group@b1000 { + #address-cells = <1>; +--- a/arch/powerpc/boot/dts/fsl/pq3-etsec2-2.dtsi ++++ b/arch/powerpc/boot/dts/fsl/pq3-etsec2-2.dtsi +@@ -49,6 +49,7 @@ ethernet@b2000 { + fsl,num_tx_queues = <0x8>; + fsl,magic-packet; + local-mac-address = [ 00 00 00 00 00 00 ]; ++ ranges; + + queue-group@b2000 { + #address-cells = <1>; diff --git a/queue-3.10/series b/queue-3.10/series index a0420c5d803..7b44af73ed5 100644 --- a/queue-3.10/series +++ b/queue-3.10/series @@ -19,3 +19,5 @@ perf-fix-irq_work-tail-recursion.patch vt6655-rfbsetpower-fix-missing-rate-rate_12m.patch dm-hold-suspend_lock-while-suspending-device-during-device-deletion.patch hfsplus-fix-b-tree-corruption-after-insertion-at-position-0.patch +powerpc-mpc85xx-add-ranges-to-etsec2-nodes.patch +net-ethernet-pcnet32-setup-the-sram-and-nouflo-on-am79c97-3-5.patch