提交 97a89ed1 编写于 作者: M Michael Walle 提交者: Paolo Abeni

net: phy: mxl-gpy: disable interrupts on GPY215 by default

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: NMichael Walle <michael@walle.cc>
Reviewed-by: NAndrew Lunn <andrew@lunn.ch>
Signed-off-by: NPaolo Abeni <pabeni@redhat.com>
上级 7d885863
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
#include <linux/mutex.h> #include <linux/mutex.h>
#include <linux/phy.h> #include <linux/phy.h>
#include <linux/polynomial.h> #include <linux/polynomial.h>
#include <linux/property.h>
#include <linux/netdevice.h> #include <linux/netdevice.h>
/* PHY ID */ /* PHY ID */
...@@ -292,6 +293,10 @@ static int gpy_probe(struct phy_device *phydev) ...@@ -292,6 +293,10 @@ static int gpy_probe(struct phy_device *phydev)
phydev->priv = priv; phydev->priv = priv;
mutex_init(&priv->mbox_lock); 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); fw_version = phy_read(phydev, PHY_FWV);
if (fw_version < 0) if (fw_version < 0)
return fw_version; return fw_version;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册