Re: [PATCH 1/5] mmc: renesas_sdhi_internal_dmac: limit DMA RX for old SoCs

2018-04-13 Thread Simon Horman
On Fri, Apr 13, 2018 at 10:35:48AM +0200, Wolfram Sang wrote: > > > As the implementation stands it is global - only one DMA RX stream may > > be in flight for the entire system. I am wondering if that is the right > > granularity for the restriction. Perhaps it could be per-SDHI device, > > allow

Re: [PATCH 1/5] mmc: renesas_sdhi_internal_dmac: limit DMA RX for old SoCs

2018-04-13 Thread Wolfram Sang
> As the implementation stands it is global - only one DMA RX stream may > be in flight for the entire system. I am wondering if that is the right > granularity for the restriction. Perhaps it could be per-SDHI device, > allowing concurrent streams on different SDHI devices. As we have only one D

Re: [PATCH 1/5] mmc: renesas_sdhi_internal_dmac: limit DMA RX for old SoCs

2018-04-13 Thread Simon Horman
On Thu, Apr 12, 2018 at 01:21:42PM +0200, Wolfram Sang wrote: > > > > +static unsigned long global_flags; > > > > Is the restriction on concurrent DMA RX streams global or per-device? > > ? Each device has only one DMA RX channel. Hey Simon, you upstreamed > this driver :) Or did I get the quest

Re: [PATCH 1/5] mmc: renesas_sdhi_internal_dmac: limit DMA RX for old SoCs

2018-04-12 Thread Wolfram Sang
On Thu, Apr 12, 2018 at 01:34:41PM +0200, Geert Uytterhoeven wrote: > Hi Wolfram, > > On Thu, Apr 12, 2018 at 1:31 PM, Wolfram Sang wrote: > >> That should have been caught by the !soc check above, and have already > >> returned with -ENODEV. > > > > Now I get it: You mean non-0 check, not non-NU

Re: [PATCH 1/5] mmc: renesas_sdhi_internal_dmac: limit DMA RX for old SoCs

2018-04-12 Thread Geert Uytterhoeven
Hi Wolfram, On Thu, Apr 12, 2018 at 1:31 PM, Wolfram Sang wrote: >> That should have been caught by the !soc check above, and have already >> returned with -ENODEV. > > Now I get it: You mean non-0 check, not non-NULL check... soc->data _is_ a pointer. You only cast it to an integer on the next

Re: [PATCH 1/5] mmc: renesas_sdhi_internal_dmac: limit DMA RX for old SoCs

2018-04-12 Thread Wolfram Sang
> That should have been caught by the !soc check above, and have already > returned with -ENODEV. Now I get it: You mean non-0 check, not non-NULL check... signature.asc Description: PGP signature

Re: [PATCH 1/5] mmc: renesas_sdhi_internal_dmac: limit DMA RX for old SoCs

2018-04-12 Thread Geert Uytterhoeven
Hi Wolfram, On Thu, Apr 12, 2018 at 1:11 PM, Wolfram Sang wrote: >> > + if (soc->data) >> >> This non-NULL check is not really needed. > > And if we match using the Gen3 generic compatible with a non-whitelisted > SoC? That should have been caught by the !soc check above, and have already

Re: [PATCH 1/5] mmc: renesas_sdhi_internal_dmac: limit DMA RX for old SoCs

2018-04-12 Thread Wolfram Sang
> > +static unsigned long global_flags; > > Is the restriction on concurrent DMA RX streams global or per-device? ? Each device has only one DMA RX channel. Hey Simon, you upstreamed this driver :) Or did I get the question wrong? > > + if (dir == DMA_FROM_DEVICE) > > + clear_bit(SD

Re: [PATCH 1/5] mmc: renesas_sdhi_internal_dmac: limit DMA RX for old SoCs

2018-04-12 Thread Wolfram Sang
> > + if (soc->data) > > This non-NULL check is not really needed. And if we match using the Gen3 generic compatible with a non-whitelisted SoC? signature.asc Description: PGP signature

Re: [PATCH 1/5] mmc: renesas_sdhi_internal_dmac: limit DMA RX for old SoCs

2018-04-11 Thread Simon Horman
On Tue, Apr 10, 2018 at 11:38:27AM +0200, Wolfram Sang wrote: > Early revisions of certain SoCs cannot do multiple DMA RX streams in > parallel. To avoid data corruption, only allow one DMA RX channel and > fall back to PIO, if needed. > > Signed-off-by: Wolfram Sang > Reviewed-by: Yoshihiro Shim

Re: [PATCH 1/5] mmc: renesas_sdhi_internal_dmac: limit DMA RX for old SoCs

2018-04-10 Thread Geert Uytterhoeven
Hi Wolfram, On Tue, Apr 10, 2018 at 11:38 AM, Wolfram Sang wrote: > Early revisions of certain SoCs cannot do multiple DMA RX streams in > parallel. To avoid data corruption, only allow one DMA RX channel and > fall back to PIO, if needed. > > Signed-off-by: Wolfram Sang > Reviewed-by: Yoshihiro

[PATCH 1/5] mmc: renesas_sdhi_internal_dmac: limit DMA RX for old SoCs

2018-04-10 Thread Wolfram Sang
Early revisions of certain SoCs cannot do multiple DMA RX streams in parallel. To avoid data corruption, only allow one DMA RX channel and fall back to PIO, if needed. Signed-off-by: Wolfram Sang Reviewed-by: Yoshihiro Shimoda Tested-by: Nguyen Viet Dung --- drivers/mmc/host/renesas_sdhi_inter