* [PATCH net 1/2] net: ethernet: oa_tc6: Interrupt is active low, level triggered.
@ 2026-05-15 16:13 Selvamani Rajagopal
2026-05-15 16:35 ` Andrew Lunn
2026-05-20 15:16 ` Ciprian Regus
0 siblings, 2 replies; 4+ messages in thread
From: Selvamani Rajagopal @ 2026-05-15 16:13 UTC (permalink / raw)
To: parthiban.veerasooran, andrew+netdev, davem, edumazet, kuba,
pabeni, netdev, linux-kernel
According to OPEN Alliance 10BASET1x MAC-PHY Serial Interface
specification, interrupt is active low, level triggered.
Fixes: 2c6ce5354453 ("net: ethernet: oa_tc6: implement mac-phy interrupt")
Signed-off-by: Selvamani Rajagopal <Selvamani.Rajagopal@onsemi.com>
---
drivers/net/ethernet/oa_tc6.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/oa_tc6.c b/drivers/net/ethernet/oa_tc6.c
index 91a906a7918a..667faf155405 100644
--- a/drivers/net/ethernet/oa_tc6.c
+++ b/drivers/net/ethernet/oa_tc6.c
@@ -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",
--
2.43.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net 1/2] net: ethernet: oa_tc6: Interrupt is active low, level triggered.
2026-05-15 16:13 [PATCH net 1/2] net: ethernet: oa_tc6: Interrupt is active low, level triggered Selvamani Rajagopal
@ 2026-05-15 16:35 ` Andrew Lunn
2026-05-20 15:16 ` Ciprian Regus
1 sibling, 0 replies; 4+ messages in thread
From: Andrew Lunn @ 2026-05-15 16:35 UTC (permalink / raw)
To: Selvamani Rajagopal
Cc: parthiban.veerasooran, andrew+netdev, davem, edumazet, kuba,
pabeni, netdev, linux-kernel
On Fri, May 15, 2026 at 04:13:48PM +0000, Selvamani Rajagopal wrote:
> According to OPEN Alliance 10BASET1x MAC-PHY Serial Interface
> specification, interrupt is active low, level triggered.
>
> Fixes: 2c6ce5354453 ("net: ethernet: oa_tc6: implement mac-phy interrupt")
> Signed-off-by: Selvamani Rajagopal <Selvamani.Rajagopal@onsemi.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net 1/2] net: ethernet: oa_tc6: Interrupt is active low, level triggered.
2026-05-15 16:13 [PATCH net 1/2] net: ethernet: oa_tc6: Interrupt is active low, level triggered Selvamani Rajagopal
2026-05-15 16:35 ` Andrew Lunn
@ 2026-05-20 15:16 ` Ciprian Regus
2026-05-20 15:27 ` Andrew Lunn
1 sibling, 1 reply; 4+ messages in thread
From: Ciprian Regus @ 2026-05-20 15:16 UTC (permalink / raw)
To: selvamani.rajagopal
Cc: andrew+netdev, davem, edumazet, kuba, linux-kernel, netdev,
pabeni, parthiban.veerasooran, ciprian.regus
> 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);
oa_tc6_macphy_isr() doesn't clear the interrupt condition or disable the
interrupt. So it will be triggered several times until the oa tc6
thread gets to run. Should we use something like this instead?
devm_request_threaded_irq(..., IRQF_TRIGGER_LOW | IRQF_ONESHOT, ...)
(together with some rework to call oa_tc6_try_spi_transfer() from the
threaded irq part).
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net 1/2] net: ethernet: oa_tc6: Interrupt is active low, level triggered.
2026-05-20 15:16 ` Ciprian Regus
@ 2026-05-20 15:27 ` Andrew Lunn
0 siblings, 0 replies; 4+ messages in thread
From: Andrew Lunn @ 2026-05-20 15:27 UTC (permalink / raw)
To: Ciprian Regus
Cc: selvamani.rajagopal, andrew+netdev, davem, edumazet, kuba,
linux-kernel, netdev, pabeni, parthiban.veerasooran
On Wed, May 20, 2026 at 06:16:21PM +0300, Ciprian Regus wrote:
> > 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);
>
> oa_tc6_macphy_isr() doesn't clear the interrupt condition
Since this is an SPI device, there is no way it can clear the
condition, that needs a blocking operation.
> devm_request_threaded_irq(..., IRQF_TRIGGER_LOW | IRQF_ONESHOT, ...)
>
> (together with some rework to call oa_tc6_try_spi_transfer() from the
> threaded irq part).
Threaded makes sense. Not so sure about ONESHOT. We need it to fire
again when the thread handler exists and the condition is still true.
Andrew
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-05-20 15:27 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-05-15 16:13 [PATCH net 1/2] net: ethernet: oa_tc6: Interrupt is active low, level triggered Selvamani Rajagopal
2026-05-15 16:35 ` Andrew Lunn
2026-05-20 15:16 ` Ciprian Regus
2026-05-20 15:27 ` Andrew Lunn
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®