| To: | Brian Murphy <brian@murphy.dk> |
|---|---|
| Subject: | [PATCH 2.4] Re: ide-dma bug (cache flushing) |
| From: | Brian Murphy <brian@murphy.dk> |
| Date: | Thu, 12 Sep 2002 22:15:11 +0200 |
| Cc: | linux-mips <linux-mips@linux-mips.org> |
| Original-recipient: | rfc822;linux-mips@linux-mips.org |
| References: | <3D7FAB4A.4010802@murphy.dk> |
| Sender: | linux-mips-bounce@linux-mips.org |
| User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020623 Debian/1.0.0-0.woody.1 |
It seems like this problem is (yet again) caused by lack of cache flushing. The attached patch adds a dma_cache_wback_inv to pci_map_sg in pci.h to the if fork in which sg->address is not set. This fixes my problem. Can someone with commit access please apply this patch? /Brian Index: include/asm-mips/pci.h
===================================================================
RCS file: /cvs/linux-mips/include/asm-mips/pci.h,v
retrieving revision 1.1.1.2
diff -u -r1.1.1.2 pci.h
--- include/asm-mips/pci.h 19 Aug 2002 18:00:29 -0000 1.1.1.2
+++ include/asm-mips/pci.h 12 Sep 2002 20:06:31 -0000
@@ -200,9 +200,13 @@
dma_cache_wback_inv((unsigned long)sg->address,
sg->length);
sg->dma_address = bus_to_baddr(hwdev,
__pa(sg->address));
- } else
+ } else {
sg->dma_address = page_to_bus(sg->page) +
sg->offset;
+ dma_cache_wback_inv(
+ (unsigned long)(page_address(sg->page)+
+ sg->offset), sg->length);
+ }
}
return nents;
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | patch for pci.c, Yoichi Yuasa |
|---|---|
| Next by Date: | tools for modifying dwarf symbols, Gerald Champagne |
| Previous by Thread: | ide-dma bug, Brian Murphy |
| Next by Thread: | memcpy, Carsten Langgaard |
| Indexes: | [Date] [Thread] [Top] [All Lists] |