Re: [PATCH] dmaengine: cppi41: Fix cppi41_dma_prep_slave_sg() when idle

2019-10-23 Thread Sergei Shtylyov
Hello! On 10/23/2019 09:58 PM, Andy Shevchenko wrote: >>> + int error; >>> + >>> + error = pm_runtime_get(cdd->ddev.dev); >>> + if (error < 0) { >> >>I'd call that variable 'status', comparison (error < 0) just doesn't look >> right. >> If it was *if* (error), it would have been

Re: [PATCH] dmaengine: cppi41: Fix cppi41_dma_prep_slave_sg() when idle

2019-10-23 Thread Tony Lindgren
* Peter Ujfalusi [191023 19:02]: > On 10/23/19 8:16 PM, Tony Lindgren wrote: > > * Peter Ujfalusi [191023 17:04]: > >> On 10/23/19 6:31 PM, Tony Lindgren wrote: > >>> diff --git a/drivers/dma/ti/cppi41.c b/drivers/dma/ti/cppi41.c > >>> --- a/drivers/dma/ti/cppi41.c > >>> +++ b/drivers/dma/ti/cppi

Re: [PATCH] dmaengine: cppi41: Fix cppi41_dma_prep_slave_sg() when idle

2019-10-23 Thread Peter Ujfalusi
On 10/23/19 8:16 PM, Tony Lindgren wrote: > * Peter Ujfalusi [191023 17:04]: >> On 10/23/19 6:31 PM, Tony Lindgren wrote: >>> diff --git a/drivers/dma/ti/cppi41.c b/drivers/dma/ti/cppi41.c >>> --- a/drivers/dma/ti/cppi41.c >>> +++ b/drivers/dma/ti/cppi41.c >>> @@ -586,9 +586,22 @@ static struct

Re: [PATCH] dmaengine: cppi41: Fix cppi41_dma_prep_slave_sg() when idle

2019-10-23 Thread Tony Lindgren
* Sergei Shtylyov [191023 18:56]: > On 10/23/2019 06:31 PM, Tony Lindgren wrote: > > --- a/drivers/dma/ti/cppi41.c > > +++ b/drivers/dma/ti/cppi41.c > > @@ -586,9 +586,22 @@ static struct dma_async_tx_descriptor > > *cppi41_dma_prep_slave_sg( > > enum dma_transfer_direction dir, unsigned long

Re: [PATCH] dmaengine: cppi41: Fix cppi41_dma_prep_slave_sg() when idle

2019-10-23 Thread Andy Shevchenko
On Wed, Oct 23, 2019 at 9:55 PM Sergei Shtylyov wrote: > On 10/23/2019 06:31 PM, Tony Lindgren wrote: > > + int error; > > + > > + error = pm_runtime_get(cdd->ddev.dev); > > + if (error < 0) { > >I'd call that variable 'status', comparison (error < 0) just doesn't look > right. >

Re: [PATCH] dmaengine: cppi41: Fix cppi41_dma_prep_slave_sg() when idle

2019-10-23 Thread Sergei Shtylyov
Hello! On 10/23/2019 06:31 PM, Tony Lindgren wrote: > Yegor Yefremov reported that musb and ftdi > uart can fail for the first open of the uart unless connected using > a hub. > > This is because the first dma call done by musb_ep_program() must wait > if cppi41 is PM runtime suspended. Otherwi

Re: [PATCH] dmaengine: cppi41: Fix cppi41_dma_prep_slave_sg() when idle

2019-10-23 Thread Tony Lindgren
* Peter Ujfalusi [191023 17:04]: > On 10/23/19 6:31 PM, Tony Lindgren wrote: > > diff --git a/drivers/dma/ti/cppi41.c b/drivers/dma/ti/cppi41.c > > --- a/drivers/dma/ti/cppi41.c > > +++ b/drivers/dma/ti/cppi41.c > > @@ -586,9 +586,22 @@ static struct dma_async_tx_descriptor > > *cppi41_dma_prep_s

Re: [PATCH] dmaengine: cppi41: Fix cppi41_dma_prep_slave_sg() when idle

2019-10-23 Thread Peter Ujfalusi
Hi Tony, On 10/23/19 6:31 PM, Tony Lindgren wrote: > Yegor Yefremov reported that musb and ftdi > uart can fail for the first open of the uart unless connected using > a hub. > > This is because the first dma call done by musb_ep_program() must wait > if cppi41 is PM runtime suspended. Otherwise

Re: [PATCH] dmaengine: cppi41: Fix cppi41_dma_prep_slave_sg() when idle

2019-10-23 Thread Vinod Koul
On 23-10-19, 08:31, Tony Lindgren wrote: > Yegor Yefremov reported that musb and ftdi > uart can fail for the first open of the uart unless connected using > a hub. > > This is because the first dma call done by musb_ep_program() must wait > if cppi41 is PM runtime suspended. Otherwise musb_ep_pr