linux/drivers/dma
Shuah Khan ac4989874a ioat: Fix DMA memory sync direction correct flag
ioat does DMA memory sync with DMA_TO_DEVICE direction on a buffer allocated
for DMA_FROM_DEVICE dma, resulting in the following warning from dma debug.
Fixed the dma_sync_single_for_device() call to use the correct direction.

[  226.288947] WARNING: at lib/dma-debug.c:990 check_sync+0x132/0x550()
[  226.288948] Hardware name: ProLiant DL380p Gen8
[  226.288951] ioatdma 0000:00:04.0: DMA-API: device driver syncs DMA memory with different direction [device address=0x00000000ffff7000] [size=4096 bytes] [mapped with DMA_FROM_DEVICE] [synced with DMA_TO_DEVICE]
[  226.288953] Modules linked in: iTCO_wdt(+) sb_edac(+) ioatdma(+) microcode serio_raw pcspkr edac_core hpwdt(+) iTCO_vendor_support hpilo(+) dca acpi_power_meter ata_generic pata_acpi sd_mod crc_t10dif ata_piix libata hpsa tg3 netxen_nic(+) sunrpc dm_mirror dm_region_hash dm_log dm_mod
[  226.288967] Pid: 1055, comm: work_for_cpu Tainted: G        W    3.3.0-0.20.el7.x86_64 #1
[  226.288968] Call Trace:
[  226.288974]  [<ffffffff810644cf>] warn_slowpath_common+0x7f/0xc0
[  226.288977]  [<ffffffff810645c6>] warn_slowpath_fmt+0x46/0x50
[  226.288980]  [<ffffffff81345502>] check_sync+0x132/0x550
[  226.288983]  [<ffffffff81345c9f>] debug_dma_sync_single_for_device+0x3f/0x50
[  226.288988]  [<ffffffff81661002>] ? wait_for_common+0x72/0x180
[  226.288995]  [<ffffffffa019590f>] ioat_xor_val_self_test+0x3e5/0x832 [ioatdma]
[  226.288999]  [<ffffffff811a5739>] ? kfree+0x259/0x270
[  226.289004]  [<ffffffffa0195d77>] ioat3_dma_self_test+0x1b/0x20 [ioatdma]
[  226.289008]  [<ffffffffa01952c3>] ioat_probe+0x2f8/0x348 [ioatdma]
[  226.289011]  [<ffffffffa0195f51>] ioat3_dma_probe+0x1d5/0x2aa [ioatdma]
[  226.289016]  [<ffffffffa0194d12>] ioat_pci_probe+0x139/0x17c [ioatdma]
[  226.289020]  [<ffffffff81354b8c>] local_pci_probe+0x5c/0xd0
[  226.289023]  [<ffffffff81083e50>] ? destroy_work_on_stack+0x20/0x20
[  226.289025]  [<ffffffff81083e68>] do_work_for_cpu+0x18/0x30
[  226.289029]  [<ffffffff8108d997>] kthread+0xb7/0xc0
[  226.289033]  [<ffffffff8166cef4>] kernel_thread_helper+0x4/0x10
[  226.289036]  [<ffffffff81662d20>] ? _raw_spin_unlock_irq+0x30/0x50
[  226.289038]  [<ffffffff81663234>] ? retint_restore_args+0x13/0x13
[  226.289041]  [<ffffffff8108d8e0>] ? kthread_worker_fn+0x1a0/0x1a0
[  226.289044]  [<ffffffff8166cef0>] ? gs_change+0x13/0x13
[  226.289045] ---[ end trace e1618afc7a606089 ]---
[  226.289047] Mapped at:
[  226.289048]  [<ffffffff81345307>] debug_dma_map_page+0x87/0x150
[  226.289050]  [<ffffffffa019653c>] dma_map_page.constprop.18+0x70/0xb34 [ioatdma]
[  226.289054]  [<ffffffffa0195702>] ioat_xor_val_self_test+0x1d8/0x832 [ioatdma]
[  226.289058]  [<ffffffffa0195d77>] ioat3_dma_self_test+0x1b/0x20 [ioatdma]
[  226.289061]  [<ffffffffa01952c3>] ioat_probe+0x2f8/0x348 [ioatdma]

Signed-off-by: Shuah Khan <shuah.khan@hp.com>
CC: <stable@vger.kernel.org>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
2013-01-06 08:36:34 -08:00
..
ioat ioat: Fix DMA memory sync direction correct flag 2013-01-06 08:36:34 -08:00
ipu dma: ipu: rename mach/ipu.h to include/linux/dma/ipu-dma.h 2012-10-15 10:03:12 +08:00
ppc4xx dma: remove use of __devinit 2012-11-28 12:42:36 -08:00
sh dma: remove use of __devinit 2012-11-28 12:42:36 -08:00
Kconfig drivers/dma/dw_dmac: make driver's endianness configurable 2012-10-25 14:37:53 -07:00
Makefile dmaengine: mmp-pdma support 2012-09-14 08:14:07 +05:30
TODO dmaengine: remove ste_dma40 from issue_pending TODO 2011-07-14 04:02:08 +05:30
amba-pl08x.c drivers/dma/amba-pl08x.c: fix error return code 2012-08-22 09:51:04 +05:30
at_hdmac.c Sound updates for 3.7-rc1 2012-10-09 07:07:14 +09:00
at_hdmac_regs.h ARM: at91: move platform_data definitions 2012-09-14 11:16:40 +02:00
coh901318.c dma: coh901318: use devm allocation 2012-06-14 08:42:26 +05:30
coh901318_lli.c dmaengine: Use sg_dma_address instead of sg_phys 2012-05-11 12:04:38 +05:30
coh901318_lli.h dmaengine: move drivers to dma_transfer_direction 2011-10-27 20:53:43 +05:30
dmaengine.c drivers/dma/dmaengine.c: lower the priority of 'failed to get' dma channel message 2012-10-06 03:04:36 +09:00
dmaengine.h dmaengine: consolidate initialization of cookies 2012-03-13 11:37:22 +05:30
dmatest.c dmatest: check for dma mapping error 2012-12-17 17:15:13 -08:00
dw_dmac.c dma: remove use of __devinit 2012-11-28 12:42:36 -08:00
dw_dmac_regs.h drivers/dma/dw_dmac: make driver's endianness configurable 2012-10-25 14:37:53 -07:00
edma.c dma: remove use of __devinit 2012-11-28 12:42:36 -08:00
ep93xx_dma.c Sound updates for 3.7-rc1 2012-10-09 07:07:14 +09:00
fsldma.c dma: remove use of __devinit 2012-11-28 12:42:36 -08:00
fsldma.h dmaengine: move last completed cookie into generic dma_chan structure 2012-03-13 11:36:06 +05:30
imx-dma.c Merge branch 'arm-next' of git://git.xilinx.com/linux-xlnx into next/cleanup 2012-11-06 07:51:06 -08:00
imx-sdma.c dma: imx-sdma: remove unneeded mach/hardware.h inclusion 2012-10-15 10:03:13 +08:00
intel_mid_dma.c dma: remove use of __devinit 2012-11-28 12:42:36 -08:00
intel_mid_dma_regs.h dma: fix comments 2012-09-01 08:57:12 -07:00
iop-adma.c dma: remove use of __devinit 2012-11-28 12:42:36 -08:00
iovlock.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
mmp_pdma.c dma: remove use of __devinit 2012-11-28 12:42:36 -08:00
mmp_tdma.c dma: remove use of __devinit 2012-11-28 12:42:36 -08:00
mpc512x_dma.c dma: remove use of __devinit 2012-11-28 12:42:36 -08:00
mv_xor.c ARM: arm-soc: Updates for Marvell mvebu/kirkwood 2012-12-14 14:54:26 -08:00
mv_xor.h dma: mv_xor: clear the window override control registers 2012-11-22 18:16:37 +01:00
mxs-dma.c Merge branch 'next' of git://git.infradead.org/users/vkoul/slave-dma 2012-10-10 11:10:41 +09:00
omap-dma.c ARM: OMAP: Move plat-omap/dma-omap.h to include/linux/omap-dma.h 2012-11-30 08:41:50 -08:00
pch_dma.c dma: remove use of __devinit 2012-11-28 12:42:36 -08:00
pl330.c dma: remove use of __devinit 2012-11-28 12:42:36 -08:00
sa11x0-dma.c dma: remove use of __devinit 2012-11-28 12:42:36 -08:00
sirf-dma.c dma: remove use of __devinit 2012-11-28 12:42:36 -08:00
ste_dma40.c ARM: plat-nomadik: move DMA40 header to <linux/platform_data> 2012-11-05 09:55:32 +01:00
ste_dma40_ll.c ARM: plat-nomadik: move DMA40 header to <linux/platform_data> 2012-11-05 09:55:32 +01:00
ste_dma40_ll.h dma: fix comments 2012-09-01 08:57:12 -07:00
tegra20-apb-dma.c dma: remove use of __devinit 2012-11-28 12:42:36 -08:00
timb_dma.c dma: remove use of __devinit 2012-11-28 12:42:36 -08:00
txx9dmac.c dmaengine: add context parameter to prep_slave_sg and prep_dma_cyclic 2012-03-21 19:20:23 +05:30
txx9dmac.h dmaengine: move last completed cookie into generic dma_chan structure 2012-03-13 11:36:06 +05:30
virt-dma.c dmaengine: virt-dma: add support for cyclic DMA periodic callbacks 2012-07-01 14:15:23 +01:00
virt-dma.h dmaengine: virt-dma: add support for cyclic DMA periodic callbacks 2012-07-01 14:15:23 +01:00