From: Kevin Hao Date: Sat, 21 Jun 2008 10:20:35 +0000 (+0800) Subject: e100: Do pci_dma_sync after skb_alloc for proper operation on ixp4xx X-Git-Tag: v2.6.26-rc9~84^2~33 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1923815d855e1daec931fc9f2221fb73ca708870;p=linux-2.6 e100: Do pci_dma_sync after skb_alloc for proper operation on ixp4xx The E100 device can't work on current kernel (2.6.26-rc6) and will cause kernel corruption on intel ixdp4xx. Signed-off-by: Jeff Garzik --- diff --git a/drivers/net/e100.c b/drivers/net/e100.c index f3cba5e24e..1037b13323 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;