Re: [PATCH v2] net: phy: marvell: Enable interrupt function on LED2 pin
Hi, [This is an automated email] This commit has been processed by the -stable helper bot and determined to be a high probability candidate for -stable trees. (score: 7.6606) The bot has tested the following trees: v4.16.1, v4.15.16, v4.14.33, v4.9.93, v4.4.127. v4.16.1: Build OK! v4.15.16: Build failed! Errors: marvell.c:878:13: error: implicit declaration of function ‘phy_modify_paged’; did you mean ‘phys_to_page’? [-Werror=implicit-function-declaration] v4.14.33: Build failed! Errors: marvell.c:874:13: error: implicit declaration of function ‘phy_modify_paged’; did you mean ‘phys_to_page’? [-Werror=implicit-function-declaration] v4.9.93: Build failed! Errors: marvell.c:829:13: error: implicit declaration of function ‘phy_modify_paged’; did you mean ‘phys_to_page’? [-Werror=implicit-function-declaration] marvell.c:830:12: error: ‘MII_MARVELL_LED_PAGE’ undeclared (first use in this function); did you mean ‘MII_MARVELL_PHY_PAGE’? v4.4.127: Failed to apply! Possible dependencies: 407353ec85cc ("phy: marvell: Fix 88E1510 initialization") d2fa47d9dd5c ("phy: marvell: Add ethtool statistics counters") fdecf36fcefa ("phy: marvell: fix LED configuration via marvell,reg-init") Please let us know if you'd like to have this patch included in a stable tree. -- Thanks, Sasha
Re: [PATCH v2] net: phy: marvell: Enable interrupt function on LED2 pin
From: Andrew LunnDate: Fri, 6 Apr 2018 19:29:28 +0200 > On Thu, Apr 05, 2018 at 10:40:29PM +0200, Esben Haabendal wrote: >> From: Esben Haabendal >> >> The LED2[2]/INTn pin on Marvell 88E1318S as well as 88E1510/12/14/18 needs >> to be configured to be usable as interrupt not only when WOL is enabled, >> but whenever we rely on interrupts from the PHY. >> >> Signed-off-by: Esben Haabendal >> Cc: Rasmus Villemoes > > Reviewed-by: Andrew Lunn Applied, thanks everyone.
Re: [PATCH v2] net: phy: marvell: Enable interrupt function on LED2 pin
On Thu, Apr 05, 2018 at 10:40:29PM +0200, Esben Haabendal wrote: > From: Esben Haabendal> > The LED2[2]/INTn pin on Marvell 88E1318S as well as 88E1510/12/14/18 needs > to be configured to be usable as interrupt not only when WOL is enabled, > but whenever we rely on interrupts from the PHY. > > Signed-off-by: Esben Haabendal > Cc: Rasmus Villemoes Reviewed-by: Andrew Lunn Andrew
[PATCH v2] net: phy: marvell: Enable interrupt function on LED2 pin
From: Esben HaabendalThe LED2[2]/INTn pin on Marvell 88E1318S as well as 88E1510/12/14/18 needs to be configured to be usable as interrupt not only when WOL is enabled, but whenever we rely on interrupts from the PHY. Signed-off-by: Esben Haabendal Cc: Rasmus Villemoes --- drivers/net/phy/marvell.c | 20 ++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c index 0e0978d8a0eb..a6ad0255c512 100644 --- a/drivers/net/phy/marvell.c +++ b/drivers/net/phy/marvell.c @@ -828,6 +828,22 @@ static int m88e1121_config_init(struct phy_device *phydev) return marvell_config_init(phydev); } +static int m88e1318_config_init(struct phy_device *phydev) +{ + if (phy_interrupt_is_valid(phydev)) { + int err = phy_modify_paged( + phydev, MII_MARVELL_LED_PAGE, + MII_88E1318S_PHY_LED_TCR, + MII_88E1318S_PHY_LED_TCR_FORCE_INT, + MII_88E1318S_PHY_LED_TCR_INTn_ENABLE | + MII_88E1318S_PHY_LED_TCR_INT_ACTIVE_LOW); + if (err < 0) + return err; + } + + return m88e1121_config_init(phydev); +} + static int m88e1510_config_init(struct phy_device *phydev) { int err; @@ -870,7 +886,7 @@ static int m88e1510_config_init(struct phy_device *phydev) phydev->advertising &= ~pause; } - return m88e1121_config_init(phydev); + return m88e1318_config_init(phydev); } static int m88e1118_config_aneg(struct phy_device *phydev) @@ -2086,7 +2102,7 @@ static struct phy_driver marvell_drivers[] = { .features = PHY_GBIT_FEATURES, .flags = PHY_HAS_INTERRUPT, .probe = marvell_probe, - .config_init = _config_init, + .config_init = _config_init, .config_aneg = _config_aneg, .read_status = _read_status, .ack_interrupt = _ack_interrupt, -- 2.16.3