]> err.no Git - linux-2.6/commitdiff
tc35815: Fix an usage of streaming DMA API.
authorAtsushi Nemoto <anemo@mba.ocn.ne.jp>
Tue, 13 Mar 2007 16:02:20 +0000 (01:02 +0900)
committerJeff Garzik <jeff@garzik.org>
Sat, 28 Apr 2007 15:00:58 +0000 (11:00 -0400)
The tc35815 driver lacks a call to pci_dma_sync_single_for_device() on
receiving.  Recent fix of MIPS dma_sync_single_for_cpu() reveal this
bug.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/net/tc35815.c

index 1a1b74c956bdf81c385ae89f3b8ff8865fb92100..b269b187b55fb8c3de874cba446a86222f4c36d7 100644 (file)
  *     1.34    Fix netpoll locking.  "BH rule" for NAPI is not enough with
  *             netpoll, hard_start_xmit might be called from irq context.
  *             PM support.
+ *     1.35    Fix an usage of streaming DMA API.
  */
 
 #ifdef TC35815_NAPI
-#define DRV_VERSION    "1.34-NAPI"
+#define DRV_VERSION    "1.35-NAPI"
 #else
-#define DRV_VERSION    "1.34"
+#define DRV_VERSION    "1.35"
 #endif
 static const char *version = "tc35815.c:v" DRV_VERSION "\n";
 #define MODNAME                        "tc35815"
@@ -1550,6 +1551,11 @@ tc35815_rx(struct net_device *dev)
                                                            PCI_DMA_FROMDEVICE);
 #endif
                                memcpy(data + offset, rxbuf, len);
+#ifdef TC35815_DMA_SYNC_ONDEMAND
+                               pci_dma_sync_single_for_device(lp->pci_dev,
+                                                              dma, len,
+                                                              PCI_DMA_FROMDEVICE);
+#endif
                                offset += len;
                                cur_bd++;
                        }