Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

+3 -4
+3 -4
drivers/net/phy/adin1100.c
··· 192 192 static int adin_set_powerdown_mode(struct phy_device *phydev, bool en) 193 193 { 194 194 int ret; 195 - int val; 196 195 197 - val = en ? ADIN_CRSM_SFT_PD_CNTRL_EN : 0; 198 196 ret = phy_write_mmd(phydev, MDIO_MMD_VEND1, 199 - ADIN_CRSM_SFT_PD_CNTRL, val); 197 + ADIN_CRSM_SFT_PD_CNTRL, 198 + en ? ADIN_CRSM_SFT_PD_CNTRL_EN : 0); 200 199 if (ret < 0) 201 200 return ret; 202 201 203 202 return phy_read_mmd_poll_timeout(phydev, MDIO_MMD_VEND1, ADIN_CRSM_STAT, ret, 204 - (ret & ADIN_CRSM_SFT_PD_RDY) == val, 203 + !!(ret & ADIN_CRSM_SFT_PD_RDY) == en, 205 204 1000, 30000, true); 206 205 } 207 206