2021-11-26 15:23:16

by Sven Schuchmann

[permalink] [raw]
Subject: [PATCH] net: usb: lan78xx: lan78xx_phy_init(): use PHY_POLL instead of "0" if no IRQ is available

On most systems request for IRQ 0 will fail, phylib will print an error message
and fall back to polling. To fix this set the phydev->irq to PHY_POLL if no IRQ
is available.

Signed-off-by: Sven Schuchmann <[email protected]>
---
drivers/net/usb/lan78xx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/usb/lan78xx.c b/drivers/net/usb/lan78xx.c
index 2bfb59ae0eaf..185e08c1af31 100644
--- a/drivers/net/usb/lan78xx.c
+++ b/drivers/net/usb/lan78xx.c
@@ -2398,7 +2398,7 @@ static int lan78xx_phy_init(struct lan78xx_net *dev)
if (dev->domain_data.phyirq > 0)
phydev->irq = dev->domain_data.phyirq;
else
- phydev->irq = 0;
+ phydev->irq = PHY_POLL;
netdev_dbg(dev->net, "phydev->irq = %d\n", phydev->irq);

/* set to AUTOMDIX */
--
2.17.1



2021-11-26 19:52:49

by Jakub Kicinski

[permalink] [raw]
Subject: Re: [PATCH] net: usb: lan78xx: lan78xx_phy_init(): use PHY_POLL instead of "0" if no IRQ is available

On Fri, 26 Nov 2021 16:57:50 +0100 Andrew Lunn wrote:
> On Fri, Nov 26, 2021 at 04:20:40PM +0100, Sven Schuchmann wrote:
> > On most systems request for IRQ 0 will fail, phylib will print an error message
> > and fall back to polling. To fix this set the phydev->irq to PHY_POLL if no IRQ
> > is available.
> >
> > Signed-off-by: Sven Schuchmann <[email protected]>
>
> Reviewed-by: Andrew Lunn <[email protected]>

Fixes: cc89c323a30e ("lan78xx: Use irq_domain for phy interrupt from USB Int. EP")

right?

2021-11-27 10:38:59

by Sven Schuchmann

[permalink] [raw]
Subject: AW: [PATCH] net: usb: lan78xx: lan78xx_phy_init(): use PHY_POLL instead of "0" if no IRQ is available

Hello Jakub,

> Von: Jakub Kicinski <[email protected]>
> Gesendet: Freitag, 26. November 2021 20:35
> An: Andrew Lunn <[email protected]>; Sven Schuchmann <[email protected]>
> Cc: Woojung Huh <[email protected]>; [email protected]; David S. Miller
> <[email protected]>; [email protected]; [email protected]; linux-
> [email protected]
> Betreff: Re: [PATCH] net: usb: lan78xx: lan78xx_phy_init(): use PHY_POLL instead of "0" if
> no IRQ is available
>
> On Fri, 26 Nov 2021 16:57:50 +0100 Andrew Lunn wrote:
> > On Fri, Nov 26, 2021 at 04:20:40PM +0100, Sven Schuchmann wrote:
> > > On most systems request for IRQ 0 will fail, phylib will print an error message
> > > and fall back to polling. To fix this set the phydev->irq to PHY_POLL if no IRQ
> > > is available.
> > >
> > > Signed-off-by: Sven Schuchmann <[email protected]>
> >
> > Reviewed-by: Andrew Lunn <[email protected]>
>
> Fixes: cc89c323a30e ("lan78xx: Use irq_domain for phy interrupt from USB Int. EP")
>
> right?

Seems right, will send a v2

Sven