lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <trinity-98eee496-129f-43c7-8d3f-4a77f4a183b9-1750329125336@trinity-msg-rest-gmx-gmx-live-b647dc579-9795v>
Date: Thu, 19 Jun 2025 10:32:05 +0000
From: Frank Wunderlich <frank-w@...lic-files.de>
To: horms@...nel.org, linux@...web.de
Cc: nbd@....name, sean.wang@...iatek.com, lorenzo@...nel.org,
 andrew+netdev@...n.ch, davem@...emloft.net, edumazet@...gle.com,
 kuba@...nel.org, pabeni@...hat.com, matthias.bgg@...il.com,
 angelogioacchino.delregno@...labora.com, netdev@...r.kernel.org,
 linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
 linux-mediatek@...ts.infradead.org, daniel@...rotopia.org,
 arinc.unal@...nc9.com
Subject: Aw: Re: [net-next v5 3/3] net: ethernet: mtk_eth_soc: skip first
 IRQ if not used

Hi Simon

> Gesendet: Donnerstag, 19. Juni 2025 um 12:03
> Von: "Simon Horman" <horms@...nel.org>
> Betreff: Re: [net-next v5 3/3] net: ethernet: mtk_eth_soc: skip first IRQ if not used
>
> On Wed, Jun 18, 2025 at 03:07:14PM +0200, Frank Wunderlich wrote:
> > From: Frank Wunderlich <frank-w@...lic-files.de>
> > 
> > On SoCs without MTK_SHARED_INT capability (all except mt7621 and
> > mt7628) platform_get_irq() is called for the first IRQ (eth->irq[0])
> > but it is never used.
> > Skip the first IRQ and reduce the IRQ-count to 2.
> > 
> > Signed-off-by: Frank Wunderlich <frank-w@...lic-files.de>
> > ---
> > v5:
> > - change commit title and description
> > v4:
> > - drop >2 condition as max is already 2 and drop the else continue
> > - update comment to explain which IRQs are taken in legacy way
> 
> Reviewed-by: Simon Horman <horms@...nel.org>

thank you very much

i guess RB is still valid with changes requested by Daniel?

    net: ethernet: mtk_eth_soc: skip first IRQ if not used
    
    On SoCs with dedicated RX and TX interrupts (all except MT7621 and
    MT7628) platform_get_irq() is called for the first IRQ (eth->irq[0])
    but it is never used.
    Skip the first IRQ and reduce the IRQ-count to 2.

code (changed condition "if (i == MTK_FE_IRQ_SHARED)")
        for (i = 0; i < MTK_FE_IRQ_NUM; i++) {
-               if (MTK_HAS_CAPS(eth->soc->caps, MTK_SHARED_INT) && i > 0)
-                       eth->irq[i] = eth->irq[MTK_FE_IRQ_SHARED];
-               else
-                       eth->irq[i] = platform_get_irq(pdev, i);
+               if (MTK_HAS_CAPS(eth->soc->caps, MTK_SHARED_INT)) {
+                       if (i == MTK_FE_IRQ_SHARED)
+                               eth->irq[MTK_FE_IRQ_SHARED] = platform_get_irq(pdev, i);
+                       else
+                               eth->irq[i] = eth->irq[MTK_FE_IRQ_SHARED];
+               } else {
+                       eth->irq[i] = platform_get_irq(pdev, i + 1);
+               }

regards Frank

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ