Re: Regression: spi: core: avoid waking pump thread from spi_sync instead run teardown delayed

2019-05-12 Thread Mark Brown
On Thu, May 09, 2019 at 09:47:08PM +0200, Martin Sperl wrote: > While thinking about this again maybe an idea: > What about implement a second spi_transfer_one implementation (together > with a message pump implementation) that would handle things correctly. > Any driver then can select the old

Re: Regression: spi: core: avoid waking pump thread from spi_sync instead run teardown delayed

2019-05-09 Thread Martin Sperl
Hi Mark! > On 23.01.2019, at 18:56, Mark Brown wrote: > >> On Sun, Jan 20, 2019 at 12:24:23PM +0100, ker...@martin.sperl.org wrote: >> >> These kind of changes it requires are consuming a bit more time than >> I was hoping for. > > Thanks for trying. > >> So maybe at this very moment the

Re: Regression: spi: core: avoid waking pump thread from spi_sync instead run teardown delayed

2019-01-23 Thread Mark Brown
On Sun, Jan 20, 2019 at 12:24:23PM +0100, ker...@martin.sperl.org wrote: > These kind of changes it requires are consuming a bit more time than > I was hoping for. Thanks for trying. > So maybe at this very moment the best is reverting the patch. Yes, I'm just going to do that for now. > As

Re: Regression: spi: core: avoid waking pump thread from spi_sync instead run teardown delayed

2019-01-23 Thread Marek Szyprowski
Hi All On 2019-01-22 10:36, Geert Uytterhoeven wrote: > On Mon, Jan 14, 2019 at 4:36 PM Jon Hunter wrote: >> I have noticed that system suspend has started failing consistently on a >> couple Tegra boards over the last few days with the linux-next branch. >> The following error is seen on on

Re: Regression: spi: core: avoid waking pump thread from spi_sync instead run teardown delayed

2019-01-22 Thread Geert Uytterhoeven
On Mon, Jan 14, 2019 at 4:36 PM Jon Hunter wrote: > I have noticed that system suspend has started failing consistently on a > couple Tegra boards over the last few days with the linux-next branch. > The following error is seen on on entering suspend ... > > [ 58.222033] spi_master spi1: could

Re: Regression: spi: core: avoid waking pump thread from spi_sync instead run teardown delayed

2019-01-20 Thread kernel
Hi Mark! > On 18.01.2019, at 20:12, Mark Brown wrote: > > On Fri, Jan 18, 2019 at 06:11:31PM +0100, ker...@martin.sperl.org wrote: > >> Does something like this looks acceptable? > > Yes, it does! > >> SPI_CONTROLLER_MODE_EXCLUSIVE could replace the bus_lock_flag. >> I am also not sure of

Re: Regression: spi: core: avoid waking pump thread from spi_sync instead run teardown delayed

2019-01-18 Thread Mark Brown
On Fri, Jan 18, 2019 at 06:11:31PM +0100, ker...@martin.sperl.org wrote: > Does something like this looks acceptable? > diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h > index ec210286567c..677fc5025033 100644 > --- a/include/linux/spi/spi.h > +++ b/include/linux/spi/spi.h > @@

Re: Regression: spi: core: avoid waking pump thread from spi_sync instead run teardown delayed

2019-01-18 Thread kernel
Hi Mark! Just got access to my computer back for the weekend ;) > On 15.01.2019, at 22:25, Mark Brown wrote: > > On Tue, Jan 15, 2019 at 09:58:55PM +0100, Martin Sperl wrote: > >> I may find some time over the weekend if no solution >> has been found until then. > > Thanks for volunteering

Re: Regression: spi: core: avoid waking pump thread from spi_sync instead run teardown delayed

2019-01-16 Thread Jon Hunter
On 15/01/2019 21:25, Mark Brown wrote: > On Tue, Jan 15, 2019 at 09:58:55PM +0100, Martin Sperl wrote: > >> Maybe a bigger change to the reduce the complexity of >> the state machine would solve that problem and also >> reduce code complexity... > > Yeah, that's where I was getting to with

Re: Regression: spi: core: avoid waking pump thread from spi_sync instead run teardown delayed

2019-01-16 Thread Jon Hunter
On 15/01/2019 17:39, ker...@martin.sperl.org wrote: > Hi John! > >> On 15.01.2019, at 15:26, Jon Hunter wrote: >>> Looks as if there is something missing in spi_stop_queue that >>> would wake the worker thread one last time without any delays >>> and finish the hw shutdown immediately - it

Re: Regression: spi: core: avoid waking pump thread from spi_sync instead run teardown delayed

2019-01-15 Thread Mark Brown
On Tue, Jan 15, 2019 at 09:58:55PM +0100, Martin Sperl wrote: > Maybe a bigger change to the reduce the complexity of > the state machine would solve that problem and also > reduce code complexity... Yeah, that's where I was getting to with that test patch I posted. > I may find some time over

Re: Regression: spi: core: avoid waking pump thread from spi_sync instead run teardown delayed

2019-01-15 Thread Martin Sperl
> On 15.01.2019, at 20:26, Mark Brown wrote: > >> On Tue, Jan 15, 2019 at 06:39:27PM +0100, ker...@martin.sperl.org wrote: >> >> Is it possible that the specific flash is not using the “normal” >> spi_pump_message, but spi_controller_mem_ops operations? > > Right, that's my best guess at

Re: Regression: spi: core: avoid waking pump thread from spi_sync instead run teardown delayed

2019-01-15 Thread Mark Brown
On Tue, Jan 15, 2019 at 04:09:14PM +, Jon Hunter wrote: > On 15/01/2019 15:10, Mark Brown wrote: > > On Tue, Jan 15, 2019 at 02:26:02PM +, Jon Hunter wrote: > > Right, I think with the current code we just shouldn't be checking for > > busy in teardown, since there's now a fairly big

Re: Regression: spi: core: avoid waking pump thread from spi_sync instead run teardown delayed

2019-01-15 Thread Mark Brown
On Tue, Jan 15, 2019 at 06:39:27PM +0100, ker...@martin.sperl.org wrote: > Is it possible that the specific flash is not using the “normal” > spi_pump_message, but spi_controller_mem_ops operations? Right, that's my best guess at the minute as well. > Maybe we are missing the teardown in that

Re: Regression: spi: core: avoid waking pump thread from spi_sync instead run teardown delayed

2019-01-15 Thread kernel
Hi John! > On 15.01.2019, at 15:26, Jon Hunter wrote: >> Looks as if there is something missing in spi_stop_queue that >> would wake the worker thread one last time without any delays >> and finish the hw shutdown immediately - it runs as a delayed >> task... >> >> One question: do you run any

Re: Regression: spi: core: avoid waking pump thread from spi_sync instead run teardown delayed

2019-01-15 Thread Jon Hunter
On 15/01/2019 15:10, Mark Brown wrote: > On Tue, Jan 15, 2019 at 02:26:02PM +, Jon Hunter wrote: > >> It seems that __spi_pump_messages() is getting called several times >> during boot when registering the spi-flash, then after the spi-flash has >> been registered, about a 1 sec later

Re: Regression: spi: core: avoid waking pump thread from spi_sync instead run teardown delayed

2019-01-15 Thread Mark Brown
On Tue, Jan 15, 2019 at 02:26:02PM +, Jon Hunter wrote: > It seems that __spi_pump_messages() is getting called several times > during boot when registering the spi-flash, then after the spi-flash has > been registered, about a 1 sec later spi_pump_idle_teardown() is called > (as expected),

Re: Regression: spi: core: avoid waking pump thread from spi_sync instead run teardown delayed

2019-01-15 Thread Jon Hunter
Hi Martin, On 14/01/2019 22:01, Martin Sperl wrote: > Hi Jon, > > On 14.01.2019, at 16:35, Jon Hunter > wrote: > >> Hi Martin, Mark, >> >> [   58.222033] spi_master spi1: could not stop message queue >> [   58.222038] spi_master spi1: queue stop failed >> [   

Regression: spi: core: avoid waking pump thread from spi_sync instead run teardown delayed

2019-01-14 Thread Jon Hunter
Hi Martin, Mark, I have noticed that system suspend has started failing consistently on a couple Tegra boards over the last few days with the linux-next branch. The following error is seen on on entering suspend ... [ 58.222033] spi_master spi1: could not stop message queue [ 58.222038]