mpc83xx: add support for kernel 3.14
[openwrt/staging/chunkeey.git] / target / linux / mpc83xx / patches-3.14 / 111-etsec27_war.patch
1 --- a/drivers/net/ethernet/freescale/gianfar.c
2 +++ b/drivers/net/ethernet/freescale/gianfar.c
3 @@ -1050,10 +1050,16 @@ static int gfar_probe(struct platform_de
4 udelay(2);
5
6 tempval = 0;
7 - if (!priv->pause_aneg_en && priv->tx_pause_en)
8 - tempval |= MACCFG1_TX_FLOW;
9 - if (!priv->pause_aneg_en && priv->rx_pause_en)
10 - tempval |= MACCFG1_RX_FLOW;
11 + /*
12 + * Do not enable flow control on chips earlier than rev 1.1,
13 + * because of the eTSEC27 erratum
14 + */
15 + if ((mfspr(SPRN_SVR) & 0xffff) >= 0x0011) {
16 + if (!priv->pause_aneg_en && priv->tx_pause_en)
17 + tempval |= MACCFG1_TX_FLOW;
18 + if (!priv->pause_aneg_en && priv->rx_pause_en)
19 + tempval |= MACCFG1_RX_FLOW;
20 + }
21 /* the soft reset bit is not self-resetting, so we need to
22 * clear it before resuming normal operation
23 */