aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/gianfar.c19
-rw-r--r--drivers/net/gianfar.h1
2 files changed, 20 insertions, 0 deletions
diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c
index cee8ae714731..c2fabc1853ad 100644
--- a/drivers/net/gianfar.c
+++ b/drivers/net/gianfar.c
@@ -942,6 +942,11 @@ static void gfar_detect_errata(struct gfar_private *priv)
942 (pvr == 0x80861010 && (mod & 0xfff9) == 0x80c0)) 942 (pvr == 0x80861010 && (mod & 0xfff9) == 0x80c0))
943 priv->errata |= GFAR_ERRATA_74; 943 priv->errata |= GFAR_ERRATA_74;
944 944
945 /* MPC8313 and MPC837x all rev */
946 if ((pvr == 0x80850010 && mod == 0x80b0) ||
947 (pvr == 0x80861010 && (mod & 0xfff9) == 0x80c0))
948 priv->errata |= GFAR_ERRATA_76;
949
945 if (priv->errata) 950 if (priv->errata)
946 dev_info(dev, "enabled errata workarounds, flags: 0x%x\n", 951 dev_info(dev, "enabled errata workarounds, flags: 0x%x\n",
947 priv->errata); 952 priv->errata);
@@ -2011,6 +2016,20 @@ static int gfar_start_xmit(struct sk_buff *skb, struct net_device *dev)
2011 unsigned int nr_frags, nr_txbds, length; 2016 unsigned int nr_frags, nr_txbds, length;
2012 union skb_shared_tx *shtx; 2017 union skb_shared_tx *shtx;
2013 2018
2019 /*
2020 * TOE=1 frames larger than 2500 bytes may see excess delays
2021 * before start of transmission.
2022 */
2023 if (unlikely(gfar_has_errata(priv, GFAR_ERRATA_76) &&
2024 skb->ip_summed == CHECKSUM_PARTIAL &&
2025 skb->len > 2500)) {
2026 int ret;
2027
2028 ret = skb_checksum_help(skb);
2029 if (ret)
2030 return ret;
2031 }
2032
2014 rq = skb->queue_mapping; 2033 rq = skb->queue_mapping;
2015 tx_queue = priv->tx_queue[rq]; 2034 tx_queue = priv->tx_queue[rq];
2016 txq = netdev_get_tx_queue(dev, rq); 2035 txq = netdev_get_tx_queue(dev, rq);
diff --git a/drivers/net/gianfar.h b/drivers/net/gianfar.h
index 0a0483ce21d2..c414374f407f 100644
--- a/drivers/net/gianfar.h
+++ b/drivers/net/gianfar.h
@@ -1027,6 +1027,7 @@ struct gfar_priv_grp {
1027 1027
1028enum gfar_errata { 1028enum gfar_errata {
1029 GFAR_ERRATA_74 = 0x01, 1029 GFAR_ERRATA_74 = 0x01,
1030 GFAR_ERRATA_76 = 0x02,
1030}; 1031};
1031 1032
1032/* Struct stolen almost completely (and shamelessly) from the FCC enet source 1033/* Struct stolen almost completely (and shamelessly) from the FCC enet source