summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorAlex Gonzalez <alex.gonzalez@digi.com>2011-08-09 16:37:38 +0200
committerAlex Gonzalez <alex.gonzalez@digi.com>2011-08-09 16:37:38 +0200
commitf8493d7c13d83d99c300403dbe075555d806b510 (patch)
tree764267b3d4510f89eebf58accdeb55f29c02a6c2 /drivers/net
parentf132ad28c29d66fe729837ab2d9b72ed9528f452 (diff)
mx28: Improved FEC patch for the packets bigger than MTU issue.
Freescale support confirmed that the delay is needed to allow for the slow MX28 bus to DMA the data. This empirically improved patch gives better performance than a single delay. Also, I confirmed with the SarOS team they have a similar patch in the same place. Signed-off-by: Alex Gonzalez <alex.gonzalez@digi.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/fec.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/net/fec.c b/drivers/net/fec.c
index 9077b81c71b0..69ab4ec7f990 100644
--- a/drivers/net/fec.c
+++ b/drivers/net/fec.c
@@ -250,6 +250,7 @@ fec_enet_start_xmit(struct sk_buff *skb, struct net_device *dev)
unsigned short status;
unsigned long estatus;
unsigned long flags;
+ int i = 0;
if (!fep->link) {
/* Link is down or autonegotiation is in progress. */
@@ -325,10 +326,18 @@ fec_enet_start_xmit(struct sk_buff *skb, struct net_device *dev)
| BD_ENET_TX_LAST | BD_ENET_TX_TC);
bdp->cbd_sc = status;
+#ifdef CONFIG_ARCH_MXS
+ /* Trigger transmission start */
+ writel(0, fep->hwp + FEC_X_DES_ACTIVE);
+ while ( i++ < 5 ) {
+ while (readl(fep->hwp + FEC_X_DES_ACTIVE) == 1)
+ continue;
+ udelay(10);
+ writel(0, fep->hwp + FEC_X_DES_ACTIVE);
+ }
+#else
/* Trigger transmission start */
writel(0, fep->hwp + FEC_X_DES_ACTIVE);
-#ifdef CONFIG_ARCH_MXS
- udelay(100);
#endif
/* If this was the last BD in the ring, start at the beginning again. */