]> git.itanic.dy.fi Git - linux-stable/commitdiff
net: phy: mxl-gpy: disable interrupts on GPY215 by default
authorMichael Walle <michael@walle.cc>
Mon, 9 Jan 2023 12:30:13 +0000 (13:30 +0100)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 10 Jan 2023 12:38:37 +0000 (13:38 +0100)
The interrupts on the GPY215B and GPY215C are broken and the only viable
fix is to disable them altogether. There is still the possibilty to
opt-in via the device tree.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/phy/mxl-gpy.c

index 147d7a5a9b354c6d43f30a56adbbdd7aeb908c31..e5972b4ef6e8f8064021f55737f4748183eb1568 100644 (file)
@@ -12,6 +12,7 @@
 #include <linux/mutex.h>
 #include <linux/phy.h>
 #include <linux/polynomial.h>
+#include <linux/property.h>
 #include <linux/netdevice.h>
 
 /* PHY ID */
@@ -292,6 +293,10 @@ static int gpy_probe(struct phy_device *phydev)
        phydev->priv = priv;
        mutex_init(&priv->mbox_lock);
 
+       if (gpy_has_broken_mdint(phydev) &&
+           !device_property_present(dev, "maxlinear,use-broken-interrupts"))
+               phydev->dev_flags |= PHY_F_NO_IRQ;
+
        fw_version = phy_read(phydev, PHY_FWV);
        if (fw_version < 0)
                return fw_version;