Skip to contentSkip to conversation

mv643xx_eth: Unmap DMA buffers in receive path

PATCH Dale Farnsworth 2 participants 3 messages Sep 12, 2006 – Sep 13, 2006

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

From: Dale Farnsworth <[email protected]>

Fix a missing call to dma_unmap_single() in the receive path. Without this call, errors have been observed on non-cache-coherent systems.

Signed-off-by Dale Farnsworth <[email protected]>

---

 drivers/net/mv643xx_eth.c |    2 ++
 1 file changed, 2 insertions(+)
drivers/net/mv643xx_eth.c +2 -0
Index: linux-2.6.10/drivers/net/mv643xx_eth.c
===================================================================
@@ -402,6 +402,8 @@ static int mv643xx_eth_receive_queue(str
 #else
 	while (eth_port_receive(mp, &pkt_info) == ETH_OK) {
 #endif
+		dma_unmap_single(NULL, pkt_info.buf_ptr, RX_SKB_SIZE,
+							DMA_FROM_DEVICE);
 		mp->rx_desc_count--;
 		received_packets++;
 
#1 lore raw
Quoted 11 lines · Dale Farnsworth

From: Dale Farnsworth <[email protected]>

Fix a missing call to dma_unmap_single() in the receive path. Without this call, errors have been observed on non-cache-coherent systems.

Signed-off-by Dale Farnsworth <[email protected]>

---

 drivers/net/mv643xx_eth.c |    2 ++
 1 file changed, 2 insertions(+)

ACK, but

[jgarzik@pretzel netdev-2.6]$ git-applymbox /g/tmp/mbox ~/info/signoff.txt 1 patch(es) to process.

Applying 'mv643xx_eth: Unmap DMA buffers in receive path'

error: patch failed: drivers/net/mv643xx_eth.c:402
error: drivers/net/mv643xx_eth.c: patch does not apply

#2 lore raw

PATCH mv643xx_eth: Unmap DMA buffers in receive path

From: Dale Farnsworth <[email protected]>

Fix a missing call to dma_unmap_single() in the receive path. Without this call, errors have been observed on non-cache-coherent systems.

Signed-off-by Dale Farnsworth <[email protected]>

---

Quoted 3 lines

ACK, but
error: patch failed: drivers/net/mv643xx_eth.c:402
error: drivers/net/mv643xx_eth.c: patch does not apply

Sorry. Patch was against an old version.
This one's current.

-Dale

 drivers/net/mv643xx_eth.c |    2 ++
  1 file changed, 2 insertions(+)
drivers/net/mv643xx_eth.c +2 -0
index 760c61b..eeab1df 100644
@@ -385,6 +385,8 @@ static int mv643xx_eth_receive_queue(str
 	struct pkt_info pkt_info;
 
 	while (budget-- > 0 && eth_port_receive(mp, &pkt_info) == ETH_OK) {
+		dma_unmap_single(NULL, pkt_info.buf_ptr, RX_SKB_SIZE,
+							DMA_FROM_DEVICE);
 		mp->rx_desc_count--;
 		received_packets++;