Re: [PATCH] net: stmmac: platform: Fix misleading interrupt error msg

From: Markus Fuchs
Date: Thu Mar 12 2020 - 12:37:41 EST


On Thu, 12 Mar 2020 at 07:04, David Miller <davem@xxxxxxxxxxxxx> wrote:
>
> From: Markus Fuchs <mklntf@xxxxxxxxx>
> Date: Fri, 6 Mar 2020 17:38:48 +0100
>
> > Not every stmmac based platform makes use of the eth_wake_irq or eth_lpi
> > interrupts. Use the platform_get_irq_byname_optional variant for these
> > interrupts, so no error message is displayed, if they can't be found.
> > Rather print an information to hint something might be wrong to assist
> > debugging on platforms which use these interrupts.
> >
> > Signed-off-by: Markus Fuchs <mklntf@xxxxxxxxx>
>
> What do you mean the error message is misleading right now?
>
> It isn't printing anything out at the moment in this situation.

Hello,

the error messages are
[ 1.206363] socfpga-dwmac ff700000.ethernet: IRQ eth_wake_irq not found
[ 1.213023] socfpga-dwmac ff700000.ethernet: IRQ eth_lpi not found

I tried to explain this in my original post between the --- lines of the patch.
Maybe this was wrong, so I repost it.


On my cyclone V socfpga platform I get error messages after updating to
Linux Kernel 5.4.24

Starting kernel ...

Deasserting all peripheral resets
[ 1.206363] socfpga-dwmac ff700000.ethernet: IRQ eth_wake_irq not found
[ 1.213023] socfpga-dwmac ff700000.ethernet: IRQ eth_lpi not found

These interrupts don't matter for my platform and many other stmmac based
ones, as we can see by grepping for 'macirq'.

socfpga.dtsi: interrupt-names = "macirq";
socfpga.dtsi: interrupt-names = "macirq";
sun7i-a20.dtsi: interrupt-names = "macirq";
spear600.dtsi: interrupt-names = "macirq", "eth_wake_irq";
artpec6.dtsi: interrupt-names = "macirq", "eth_lpi";
rk322x.dtsi: interrupt-names = "macirq";
sun9i-a80.dtsi: interrupt-names = "macirq";
spear1310.dtsi: interrupt-names = "macirq";
spear1310.dtsi: interrupt-names = "macirq";
spear1310.dtsi: interrupt-names = "macirq";
spear1310.dtsi: interrupt-names = "macirq";
stih407-family.dtsi: interrupt-names = "macirq", "eth_wake_irq";
stm32f429.dtsi: interrupt-names = "macirq";
sun6i-a31.dtsi: interrupt-names = "macirq";
meson.dtsi: interrupt-names = "macirq";
rk3288.dtsi: interrupt-names = "macirq", "eth_wake_irq";
sun8i-r40.dtsi: interrupt-names = "macirq";
sunxi-h3-h5.dtsi: interrupt-names = "macirq";
spear3xx.dtsi: interrupt-names = "macirq", "eth_wake_irq";
lpc18xx.dtsi: interrupt-names = "macirq";
stm32h743.dtsi: interrupt-names = "macirq";
socfpga_arria10.dtsi: interrupt-names = "macirq";
socfpga_arria10.dtsi: interrupt-names = "macirq";
socfpga_arria10.dtsi: interrupt-names = "macirq";
rv1108.dtsi: interrupt-names = "macirq", "eth_wake_irq";
spear13xx.dtsi: interrupt-names = "macirq", "eth_wake_irq";
stm32mp151.dtsi: interrupt-names = "macirq";
ox820.dtsi: interrupt-names = "macirq", "eth_wake_irq";
sun8i-a83t.dtsi: interrupt-names = "macirq";

So, in my opinion, the error messages are missleading. I believe
the right way to handle this would require more changes though. Some
kind of configuration information, telling which interrupts are required
by the platform and than conditionally call platform_get_irq_byname().
This would print an error message, if something is wrong, on the right
platforms and nothing at all on the others.