igb: skip phy status check where unavailable
Subsystems (3)
PATCH 1/1 igb: skip phy status check where unavailable
igb_read_phy_reg() will silently return, leaving phy_data untouched, if hw->ops.read_reg isn't set. Depending on the uninitialized value of phy_data, this led to the phy status check either succeeding immediately or looping continuously for 2 seconds before emitting a noisy err-level timeout. This message went out to the console even though there was no actual problem.
Instead, first check if there is read_reg function pointer. If not, proceed without trying to check the phy status register.
--- drivers/net/ethernet/intel/igb/igb_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/ethernet/intel/igb/igb_main.c +2 -1
@@ -5505,7 +5505,8 @@ static void igb_watchdog_task(struct work_struct *work)break ; } -if (adapter->link_speed !=SPEED_1000 ) +if (adapter->link_speed !=SPEED_1000 || + !hw->phy.ops.read_reg) goto no_wait;/* wait for Remote receiver status OK */
Signature · 1 line
2.35.1
Quoted 24 lines
-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Kevin Mitchell
Sent: Saturday, April 30, 2022 5:26 AM
Cc: [email protected]; [email protected]; linux- [email protected]; Takuma Ueba <[email protected]>; Jeff Kirsher <[email protected]>; [email protected]; Jakub Kicinski <[email protected]>; Paolo Abeni <[email protected]>; David S. Miller <[email protected]>
Subject: [Intel-wired-lan] [PATCH] igb: skip phy status check where unavailable
igb_read_phy_reg()will silently return, leavingphy_datauntouched, ifhw->ops.read_regisn't set. Depending on the uninitialized value ofphy_data, this led to the phy status check either succeeding immediately or looping continuously for 2 seconds before emitting a noisy err-level timeout. This message went out to the console even though there was no actual problem.Instead, first check if there is
read_regfunction pointer. If not, proceed without trying to check the phy status register.
Quoted 7 lines
Fixes b72f3f72005d ("igb: When GbE link up, wait for Remote receiver statuscondition")
Signed-off-by Kevin Mitchell <[email protected]>--- drivers/net/ethernet/intel/igb/igb_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Quoted 24 lines
-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Kevin Mitchell
Sent: Saturday, April 30, 2022 5:26 AM
Cc: [email protected]; [email protected]; linux- [email protected]; Takuma Ueba <[email protected]>; Jeff Kirsher <[email protected]>; [email protected]; Jakub Kicinski <[email protected]>; Paolo Abeni <[email protected]>; David S. Miller <[email protected]>
Subject: [Intel-wired-lan] [PATCH] igb: skip phy status check where unavailable
igb_read_phy_reg()will silently return, leavingphy_datauntouched, ifhw->ops.read_regisn't set. Depending on the uninitialized value ofphy_data, this led to the phy status check either succeeding immediately or looping continuously for 2 seconds before emitting a noisy err-level timeout. This message went out to the console even though there was no actual problem.Instead, first check if there is
read_regfunction pointer. If not, proceed without trying to check the phy status register.
Quoted 7 lines
Fixes b72f3f72005d ("igb: When GbE link up, wait for Remote receiver statuscondition")
Signed-off-by Kevin Mitchell <[email protected]>--- drivers/net/ethernet/intel/igb/igb_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)