patch-2.1.121 linux/drivers/acorn/scsi/powertec.c

Next file: linux/drivers/block/floppy.c
Previous file: linux/drivers/acorn/scsi/eesox.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.120/linux/drivers/acorn/scsi/powertec.c linux/drivers/acorn/scsi/powertec.c
@@ -154,13 +154,10 @@
 {
 	unsigned int page;
 
-	if (direction == DMA_OUT) {
-		for (page = (unsigned int) addr; len > 0;
-		     page += PAGE_SIZE, len -= PAGE_SIZE)
-			flush_page_to_ram(page);
-	} else
-		flush_cache_range(current->mm, (unsigned long)addr,
-				  (unsigned long)addr + len);
+	if (direction == DMA_OUT)
+		dma_cache_wback((unsigned long)addr, (unsigned long)len);
+	else
+		dma_cache_inv((unsigned long)addr, (unsigned long)len);
 }
 
 /* Prototype: fasdmatype_t powertecscsi_dma_setup(host, SCpnt, direction, min_type)

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov