Thread (14 messages) 14 messages, 5 authors, 2008-07-02

Re: [PATCH] Fix e100 on systems that have cache incoherent DMA

From: Anders Grafström <hidden>
Date: 2008-06-18 18:54:20
Subsystem: networking drivers, the rest · Maintainers: Andrew Lunn, "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Linus Torvalds

quoted
quoted
David Acker wrote:
quoted
What is the status of this patch?
Jeff merged it in netdev-2.6#upstream so it is queued for 2.6.25.
The e100 driver broke in 2.6.25 on the ixp4xx based platform I'm using.
This patch seems to be the cause.

It appears to work again with pci_dma_sync_single_for_device() restored.
So I'm wondering if the patch below would be valid and correct?

Anders
diff --git a/drivers/net/e100.c b/drivers/net/e100.c
index f3cba5e..1037b13 100644
--- a/drivers/net/e100.c
+++ b/drivers/net/e100.c
@@ -1803,6 +1803,8 @@ static int e100_rx_alloc_skb(struct nic *nic, struct rx *rx)
  	if (rx->prev->skb) {
  		struct rfd *prev_rfd = (struct rfd *)rx->prev->skb->data;
  		put_unaligned_le32(rx->dma_addr, &prev_rfd->link);
+		pci_dma_sync_single_for_device(nic->pdev, rx->prev->dma_addr,
+			sizeof(struct rfd), PCI_DMA_TODEVICE);
  	}

  	return 0;

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help