Skip to content

Commit

Permalink
net: calxedaxgmac: drop some unnecessary register writes
Browse files Browse the repository at this point in the history
The interrupts have already been cleared, so we don't need to clear them
again. Also, we could miss interrupts if they are cleared, but we don't
process the packet.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Rob Herring authored and David S. Miller committed Nov 7, 2012
1 parent 0ec6d34 commit 9169963
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions drivers/net/ethernet/calxeda/xgmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -846,9 +846,6 @@ static void xgmac_free_dma_desc_rings(struct xgmac_priv *priv)
static void xgmac_tx_complete(struct xgmac_priv *priv)
{
int i;
void __iomem *ioaddr = priv->base;

writel(DMA_STATUS_TU | DMA_STATUS_NIS, ioaddr + XGMAC_DMA_STATUS);

while (dma_ring_cnt(priv->tx_head, priv->tx_tail, DMA_TX_RING_SZ)) {
unsigned int entry = priv->tx_tail;
Expand Down Expand Up @@ -1139,9 +1136,6 @@ static int xgmac_rx(struct xgmac_priv *priv, int limit)
struct sk_buff *skb;
int frame_len;

writel(DMA_STATUS_RI | DMA_STATUS_NIS,
priv->base + XGMAC_DMA_STATUS);

entry = priv->rx_tail;
p = priv->dma_rx + entry;
if (desc_get_owner(p))
Expand Down

0 comments on commit 9169963

Please sign in to comment.