Skip to content

Commit 519d648

Browse files
Xu Liangkuba-moo
Xu Liang
authored andcommitted
net: phy: mxl-gpy: extend interrupt fix to all impacted variants
The interrupt fix in commit 97a89ed should be applied on all variants of GPY2xx PHY and GPY115C. Fixes: 97a89ed ("net: phy: mxl-gpy: disable interrupts on GPY215 by default") Signed-off-by: Xu Liang <[email protected]> Reviewed-by: Simon Horman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent a60caf0 commit 519d648

File tree

1 file changed

+3
-13
lines changed

1 file changed

+3
-13
lines changed

drivers/net/phy/mxl-gpy.c

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -274,13 +274,6 @@ static int gpy_config_init(struct phy_device *phydev)
274274
return ret < 0 ? ret : 0;
275275
}
276276

277-
static bool gpy_has_broken_mdint(struct phy_device *phydev)
278-
{
279-
/* At least these PHYs are known to have broken interrupt handling */
280-
return phydev->drv->phy_id == PHY_ID_GPY215B ||
281-
phydev->drv->phy_id == PHY_ID_GPY215C;
282-
}
283-
284277
static int gpy_probe(struct phy_device *phydev)
285278
{
286279
struct device *dev = &phydev->mdio.dev;
@@ -300,8 +293,7 @@ static int gpy_probe(struct phy_device *phydev)
300293
phydev->priv = priv;
301294
mutex_init(&priv->mbox_lock);
302295

303-
if (gpy_has_broken_mdint(phydev) &&
304-
!device_property_present(dev, "maxlinear,use-broken-interrupts"))
296+
if (!device_property_present(dev, "maxlinear,use-broken-interrupts"))
305297
phydev->dev_flags |= PHY_F_NO_IRQ;
306298

307299
fw_version = phy_read(phydev, PHY_FWV);
@@ -659,11 +651,9 @@ static irqreturn_t gpy_handle_interrupt(struct phy_device *phydev)
659651
* frame. Therefore, polling is the best we can do and won't do any more
660652
* harm.
661653
* It was observed that this bug happens on link state and link speed
662-
* changes on a GPY215B and GYP215C independent of the firmware version
663-
* (which doesn't mean that this list is exhaustive).
654+
* changes independent of the firmware version.
664655
*/
665-
if (gpy_has_broken_mdint(phydev) &&
666-
(reg & (PHY_IMASK_LSTC | PHY_IMASK_LSPC))) {
656+
if (reg & (PHY_IMASK_LSTC | PHY_IMASK_LSPC)) {
667657
reg = gpy_mbox_read(phydev, REG_GPIO0_OUT);
668658
if (reg < 0) {
669659
phy_error(phydev);

0 commit comments

Comments
 (0)