Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Brian Murphy <brian@murphy.dk>
To: Brian Murphy <brian@murphy.dk>
Cc: linux-mips <linux-mips@linux-mips.org>
Subject: [PATCH 2.4] Re: ide-dma bug (cache flushing)
Date: Thu, 12 Sep 2002 22:15:11 +0200	[thread overview]
Message-ID: <3D80F5CF.1040905@murphy.dk> (raw)
In-Reply-To: 3D7FAB4A.4010802@murphy.dk

[-- Attachment #1: Type: text/plain, Size: 283 bytes --]

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

[-- Attachment #2: flush.patch --]
[-- Type: text/plain, Size: 721 bytes --]

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;

  reply	other threads:[~2002-09-12 20:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-11 20:44 ide-dma bug Brian Murphy
2002-09-12 20:15 ` Brian Murphy [this message]
2002-10-01 10:17   ` [PATCH 2.4] Re: ide-dma bug (cache flushing) Carsten Langgaard
2002-10-01 11:15     ` Ralf Baechle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3D80F5CF.1040905@murphy.dk \
    --to=brian@murphy.dk \
    --cc=linux-mips@linux-mips.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox