netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: ethernet: ti: am65-cpsw-nuss: fix irqs type
@ 2020-05-05 16:31 Grygorii Strashko
  2020-05-07  0:53 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Grygorii Strashko @ 2020-05-05 16:31 UTC (permalink / raw)
  To: David S. Miller
  Cc: netdev, Sekhar Nori, linux-kernel, linux-arm-kernel,
	Murali Karicheri, Grygorii Strashko

The K3 INTA driver, which is source TX/RX IRQs for CPSW NUSS, defines IRQs
triggering type as EDGE by default, but triggering type for CPSW NUSS TX/RX
IRQs has to be LEVEL as the EDGE triggering type may cause unnecessary IRQs
triggering and NAPI scheduling for empty queues. It was discovered with
RT-kernel.

Fix it by explicitly specifying CPSW NUSS TX/RX IRQ type as
IRQF_TRIGGER_HIGH.

Fixes: 93a76530316a ("net: ethernet: ti: introduce am65x/j721e gigabit eth subsystem driver")
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
---
 drivers/net/ethernet/ti/am65-cpsw-nuss.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/ti/am65-cpsw-nuss.c b/drivers/net/ethernet/ti/am65-cpsw-nuss.c
index 2bf56733ba94..2517ffba8178 100644
--- a/drivers/net/ethernet/ti/am65-cpsw-nuss.c
+++ b/drivers/net/ethernet/ti/am65-cpsw-nuss.c
@@ -1719,7 +1719,8 @@ static int am65_cpsw_nuss_ndev_add_napi_2g(struct am65_cpsw_common *common)
 
 		ret = devm_request_irq(dev, tx_chn->irq,
 				       am65_cpsw_nuss_tx_irq,
-				       0, tx_chn->tx_chn_name, tx_chn);
+				       IRQF_TRIGGER_HIGH,
+				       tx_chn->tx_chn_name, tx_chn);
 		if (ret) {
 			dev_err(dev, "failure requesting tx%u irq %u, %d\n",
 				tx_chn->id, tx_chn->irq, ret);
@@ -1744,7 +1745,7 @@ static int am65_cpsw_nuss_ndev_reg_2g(struct am65_cpsw_common *common)
 
 	ret = devm_request_irq(dev, common->rx_chns.irq,
 			       am65_cpsw_nuss_rx_irq,
-			       0, dev_name(dev), common);
+			       IRQF_TRIGGER_HIGH, dev_name(dev), common);
 	if (ret) {
 		dev_err(dev, "failure requesting rx irq %u, %d\n",
 			common->rx_chns.irq, ret);
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] net: ethernet: ti: am65-cpsw-nuss: fix irqs type
  2020-05-05 16:31 [PATCH] net: ethernet: ti: am65-cpsw-nuss: fix irqs type Grygorii Strashko
@ 2020-05-07  0:53 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2020-05-07  0:53 UTC (permalink / raw)
  To: grygorii.strashko
  Cc: netdev, nsekhar, linux-kernel, linux-arm-kernel, m-karicheri2

From: Grygorii Strashko <grygorii.strashko@ti.com>
Date: Tue, 5 May 2020 19:31:26 +0300

> The K3 INTA driver, which is source TX/RX IRQs for CPSW NUSS, defines IRQs
> triggering type as EDGE by default, but triggering type for CPSW NUSS TX/RX
> IRQs has to be LEVEL as the EDGE triggering type may cause unnecessary IRQs
> triggering and NAPI scheduling for empty queues. It was discovered with
> RT-kernel.
> 
> Fix it by explicitly specifying CPSW NUSS TX/RX IRQ type as
> IRQF_TRIGGER_HIGH.
> 
> Fixes: 93a76530316a ("net: ethernet: ti: introduce am65x/j721e gigabit eth subsystem driver")
> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>

Applied, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-05-07  0:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-05 16:31 [PATCH] net: ethernet: ti: am65-cpsw-nuss: fix irqs type Grygorii Strashko
2020-05-07  0:53 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).