summaryrefslogtreecommitdiffstats
path: root/drivers/net/pasemi_mac.c
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2007-10-02 16:26:30 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 16:54:24 -0700
commit9a50bebda95745d312c69d3bb6d788067cbefb84 (patch)
tree5aaa75097fb0b62b22c0d833282fcb28a49a9d5c /drivers/net/pasemi_mac.c
parentad3c20d1ab586884f1815c315e3f303a8b8a7d7d (diff)
downloadop-kernel-dev-9a50bebda95745d312c69d3bb6d788067cbefb84.zip
op-kernel-dev-9a50bebda95745d312c69d3bb6d788067cbefb84.tar.gz
pasemi_mac: workaround for erratum 5971
pasemi_mac: workaround for erratum 5971 Implement workarounds for erratum 5971, where L2 hints aren't considered properly unless the way hint is enabled on the interface. Since L2 isn't setup to dedicate a way to headers, we need to reset the packet count by hand so it won't run out of credits. Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/pasemi_mac.c')
-rw-r--r--drivers/net/pasemi_mac.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/net/pasemi_mac.c b/drivers/net/pasemi_mac.c
index 5eb5e47..c538c66 100644
--- a/drivers/net/pasemi_mac.c
+++ b/drivers/net/pasemi_mac.c
@@ -239,7 +239,9 @@ static int pasemi_mac_setup_rx_resources(struct net_device *dev)
PAS_DMA_RXINT_BASEU_SIZ(RX_RING_SIZE >> 3));
write_dma_reg(mac, PAS_DMA_RXINT_CFG(mac->dma_if),
- PAS_DMA_RXINT_CFG_DHL(2));
+ PAS_DMA_RXINT_CFG_DHL(3) |
+ PAS_DMA_RXINT_CFG_L2 |
+ PAS_DMA_RXINT_CFG_LW);
ring->next_to_fill = 0;
ring->next_to_clean = 0;
@@ -589,6 +591,11 @@ static int pasemi_mac_clean_rx(struct pasemi_mac *mac, int limit)
n += 2;
}
+ if (n > RX_RING_SIZE) {
+ /* Errata 5971 workaround: L2 target of headers */
+ write_iob_reg(mac, PAS_IOB_COM_PKTHDRCNT, 0);
+ n &= (RX_RING_SIZE-1);
+ }
mac->rx->next_to_clean = n;
pasemi_mac_replenish_rx_ring(mac->netdev, limit-count);
OpenPOWER on IntegriCloud