From: khc@pm.waw.pl (Krzysztof Halasa)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 5/10] ARM: fix DMA-bounce code to allow sync from_device and to_device with bidirectional mappings.
Date: Thu, 20 Sep 2012 22:19:40 +0200 [thread overview]
Message-ID: <m3ipb830rn.fsf@intrepid.localdomain> (raw)
In-Reply-To: <m3txus4hgm.fsf@intrepid.localdomain> (Krzysztof Halasa's message of "Thu, 20 Sep 2012 21:33:45 +0200")
Signed-off-by: Krzysztof Ha?asa <khc@pm.waw.pl>
--- a/arch/arm/common/dmabounce.c
+++ b/arch/arm/common/dmabounce.c
@@ -375,7 +375,7 @@ static int __dmabounce_sync_for_cpu(struct device *dev, dma_addr_t addr,
off = addr - buf->safe_dma_addr;
- BUG_ON(buf->direction != dir);
+ BUG_ON(buf->direction != dir && buf->direction != DMA_BIDIRECTIONAL);
dev_dbg(dev, "%s: unsafe buffer %p (dma=%#x off=%#lx) mapped to %p (dma=%#x)\n",
__func__, buf->ptr, virt_to_dma(dev, buf->ptr), off,
@@ -415,7 +415,7 @@ static int __dmabounce_sync_for_device(struct device *dev, dma_addr_t addr,
off = addr - buf->safe_dma_addr;
- BUG_ON(buf->direction != dir);
+ BUG_ON(buf->direction != dir && buf->direction != DMA_BIDIRECTIONAL);
dev_dbg(dev, "%s: unsafe buffer %p (dma=%#x off=%#lx) mapped to %p (dma=%#x)\n",
__func__, buf->ptr, virt_to_dma(dev, buf->ptr), off,
--
Krzysztof Halasa
next prev parent reply other threads:[~2012-09-20 20:19 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-20 19:33 My collection of IXP4xx patches for the next window Krzysztof Halasa
2012-09-20 20:16 ` [PATCH 1/10] IXP4xx: Fix Goramo MultiLink platform compilation Krzysztof Halasa
2012-09-20 20:16 ` [PATCH 2/10] IXP4xx: Fix off-by-one bug in Goramo MultiLink platform Krzysztof Halasa
2012-09-20 20:17 ` [PATCH 3/10] IXP4xx: HW pseudo-random generator is available on IXP45x/46x only Krzysztof Halasa
2012-09-20 20:18 ` [PATCH 4/10] IXP4xx: ixp4xx_crypto driver requires Queue Manager and NPE drivers Krzysztof Halasa
2012-09-20 20:19 ` Krzysztof Halasa [this message]
2012-09-20 20:19 ` [PATCH 6/10] IXP4xx: Remove time limit for PCI TRDY to enable use of slow devices Krzysztof Halasa
2012-09-20 20:19 ` [PATCH 7/10] WAN: Remove redundant HDLC info printed by IXP4xx HSS driver Krzysztof Halasa
2012-09-20 20:21 ` [PATCH 8/10] IXP4xx crypto: MOD_AES{128, 192, 256} already include key size Krzysztof Halasa
2012-09-20 20:21 ` [PATCH 9/10] IXP4xx: Always ioremap() Queue Manager MMIO region at boot Krzysztof Halasa
2012-09-20 20:21 ` [PATCH 10/10] IXP4xx: map CPU config registers within VMALLOC region Krzysztof Halasa
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=m3ipb830rn.fsf@intrepid.localdomain \
--to=khc@pm.waw.pl \
--cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).