Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1736937
| From | Vinod Koul <vinod.koul@intel.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] dmaengine: edma: Reject slave configs using a buswidth of 8 and larger |
| Date | 2017-09-21 19:20 +0200 |
| Message-ID | <usdiQ-3Se-77@gated-at.bofh.it> (permalink) |
| References | <uqIK5-Ea-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Sun, Sep 17, 2017 at 04:25:10PM +0200, Stefan Brüns wrote:
> The driver would happily accept buswidth of 16/32/64 bytes and program
> garbage to its registers.
Peter?
>
> Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
> ---
> drivers/dma/edma.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/dma/edma.c b/drivers/dma/edma.c
> index 3879f80a4815..c944ea339425 100644
> --- a/drivers/dma/edma.c
> +++ b/drivers/dma/edma.c
> @@ -887,8 +887,8 @@ static int edma_slave_config(struct dma_chan *chan,
> {
> struct edma_chan *echan = to_edma_chan(chan);
>
> - if (cfg->src_addr_width == DMA_SLAVE_BUSWIDTH_8_BYTES ||
> - cfg->dst_addr_width == DMA_SLAVE_BUSWIDTH_8_BYTES)
> + if (cfg->src_addr_width >= DMA_SLAVE_BUSWIDTH_8_BYTES ||
> + cfg->dst_addr_width >= DMA_SLAVE_BUSWIDTH_8_BYTES)
> return -EINVAL;
>
> memcpy(&echan->cfg, cfg, sizeof(echan->cfg));
> --
> 2.14.1
>
--
~Vinod
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] dmaengine: edma: Reject slave configs using a buswidth of 8 and larger Stefan Brüns <stefan.bruens@rwth-aachen.de> - 2017-09-17 16:30 +0200
Re: [PATCH] dmaengine: edma: Reject slave configs using a buswidth of 8 and larger Vinod Koul <vinod.koul@intel.com> - 2017-09-21 19:20 +0200
Re: [PATCH] dmaengine: edma: Reject slave configs using a buswidth of 8 and larger Peter Ujfalusi <peter.ujfalusi@ti.com> - 2017-09-21 20:30 +0200
Re: [PATCH] dmaengine: edma: Reject slave configs using a buswidth of 8 and larger Peter Ujfalusi <peter.ujfalusi@ti.com> - 2017-09-22 08:20 +0200
Re: [PATCH] dmaengine: edma: Reject slave configs using a buswidth of 8 and larger Vinod Koul <vinod.koul@intel.com> - 2017-09-22 10:40 +0200
csiph-web