Summary: OMAP patch causes SPI bus transaction failure on TI CPU Commit: c859e0d479b3b4f6132fc12637c51e01492f31f6 Kernel version: 5.10.87
The detailed description:
I know this is a old commit at this point, but we have observed a regression caused by this commit. It causes improper toggle during a SPI transaction with a microcontroller. The CPU in use is Texas Instruments AM3352BZCZA80. The microcontroller in use is a PIC based micro. I have logic capture images available to show the signal difference that is causing confusion on the SPI bus.
..............................................
Eric Schikschneit
Embedded Linux Engineer
NovaTech, LLC 13555 W. 107th Street Lenexa, KS 66215 (913) 451-1880 (main) (913) 742-XXXX (direct)
Eric.Schikschneit@novatechweb.com
Hi, this is your Linux kernel regression tracker.
On 01.06.22 17:56, Eric Schikschneit wrote:
Summary: OMAP patch causes SPI bus transaction failure on TI CPU Commit: c859e0d479b3b4f6132fc12637c51e01492f31f6 Kernel version: 5.10.87
The detailed description:
I know this is a old commit at this point,
That shouldn't be a problem at all, but it raises one question that would be good to get answered: does this problem still occur with the latest code? This issue for example might have been fixed in between, but maybe the fix was to complex to get backported or something like that. Hence it would be ideal if you could quickly give 5.19-rc1 a shot; 5.18.y is not ideal, but will do as well.
but we have observed a regression caused by this commit. It causes improper toggle during a SPI transaction with a microcontroller. The CPU in use is Texas Instruments AM3352BZCZA80. The microcontroller in use is a PIC based micro. I have logic capture images available to show the signal difference that is causing confusion on the SPI bus.
Ciao, Thorsten (wearing his 'the Linux kernel's regression tracker' hat)
P.S.: As the Linux kernel's regression tracker I deal with a lot of reports and sometimes miss something important when writing mails like this. If that's the case here, don't hesitate to tell me in a public reply, it's in everyone's interest to set the public record straight.
I am limited by the availability of the preempt-rt kernels that are available on the yocto project. The newest kernel I see listed is 5.15.44 on: https://git.yoctoproject.org/linux-yocto/
From: Thorsten Leemhuis regressions@leemhuis.info Sent: Tuesday, June 7, 2022 5:07 AM To: Eric Schikschneit eric.schikschneit@novatechautomation.com; stable@vger.kernel.org stable@vger.kernel.org Cc: regressions@lists.linux.dev regressions@lists.linux.dev; rmk+kernel@armlinux.org.uk rmk+kernel@armlinux.org.uk; grygorii.strashko@ti.com grygorii.strashko@ti.com; tony@atomide.com tony@atomide.com; linus.walleij@linaro.org linus.walleij@linaro.org Subject: Re: [REGRESSION] gpio: omap: ensure irq is enabled before wakeup Hi, this is your Linux kernel regression tracker.
On 01.06.22 17:56, Eric Schikschneit wrote:
Summary: OMAP patch causes SPI bus transaction failure on TI CPU Commit: c859e0d479b3b4f6132fc12637c51e01492f31f6 Kernel version: 5.10.87
The detailed description:
I know this is a old commit at this point,
That shouldn't be a problem at all, but it raises one question that would be good to get answered: does this problem still occur with the latest code? This issue for example might have been fixed in between, but maybe the fix was to complex to get backported or something like that. Hence it would be ideal if you could quickly give 5.19-rc1 a shot; 5.18.y is not ideal, but will do as well.
but we have observed a regression caused by this commit. It causes improper toggle during a SPI transaction with a microcontroller. The CPU in use is Texas Instruments AM3352BZCZA80. The microcontroller in use is a PIC based micro. I have logic capture images available to show the signal difference that is causing confusion on the SPI bus.
Ciao, Thorsten (wearing his 'the Linux kernel's regression tracker' hat)
P.S.: As the Linux kernel's regression tracker I deal with a lot of reports and sometimes miss something important when writing mails like this. If that's the case here, don't hesitate to tell me in a public reply, it's in everyone's interest to set the public record straight.
On 07.06.22 13:58, Eric Schikschneit wrote:
I am limited by the availability of the preempt-rt kernels that are available on the yocto project. The newest kernel I see listed is 5.15.44 on: https://git.yoctoproject.org/linux-yocto/
Well, it's up to Russel if that is enough for him, as he authored c859e0d479b3 ("gpio: omap: ensure irq is enabled before wakeup") and thus should look into this regression.
Ciao, Thorsten
From: Thorsten Leemhuis regressions@leemhuis.info Sent: Tuesday, June 7, 2022 5:07 AM To: Eric Schikschneit eric.schikschneit@novatechautomation.com; stable@vger.kernel.org stable@vger.kernel.org Cc: regressions@lists.linux.dev regressions@lists.linux.dev; rmk+kernel@armlinux.org.uk rmk+kernel@armlinux.org.uk; grygorii.strashko@ti.com grygorii.strashko@ti.com; tony@atomide.com tony@atomide.com; linus.walleij@linaro.org linus.walleij@linaro.org Subject: Re: [REGRESSION] gpio: omap: ensure irq is enabled before wakeup Hi, this is your Linux kernel regression tracker.
On 01.06.22 17:56, Eric Schikschneit wrote:
Summary: OMAP patch causes SPI bus transaction failure on TI CPU Commit: c859e0d479b3b4f6132fc12637c51e01492f31f6 Kernel version: 5.10.87
The detailed description:
I know this is a old commit at this point,
That shouldn't be a problem at all, but it raises one question that would be good to get answered: does this problem still occur with the latest code? This issue for example might have been fixed in between, but maybe the fix was to complex to get backported or something like that. Hence it would be ideal if you could quickly give 5.19-rc1 a shot; 5.18.y is not ideal, but will do as well.
but we have observed a regression caused by this commit. It causes improper toggle during a SPI transaction with a microcontroller. The CPU in use is Texas Instruments AM3352BZCZA80. The microcontroller in use is a PIC based micro. I have logic capture images available to show the signal difference that is causing confusion on the SPI bus.
Ciao, Thorsten (wearing his 'the Linux kernel's regression tracker' hat)
P.S.: As the Linux kernel's regression tracker I deal with a lot of reports and sometimes miss something important when writing mails like this. If that's the case here, don't hesitate to tell me in a public reply, it's in everyone's interest to set the public record straight.
On Wed, Jun 08, 2022 at 10:54:48AM +0200, Thorsten Leemhuis wrote:
On 07.06.22 13:58, Eric Schikschneit wrote:
I am limited by the availability of the preempt-rt kernels that are available on the yocto project. The newest kernel I see listed is 5.15.44 on: https://git.yoctoproject.org/linux-yocto/
Well, it's up to Russel if that is enough for him, as he authored c859e0d479b3 ("gpio: omap: ensure irq is enabled before wakeup") and thus should look into this regression.
I've already made it clear that is something I can no longer do; I no longer have the knowledge, nor do I have the hardware to test for this regression.
On Wed, Jun 08, 2022 at 10:19:01AM +0100, Russell King (Oracle) wrote:
On Wed, Jun 08, 2022 at 10:54:48AM +0200, Thorsten Leemhuis wrote:
On 07.06.22 13:58, Eric Schikschneit wrote:
I am limited by the availability of the preempt-rt kernels that are available on the yocto project. The newest kernel I see listed is 5.15.44 on: https://git.yoctoproject.org/linux-yocto/
Well, it's up to Russel if that is enough for him, as he authored c859e0d479b3 ("gpio: omap: ensure irq is enabled before wakeup") and thus should look into this regression.
I've already made it clear that is something I can no longer do; I no longer have the knowledge, nor do I have the hardware to test for this regression.
There's a lot of debugging that needs to be done that can only be done by the reporter to work out exactly what is going on. Most of what is below is guess work - as I say, I don't have the knowledge, but what follows is based on what would be a sensible investigation approach.
As I understand it having *briefly* looked at what I guess is the right SPI code - I don't know - I'm guessing the CS lines are manually controlled by the SPI driver via the GPIO layer.
If that is correct, the SPI driver must be itself deasserting the CS line at the inappropriate point. This means the reporter needs to locate where that is happening, and work out why the driver is doing that. dump_stack() can be inserted at the appropriate point(s) to get a stack trace to show the call path, which may or may not reveal how we got there.
Also, we have no idea what the SPI device is, or how the driver for the SPI device is using the SPI subsystem. Are there two separate transfers being issued to the SPI subsystem, and is the CS signal being deasserted between those two transfers?
If that is the case, deasserting the CS signal between the two transfers seems to me to be entirely reasonable - as once a transfer has completed, the SPI bus _could_ be used to access another peripheral before the second transfer is acted upon. If this is the case, then this commit has revealed a latent bug.
If CS is deasserted between two separate SPI transactions, but the chip must not see CS deasserted, then that would be a bug in the SPI device driver and have nothing to do with the GPIO layer. The change in the GPIO code would have revealed a latent bug in the SPI side of things (maybe the SPI device driver.)
There is just so much that is unknown here, and there is nothing I can do here locally to debug this.
linux-stable-mirror@lists.linaro.org