Skip to content
Commit 3361dc95 authored by Mikulas Patocka's avatar Mikulas Patocka Committed by David S. Miller
Browse files

skge: fix invalid value passed to pci_unmap_sigle



In my patch c194992c ("skge: fix
broken driver") I didn't fix the skge bug correctly. The value of the
new mapping (not old) was passed to pci_unmap_single.

If we enable CONFIG_DMA_API_DEBUG, it results in this warning:
WARNING: CPU: 0 PID: 0 at lib/dma-debug.c:986 check_sync+0x4c4/0x580()
skge 0000:02:07.0: DMA-API: device driver tries to sync DMA memory it has
not allocated [device address=0x000000023a0096c0] [size=1536 bytes]

This patch makes the skge driver pass the correct value to
pci_unmap_single and fixes the warning. It copies the old descriptor to
on-stack variable "ee" and unmaps it if mapping of the new descriptor
succeeded.

This patch should be backported to 3.11-stable.

Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
Reported-by: default avatarFrancois Romieu <romieu@fr.zoreil.com>
Tested-by: default avatarMikulas Patocka <mpatocka@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 8d65b119
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment