03 Oct, 2016
2 commits
-
Signed-off-by: Vinod Koul
Conflicts:
drivers/dma/cppi41.c
01 Oct, 2016
1 commit
-
Free memory mapping, if probe is not successful.
Signed-off-by: Arvind Yadav
Acked-by: Li Yang
Signed-off-by: Vinod Koul
14 Sep, 2016
1 commit
-
We'd like to eventually remove NO_IRQ on powerpc, so remove usages of it
from powerpc-only drivers.Signed-off-by: Michael Ellerman
Signed-off-by: Vinod Koul
08 Aug, 2016
2 commits
-
Completion callback should happen after dma_descriptor_unmap() has
happened. This allow the cache invalidate to happen and ensure that
the data accessed by the upper layer is in memory that was from DMA
rather than stale data. On some architecture this is done by the
hardware, however we should make the code consistent to not cause
confusion.Signed-off-by: Dave Jiang
Acked-by: Li Yang
Signed-off-by: Vinod Koul -
This is in preperation of moving to a callback that provides results to the
callback for the transaction. The conversion will maintain current behavior
and the driver must convert to new callback mechanism at a later time in
order to receive results.Signed-off-by: Dave Jiang
Reviewed-by: Lars-Peter Clausen
Cc: Li Yang
Signed-off-by: Vinod Koul
22 Jun, 2016
1 commit
-
If kzalloc() fails it will issue it's own error message including
a dump_stack(). So remove the site specific error messages.Signed-off-by: Peter Griffin
Acked-by: Jon Hunter
Acked-by: Linus Walleij
Signed-off-by: Vinod Koul
03 May, 2016
1 commit
-
Dma_pool_zalloc combines dma_pool_alloc and memset 0. The semantic patch
that makes this transformation is as follows: (http://coccinelle.lip6.fr/)//
@@
expression d,e;
statement S;
@@d =
- dma_pool_alloc
+ dma_pool_zalloc
(...);
if (!d) S
- memset(d, 0, sizeof(*d));
//Signed-off-by: Julia Lawall
Acked-by: Li Yang
Signed-off-by: Vinod Koul
09 Mar, 2016
1 commit
-
adding unmap of sources and destinations while doing dequeue.
Signed-off-by: Xuelin Shi
Signed-off-by: Vinod Koul
01 Oct, 2015
1 commit
-
This platform driver has a OF device ID table but the OF module
alias information is not created so module autoloading won't work.Signed-off-by: Luis de Bethencourt
Signed-off-by: Vinod Koul
14 Jan, 2015
2 commits
-
Fix the following build warning:
drivers/dma/fsldma.c: In function 'fsl_dma_device_terminate_all':
drivers/dma/fsldma.c:947:6: warning: unused variable 'size' [-Wunused-variable]Signed-off-by: Kevin Hao
Signed-off-by: Vinod Koul -
Since commit ecc19d17868b ("dmaengine: Add a warning for drivers not
using the generic slave caps retrieval"), the dma drivers are required
to fill the caps infos in order to support generic slaves caps
retrieval. Otherwise we will get a warning like this:
WARNING: at drivers/dma/dmaengine.c:830
Modules linked in:
CPU: 0 PID: 1 Comm: swapper/0 Tainted: G W 3.19.0-rc2-next-20150106-dirty #271
task: c0000001f70a0000 ti: c0000001f7044000 task.ti: c0000001f7044000
NIP: c00000000032b238 LR: c00000000032b234 CTR: c00000000001d258
REGS: c0000001f7047330 TRAP: 0700 Tainted: G W (3.19.0-rc2-next-20150106-dirty)
MSR: 0000000080029000 CR: 24adbe22 XER: 20000000
SOFTE: 1
GPR00: c00000000032b234 c0000001f70475b0 c0000000009b4848 0000000000000040
GPR04: 0000000000000001 0000000000000001 0000000000000000 000000000000000f
GPR08: 0000000000000000 c000000000902988 c000000000902988 00000000000052c8
GPR12: 0000000024adbe22 c00000000fff4000 c000000000002038 0000000000000000
GPR16: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
GPR20: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
GPR24: 0000000000000000 0000000000000000 c000000000972dc8 c0000000007e6fd0
GPR28: c0000001f76d1d30 c0000001f76d1c10 c0000001f76d1c00 0000000000000000
NIP [c00000000032b238] .dma_async_device_register+0x3f8/0x5b8
LR [c00000000032b234] .dma_async_device_register+0x3f4/0x5b8
Call Trace:
[c0000001f70475b0] [c00000000032b234] .dma_async_device_register+0x3f4/0x5b8 (unreliable)
[c0000001f70476a0] [c00000000032ca78] .fsldma_of_probe+0x298/0x438
[c0000001f7047750] [c00000000037080c] .platform_drv_probe+0x50/0x9c
[c0000001f70477d0] [c00000000036e74c] .really_probe+0xa4/0x29c
[c0000001f7047870] [c00000000036eae4] .__driver_attach+0x100/0x104
[c0000001f7047900] [c00000000036c1f0] .bus_for_each_dev+0x84/0xe4
[c0000001f70479a0] [c00000000036e164] .driver_attach+0x24/0x38
[c0000001f7047a10] [c00000000036dcc8] .bus_add_driver+0x1c8/0x2ac
[c0000001f7047ab0] [c00000000036f14c] .driver_register+0x8c/0x158
[c0000001f7047b30] [c0000000003707a8] .__platform_driver_register+0x6c/0x80
[c0000001f7047ba0] [c000000000898a3c] .fsldma_init+0x2c/0x40
[c0000001f7047c10] [c000000000001818] .do_one_initcall+0xb8/0x234
[c0000001f7047d00] [c000000000878e2c] .kernel_init_freeable+0x188/0x268
[c0000001f7047db0] [c000000000002054] .kernel_init+0x1c/0xfc8
[c0000001f7047e30] [c000000000000884] .ret_from_kernel_thread+0x58/0xd4
Instruction dump:
7fb9f840 3bffffe0 409effac 7f54d378 48000060 813d0050 2f890000 40befdd0
3c62ffe3 38632450 482f0aa9 60000000 4bfffdb8 7f03c378 482ed465Signed-off-by: Kevin Hao
Signed-off-by: Vinod Koul
22 Dec, 2014
1 commit
-
Split the device_control callback of the Freescale Elo DMA driver to make use
of the newly introduced callbacks, that will eventually be used to retrieve
slave capabilities.While we're at it, remove the useless prep_sg callback.
Signed-off-by: Maxime Ripard
Signed-off-by: Vinod Koul
15 Dec, 2014
1 commit
-
Pull driver core update from Greg KH:
"Here's the set of driver core patches for 3.19-rc1.They are dominated by the removal of the .owner field in platform
drivers. They touch a lot of files, but they are "simple" changes,
just removing a line in a structure.Other than that, a few minor driver core and debugfs changes. There
are some ath9k patches coming in through this tree that have been
acked by the wireless maintainers as they relied on the debugfs
changes.Everything has been in linux-next for a while"
* tag 'driver-core-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (324 commits)
Revert "ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries"
fs: debugfs: add forward declaration for struct device type
firmware class: Deletion of an unnecessary check before the function call "vunmap"
firmware loader: fix hung task warning dump
devcoredump: provide a one-way disable function
device: Add dev__once variants
ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries
ath: use seq_file api for ath9k debugfs files
debugfs: add helper function to create device related seq_file
drivers/base: cacheinfo: remove noisy error boot message
Revert "core: platform: add warning if driver has no owner"
drivers: base: support cpu cache information interface to userspace via sysfs
drivers: base: add cpu_device_create to support per-cpu devices
topology: replace custom attribute macros with standard DEVICE_ATTR*
cpumask: factor out show_cpumap into separate helper function
driver core: Fix unbalanced device reference in drivers_probe
driver core: fix race with userland in device_add()
sysfs/kernfs: make read requests on pre-alloc files use the buffer.
sysfs/kernfs: allow attributes to request write buffer be pre-allocated.
fs: sysfs: return EGBIG on write if offset is larger than file size
...
06 Nov, 2014
1 commit
-
chanctnt is already filled by dma_async_device_register, which uses the channel
list to know how much channels there is.Since it's already filled, we can safely remove it from the drivers' probe
function.Signed-off-by: Maxime Ripard
Signed-off-by: Vinod Koul
20 Oct, 2014
1 commit
-
A platform_driver does not need to set an owner, it will be populated by the
driver core.Signed-off-by: Wolfram Sang
16 Oct, 2014
2 commits
-
since users have been move to fsl_dma_external_start() API, so remove this
nowSigned-off-by: Vinod Koul
-
The freescale driver uses custom device control FSLDMA_EXTERNAL_START to
put the controller in external start mode.
Since we are planning to deprecate the device control, move this to exported
API. Subsequent patches will remove the FSLDMA_EXTERNAL_STARTSigned-off-by: Vinod Koul
15 Jul, 2014
3 commits
-
Fix the potential risk when enable config NET_DMA and ASYNC_TX. Async_tx is
lack of support in current release process of dma descriptor, all descriptors
will be released whatever is acked or no-acked by async_tx, so there is a
potential race condition when dma engine is uesd by others clients (e.g. when
enable NET_DMA to offload TCP).In our case, a race condition which is raised when use both of talitos and
dmaengine to offload xor is because napi scheduler will sync all pending
requests in dma channels, it affects the process of raid operations due to
ack_tx is not checked in fsl dma. The no-acked descriptor is freed which is
submitted just now, as a dependent tx, this freed descriptor trigger
BUG_ON(async_tx_test_ack(depend_tx)) in async_tx_submit().TASK = ee1a94a0[1390] 'md0_raid5' THREAD: ecf40000 CPU: 0
GPR00: 00000001 ecf41ca0 ee44/921a94a0 0000003f 00000001 c00593e4 00000000 00000001
GPR08: 00000000 a7a7a7a7 00000001 045/920000002 42028042 100a38d4 ed576d98 00000000
GPR16: ed5a11b0 00000000 2b162000 00000200 046/920000000 2d555000 ed3015e8 c15a7aa0
GPR24: 00000000 c155fc40 00000000 ecb63220 ecf41d28 e47/92f640bb0 ef640c30 ecf41ca0
NIP [c02b048c] async_tx_submit+0x6c/0x2b4
LR [c02b068c] async_tx_submit+0x26c/0x2b4
Call Trace:
[ecf41ca0] [c02b068c] async_tx_submit+0x26c/0x2b448/92 (unreliable)
[ecf41cd0] [c02b0a4c] async_memcpy+0x240/0x25c
[ecf41d20] [c0421064] async_copy_data+0xa0/0x17c
[ecf41d70] [c0421cf4] __raid_run_ops+0x874/0xe10
[ecf41df0] [c0426ee4] handle_stripe+0x820/0x25e8
[ecf41e90] [c0429080] raid5d+0x3d4/0x5b4
[ecf41f40] [c04329b8] md_thread+0x138/0x16c
[ecf41f90] [c008277c] kthread+0x8c/0x90
[ecf41ff0] [c0011630] kernel_thread+0x4c/0x68Another modification in this patch is the change of completed descriptors,
there is a potential risk which caused by exception interrupt, all descriptors
in ld_running list are seemed completed when an interrupt raised, it works fine
under normal condition, but if there is an exception occured, it cannot work as
our excepted. Hardware should not be depend on s/w list, the right way is to
read current descriptor address register to find the last completed descriptor.
If an interrupt is raised by an error, all descriptors in ld_running should not
be seemed finished, or these unfinished descriptors in ld_running will be
released wrongly.A simple way to reproduce:
Enable dmatest first, then insert some bad descriptors which can trigger
Programming Error interrupts before the good descriptors. Last, the good
descriptors will be freed before they are processsed because of the exception
intrerrupt.Note: the bad descriptors are only for simulating an exception interrupt. This
case can illustrate the potential risk in current fsl-dma very well.Signed-off-by: Hongbo Zhang
Signed-off-by: Qiang Liu
Signed-off-by: Ira W. Snyder
Signed-off-by: Vinod Koul -
This patch adds suspend and resume functions for Freescale DMA driver.
Signed-off-by: Hongbo Zhang
Signed-off-by: Vinod Koul -
The usage of spin_lock_irqsave() is a stronger locking mechanism than is
required throughout the driver. The minimum locking required should be used
instead. Interrupts will be turned off and context will be saved, it is
unnecessary to use irqsave.This patch changes all instances of spin_lock_irqsave() to spin_lock_bh(). All
manipulation of protected fields is done using tasklet context or weaker, which
makes spin_lock_bh() the correct choice.Signed-off-by: Hongbo Zhang
Signed-off-by: Qiang Liu
Signed-off-by: Vinod Koul
03 May, 2014
5 commits
-
These functions will be modified in the next patch in the series. By moving the
function in a patch separate from the changes, it will make review easier.Signed-off-by: Hongbo Zhang
Signed-off-by: Qiang Liu
Signed-off-by: Vinod Koul -
There are several places where descriptors are freed using identical code.
This patch puts this code into a function to reduce code duplication.Signed-off-by: Hongbo Zhang
Signed-off-by: Qiang Liu
Signed-off-by: Vinod Koul -
Delete attribute DMA_INTERRUPT because fsldma doesn't support this function,
exception will be thrown if talitos is used to offload xor at the same time.Signed-off-by: Hongbo Zhang
Signed-off-by: Qiang Liu
Signed-off-by: Vinod Koul -
Methods of accessing DMA controller registers are inconsistent, some registers
are accessed by DMA_IN/OUT directly, while others are accessed by functions
get/set_* which are wrappers of DMA_IN/OUT, and even for the BCR register, it
is read by get_bcr but written by DMA_OUT.
This patch unifies the inconsistent methods, all registers are accessed by
get/set_* now.Signed-off-by: Hongbo Zhang
Signed-off-by: Vinod Koul -
Some codes are calling chan_dbg with FSL_DMA_LD_DEBUG surrounded, it is really
unnecessary to use such a macro because chan_dbg is a wrapper of dev_dbg, we do
have corresponding DEBUG macro to switch on/off dev_dbg, and most of the other
codes are also calling chan_dbg directly without using FSL_DMA_LD_DEBUG.Signed-off-by: Hongbo Zhang
Signed-off-by: Vinod Koul
13 Dec, 2013
1 commit
-
drivers/dma/fsldma.c: In function 'fsldma_cleanup_descriptor':
drivers/dma/fsldma.c:860:6: warning: unused variable 'len' [-Wunused-variable]
drivers/dma/fsldma.c:859:13: warning: unused variable 'dst' [-Wunused-variable]
drivers/dma/fsldma.c:858:13: warning: unused variable 'src' [-Wunused-variable]
drivers/dma/fsldma.c:857:17: warning: unused variable 'dev' [-Wunused-variable]
- due to unmap changesdrivers/dma/fsldma.c: In function 'fsl_dma_tx_submit':
drivers/dma/fsldma.c:428:2: warning: 'cookie' may be used uninitialized in this function [-Wuninitialized]
- long standing warningCc: Bartlomiej Zolnierkiewicz
Cc: Li Yang
Cc: Zhang Wei
Signed-off-by: Dan Williams
21 Nov, 2013
1 commit
-
Pull slave-dmaengine changes from Vinod Koul:
"This brings for slave dmaengine:- Change dma notification flag to DMA_COMPLETE from DMA_SUCCESS as
dmaengine can only transfer and not verify validaty of dma
transfers- Bunch of fixes across drivers:
- cppi41 driver fixes from Daniel
- 8 channel freescale dma engine support and updated bindings from
Hongbo- msx-dma fixes and cleanup by Markus
- DMAengine updates from Dan:
- Bartlomiej and Dan finalized a rework of the dma address unmap
implementation.- In the course of testing 1/ a collection of enhancements to
dmatest fell out. Notably basic performance statistics, and
fixed / enhanced test control through new module parameters
'run', 'wait', 'noverify', and 'verbose'. Thanks to Andriy and
Linus [Walleij] for their review.- Testing the raid related corner cases of 1/ triggered bugs in
the recently added 16-source operation support in the ioatdma
driver.- Some minor fixes / cleanups to mv_xor and ioatdma"
* 'next' of git://git.infradead.org/users/vkoul/slave-dma: (99 commits)
dma: mv_xor: Fix mis-usage of mmio 'base' and 'high_base' registers
dma: mv_xor: Remove unneeded NULL address check
ioat: fix ioat3_irq_reinit
ioat: kill msix_single_vector support
raid6test: add new corner case for ioatdma driver
ioatdma: clean up sed pool kmem_cache
ioatdma: fix selection of 16 vs 8 source path
ioatdma: fix sed pool selection
ioatdma: Fix bug in selftest after removal of DMA_MEMSET.
dmatest: verbose mode
dmatest: convert to dmaengine_unmap_data
dmatest: add a 'wait' parameter
dmatest: add basic performance metrics
dmatest: add support for skipping verification and random data setup
dmatest: use pseudo random numbers
dmatest: support xor-only, or pq-only channels in tests
dmatest: restore ability to start test at module load and init
dmatest: cleanup redundant "dmatest: " prefixes
dmatest: replace stored results mechanism, with uniform messages
Revert "dmatest: append verify result to results"
...
16 Nov, 2013
1 commit
-
Pull dmaengine changes from Dan
1/ Bartlomiej and Dan finalized a rework of the dma address unmap
implementation.2/ In the course of testing 1/ a collection of enhancements to dmatest
fell out. Notably basic performance statistics, and fixed / enhanced
test control through new module parameters 'run', 'wait', 'noverify',
and 'verbose'. Thanks to Andriy and Linus for their review.3/ Testing the raid related corner cases of 1/ triggered bugs in the
recently added 16-source operation support in the ioatdma driver.4/ Some minor fixes / cleanups to mv_xor and ioatdma.
Conflicts:
drivers/dma/dmatest.cSigned-off-by: Vinod Koul
15 Nov, 2013
1 commit
-
Remove support for DMA unmapping from drivers as it is no longer
needed (DMA core code is now handling it).Cc: Vinod Koul
Cc: Tomasz Figa
Cc: Dave Jiang
Signed-off-by: Bartlomiej Zolnierkiewicz
Signed-off-by: Kyungmin Park
[djbw: fix up chan2parent() unused warning in drivers/dma/dw/core.c]
Signed-off-by: Dan Williams
14 Nov, 2013
1 commit
-
Add a hook for a common dma unmap implementation to enable removal of
the per driver custom unmap code. (A reworked version of Bartlomiej
Zolnierkiewicz's patches to remove the custom callbacks and the size
increase of dma_async_tx_descriptor for drivers that don't care about
raid).Cc: Vinod Koul
Cc: Tomasz Figa
Cc: Dave Jiang
[bzolnier: prepare pl330 driver for adding missing unmap while at it]
Signed-off-by: Bartlomiej Zolnierkiewicz
Signed-off-by: Kyungmin Park
Signed-off-by: Dan Williams
13 Nov, 2013
1 commit
-
This patch adds support to 8-channel DMA engine, thus the driver works for both
the new 8-channel and the legacy 4-channel DMA engines.Signed-off-by: Hongbo Zhang
Signed-off-by: Vinod Koul
10 Oct, 2013
1 commit
-
Powerpc is a mess of implicit includes by prom.h. Add the necessary
explicit includes to drivers in preparation of prom.h cleanup.Signed-off-by: Rob Herring
Acked-by: Grant Likely
05 Aug, 2013
1 commit
-
Accordingly to dma_cookie_status() description locking is not required.
Signed-off-by: Andy Shevchenko
Cc: Li Yang
Cc: Zhang Wei
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Vinod Koul
05 Jul, 2013
1 commit
-
Use the wrapper functions for getting and setting the driver data using
platform_device instead of using dev_{get,set}_drvdata() with &pdev->dev,
so we can directly pass a struct platform_device.Also, unnecessary dev_set_drvdata() is removed, because the driver core
clears the driver data to NULL after device_release or on probe failure.Signed-off-by: Jingoo Han
Signed-off-by: Vinod Koul
29 Nov, 2012
1 commit
-
CONFIG_HOTPLUG is going away as an option so __devinit is no longer
needed.Signed-off-by: Bill Pemberton
Cc: Li Yang
Cc: Zhang Wei
Cc: Barry Song
Acked-by: Viresh Kumar
Signed-off-by: Greg Kroah-Hartman
01 Sep, 2012
1 commit
-
Correct spelling typo in drivers/dma.
Signed-off-by: Masanari Iida
Signed-off-by: Jiri Kosina
21 Mar, 2012
1 commit
-
Add context parameter to device_prep_slave_sg() and device_prep_dma_cyclic()
interfaces to allow passing client/target specific information associated
with the data transfer.
Modify all affected DMA engine drivers.Signed-off-by: Alexandre Bounine
Acked-by: Linus Walleij
Acked-by: Felipe Balbi
Signed-off-by: Vinod Koul
13 Mar, 2012
2 commits
-
Ensure all DMA engine drivers initialize their cookies in the same way,
so that they all behave in a similar fashion. This means their first
issued cookie will be 2 rather than 1, and will increment to INT_MAX
before returning 1 and starting over.In connection with this, Dan Williams said:
> Russell King wrote:
> > Secondly, some DMA engine drivers initialize the dma_chan cookie to 0,
> > others to 1. Is there a reason for this, or are these all buggy?
>
> I know that ioat and iop-adma expect 0 to mean "I have cleaned up this
> descriptor and it is idle", and would break if zero was an in-flight
> cookie value. The reserved usage of zero is an driver internal
> concern, but I have no problem formalizing it as a reserved value.Signed-off-by: Russell King
Tested-by: Linus Walleij
Reviewed-by: Linus Walleij
Acked-by: Jassi Brar
[imx-sdma.c & mxs-dma.c]
Tested-by: Shawn Guo
Signed-off-by: Vinod Koul -
Now that we have the completed cookie in the dma_chan structure, we
can consolidate the tx_status functions by providing a function to set
the txstate structure and returning the DMA status. We also provide
a separate helper to set the residue for cookies which are still in
progress.Signed-off-by: Russell King
Tested-by: Linus Walleij
Reviewed-by: Linus Walleij
Acked-by: Jassi Brar
[imx-sdma.c & mxs-dma.c]
Tested-by: Shawn Guo
Signed-off-by: Vinod Koul