obe'
> > > sata_dwc_460ex.c:(.text+0xa1954): undefined reference to `dw_dma_remove'
> > > make: *** [vmlinux] Error 1
> >
> > Looks like it was caused by:
> >
> > commit 8b3444852a2b58129ee68a8dd69fef81ceb902a1
> > Author: Andy Shevchenko
>
Since sata_dwc_460ex.c was moved to generic DMA driver we have to ensure that
user can still compile it.
Fixes: 8b3444852a2b (sata_dwc_460ex: move to generic DMA driver)
Signed-off-by: Andy Shevchenko
---
drivers/ata/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/ata
Here is a set of small independent patches that clean up or fix minor things
across DMA slave drivers.
Andy Shevchenko (12):
imx-sdma: remove useless variable
mxs-dma: remove useless variable
edma: no need to assign residue to 0 explicitly
ep93xx_dma: remove useless use of lock
fsldma
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
---
drivers/dma/fsldma.c | 10 +-
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/drivers/dma/fsldma.c b
On Thu, May 30, 2013 at 8:47 PM, Vinod Koul wrote:
> On Mon, May 27, 2013 at 03:14:30PM +0300, Andy Shevchenko wrote:
>> Here is a set of small independent patches that clean up or fix minor things
>> across DMA slave drivers.
> The series looks fine. I am going to wait a day m
On Thu, 2013-05-30 at 23:17 +0530, Vinod Koul wrote:
> On Mon, May 27, 2013 at 03:14:30PM +0300, Andy Shevchenko wrote:
> > Here is a set of small independent patches that clean up or fix minor things
> > across DMA slave drivers.
> The series looks fine. I am going to wait a
On Mon, 2013-07-15 at 15:07 +0530, Vinod Koul wrote:
> On Thu, May 30, 2013 at 09:32:19PM +0300, Andy Shevchenko wrote:
> > >> Here is a set of small independent patches that clean up or fix minor
> > >> things
> > >> across DMA slave drivers.
>
> Ap
In case we have a full node name like /foo/bar and /foo is not found the
parent_path left unfreed. So, free a memory before return to a caller.
Signed-off-by: Andy Shevchenko
---
arch/powerpc/platforms/pseries/of_helpers.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git
Extract a new module to share the code between other modules.
There is no functional change.
Signed-off-by: Andy Shevchenko
---
arch/powerpc/platforms/pseries/Makefile | 1 +
arch/powerpc/platforms/pseries/of_helpers.c | 38 +
arch/powerpc/platforms/pseries
The derive_parent() has similar semantics to what we have in newly introduced
of_helpers module. The replacement reduces code base and propagates the actual
error code to the caller.
Signed-off-by: Andy Shevchenko
---
arch/powerpc/platforms/pseries/dlpar.c | 31
The helper kstrndup() will do the same in one line.
Signed-off-by: Andy Shevchenko
---
arch/powerpc/platforms/pseries/of_helpers.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/powerpc/platforms/pseries/of_helpers.c
b/arch/powerpc/platforms/pseries/of_helpers.c
There is no need to call strrchr() second time. We already know that in that
case parent_path_len either 1 ("/foo") or bigger ("/foo/bar").
Signed-off-by: Andy Shevchenko
---
arch/powerpc/platforms/pseries/of_helpers.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-
On Wed, 2015-08-05 at 00:20 -0500, Segher Boessenkool wrote:
> Hi Andy,
>
> On Tue, Aug 04, 2015 at 05:36:45PM +0300, Andy Shevchenko wrote:
> > +struct device_node *pseries_of_derive_parent(const char *path)
> > +{
> > + struct device_node *parent = NULL
The derive_parent() has similar semantics to what we have in newly introduced
of_helpers module. The replacement reduces code base and propagates the actual
error code to the caller.
Signed-off-by: Andy Shevchenko
---
arch/powerpc/platforms/pseries/dlpar.c | 31
Extract a new module to share the code between other modules.
There is no functional change.
Signed-off-by: Andy Shevchenko
---
arch/powerpc/platforms/pseries/Makefile | 1 +
arch/powerpc/platforms/pseries/of_helpers.c | 38 +
arch/powerpc/platforms/pseries
In case we have a full node name like /foo/bar and /foo is not found the
parent_path left unfreed. So, free a memory before return to a caller.
Signed-off-by: Andy Shevchenko
---
arch/powerpc/platforms/pseries/of_helpers.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git
The helper kstrndup() will do the same in one line.
Signed-off-by: Andy Shevchenko
---
arch/powerpc/platforms/pseries/of_helpers.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/powerpc/platforms/pseries/of_helpers.c
b/arch/powerpc/platforms/pseries/of_helpers.c
In case we have node without '/' strrchr() returns NULL which might lead to
crash. Replace strrchr() by kbasename() and modify condition to avoid such
behaviour.
Suggested-by: Segher Boessenkool
Signed-off-by: Andy Shevchenko
---
arch/powerpc/platforms/pseries/of_helpers.c | 6 +++-
Signed-off-by: Andy Shevchenko
---
drivers/macintosh/smu.c | 6 +-
drivers/macintosh/via-pmu.c | 5 +++--
2 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/drivers/macintosh/smu.c b/drivers/macintosh/smu.c
index 9c6b964..b3b2d36 100644
--- a/drivers/macintosh/smu.c
+++ b
olution
how to keep devm_*_irq usability.
> + irq_dispose_mapping(mdma->irq);
> return retval;
> }
>
> @@ -1031,6 +1044,8 @@ static int mpc_dma_remove(struct platform_device *op)
> struct device *dev = &op->dev;
> struct mpc_dma *m
mchan->tcd_nunits = cfg->src_maxburst;
> + } else {
> + mchan->per_paddr = cfg->dst_addr;
> + mchan->tcd_nunits = cfg->dst_maxburst;
> + }
> +
> + if (!IS_ALIGNED(mchan->per_paddr, 4)) {
> + spin_unlock_irqrestore(&mchan->lock, flags);
> + return -EINVAL;
> + }
> +
> + if (mchan->tcd_nunits == 0)
> + mchan->tcd_nunits = 1; /* apply default */
> +
> + spin_unlock_irqrestore(&mchan->lock, flags);
> +
> + return 0;
> + default:
> + return -ENOSYS;
Use break here.
> + }
> +
> + return -EINVAL;
> +}
> +
> static int mpc_dma_probe(struct platform_device *op)
> {
> struct device_node *dn = op->dev.of_node;
> @@ -727,9 +949,12 @@ static int mpc_dma_probe(struct platform_device *op)
> dma->device_issue_pending = mpc_dma_issue_pending;
> dma->device_tx_status = mpc_dma_tx_status;
> dma->device_prep_dma_memcpy = mpc_dma_prep_memcpy;
> + dma->device_prep_slave_sg = mpc_dma_prep_slave_sg;
> + dma->device_control = mpc_dma_device_control;
>
> INIT_LIST_HEAD(&dma->channels);
> dma_cap_set(DMA_MEMCPY, dma->cap_mask);
> + dma_cap_set(DMA_SLAVE, dma->cap_mask);
>
> for (i = 0; i < dma->chancnt; i++) {
> mchan = &mdma->channels[i];
--
Andy Shevchenko
Intel Finland Oy
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev
&mchan->lock, flags);
> +
> + if (cfg->direction == DMA_DEV_TO_MEM) {
> + mchan->per_paddr = cfg->src_addr;
> + mchan->tcd_nunits = cfg->src_maxburst;
> + } else {
> + mchan->per_paddr = cfg->dst_addr;
> + mchan->tcd_nunits = cfg->dst_maxburst;
> + }
Ditto.
--
Andy Shevchenko
Intel Finland Oy
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev
irq, mdma);
> irq_dispose_mapping(mdma->irq);
> }
>
> @@ -1033,7 +1032,7 @@ static int mpc_dma_remove(struct platform_device *op)
> struct mpc_dma *mdma = dev_get_drvdata(dev);
>
> dma_async_device_u
*chan,
> dma_run_dependencies(txd);
>
> dma_descriptor_unmap(txd);
> - chan_dbg(chan, "LD %p free\n", desc);
> - dma_pool_free(chan->desc_pool, desc, txd->phys);
> + fsl_dma_free_descriptor(chan, desc);
Here is no list_del() call since it's been called in dma_do_tasklet().
What will be the result of double list_del() against the same node?
> }
>
> /**
--
Andy Shevchenko
Intel Finland Oy
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev
mp;chan->desc_lock);
> INIT_LIST_HEAD(&chan->ld_pending);
> INIT_LIST_HEAD(&chan->ld_running);
> + INIT_LIST_HEAD(&chan->ld_completed);
> chan->idle = true;
>
> chan->common.device = &fdev->common;
> diff
USE_EXT 0x1000
> #define FSL_DMA_CHAN_START_EXT 0x2000
>
> +#ifdef CONFIG_PM
> +struct fsldma_chan_regs_save {
> + u32 mr;
> +};
> +
> +enum fsldma_pm_state {
> + RUNNING = 0,
> + SUSPENDING,
> + SUSPENDED,
> +};
> +#endif
> +
&
On Fri, 2014-04-11 at 16:14 +0800, Hongbo Zhang wrote:
> On 04/10/2014 07:29 PM, Andy Shevchenko wrote:
> > On Thu, 2014-04-10 at 15:10 +0800, hongbo.zh...@freescale.com wrote:
[]
> >> @@ -819,8 +826,7 @@ static void fsldma_cleanup_descriptor(struct
>
r to keep style in your patches. Better if it
commonly used style in the driver. But comment against comments is
really minor thing.
--
Andy Shevchenko
Intel Finland Oy
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev
split the devices inside DTS as well like it's
done on other platforms.
Signed-off-by: Andy Shevchenko
---
drivers/ata/sata_dwc_460ex.c | 736 +++
1 file changed, 122 insertions(+), 614 deletions(-)
diff --git a/drivers/ata/sata_dwc_460ex.c b/driver
OMPILE_TEST for this module.
The driver is compile tested only on x86. So, it would be nice if anyone who
has either AMCC 460EX Canyonlands board or similar SATA controller in
possession can test this.
[1] http://www.spinics.net/lists/linux-ide/msg50334.html
Andy Shevchenko (2):
sata_dwc_460ex:
This patch re-uses hsdev->dev which is allocated on heap. Therefore, the
private structure, which is global variable, is reduced by one field.
In one case ap->dev is used and there it seems to be right decision.
Signed-off-by: Andy Shevchenko
---
drivers/ata/sata_dwc_460ex.
\
> long __gu_err; \
> - unsigned long __gu_val; \
> + __inttype(*(ptr)) __gu_val; \
> __typeof__(*(ptr)) __user *__gu_addr = (p
erge window.
I think it is the best solution right now.
> I've also sent a patch that fixes the link error on ARM and that should
> work on all other architectures too.
In case of avr32 signalfd_read() fails. Does your patch help with it as well?
P.S. Bisecting shows same culprit: 150a0b4905f1 ("aio: add support for
async openat()")
--
With Best Regards,
Andy Shevchenko
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev
err = -ENODEV;
> goto out_lpc;
> }
>
> - printk(KERN_INFO "PA Semi NAND flash at %08llx, control at I/O %x\n",
> - res.start, lpcctl);
> + pr_info("PA Semi NAND flash at %pR, control at I/O %x\n", &res,
>
From: Christian Lamparter
This patch fixes Machine Check "Data Write PLB Error" which happens
when libata-sff's ata_sff_dev_select is trying to write into the
device_addr in order to select a drive. However, SATA has no master
or slave devices like the old ATA Bus, therefore selecting a
different
The burst size as defined by DMAengine API is in items of address width. Derive
burst size from AHB_DMA_BRST_DFLT (64 bytes) by dividing it to
DMA_SLAVE_BUSWIDTH_4_BYTES (4 bytes) that gives us 16 items.
Signed-off-by: Andy Shevchenko
---
drivers/ata/sata_dwc_460ex.c | 6 +++---
1 file changed
switched to generic DMAengine API we satisfy above by setting
dma_boundary value to 0x1fff.
Suggested-by: Mans Rullgard
Signed-off-by: Andy Shevchenko
---
drivers/ata/sata_dwc_460ex.c | 8 +++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/ata/sata_dwc_460ex.c b
From: Mans Rullgard
This lock is already taken in ata_scsi_queuecmd() a few levels up the
call stack so attempting to take it here is an error. Moreover, it is
pointless in the first place since it only protects a single, atomic
assignment.
Enabling lock debugging gives the following output:
=
From: Mans Rullgard
Calling dmaengine_prep_slave_sg() for non-dma ATA commands is
unnecessary at best and could be harmful if the dma driver reacts
badly to this. It also causes this driver to print a bogus error
message in these cases.
This patch changes sata_dwc_qc_issue() to only do the dma
In the original code the DMA is always a flow controller. Set this accordingly
in updated code.
Signed-off-by: Andy Shevchenko
---
drivers/ata/sata_dwc_460ex.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/ata/sata_dwc_460ex.c b/drivers/ata/sata_dwc_460ex.c
index
3g)
boards. In any case I ask Christian, Måns, and Julian to independently test and
provide Tested-by tag or error report.
Series depends on previously published but not yet fully applied series [1].
[1] http://www.spinics.net/lists/kernel/msg2239735.html
Andy Shevchenko (11):
ata: sata_dwc_4
Here we refactor HOSTDEV{P}_FROM_*() macros to fit one line and fix the
definition of HSDEV_FROM_HSDEVP() where wrong name of the parameter waas used.
Signed-off-by: Andy Shevchenko
---
drivers/ata/sata_dwc_460ex.c | 17 ++---
1 file changed, 6 insertions(+), 11 deletions(-)
diff
There is no need to have a platform driver compiled since the DMA driver is
used as a library.
Signed-off-by: Andy Shevchenko
---
drivers/ata/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig
index cfa936a..7c6e43a 100644
--- a
From: Mans Rullgard
Currently this driver only works with a DesignWare DMA engine which it
registers manually using the second "reg" address range and interrupt
number from the DT node.
This patch makes the driver instead use the "dmas" property if present,
otherwise optionally falling back on t
From: Mans Rullgard
Casting a pointer to unsigned long only to immediately cast it back
to a pointer makes no sense. Fix this.
Signed-off-by: Mans Rullgard
---
drivers/ata/sata_dwc_460ex.c | 30 +++---
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/dr
From: Mans Rullgard
The sata_dwc_qc_prep() does nothing. Use the default ata_noop_qc_prep
instead.
Signed-off-by: Mans Rullgard
---
drivers/ata/sata_dwc_460ex.c | 22 --
1 file changed, 22 deletions(-)
diff --git a/drivers/ata/sata_dwc_460ex.c b/drivers/ata/sata_dwc_460ex
ata_sff_qc_issue() can't handle DMA commands and thus we have to avoid it for
them. Do call ata_bmdma_qc_issue() instead for this case.
Suggested-by: Christian Lamparter
Signed-off-by: Andy Shevchenko
---
drivers/ata/sata_dwc_460ex.c | 6 --
1 file changed, 4 insertions(+), 2 dele
From: Mans Rullgard
The pointer to the mmio register base is missing the __iomem
annotation. Fix this.
Signed-off-by: Mans Rullgard
---
drivers/ata/sata_dwc_460ex.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/ata/sata_dwc_460ex.c b/drivers/ata/sata_dwc_460ex.c
From: Mans Rullgard
The (void *__iomem) cast is wrong. Change the target type of the
"base" pointer to void __iomem instead and drop the cast.
Signed-off-by: Mans Rullgard
---
drivers/ata/sata_dwc_460ex.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/ata/sata
Convert dmaengine_terminate_all() calls to synchronous and asynchronous
versions where appropriate.
Signed-off-by: Andy Shevchenko
---
drivers/ata/sata_dwc_460ex.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/ata/sata_dwc_460ex.c b/drivers/ata/sata_dwc_460ex.c
From: Mans Rullgard
This moves all global data into the driver private struct, thus
permitting multiple devices of this type to be used.
The core_scr_read/write() functions are replaced with equivalent
calls to the existing sata_dwc_scr_read/write().
Signed-off-by: Mans Rullgard
---
drivers/a
From: Mans Rullgard
This adds support for powering on an optional PHY when activating the
device.
Signed-off-by: Mans Rullgard
---
drivers/ata/Kconfig | 1 +
drivers/ata/sata_dwc_460ex.c | 22 ++
2 files changed, 23 insertions(+)
diff --git a/drivers/ata/Kconfig
From: Mans Rullgard
This consolidates the reads from each of the if/else branches
to one place making the code a lot nicer to look at.
Signed-off-by: Mans Rullgard
---
drivers/ata/sata_dwc_460ex.c | 14 ++
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/drivers/ata/sa
Device tree update for the Applied micro processor 460ex on-chip SATA to use
"dmas" property.
Signed-off-by: Andy Shevchenko
---
arch/powerpc/boot/dts/canyonlands.dts | 15 ---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/arch/powerpc/boot/dts/canyonla
There is a duplication in the debug messages when accessing SCR registers.
Remove duplication to make the messages neat.
Signed-off-by: Andy Shevchenko
---
drivers/ata/sata_dwc_460ex.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/ata/sata_dwc_460ex.c b
This simplifies error handling and cleanup by using devm to manage
IO mappings.
Signed-off-by: Mans Rullgard
---
drivers/ata/sata_dwc_460ex.c | 30 +++---
1 file changed, 11 insertions(+), 19 deletions(-)
diff --git a/drivers/ata/sata_dwc_460ex.c b/drivers/ata/sata_dwc_4
From: Mans Rullgard
Rename the register access macros and use standard _relaxed()
ops instead of __raw variants with explicit byte swapping.
The original driver used the ppc-specific in/out_le32(). When it
was adapted to other systems, these were added to the driver
under ifdefs. However, thos
DMA operates with physical addresses which is not exactly the same as ioremap()
returns.
Introduce variable to keep physical address of the SATA FIFO register and
supply it when prepare DMA channel.
Signed-off-by: Andy Shevchenko
---
drivers/ata/sata_dwc_460ex.c | 13 +++--
1 file
From: Christian Lamparter
This patch fixes Machine Check "Data Write PLB Error" which happens
when libata-sff's ata_sff_dev_select is trying to write into the
device_addr in order to select a drive. However, SATA has no master
or slave devices like the old ATA Bus, therefore selecting a
different
e/msg09250.html
[2] https://bitbucket.org/andy-shev/linux/branch/topic%2Fdw%2Fsata
Since v1:
- simplify patch 8 (David Laight)
- add Tested-by and Acked-by tags
Andy Shevchenko (11):
ata: sata_dwc_460ex: set dma_boundary to 0x1fff
ata: sata_dwc_460ex: burst size must be in items not bytes
at
switched to generic DMAengine API we satisfy above by setting
dma_boundary value to 0x1fff.
Suggested-by: Mans Rullgard
Tested-by: Christian Lamparter
Signed-off-by: Andy Shevchenko
---
drivers/ata/sata_dwc_460ex.c | 8 +++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a
There is no need to have a platform driver compiled since the DMA driver is
used as a library.
Tested-by: Christian Lamparter
Signed-off-by: Andy Shevchenko
---
drivers/ata/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig
ata_sff_qc_issue() can't handle DMA commands and thus we have to avoid it for
them. Do call ata_bmdma_qc_issue() instead for this case. Note that the former
one distinguishes PIO and DMA mode and behaves accordingly.
Suggested-by: Christian Lamparter
Signed-off-by: Andy Shevchenko
---
dr
In the original code the DMA is always a flow controller. Set this accordingly
in updated code.
Tested-by: Christian Lamparter
Signed-off-by: Andy Shevchenko
---
drivers/ata/sata_dwc_460ex.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/ata/sata_dwc_460ex.c b
From: Mans Rullgard
Currently this driver only works with a DesignWare DMA engine which it
registers manually using the second "reg" address range and interrupt
number from the DT node.
This patch makes the driver instead use the "dmas" property if present,
otherwise optionally falling back on t
From: Mans Rullgard
This adds support for powering on an optional PHY when activating the
device.
Tested-by: Christian Lamparter
Signed-off-by: Mans Rullgard
---
drivers/ata/Kconfig | 1 +
drivers/ata/sata_dwc_460ex.c | 22 ++
2 files changed, 23 insertions(+)
d
Here we refactor HOSTDEV{P}_FROM_*() macros to fit one line and fix the
definition of HSDEV_FROM_HSDEVP() where wrong name of the parameter waas used.
Tested-by: Christian Lamparter
Signed-off-by: Andy Shevchenko
---
drivers/ata/sata_dwc_460ex.c | 17 ++---
1 file changed, 6
From: Mans Rullgard
The (void *__iomem) cast is wrong. Change the target type of the
"base" pointer to void __iomem instead and drop the cast.
Tested-by: Christian Lamparter
Signed-off-by: Mans Rullgard
---
drivers/ata/sata_dwc_460ex.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-
From: Mans Rullgard
Casting a pointer to unsigned long only to immediately cast it back
to a pointer makes no sense. Fix this.
Tested-by: Christian Lamparter
Signed-off-by: Mans Rullgard
---
drivers/ata/sata_dwc_460ex.c | 30 +++---
1 file changed, 15 insertions(+), 1
From: Mans Rullgard
The sata_dwc_qc_prep() does nothing. Use the default ata_noop_qc_prep
instead.
Tested-by: Christian Lamparter
Signed-off-by: Mans Rullgard
---
drivers/ata/sata_dwc_460ex.c | 22 --
1 file changed, 22 deletions(-)
diff --git a/drivers/ata/sata_dwc_460e
From: Mans Rullgard
This consolidates the reads from each of the if/else branches
to one place making the code a lot nicer to look at.
Tested-by: Christian Lamparter
Signed-off-by: Mans Rullgard
---
drivers/ata/sata_dwc_460ex.c | 14 ++
1 file changed, 6 insertions(+), 8 deletions
DMA operates with physical addresses which is not exactly the same as ioremap()
returns.
Introduce variable to keep physical address of the SATA FIFO register and
supply it when prepare DMA channel.
Tested-by: Christian Lamparter
Signed-off-by: Andy Shevchenko
---
drivers/ata/sata_dwc_460ex.c
From: Mans Rullgard
Rename the register access macros and use standard _relaxed()
ops instead of __raw variants with explicit byte swapping.
The original driver used the ppc-specific in/out_le32(). When it
was adapted to other systems, these were added to the driver
under ifdefs. However, thos
From: Mans Rullgard
This moves all global data into the driver private struct, thus
permitting multiple devices of this type to be used.
The core_scr_read/write() functions are replaced with equivalent
calls to the existing sata_dwc_scr_read/write().
Tested-by: Christian Lamparter
Signed-off-b
From: Mans Rullgard
The pointer to the mmio register base is missing the __iomem
annotation. Fix this.
Tested-by: Christian Lamparter
Signed-off-by: Mans Rullgard
---
drivers/ata/sata_dwc_460ex.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/ata/sata_dwc_460ex.c
There is a duplication in the debug messages when accessing SCR registers.
Remove duplication to make the messages neat.
Tested-by: Christian Lamparter
Signed-off-by: Andy Shevchenko
---
drivers/ata/sata_dwc_460ex.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a
The burst size as defined by DMAengine API is in items of address width. Derive
burst size from AHB_DMA_BRST_DFLT (64 bytes) by dividing it to
DMA_SLAVE_BUSWIDTH_4_BYTES (4 bytes) that gives us 16 items.
Tested-by: Christian Lamparter
Signed-off-by: Andy Shevchenko
---
drivers/ata
From: Mans Rullgard
Calling dmaengine_prep_slave_sg() for non-dma ATA commands is
unnecessary at best and could be harmful if the dma driver reacts
badly to this. It also causes this driver to print a bogus error
message in these cases.
This patch changes sata_dwc_qc_issue() to only do the dma
Device tree update for the Applied micro processor 460ex on-chip SATA to use
"dmas" property.
Acked-by: Rob Herring
Signed-off-by: Andy Shevchenko
---
arch/powerpc/boot/dts/canyonlands.dts | 15 ---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/arch/po
From: Mans Rullgard
This lock is already taken in ata_scsi_queuecmd() a few levels up the
call stack so attempting to take it here is an error. Moreover, it is
pointless in the first place since it only protects a single, atomic
assignment.
Enabling lock debugging gives the following output:
=
This simplifies error handling and cleanup by using devm to manage
IO mappings.
Tested-by: Christian Lamparter
Signed-off-by: Mans Rullgard
Signed-off-by: Andy Shevchenko
---
drivers/ata/sata_dwc_460ex.c | 30 +++---
1 file changed, 11 insertions(+), 19 deletions
Convert dmaengine_terminate_all() calls to synchronous and asynchronous
versions where appropriate.
Tested-by: Christian Lamparter
Signed-off-by: Andy Shevchenko
---
drivers/ata/sata_dwc_460ex.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/ata/sata_dwc_460ex.c b
; - debug_dma_mapping_error(dev, dma_addr);
> - if (ops->mapping_error)
> - return ops->mapping_error(dev, dma_addr);
> -
> - return (dma_addr == DMA_ERROR_CODE);
> -}
> -
> extern int dma_supported(struct device *hwdev, u64 mask);
> extern int d
On Fri, 2015-08-14 at 21:51 +1000, Michael Ellerman wrote:
> On Tue, 2015-11-08 at 11:23:09 UTC, Andy Shevchenko wrote:
> > The derive_parent() has similar semantics to what we have in newly
> > introduced
> > of_helpers module. The replacement reduces code base and propa
On Thu, 2015-10-01 at 10:02 +0300, Denis Kirjanov wrote:
> On 10/1/15, Michael Ellerman wrote:
> > On Wed, 2015-09-30 at 19:19 +0300, Andy Shevchenko wrote:
> > > On Fri, 2015-08-14 at 21:51 +1000, Michael Ellerman wrote:
> > > > On Tue, 2015-11-08 at 11:23
Changelog v2:
- fix compiler error
- rebase on top of recent linux-next
- compile tested
Andy Shevchenko (5):
powerpc/pseries: extract of_helpers module
powerpc/pseries: fix a potential memory leak
powerpc/pseries: replace kmalloc + strlcpy
powerpc/pseries: handle nodes without
The helper kstrndup() will do the same in one line.
Signed-off-by: Andy Shevchenko
---
arch/powerpc/platforms/pseries/of_helpers.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/powerpc/platforms/pseries/of_helpers.c
b/arch/powerpc/platforms/pseries/of_helpers.c
Extract a new module to share the code between other modules.
There is no functional change.
Signed-off-by: Andy Shevchenko
---
arch/powerpc/platforms/pseries/Makefile | 1 +
arch/powerpc/platforms/pseries/of_helpers.c | 38 +
arch/powerpc/platforms/pseries
The derive_parent() has similar semantics to what we have in newly introduced
of_helpers module. The replacement reduces code base and propagates the actual
error code to the caller.
Signed-off-by: Andy Shevchenko
---
arch/powerpc/platforms/pseries/dlpar.c | 31
In case we have a full node name like /foo/bar and /foo is not found the
parent_path left unfreed. So, free a memory before return to a caller.
Signed-off-by: Andy Shevchenko
---
arch/powerpc/platforms/pseries/of_helpers.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git
In case we have node without '/' strrchr() returns NULL which might lead to
crash. Replace strrchr() by kbasename() and modify condition to avoid such
behaviour.
Suggested-by: Segher Boessenkool
Signed-off-by: Andy Shevchenko
---
arch/powerpc/platforms/pseries/of_helpers.c | 6 +++-
ivalent to (tail
- 1 > path), can we amend both?
For example (might be better, but first comes to my mind)
const char *tail = kbasename(path) - 1;
...
if (tail > path) {
> if (!parent_path)
> return ERR_PTR(-ENOMEM);
> }
>
--
Andy Shevchenko
Intel Finland Oy
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev
27;/' character before the base name instead of the base name. This
> then
> adjusts the string length calculations to not include the trailing
> '/'
> in the parent path name.
>
> Signed-off-by: Nathan Fontenot
Reviewed-by: Andy Shevchenko
> ---
>
> Upd
On Sun, 2015-11-22 at 13:03 +, Måns Rullgård wrote:
> Andy Shevchenko writes:
>
> > The SATA implementation based on two actually different devices,
> > i.e. SATA and
> > DMA controllers.
> >
> > For Synopsys DesignWare DMA we have already a generic
eEnabled = true;
> unsigned int global_secflags = CIFSSEC_DEF;
> /* unsigned int ntlmv2_support = 0; */
> unsigned int sign_CIFS_PDUs = 1;
> diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h
> index a25b2513f146..d21da9f05bae 100644
> --- a/fs/cifs/cifsglob.h
> +++ b/fs/cifs/cifsglob.h
> @@ -1596,11 +1596,11 @@ GLOBAL_EXTERN atomic_t midCount;
>
> /* Misc globals */
> GLOBAL_EXTERN bool enable_oplocks; /* enable or disable oplocks */
> -GLOBAL_EXTERN unsigned int lookupCacheEnabled;
> +GLOBAL_EXTERN bool lookupCacheEnabled;
> GLOBAL_EXTERN unsigned int global_secflags;/* if on, session setup sent
> with more secure ntlmssp2 challenge/resp */
> GLOBAL_EXTERN unsigned int sign_CIFS_PDUs; /* enable smb packet signing */
> -GLOBAL_EXTERN unsigned int linuxExtEnabled;/*enable Linux/Unix CIFS
> extensions*/
> +GLOBAL_EXTERN bool linuxExtEnabled;/*enable Linux/Unix CIFS extensions*/
> GLOBAL_EXTERN unsigned int CIFSMaxBufSize; /* max size not including hdr */
> GLOBAL_EXTERN unsigned int cifs_min_rcv;/* min size of big ntwrk buf
> pool */
> GLOBAL_EXTERN unsigned int cifs_min_small; /* min size of small buf pool */
> --
> 2.6.3
>
--
With Best Regards,
Andy Shevchenko
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev
'Yy1Nn0'.
> - * Otherwise it will return -EINVAL. Value pointed to by res is
> - * updated upon finding a match.
> - */
> -int strtobool(const char *s, bool *res)
> -{
> - switch (s[0]) {
> - case 'y':
>
secflags = CIFSSEC_DEF;
> /* unsigned int ntlmv2_support = 0; */
> unsigned int sign_CIFS_PDUs = 1;
> diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h
> index a25b2513f146..d21da9f05bae 100644
> --- a/fs/cifs/cifsglob.h
> +++ b/fs/cifs/cifsglob.h
>
eturn 0;
> + case 'f':
> + case 'F':
> + *res = false;
> + return 0;
> + default:
> + break;
> + }
> default:
>
else
> - return 0;
> - return 1;
> + return kstrtobool(str, 0, &hrtimer_hres_enabled);
> }
>
> __setup("highres=", setup_hrtimer_hres);
> diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
> index
ioremap(dev, regs->start, resource_size(regs));
> + p->membase = devm_ioremap_resource(dev, regs);
> if (!p->membase)
And how did you test this? devm_ioremap_resource() returns error
pointer in case of error.
> return -ENOMEM;
--
With Best Regards,
Andy Shevchenko
1 - 100 of 488 matches
Mail list logo