Thread (5 messages) 5 messages, 4 authors, 2008-11-14

Re: Validation of DMA params breaks e100 driver (2.6.28-rc2)

From: Anders Grafström <hidden>
Date: 2008-11-14 20:37:33

Brandeburg, Jesse wrote:
On Fri, 31 Oct 2008, Russell King - ARM Linux wrote:
quoted
On Thu, Oct 30, 2008 at 05:27:59PM +0100, Anders Grafström wrote:
quoted
The e100 driver triggers BUG_ON(buf->direction != dir)
by doing pci_map_single(..., PCI_DMA_BIDIRECTIONAL)
and pci_dma_sync_single_for_device(..., PCI_DMA_TODEVICE).

I'm guessing it's allowed to do that and that something like
the patch below is called for?
No, it is not allowed to do that - that's why it's called "BUG_ON".
Changing the DMA direction, especially with dmabounce will result
in unexpected behaviour.
okay, how about this patch...  only compile tested as I couldn't get 
net-next-2.6 to boot on my test machine.  I'll get some testing done on 
this, but in the meantime....

e100: fix dma error in direction for mapping

From: Jesse Brandeburg <redacted>
I failed to save this patch (flowed format?) but I applied it manually
to 2.6.28-rc4 and tried it. Appears to work.


-------------------------------------------------------------------
List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernel
FAQ:        http://www.arm.linux.org.uk/mailinglists/faq.php
Etiquette:  http://www.arm.linux.org.uk/mailinglists/etiquette.php
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help