Skip to contentSkip to conversation

net/e1000/base: check PHY link status read

PATCH New Artem Novikov 1 participant 1 message Sep 14 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/e1000/base: check PHY link status read

The Kumeran lock loss workaround checks the PHY link state before reading the Kumeran diagnostic register. The PHY status read can fail, but the returned error is ignored and the link output is used immediately.

Propagate the PHY read error before using the link state so the workaround does not continue with an invalid status.

Fixes 5a32a257f957 ("e1000: more NICs in base driver")
---
 drivers/net/intel/e1000/base/e1000_ich8lan.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/net/intel/e1000/base/e1000_ich8lan.c +2 -0
index 0290a7dcb4..816a361fa9 100644
@@ -5548,6 +5548,8 @@ STATIC s32 e1000_kmrn_lock_loss_workaround_ich8lan(struct e1000_hw *hw)
 	 * stability
 	 */
 	ret_val = e1000_phy_has_link_generic(hw, 1, 0, &link);
+	if (ret_val)
+		return ret_val;
 	if (!link)
 		return E1000_SUCCESS;
 
Signature · 1 line
2.43.0