mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-14 18:25:48 -04:00
Merge branch 'net-phy-adin1100-fix-powerdown-mode-setting'
Alexander Dahl says: ==================== net: phy: adin1100: Fix powerdown mode setting while building a new device around the ADIN1100 I noticed some errors in kernel log when calling `ifdown` on the ethernet device. Series has a straight forward fix and an obvious follow-up code simplification. ==================== Link: https://patch.msgid.link/20251119124737.280939-1-ada@thorsis.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
@@ -192,16 +192,15 @@ static irqreturn_t adin_phy_handle_interrupt(struct phy_device *phydev)
|
||||
static int adin_set_powerdown_mode(struct phy_device *phydev, bool en)
|
||||
{
|
||||
int ret;
|
||||
int val;
|
||||
|
||||
val = en ? ADIN_CRSM_SFT_PD_CNTRL_EN : 0;
|
||||
ret = phy_write_mmd(phydev, MDIO_MMD_VEND1,
|
||||
ADIN_CRSM_SFT_PD_CNTRL, val);
|
||||
ADIN_CRSM_SFT_PD_CNTRL,
|
||||
en ? ADIN_CRSM_SFT_PD_CNTRL_EN : 0);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
return phy_read_mmd_poll_timeout(phydev, MDIO_MMD_VEND1, ADIN_CRSM_STAT, ret,
|
||||
(ret & ADIN_CRSM_SFT_PD_RDY) == val,
|
||||
!!(ret & ADIN_CRSM_SFT_PD_RDY) == en,
|
||||
1000, 30000, true);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user