linux/drivers
Mikulas Patocka ff236f7af8 sunhme: fix dma warning in Sun HME
Fix dma-api-checking warnings in Sun HME

Sun HME driver is mapping the first fragment with dma_map_single and subsequent
fragments with dma_map_page. It is unmapping all fragments with dma_unmap_single
and that produces the warning.

This patch changes it so that it unmaps only the first fragment with
dma_unmap_single and subsequent fragments are unmapped with dma_unmap_page.

WARNING: at lib/dma-debug.c:816 check_unmap+0x3ac/0x780()
hme 0000:01:01.1: DMA-API: device driver frees DMA memory with wrong function [device address=0x00000000c1082000] [size=32 bytes] [mapped as page] [unmapped as single]
Modules linked in: nbd sunhme openpromfs sermouse unix
Call Trace:
 [0000000000456910] warn_slowpath_common+0x50/0xa0
 [0000000000571f4c] check_unmap+0x3ac/0x780
 [0000000000572570] debug_dma_unmap_page+0x50/0x60
 [000000001002f5fc] happy_meal_tx+0x11c/0x260 [sunhme]
 [000000001002fc4c] happy_meal_interrupt+0xcc/0xe0 [sunhme]
 [0000000000492d94] handle_fasteoi_irq+0x74/0x100
 [000000000042ac0c] handler_irq+0xcc/0x100
 [0000000000426a54] valid_addr_bitmap_patch+0x14/0x1c0
 [0000000000665de0] _spin_unlock_irqrestore+0x40/0x60
 [0000000000462bb8] mod_timer+0x118/0x1a0
 [00000000005ec254] sk_reset_timer+0x14/0x40
 [0000000000635e4c] tcp_event_new_data_sent+0x8c/0xc0
 [0000000000639374] __tcp_push_pending_frames+0x34/0xc0
---[ end trace 73d5c42c1e9f11c4 ]---
Mapped at:
 [<000000001002f148>] happy_meal_start_xmit+0x308/0x480 [sunhme]
 [<00000000005fc858>] dev_hard_start_xmit+0x318/0x3c0
 [<000000000060fec4>] sch_direct_xmit+0x1a4/0x200
 [<00000000005fced0>] dev_queue_xmit+0x410/0x560
 [<0000000000604a1c>] neigh_resolve_output+0xfc/0x300

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-02 22:26:38 -08:00
..
accessibility
acpi Merge branch 'thinkpad-2.6.32' into release 2009-11-25 00:43:08 -05:00
amba
ata sata_fsl: Split hard and soft reset 2009-11-19 18:18:17 -05:00
atm drivers/atm/solos-pci.c: fix warning/bug, clean up code 2009-11-18 05:03:32 -08:00
auxdisplay
base PM: fix irq enable/disable in runtime PM code 2009-11-29 16:51:27 +01:00
block cciss: make device attrs static 2009-11-13 08:47:53 +01:00
bluetooth fix memory leak in fixed btusb_close 2009-11-14 12:57:08 -08:00
cdrom
char tty_port: handle the nonblocking open of a dead port corner case 2009-11-30 16:38:25 -08:00
clocksource
connector
cpufreq [CPUFREQ] Fix stale cpufreq_cpu_governor pointer 2009-11-17 23:15:04 -05:00
cpuidle cpuidle: always return with interrupts enabled 2009-10-29 07:39:31 -07:00
crypto crypto: padlock-aes - Use the correct mask when checking whether copying is required 2009-11-03 10:32:03 -05:00
dca
dio
dma shdma: fix initialization error handling 2009-11-22 12:10:10 -07:00
edac amd64_edac: fix CECCs reporting 2009-11-04 14:04:06 +01:00
eisa
firewire Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6 2009-11-30 13:58:23 -08:00
firmware
gpio gpiolib: fix device_create() result check 2009-11-12 07:26:00 -08:00
gpu Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/anholt/drm-intel 2009-11-30 13:57:19 -08:00
hid
hwmon hwmon: (adt7475) Fix sysfs file names 2009-11-16 12:45:40 +01:00
i2c Merge branch 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging 2009-11-30 14:50:44 -08:00
ide Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide-2.6 2009-11-30 14:02:34 -08:00
idle
ieee1394
ieee802154 ieee802154: merge cleanup 2009-12-02 01:13:11 -08:00
infiniband Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2009-11-18 22:19:03 -08:00
input Input: lifebook - fix settings for CF-72 2009-11-16 22:27:12 -08:00
isdn drivers/isdn/gigaset: tasklet_init - Remove unnecessary leading & from second arg 2009-11-19 12:29:27 -08:00
leds leds-gpio: fix possible crash on OF device unbinding 2009-11-16 11:50:42 +00:00
lguest
macintosh
mca
md md/raid5: Allow dirty-degraded arrays to be assembled when only party is degraded. 2009-11-13 17:47:00 +11:00
media V4L/DVB (13530): Fix wrong parameter order in memset 2009-11-27 18:50:43 -02:00
memstick
message
mfd
misc Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2009-12-01 22:13:38 -08:00
mmc mmci-omap: free irq resource 2009-11-12 07:25:57 -08:00
mtd ARM: Fix warning in sa1100-flash.c 2009-11-16 16:13:35 +00:00
net sunhme: fix dma warning in Sun HME 2009-12-02 22:26:38 -08:00
nubus
of
oprofile
parisc parisc: led: Use for_each_netdev_rcu() 2009-11-10 20:54:43 -08:00
parport
pci Fix handling of the HP/Acer 'DMAR at zero' BIOS error for machines with <4GiB RAM. 2009-11-19 13:42:02 -08:00
pcmcia PM / yenta: Split resume into early and late parts (rev. 4) 2009-11-03 10:54:58 +01:00
platform Merge branch 'misc-2.6.32' into release 2009-11-25 01:01:29 -05:00
pnp
power
pps pps: events reporting fix up 2009-11-12 07:26:01 -08:00
ps3
rapidio
regulator dereferencing freed memory regulator_fixed_voltage_remove() 2009-11-16 12:40:25 +00:00
rtc ARM: 5787/1: U300 COH 901 331 fixes 2009-11-16 16:15:49 +00:00
s390 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2009-11-18 22:19:03 -08:00
sbus
scsi [SCSI] fix crash when disconnecting usb storage 2009-11-26 10:04:22 -06:00
serial tty/of_serial: add missing ns16550a id 2009-11-30 16:38:44 -08:00
sfi
sh
sn
spi spi: error status should be negative 2009-11-17 17:40:32 -08:00
ssb ssb: Fix range check in sprom write 2009-11-23 17:05:41 -05:00
staging Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2009-12-01 22:13:38 -08:00
tc
telephony
thermal acpi: thermal: Add EOL to the trip_point_N_type strings 2009-11-05 17:33:24 -05:00
uio uio: pm_runtime_disable is needed if failed 2009-11-13 11:36:00 +09:00
usb USB: Add support for Mobilcom Debitel USB UMTS Surf-Stick to option driver 2009-11-30 16:43:17 -08:00
uwb
video drivers/video/da8xx-fb.c: fix error return 2009-11-17 17:40:33 -08:00
virtio virtio: order used ring after used index read 2009-10-29 08:50:37 +10:30
vlynq
w1
watchdog ARM: PNX4008: fix watchdog device driver name 2009-11-20 14:23:36 +00:00
xen
zorro
Kconfig
Makefile