Resubmitting with cover-letter and threaded patch series.
Subsystems (5)
v3 cover Resubmitting with cover-letter and threaded patch series.
According to OPEN Alliance 10BASE-T1x MAC-PHY Serial Interface specification, MAC-PHY interrupt is "active low, level triggered". The specification mentions about the conditions in which the IRQ is asserted and deasserted.
Bug is inadvertently introduced by treating the IRQ in the OA TC6 framework driver and in dt-binding YAML file as edge triggered.
Changes are done in two files
- OA TC6 framework Ethernet driver
- YAML file for the vendor that already uses OA TC6 framework.
Maintainer for this driver is already informed and aware of these changes. Testing for these changes was done in onsemi's setup and found to be working.
---
Selvamani Rajagopal (2):
net: ethernet: oa_tc6: Interrupt is active low, level triggered.
dt-bindings: net: updated interrupt type to be active low, level triggered
Documentation/devicetree/bindings/net/microchip,lan8650.yaml | 2 +- drivers/net/ethernet/oa_tc6.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
---
base-commit: 02896a7fa4cd3ec61d60ba30136841e4f04bdeac
change-id: 20260531-level-trigger-8cb1a83af034
Best regards,
Signature · 1 line
Selvamani Rajagopal <[email protected]>
PATCH v3 1/2 net: ethernet: oa_tc6: Interrupt is active low, level triggered.
According OPEN Alliance 10BASET1x MAC-PHY Serial Interface specification, interrupt is active low, level triggered.
--- drivers/net/ethernet/oa_tc6.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/oa_tc6.c +1 -1
@@ -1323,7 +1323,7 @@ struct oa_tc6 *oa_tc6_init(struct spi_device *spi, struct net_device *netdev)sched_set_fifo (tc6->spi_thread); ret =devm_request_irq (&tc6->spi->dev, tc6->spi->irq, oa_tc6_macphy_isr, -IRQF_TRIGGER_FALLING ,dev_name (&tc6->spi->dev), +IRQF_TRIGGER_LOW ,dev_name (&tc6->spi->dev), tc6);if (ret) { dev_err(&tc6->spi->dev, "Failed to request macphy isr %d\n",
Signature · 1 line
2.43.0
[email protected]
AI reviewRe: [PATCH net v3 1/2] net: ethernet: oa_tc6: Interrupt is active low, level triggered.
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [High] IRQ storm and starvation caused by level-triggered interrupt without IRQF_ONESHOT or manual…
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] IRQ storm and starvation caused by level-triggered interrupt without IRQF_ONESHOT or manual masking. --
commit 3908a29ac2b1392995dbf0f4228af86bbddb0261
Author: Selvamani Rajagopal <[email protected]>
net: ethernet: oa_tc6: Interrupt is active low, level triggered.
According OPEN Alliance 10BASET1x MAC-PHY Serial Interface specification, interrupt is active low, level triggered.
drivers/net/ethernet/oa_tc6.c struct oa_tc6 *oa_tc6_init(struct spi_device *spi, struct net_device *netdev) · line 1327
Quoted 11 lines
drivers/net/ethernet/oa_tc6.c +1
-1@@ -1323,7 +1323,7 @@ struct oa_tc6 *oa_tc6_init(struct spi_device *spi, struct net_device *netdev)sched_set_fifo (tc6->spi_thread); ret =devm_request_irq (&tc6->spi->dev, tc6->spi->irq, oa_tc6_macphy_isr, -IRQF_TRIGGER_FALLING ,dev_name (&tc6->spi->dev), +IRQF_TRIGGER_LOW ,dev_name (&tc6->spi->dev), tc6);
[Severity: High]
Does changing this to a level-triggered interrupt cause an IRQ storm?
Looking at the primary hardirq handler:
drivers/net/ethernet/oa_tc6.c:oa_tc6_macphy_isr() {
...
tc6->int_flag = true;
wake_up_interruptible(&tc6->spi_wq);
return IRQ_HANDLED;
}Since the handler returns IRQ_HANDLED without clearing the hardware condition on the device, the IRQ core will immediately unmask the line. Because the MAC-PHY is still holding the line low (waiting for the SPI kthread to run and clear it), the interrupt will instantly re-trigger.
Could this starve the awakened spi_wq kthread and lead to a CPU lockup or the kernel permanently disabling the interrupt line? Should this use a threaded IRQ with IRQF_ONESHOT, or explicitly disable the IRQ in the handler until the kthread completes the SPI transfer?
Quoted 2 lines
drivers/net/ethernet/oa_tc6.c +0
-0if (ret) { dev_err(&tc6->spi->dev, "Failed to request macphy isr %d\n",
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
PATCH v3 2/2 dt-bindings: net: updated interrupt type to be active low, level triggered
In reply to Selvamani RajagopalAccording to OPEN Alliance 10BASE-T1x MACPHY Serial Interface (TC6) specification, interrupt type is active low, level triggered interrupt.
--- Documentation/devicetree/bindings/net/microchip,lan8650.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/devicetree/bindings/net/microchip,lan8650.yaml +1 -1
@@ -67,7 +67,7 @@ examples: pinctrl-names = "default"; pinctrl-0 = <ð0_pins>; interrupt-parent = <&gpio>; - interrupts = <6 IRQ_TYPE_EDGE_FALLING>; + interrupts = <6 IRQ_TYPE_LEVEL_LOW>; local-mac-address = [04 05 06 01 02 03]; spi-max-frequency = <15000000>; };
Signature · 1 line
2.43.0
[email protected]
AI reviewRe: [PATCH net v3 2/2] dt-bindings: net: updated interrupt type to be active low, level triggered
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
Pre-existing issues:
- [High] The driver incorrectly handles a level-triggered interrupt without using threaded IRQs or masking the interrupt, which will cause an infinite interrupt storm.
- [High] The custom SPI kthread is stopped before the interrupt handler is disabled, leading to a guaranteed interrupt storm if an interrupt is asserted during module removal. --
commit 7ca880f8acfa2e8b17a55026e4eceb0ac7d436f9
Author: Selvamani Rajagopal <[email protected]>
dt-bindings: net: updated interrupt type to be active low, level triggered
This commit updates the lan8650 device tree binding interrupt type to active low, level triggered, to match the TC6 specification.
Documentation/devicetree/bindings/net/microchip,lan8650.yaml examples: · line 70
Quoted 10 lines
Documentation/devicetree/bindings/net/microchip,lan8650.yaml +1
-1@@ -67,7 +67,7 @@ examples: pinctrl-names = "default"; pinctrl-0 = <ð0_pins>; interrupt-parent = <&gpio>; - interrupts = <6 IRQ_TYPE_EDGE_FALLING>; + interrupts = <6 IRQ_TYPE_LEVEL_LOW>;
[Severity: High]
This is a pre-existing issue, but updating the device tree to use a level-triggered interrupt exposes a problem in the oa_tc6 driver's interrupt handling.
The driver explicitly requests a hard-IRQ for a level-triggered interrupt without IRQF_ONESHOT:
drivers/net/ethernet/oa_tc6.c:oa_tc6_init() {
...
ret = devm_request_irq(&tc6->spi->dev, tc6->spi->irq, oa_tc6_macphy_isr,
IRQF_TRIGGER_LOW, dev_name(&tc6->spi->dev),
tc6);
...
}The hard-IRQ handler returns IRQ_HANDLED without masking the interrupt or clearing the hardware state:
drivers/net/ethernet/oa_tc6.c:oa_tc6_macphy_isr() {
...
tc6->int_flag = true;
/* Wake spi kthread to perform spi transfer */
wake_up_interruptible(&tc6->spi_wq);
return IRQ_HANDLED;
}Since the interrupt is active-low and level-triggered, won't returning IRQ_HANDLED without masking it or clearing it over SPI immediately trigger an interrupt storm? Does the driver need to use request_threaded_irq() with IRQF_ONESHOT to keep the interrupt masked until the thread can clear it?
[Severity: High]
This is also a pre-existing issue, but relying on a level-triggered interrupt exposes a teardown race condition during module removal.
The driver delegates kthread shutdown to oa_tc6_exit(), stopping the SPI kthread without explicitly disabling the devm-managed interrupt first:
drivers/net/ethernet/microchip/lan865x/lan865x.c:lan865x_remove() {
...
oa_tc6_exit(priv->tc6);
free_netdev(priv->netdev);
}drivers/net/ethernet/oa_tc6.c:oa_tc6_exit() {
...
oa_tc6_phy_exit(tc6);
kthread_stop(tc6->spi_thread);
}If the MAC-PHY asserts a level-triggered interrupt after the kthread is stopped, the hard-IRQ handler will run, call wake_up_interruptible() on the dead kthread's waitqueue, and return IRQ_HANDLED.
Because the kthread is dead and cannot clear the interrupt, and the ISR does not mask it, could this result in an unrecoverable system lockup during driver removal?
Quoted 3 lines
Documentation/devicetree/bindings/net/microchip,lan8650.yaml +0
-0local-mac-address = [04 05 06 01 02 03]; spi-max-frequency = <15000000>; };
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=2
Re: [PATCH net v3 2/2] dt-bindings: net: updated interrupt type to be active low, level triggered
In reply to Selvamani RajagopalQuoted 4 lines · On Mon, Jun 01, 2026 at 09:07:19AM -0700, Selvamani Rajagopal via B4 Relay…
From: Selvamani Rajagopal <[email protected]>
According to OPEN Alliance 10BASE-T1x MACPHY Serial Interface (TC6) specification, interrupt type is active low, level triggered interrupt.
Have you checked the documentation for this device etc to make sure that the device actually follows the spec?
Maybe Parthiban can confirm this for us?
Cheers,
Conor.
Quoted 25 lines
Fixes ac49b950bea9 ("dt-bindings: net: add Microchip's LAN865X 10BASE-T1S MACPHY")Signed-off-by Selvamani Rajagopal <[email protected]>--- Documentation/devicetree/bindings/net/microchip,lan8650.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Documentation/devicetree/bindings/net/microchip,lan8650.yaml +1
-1@@ -67,7 +67,7 @@ examples: pinctrl-names = "default"; pinctrl-0 = <ð0_pins>; interrupt-parent = <&gpio>; - interrupts = <6 IRQ_TYPE_EDGE_FALLING>; + interrupts = <6 IRQ_TYPE_LEVEL_LOW>; local-mac-address = [04 05 06 01 02 03]; spi-max-frequency = <15000000>; };Signature · 2 lines
-- 2.43.0
RE: [PATCH net v3 2/2] dt-bindings: net: updated interrupt type to be active low, level triggered
Quoted 6 lines
-----Original Message-----
Subject: Re: [PATCH net v3 2/2] dt-bindings: net: updated interrupt type to be active low, level triggered
Quoted 6 lines
Quoted 2 lines
According to OPEN Alliance 10BASE-T1x MACPHY Serial Interface (TC6) specification, interrupt type is active low, level triggered interrupt.
Have you checked the documentation for this device etc to make sure that the device actually follows the spec?
Maybe Parthiban can confirm this for us?
Though I coordinated with Parthiban well ahead about this change, He is the one who could confirm.
To answer your question, I looked at the datasheet. In one occasion, it mentions "once RESET_N is deasserted, device asserts IRQ_N. When software clears RESETC bit of OA_STATUS0, device deasserts IRQ_N. This gives me an indication that the interrupt is level triggered.
From our side, I checked with our engineer, who is part of the team that put together the specification, Pier, copied in this email, confirmed that it is level triggered.
Quoted 31 lines
Cheers,
Conor.Quoted 2 lines
Fixes ac49b950bea9 ("dt-bindings: net: add Microchip's LAN865X 10BASE-T1SMACPHY")
Review
Quoted 6 lines
Signed-off-by Selvamani Rajagopal <[email protected]>--- Documentation/devicetree/bindings/net/microchip,lan8650.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)(quoted diff) +0
-0
b/Documentation/devicetree/bindings/net/microchip,lan8650.yamlQuoted 17 lines
index
61e11d4a07c4..766ff58147ae100644Documentation/devicetree/bindings/net/microchip,lan8650.yaml +1
-2@@ -67,7 +67,7 @@ examples: pinctrl-names = "default"; pinctrl-0 = <ð0_pins>; interrupt-parent = <&gpio>; - interrupts = <6 IRQ_TYPE_EDGE_FALLING>; + interrupts = <6 IRQ_TYPE_LEVEL_LOW>; local-mac-address = [04 05 06 01 02 03]; spi-max-frequency = <15000000>; }; --2.43.0
Conor Dooley
Acked-byRe: [PATCH net v3 2/2] dt-bindings: net: updated interrupt type to be active low, level triggered
Quoted 6 lines · Selvamani Rajagopal
Quoted 6 lines
-----Original Message-----
Subject: Re: [PATCH net v3 2/2] dt-bindings: net: updated interrupt type to be active low, level triggered
Quoted 8 lines
Quoted 6 lines
Quoted 2 lines
According to OPEN Alliance 10BASE-T1x MACPHY Serial Interface (TC6) specification, interrupt type is active low, level triggered interrupt.
Have you checked the documentation for this device etc to make sure that the device actually follows the spec?
Maybe Parthiban can confirm this for us?Though I coordinated with Parthiban well ahead about this change, He is the one who could confirm.
Please.
Dependant on an ack from Parthiban,
Quoted 38 lines
To answer your question, I looked at the datasheet. In one occasion, it mentions "once
RESET_Nis deasserted, device assertsIRQ_N. When software clears RESETC bit ofOA_STATUS0, device deassertsIRQ_N. This gives me an indication that the interrupt is level triggered.From our side, I checked with our engineer, who is part of the team that put together the specification, Pier, copied in this email, confirmed that it is level triggered.
Quoted 31 lines
Cheers,
Conor.Quoted 2 lines
Fixes ac49b950bea9 ("dt-bindings: net: add Microchip's LAN865X 10BASE-T1SMACPHY")
Review
Quoted 6 lines
Signed-off-by Selvamani Rajagopal <[email protected]>--- Documentation/devicetree/bindings/net/microchip,lan8650.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)(quoted diff) +0
-0
b/Documentation/devicetree/bindings/net/microchip,lan8650.yamlQuoted 17 lines
index
61e11d4a07c4..766ff58147ae100644Documentation/devicetree/bindings/net/microchip,lan8650.yaml +1
-2@@ -67,7 +67,7 @@ examples: pinctrl-names = "default"; pinctrl-0 = <ð0_pins>; interrupt-parent = <&gpio>; - interrupts = <6 IRQ_TYPE_EDGE_FALLING>; + interrupts = <6 IRQ_TYPE_LEVEL_LOW>; local-mac-address = [04 05 06 01 02 03]; spi-max-frequency = <15000000>; }; --2.43.0
[email protected]
maintainerRe: [PATCH net v3 2/2] dt-bindings: net: updated interrupt type to be active low, level triggered
In reply to Selvamani RajagopalHi Conor & Selvamani,
Quoted 13 lines · Selvamani Rajagopal
EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
Quoted 10 lines
-----Original Message-----
Subject: Re: [PATCH net v3 2/2] dt-bindings: net: updated interrupt type to be active low, level triggeredQuoted 2 lines
According to OPEN Alliance 10BASE-T1x MACPHY Serial Interface (TC6) specification, interrupt type is active low, level triggered interrupt.
Have you checked the documentation for this device etc to make sure that the device actually follows the spec?
Maybe Parthiban can confirm this for us?
Quoted 6 lines
Though I coordinated with Parthiban well ahead about this change, He is the one who could confirm.
To answer your question, I looked at the datasheet. In one occasion, it mentions "once
RESET_Nis deasserted, device assertsIRQ_N. When software clears RESETC bit ofOA_STATUS0, device deassertsIRQ_N. This gives me an indication that the interrupt is level triggered.From our side, I checked with our engineer, who is part of the team that put together the specification, Pier, copied in this email, confirmed that it is level triggered.
Thank you for notifying me.
Yes, Selvamani had approached me in a different email thread to test this change. As I informed him in that email thread, unfortunately we could not test it immediately as our team tied up with another project. Thank you for your understanding. I now have some bandwidth to proceed with the testing and will share feedback as soon as possible.
Before that, I would like to give a heads‑up based on our initial development experience. I recall that we initially used an active‑low level interrupt, but we ran into issues such as random system stalls depending on system load. Our testing was done on a Raspberry Pi 4 with LAN8650.
The code flow was as follows: whenever there is an interrupt from the MAC‑PHY, the ISR is invoked. The ISR wakes up the SPI thread to perform the SPI transfer and then returns. The interrupt remains asserted until the MAC‑PHY receives a data chunk from the host.
During further investigation, we found that sometimes there is a scheduling latency between the SPI thread wake‑up (triggered from the ISR) and the actual execution of the SPI thread due to system load. During this gap, the interrupt stays asserted for a long time even though the ISR has already returned. With an active‑low level‑triggered configuration, this causes the Linux IRQ subsystem to repeatedly invoke the ISR, resulting in ISR recurrence and eventual system instability.
In this design, whenever there is an interrupt from the MAC‑PHY, there is no way to disable the interrupt or prevent further ISR invocations before reacting to it. The only way to deassert the interrupt is by sending a data header to the MAC‑PHY. This is the primary reason we relied on a falling‑edge interrupt, which resolved the ISR recurrence issue.
My two cents: generally, interrupts are disabled or cleared via a register read/write in the ISR, the ISR returns, and the remaining work is deferred to a separate task or thread. In this case, however, there is no such mechanism, and sending a data header is the only way to clear the interrupt. Doing this inside the ISR is not feasible since spi_sync() will sleep, which is not allowed in ISR context.
One possible alternative could be to use a threaded IRQ handler with IRQF_ONESHOT, where the IRQ line is disabled until the handler completes, and sleeping is allowed. In that case, we could perform the SPI transfer in the threaded handler to send the data header and deassert the interrupt, while deferring the remaining work to a separate kthread (the current SPI thread). However, I have not yet tried this implementation, so I cannot comment on its behavior or effectiveness without implementing and testing it.
I may be missing something here and am trying to clarify my understanding. I am also curious why this issue reproduces on our system but does not appear in Selvamani’s setup with an active‑low level interrupt configuration. If possible, could you share details of your setup and how the testing is being performed?
Best regards,
Parthiban V
Quoted 33 lines
Quoted 32 lines
Cheers,
Conor.Quoted 2 lines
Fixes ac49b950bea9 ("dt-bindings: net: add Microchip's LAN865X 10BASE-T1SMACPHY")
Review
Quoted 6 lines
Signed-off-by Selvamani Rajagopal <[email protected]>--- Documentation/devicetree/bindings/net/microchip,lan8650.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)(quoted diff) +0
-0
b/Documentation/devicetree/bindings/net/microchip,lan8650.yamlQuoted 17 lines
index
61e11d4a07c4..766ff58147ae100644Documentation/devicetree/bindings/net/microchip,lan8650.yaml +1
-2@@ -67,7 +67,7 @@ examples: pinctrl-names = "default"; pinctrl-0 = <ð0_pins>; interrupt-parent = <&gpio>; - interrupts = <6 IRQ_TYPE_EDGE_FALLING>; + interrupts = <6 IRQ_TYPE_LEVEL_LOW>; local-mac-address = [04 05 06 01 02 03]; spi-max-frequency = <15000000>; }; --2.43.0
Re: [PATCH net v3 2/2] dt-bindings: net: updated interrupt type to be active low, level triggered
Hi Parthiban
Quoted 10 lines · On 4.6.2026 08:29, [email protected] wrote:
[...]
One possible alternative could be to use a threaded IRQ handler with
IRQF_ONESHOT, where the IRQ line is disabled until the handler completes, and sleeping is allowed. In that case, we could perform the SPI transfer in the threaded handler to send the data header and deassert the interrupt, while deferring the remaining work to a separate kthread (the current SPI thread). However, I have not yet tried this implementation, so I cannot comment on its behavior or effectiveness without implementing and testing it.
AFAIK both ks8851 and adin1110 request the IRQ as IRQF_TRIGGER_LOW | IRQF_ONESHOT with a NULL primary handler and do everything in the threaded handler. SO looking at these two drivers might be worth the inspiration.
Quoted 1 line
[...]
REgards
Nicolai
RE: [PATCH net v3 2/2] dt-bindings: net: updated interrupt type to be active low, level triggered
In reply to [email protected]Quoted 5 lines
Subject: Re: [PATCH net v3 2/2] dt-bindings: net: updated interrupt type to be active low, level triggered
Hi Conor & Selvamani,
[.]
Quoted 8 lines
One possible alternative could be to use a threaded IRQ handler with
IRQF_ONESHOT, where the IRQ line is disabled until the handler completes, and sleeping is allowed. In that case, we could perform the SPI transfer in the threaded handler to send the data header and deassert the interrupt, while deferring the remaining work to a separate kthread (the current SPI thread). However, I have not yet tried this implementation, so I cannot comment on its behavior or effectiveness without implementing and testing it.
I can test this in my setup.
Quoted 6 lines
I may be missing something here and am trying to clarify my understanding. I am also curious why this issue reproduces on our system but does not appear in Selvamani’s setup with an active‑low level interrupt configuration. If possible, could you share details of your setup and how the testing is being performed?
My setup is similar to yours. We have Raspberry Pi boards (P-4 & Pi-5) connected to our MAC-PHY evaluation board. As you could see in my patch submissions, there are no changes to oa_tc6.c in the way interrupts are handled.
Quoted 9 lines
Best regards,
Parthiban VQuoted 6 lines
Quoted 6 lines
Cheers,
Conor.Quoted 1 line
Re: [PATCH net v3 2/2] dt-bindings: net: updated interrupt type to be active low, level triggered
Quoted 4 lines · Selvamani Rajagopal
Quoted 4 lines
Subject: Re: [PATCH net v3 2/2] dt-bindings: net: updated interrupt type to be active low, level triggered
Hi Conor & Selvamani,
To be clear, my angle here is making sure that the microchip device is not deviant from the spec. I don't know or care about this hardware in particular.
I just made the assumption that what was in the example worked, and wanted clarification that what the example was changed to actually reflected something else that worked on the hardware in question before I gave an ack. I'm a dt-binding maintainer, not someone with knowledge of these devices.
Quoted 34 lines
Quoted 1 line
[.]
Quoted 8 lines
One possible alternative could be to use a threaded IRQ handler with
IRQF_ONESHOT, where the IRQ line is disabled until the handler completes, and sleeping is allowed. In that case, we could perform the SPI transfer in the threaded handler to send the data header and deassert the interrupt, while deferring the remaining work to a separate kthread (the current SPI thread). However, I have not yet tried this implementation, so I cannot comment on its behavior or effectiveness without implementing and testing it.I can test this in my setup.
Quoted 6 lines
I may be missing something here and am trying to clarify my understanding. I am also curious why this issue reproduces on our system but does not appear in Selvamani’s setup with an active‑low level interrupt configuration. If possible, could you share details of your setup and how the testing is being performed?
My setup is similar to yours. We have Raspberry Pi boards (P-4 & Pi-5) connected to our MAC-PHY evaluation board. As you could see in my patch submissions, there are no changes to
oa_tc6.cin the way interrupts are handled.Quoted 9 lines
Best regards,
Parthiban VQuoted 6 lines
Quoted 6 lines
Cheers,
Conor.Quoted 1 line
Re: [PATCH net v3 2/2] dt-bindings: net: updated interrupt type to be active low, level triggered
Quoted 4 lines
I just made the assumption that what was in the example worked, and wanted clarification that what the example was changed to actually reflected something else that worked on the hardware in question before I gave an ack.
That is the problem with edge interrupts when level should be used. They work %99.9 of the time, so many developers don't notice they have it wrong. And then one day it all stops because an interrupt got lost.
Andrew
[email protected]
maintainerRe: [PATCH net v3 2/2] dt-bindings: net: updated interrupt type to be active low, level triggered
Quoted 11 lines · Andrew Lunn
EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
Quoted 4 lines
I just made the assumption that what was in the example worked, and wanted clarification that what the example was changed to actually reflected something else that worked on the hardware in question before I gave an ack.
That is the problem with edge interrupts when level should be used. They work %99.9 of the time, so many developers don't notice they have it wrong. And then one day it all stops because an interrupt got lost.
I agree with this point. But simply changing the interrupt type in the existing logic is not sufficient. Level‑triggered interrupts require careful handling in the driver, and with the current implementation I am observing issues under system load when using level‑triggered IRQs, as also discussed in another thread.
Best regards,
Parthiban V
Quoted 2 lines
Andrew
RE: [PATCH net v3 2/2] dt-bindings: net: updated interrupt type to be active low, level triggered
Quoted 13 lines
Subject: Re: [PATCH net v3 2/2] dt-bindings: net: updated interrupt type to be active low, level triggered
This Message Is From an External Sender
This message came from outside your organization.Quoted 5 lines · Andrew Lunn
That is the problem with edge interrupts when level should be used. They work %99.9 of the time, so many developers don't notice they have it wrong. And then one day it all stops because an interrupt got lost.
Quoted 5 lines
I agree with this point. But simply changing the interrupt type in the existing logic is not sufficient. Level‑triggered interrupts require careful handling in the driver, and with the current implementation I am observing issues under system load when using level‑triggered IRQs, as also discussed in another thread.
Parthiban,
I agree. When we change to level triggered interrupt, current mechanism won't work as we are not disabling the interrupt when we handle them.
I have a modification ready that uses threaded IRQ mechanism, which disables further interrupt until the thread returns.(with level trigger changes of course). My simple tests (ping and ptp4l) work fine with those changes I am going to run some heavy traffic tests. If I find them stable, I will post them in my next v3 submission.
Quoted 5 lines
Best regards,
Parthiban VQuoted 2 lines
Andrew
Re: [PATCH net v3 2/2] dt-bindings: net: updated interrupt type to be active low, level triggered
Quoted 2 lines
I agree. When we change to level triggered interrupt, current mechanism won't work as we are not disabling the interrupt when we handle them.
I'm kind of surprised about that. If you only provide a thread context handler, but not a interrupt context handler, i would of expected the IRQ core to leave the interrupt disabled until the threaded handler exited. But maybe it is historic behaviour.
Andrew
RE: [PATCH net v3 2/2] dt-bindings: net: updated interrupt type to be active low, level triggered
Quoted 11 lines
Subject: Re: [PATCH net v3 2/2] dt-bindings: net: updated interrupt type to be active low, level triggered
Quoted 2 lines
I agree. When we change to level triggered interrupt, current mechanism won't work as we are not disabling the interrupt when we handle them.
I'm kind of surprised about that. If you only provide a thread context handler, but not a interrupt context handler, i would of expected the IRQ core to leave the interrupt disabled until the threaded handler exited. But maybe it is historic behaviour.
You are right. I was just highlighting the need for moving to threaded IRQ when we move to level triggered interrupt.
As you know, the current code doesn't have threaded IRQ. It has ISR waking up a thread that handles the interrupt
Quoted 1 line
Andrew
[email protected]
maintainerRe: [PATCH net v3 2/2] dt-bindings: net: updated interrupt type to be active low, level triggered
In reply to Selvamani RajagopalHi Selvamani,
Quoted 22 lines · Selvamani Rajagopal
EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
Quoted 13 lines
Subject: Re: [PATCH net v3 2/2] dt-bindings: net: updated interrupt type to be active low, level triggered
This Message Is From an External Sender
This message came from outside your organization.Quoted 5 lines · Andrew Lunn
That is the problem with edge interrupts when level should be used. They work %99.9 of the time, so many developers don't notice they have it wrong. And then one day it all stops because an interrupt got lost.
Quoted 5 lines
I agree with this point. But simply changing the interrupt type in the existing logic is not sufficient. Level‑triggered interrupts require careful handling in the driver, and with the current implementation I am observing issues under system load when using level‑triggered IRQs, as also discussed in another thread.
Quoted 8 lines
Parthiban,
I agree. When we change to level triggered interrupt, current mechanism won't work as we are not disabling the interrupt when we handle them.
I have a modification ready that uses threaded IRQ mechanism, which disables further interrupt until the thread returns.(with level trigger changes of course). My simple tests (ping and ptp4l) work fine with those changes I am going to run some heavy traffic tests. If I find them stable, I will post them in my next v3 submission.
Thank you for the update. I have also implemented threaded IRQ handling, and it works fine on my side as well. Since you are already planning to post patches for this implementation and have mentioned that you will include them in your next submission, I will hold off on posting my patch for now. Please let me know if you would like me to share it from my side.
Best regards,
Parthiban V
Quoted 7 lines
Quoted 6 lines
Best regards,
Parthiban VQuoted 2 lines
Andrew
RE: [PATCH net v3 2/2] dt-bindings: net: updated interrupt type to be active low, level triggered
Quoted 11 lines
Subject: Re: [PATCH net v3 2/2] dt-bindings: net: updated interrupt type to be active low, level triggered
Hi Selvamani,
Thank you for the update. I have also implemented threaded IRQ handling, and it works fine on my side as well. Since you are already planning to post patches for this implementation and have mentioned that you will include them in your next submission, I will hold off on posting my patch for now. Please let me know if you would like me to share it from my side.
Thanks Parthiban.
Though code was ready, I got into other things for the past two days. Please share your changes. I will compare with mine before submitting.
Quoted 10 lines
Best regards,
Parthiban VQuoted 7 lines
Quoted 6 lines
Best regards,
Parthiban VQuoted 2 lines
Andrew
RE: [PATCH net v3 2/2] dt-bindings: net: updated interrupt type to be active low, level triggered
Quoted 7 lines
Subject: RE: [PATCH net v3 2/2] dt-bindings: net: updated interrupt type to be active low, level triggered
Thanks Parthiban.
Though code was ready, I got into other things for the past two days. Please share your changes. I will compare with mine before submitting.
Parthiban,
Just submitted the patches. When you have time, please review and test. As you could see, one change led to more investigation. I saw a traffic stall when I oversubscribed the traffic. That investigation led to extra patches.
https://patchwork.kernel.org/project/netdevbpf/list/?series=1108804
Quoted 5 lines
Quoted 5 lines
Best regards,
Parthiban VQuoted 1 line
[email protected]
maintainerRe: [PATCH net v3 2/2] dt-bindings: net: updated interrupt type to be active low, level triggered
Hi Selvamani,
Quoted 11 lines · Selvamani Rajagopal
EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
Quoted 7 lines
Subject: RE: [PATCH net v3 2/2] dt-bindings: net: updated interrupt type to be active low, level triggered
Thanks Parthiban.
Though code was ready, I got into other things for the past two days. Please share your changes. I will compare with mine before submitting.
Quoted 7 lines
Parthiban,
Just submitted the patches. When you have time, please review and test. As you could see, one change led to more investigation. I saw a traffic stall when I oversubscribed the traffic. That investigation led to extra patches.
https://patchwork.kernel.org/project/netdevbpf/list/?series=1108804
Thank you for the update. I will test your v4 submission and share the feedback as soon as possible.
Best regards,
Parthiban V
Quoted 8 lines
Quoted 7 lines
Quoted 7 lines
Best regards,
Parthiban VQuoted 1 line
RE: [PATCH net v3 2/2] dt-bindings: net: updated interrupt type to be active low, level triggered
Quoted 10 lines
Subject: Re: [PATCH net v3 2/2] dt-bindings: net: updated interrupt type to be active low, level triggered
Hi Selvamani,
On 10/06/26 1:32 am, Selvamani Rajagopal wrote:
Thank you for the update. I will test your v4 submission and share the feedback as soon as possible.
Parthiban,
I think it is better to wait for v5 to test. v4 failed in AI code review. It raised some important race conditions related questions. I have some more changes to address those. Will submit v5 soon. You will have it by Monday, if not today.
Quoted 4 lines
Best regards,
Parthiban VQuoted 1 line
RE: [PATCH net v3 2/2] dt-bindings: net: updated interrupt type to be active low, level triggered
Quoted 8 lines
Subject: RE: [PATCH net v3 2/2] dt-bindings: net: updated interrupt type to be active low, level triggered
Quoted 5 lines · Selvamani Rajagopal
Thank you for the update. I will test your v4 submission and share the feedback as soon as possible.
Quoted 7 lines
Parthiban,
I think it is better to wait for v5 to test. v4 failed in AI code review. It raised some important race conditions related
questions. I have some more changes to address those. Will submit v5 soon. You will have it by Monday, if not today.
I just submitted v5. Please verify when you have time, unless you want to wait for AI code review to be done, which is fine too.
https://patchwork.kernel.org/project/netdevbpf/list/?series=1110309
Quoted 4 lines
Quoted 4 lines
Best regards,
Parthiban VQuoted 1 line
[email protected]
maintainerRe: [PATCH net v3 2/2] dt-bindings: net: updated interrupt type to be active low, level triggered
Hi Selvamani,
Quoted 19 lines · Selvamani Rajagopal
EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
Quoted 8 lines
Subject: RE: [PATCH net v3 2/2] dt-bindings: net: updated interrupt type to be active low, level triggered
Quoted 5 lines · Selvamani Rajagopal
Thank you for the update. I will test your v4 submission and share the feedback as soon as possible.
Quoted 7 lines
Parthiban,
I think it is better to wait for v5 to test. v4 failed in AI code review. It raised some important race conditions related
questions. I have some more changes to address those. Will submit v5 soon. You will have it by Monday, if not today.
Quoted 4 lines
I just submitted v5. Please verify when you have time, unless you want to wait for AI code review to be done, which is fine too.
https://patchwork.kernel.org/project/netdevbpf/list/?series=1110309
Thank you for the update. I will try to test it at the earliest.
Best regards,
Parthiban V
Quoted 7 lines
Quoted 6 lines
Quoted 6 lines
Best regards,
Parthiban VQuoted 1 line
Paolo Abeni
maintainerQuoted 12 lines · On 6/1/26 6:07 PM, Selvamani Rajagopal via B4 Relay wrote:
According to OPEN Alliance 10BASE-T1x MAC-PHY Serial Interface specification, MAC-PHY interrupt is "active low, level triggered". The specification mentions about the conditions in which the IRQ is asserted and deasserted.
Bug is inadvertently introduced by treating the IRQ in the OA TC6 framework driver and in dt-binding YAML file as edge triggered.
Changes are done in two files
- OA TC6 framework Ethernet driver
- YAML file for the vendor that already uses OA TC6 framework.
Quoted 5 lines
Maintainer for this driver is already informed and aware of these changes. Testing for these changes was done in onsemi's setup and found to be working.
Signed-off-by Selvamani Rajagopal <[email protected]>
Note for future submissions: the cover letter subj must refer to the series content, and not to changes from the previous revision.
/P
Quoted 9 lines
Quoted 6 lines
Maintainer for this driver is already informed and aware of these changes. Testing for these changes was done in onsemi's setup and found to be working.
Signed-off-by Selvamani Rajagopal <[email protected]>Note for future submissions: the cover letter subj must refer to the series content, and not to changes from the previous revision.
Understood. Thanks.
Quoted 2 lines
/P