RE: [Intel-wired-lan] [PATCH] igb: skip phy status check where unavailable

From: G, GurucharanX
Date: Tue May 17 2022 - 00:51:24 EST




> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@xxxxxxxxxx> On Behalf Of
> Kevin Mitchell
> Sent: Saturday, April 30, 2022 5:26 AM
> Cc: kevmitch@xxxxxxxxxx; intel-wired-lan@xxxxxxxxxxxxxxxx; linux-
> kernel@xxxxxxxxxxxxxxx; Takuma Ueba <t.ueba11@xxxxxxxxx>; Jeff Kirsher
> <jeffrey.t.kirsher@xxxxxxxxx>; netdev@xxxxxxxxxxxxxxx; Jakub Kicinski
> <kuba@xxxxxxxxxx>; Paolo Abeni <pabeni@xxxxxxxxxx>; David S. Miller
> <davem@xxxxxxxxxxxxx>
> Subject: [Intel-wired-lan] [PATCH] 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.
>
> Fixes: b72f3f72005d ("igb: When GbE link up, wait for Remote receiver status
> condition")
> Signed-off-by: Kevin Mitchell <kevmitch@xxxxxxxxxx>
> ---
> drivers/net/ethernet/intel/igb/igb_main.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>

Tested-by: Gurucharan <gurucharanx.g@xxxxxxxxx> (A Contingent worker at Intel)