Skip to content

Commit 37e2d7c

Browse files
Sathesh B Edarajfvogel
authored andcommitted
octeon_ep: Fix host hang issue during device reboot
[ Upstream commit 34f42736b325287a7b2ce37e415838f539767bda ] When the host loses heartbeat messages from the device, the driver calls the device-specific ndo_stop function, which frees the resources. If the driver is unloaded in this scenario, it calls ndo_stop again, attempting to free resources that have already been freed, leading to a host hang issue. To resolve this, dev_close should be called instead of the device-specific stop function.dev_close internally calls ndo_stop to stop the network interface and performs additional cleanup tasks. During the driver unload process, if the device is already down, ndo_stop is not called. Fixes: 5cb96c2 ("octeon_ep: add heartbeat monitor") Signed-off-by: Sathesh B Edara <[email protected]> Reviewed-by: Simon Horman <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]> Signed-off-by: Sasha Levin <[email protected]> (cherry picked from commit c8d788f800f83b94d9db8b3dacc1d26be38a6ef4) Signed-off-by: Jack Vogel <[email protected]>
1 parent 014ddc5 commit 37e2d7c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/marvell/octeon_ep/octep_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1184,7 +1184,7 @@ static void octep_hb_timeout_task(struct work_struct *work)
11841184
miss_cnt);
11851185
rtnl_lock();
11861186
if (netif_running(oct->netdev))
1187-
octep_stop(oct->netdev);
1187+
dev_close(oct->netdev);
11881188
rtnl_unlock();
11891189
}
11901190

0 commit comments

Comments
 (0)