History log of /linux-master/drivers/dma/fsl_raid.c
Revision Date Author Comments
# 37b24b50 19-Sep-2023 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

dmaengine: fsl_raid: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is ignored (apart
from emitting a warning) and this typically results in resource leaks.
To improve here there is a quest to make the remove callback return
void. In the first step of this quest all drivers are converted to
.remove_new() which already returns void. Eventually after all drivers
are converted, .remove_new() is renamed to .remove().

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20230919133207.1400430-15-u.kleine-koenig@pengutronix.de
Signed-off-by: Vinod Koul <vkoul@kernel.org>


# 897500c7 18-Jul-2023 Rob Herring <robh@kernel.org>

dmaengine: Explicitly include correct DT includes

The DT of_device.h and of_platform.h date back to the separate
of_platform_bus_type before it as merged into the regular platform bus.
As part of that merge prepping Arm DT support 13 years ago, they
"temporarily" include each other. They also include platform_device.h
and of.h. As a result, there's a pretty much random mix of those include
files used throughout the tree. In order to detangle these headers and
replace the implicit includes with struct declarations, users need to
explicitly include the correct includes.

Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20230718143138.1066177-1-robh@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org>


# 0395f869 01-Oct-2020 Vinod Koul <vkoul@kernel.org>

dmaengine: fsl: remove bad channel update

Commit 59cd818763e8 ("dmaengine: fsl: convert tasklets to use new
tasklet_setup() API") broke this driver by not removing the old channel
update method.

Fix this by remove the offending call as channel is queried from
tasklet structure.

Fixes: 59cd818763e8 ("dmaengine: fsl: convert tasklets to use new tasklet_setup() API")
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Link: https://lore.kernel.org/r/20201001164740.178977-1-vkoul@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org>


# 59cd8187 31-Aug-2020 Allen Pais <allen.lkml@gmail.com>

dmaengine: fsl: convert tasklets to use new tasklet_setup() API

In preparation for unconditionally passing the
struct tasklet_struct pointer to all tasklet
callbacks, switch to using the new tasklet_setup()
and from_tasklet() to pass the tasklet pointer explicitly.

Signed-off-by: Romain Perier <romain.perier@gmail.com>
Signed-off-by: Allen Pais <allen.lkml@gmail.com>
Link: https://lore.kernel.org/r/20200831134745.314945-1-allen.lkml@gmail.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>


# 5f54d3e8 27-Jun-2017 Arvind Yadav <arvind.yadav.cs@gmail.com>

dmaengine: fsl_raid: make of_device_ids const.

of_device_ids are not supposed to change at runtime. All functions
working with of_device_ids provided by <linux/of.h> work with const
of_device_ids. So mark the non-const structs as const.

File size before:
text data bss dec hex filename
3981 608 0 4589 11ed drivers/dma/fsl_raid.o

File size after constify:
text data bss dec hex filename
4381 192 0 4573 11dd drivers/dma/fsl_raid.o

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>


# d0b2a5b8 19-Oct-2016 Javier Martinez Canillas <javier@osg.samsung.com>

dmaengine: fsl_raid: Fix module autoload

If the driver is built as a module, autoload won't work because the module
alias information is not filled. So user-space can't match the registered
device with the corresponding module.

Export the module alias information using the MODULE_DEVICE_TABLE() macro.

Before this patch:

$ modinfo drivers/dma/fsl_raid.ko | grep alias
$

After this patch:

$ modinfo drivers/dma/fsl_raid.ko | grep alias
alias: of:N*T*Cfsl,raideng-v1.0C*
alias: of:N*T*Cfsl,raideng-v1.0

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>


# aa570be6 10-Sep-2016 Michael Ellerman <mpe@ellerman.id.au>

dmaengine: NO_IRQ removal from powerpc-only drivers

We'd like to eventually remove NO_IRQ on powerpc, so remove usages of it
from powerpc-only drivers.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>


# 93e11eb1 10-Aug-2016 Wei Yongjun <weiyj.lk@gmail.com>

dmaengine: fsl_raid: add missing of_node_put() in fsl_re_probe()

When terminating for_each_compatible_node() iteration with
break or return, of_node_put() should be used to prevent
stale device node references from being left behind.

Found by Coccinelle.

Signed-off-by: Wei Yongjun <weiyj.lk@gmail.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>


# a941106d 25-Jul-2016 Dave Jiang <dave.jiang@intel.com>

dmaengine: fsl_raid: move unmap to before callback

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 <dave.jiang@intel.com>
Cc: Xuelin Shi <xuelin.shi@freescale.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>


# 1595c3e1 20-Jul-2016 Dave Jiang <dave.jiang@intel.com>

dmaengine: fsl_raid: convert callback to helper function

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 <dave.jiang@intel.com>
Reviewed-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>


# 23a39661 05-Jul-2016 Vinod Koul <vkoul@kernel.org>

dmaengine: fsl_raid: remove owner assignment

platform driver operations owner is set by core, so remove

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Cc: Xuelin Shi <xuelin.shi@freescale.com>


# f950f025 01-Jul-2016 Vinod Koul <vkoul@kernel.org>

dmaengine: fsl_raid: fix size_t print specifiers

size_t should be printed with %zu, not %lu as driver did, so fix these
warning by doing this change

drivers/dma/fsl_raid.c: In function 'fsl_re_prep_dma_genq':
drivers/dma/fsl_raid.c:341:4: warning: format '%lu' expects argument of type
'long unsigned int', but argument 3 has type 'size_t' [-Wformat=]
len, FSL_RE_MAX_DATA_LEN);
^
drivers/dma/fsl_raid.c: In function 'fsl_re_prep_dma_pq':
drivers/dma/fsl_raid.c:428:4: warning: format '%lu' expects argument of type
'long unsigned int', but argument 3 has type 'size_t' [-Wformat=]
len, FSL_RE_MAX_DATA_LEN);
^
drivers/dma/fsl_raid.c: In function 'fsl_re_prep_dma_memcpy':
drivers/dma/fsl_raid.c:549:4: warning: format '%lu' expects argument of type
'long unsigned int', but argument 3 has type 'size_t' [-Wformat=]
len, FSL_RE_MAX_DATA_LEN);
^

Signed-off-by: Vinod Koul <vinod.koul@intel.com>


# cb28c7ab 01-Jul-2016 Vinod Koul <vkoul@kernel.org>

dmaengine: fsl_raid: kill the tasklets upon exit

drivers should ensure that tasklets are killed, so that they can't be
run after driver remove is executed

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Cc: Xuelin Shi <xuelin.shi@freescale.com>


# 453dcdb5 02-Apr-2015 Vinod Koul <vkoul@kernel.org>

dmaengine: fsl_raid: statify fsl_re_chan_probe

Function fsl_re_chan_probe should be declared static, so do it

Signed-off-by: Vinod Koul <vinod.koul@intel.com>


# ad80da65 02-Mar-2015 Xuelin Shi <xuelin.shi@freescale.com>

dmaengine: Driver support for FSL RaidEngine device.

The RaidEngine is a new FSL hardware used for Raid5/6 acceration.
This patch enables the RaidEngine functionality and provides
hardware offloading capability for memcpy, xor and pq computation.
It works with async_tx.

Signed-off-by: Harninder Rai <harninder.rai@freescale.com>
Signed-off-by: Xuelin Shi <xuelin.shi@freescale.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>