From: Krzysztof Halasa Date: Tue, 14 Jul 2009 11:01:54 +0000 (+0000) Subject: E100: work around the driver using streaming DMA mapping for RX descriptors. X-Git-Tag: v2.6.31-rc4~11^2~28 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=303d67c288319768b19ed8dbed429fef7eb7c275;p=~shefty%2Frdma-dev.git E100: work around the driver using streaming DMA mapping for RX descriptors. E100 places it's RX packet descriptors inside skb->data and uses them with bidirectional streaming DMA mapping. Unfortunately it fails to transfer skb->data ownership to the device after it reads the descriptor's status, breaking on non-coherent (e.g., ARM) platforms. This have to be converted to use coherent memory for the descriptors. Signed-off-by: Krzysztof Halasa Acked-by: Jeff Kirsher Signed-off-by: David S. Miller --- diff --git a/drivers/net/e100.c b/drivers/net/e100.c index efa680f4b8d..41b648a67fe 100644 --- a/drivers/net/e100.c +++ b/drivers/net/e100.c @@ -1897,6 +1897,9 @@ static int e100_rx_indicate(struct nic *nic, struct rx *rx, if (ioread8(&nic->csr->scb.status) & rus_no_res) nic->ru_running = RU_SUSPENDED; + pci_dma_sync_single_for_device(nic->pdev, rx->dma_addr, + sizeof(struct rfd), + PCI_DMA_BIDIRECTIONAL); return -ENODATA; }