]> rtime.felk.cvut.cz Git - zynq/linux.git/commit
net: xilinx_drivers: Fix DMA map size bug
authorMichal Simek <monstr@monstr.eu>
Thu, 9 Jun 2011 13:25:52 +0000 (15:25 +0200)
committerJohn Linn <john.linn@xilinx.com>
Wed, 30 Nov 2011 04:32:49 +0000 (20:32 -0800)
commitb43b452ce6e20dc88a545bae02e2cb33128662cf
treee6966d615050f335df451cd2dbfedce6f41b63ff
parentf9359a6d375d18c2cfed2f27f4a1a25631c9fd23
net: xilinx_drivers: Fix DMA map size bug

axi_ethernet come from ll_temac that's why both drivers
contain the same fault. DMA allocate skb->len instead of
headlen which is used for DMA.

LOG for axi ethernet:
------------[ cut here ]------------
WARNING: at lib/dma-debug.c:812 check_unmap+0x328/0x814()
xilinx_axienet 40c40000.axi-ethernet: DMA-API: device driver
frees DMA memory with different size [device address=0x00000000cea64e5e]
[map size=322 bytes] [unmap size=66 bytes]
Modules linked in:
Kernel Stack:
...
Call Trace:
[<c0004428>] microblaze_unwind+0x54/0x78
[<c0004134>] show_stack+0x120/0x158
[<c0004174>] dump_stack+0x8/0x20
[<c0011b84>] warn_slowpath_common+0x80/0xbc
[<c0011c4c>] warn_slowpath_fmt+0x28/0x40
[<c0144b04>] check_unmap+0x31c/0x814
[<c0145140>] debug_dma_unmap_page+0x98/0xcc
[<c01865f8>] axienet_tx_irq+0xd4/0x290
[<c00429ec>] handle_IRQ_event+0x2c/0x12c
[<c004552c>] handle_level_irq+0xb4/0x130
[<c0001ef0>] do_IRQ+0x90/0xf8
[<c00069d0>] _interrupt+0x170/0x174

---[ end trace 91389daf999a9686 ]---

Signed-off-by: Michal Simek <monstr@monstr.eu>
drivers/net/ll_temac_main.c
drivers/net/xilinx_axienet_main.c