]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
net: usb: lan78xx: lan78xx_phy_init(): use PHY_POLL instead of "0" if no IRQ is available
authorSven Schuchmann <schuchmann@schleissheimer.de>
Sat, 27 Nov 2021 10:47:07 +0000 (11:47 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 29 Nov 2021 12:22:07 +0000 (12:22 +0000)
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.

Fixes: cc89c323a30e ("lan78xx: Use irq_domain for phy interrupt from USB Int. EP")
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Sven Schuchmann <schuchmann@schleissheimer.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/usb/lan78xx.c

index f20376c1ef3fb1f3cc924a7e06a52801aac7696a..8cd265fc1fd9d4eb11b5196e7d831d2ec828f58c 100644 (file)
@@ -2228,7 +2228,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 */