netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] xgmac: use bufsz not dma_buf_sz in rx_refill
@ 2013-08-29 20:11 Kyle McMartin
  2013-08-29 20:24 ` Rob Herring
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Kyle McMartin @ 2013-08-29 20:11 UTC (permalink / raw)
  To: rob.herring; +Cc: netdev

Noticed while debugging another issue that DMA debug turned up, looks
like commit ef468d23 missed a case when switching to bufsz instead of
priv->dma_buf_sz? (tbf, the whole handling of DMA buffers seems slightly
suspect since we're not tracking the size, but trusting the hardware
between map and unmap...)

Signed-off-by: Kyle McMartin <kyle@redhat.com>

--- a/drivers/net/ethernet/calxeda/xgmac.c
+++ b/drivers/net/ethernet/calxeda/xgmac.c
@@ -686,7 +686,7 @@ static void xgmac_rx_refill(struct xgmac_priv *priv)
 			priv->rx_skbuff[entry] = skb;
 			paddr = dma_map_single(priv->device, skb->data,
 					       bufsz, DMA_FROM_DEVICE);
-			desc_set_buf_addr(p, paddr, priv->dma_buf_sz);
+			desc_set_buf_addr(p, paddr, bufsz);
 		}
 
 		netdev_dbg(priv->dev, "rx ring: head %d, tail %d\n",

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-08-30  3:17 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-29 20:11 [PATCH] xgmac: use bufsz not dma_buf_sz in rx_refill Kyle McMartin
2013-08-29 20:24 ` Rob Herring
2013-08-29 20:26   ` Kyle McMartin
2013-08-29 20:38   ` David Miller
2013-08-29 20:31 ` Sergei Shtylyov
2013-08-29 20:34 ` David Miller
2013-08-29 20:35   ` Kyle McMartin
2013-08-29 20:38     ` David Miller
2013-08-30  3:17       ` Rob Herring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).