net: macb: Add shutdown operation support
authorAbin Joseph <abin.joseph@amd.com>
Tue, 10 Jun 2025 11:41:11 +0000 (17:11 +0530)
committerJakub Kicinski <kuba@kernel.org>
Thu, 12 Jun 2025 00:39:56 +0000 (17:39 -0700)
commit5e84d5b36b5b0e8552fbbdfbfd9c81bb79ab0947
treea2411aa2d00a23ccdbe6662b58630adb8649eefb
parent48c15e974c7d85a772792e56daf46c2b28190ec7
net: macb: Add shutdown operation support

Implement the shutdown hook to ensure clean and complete deactivation of
MACB controller. The shutdown sequence is protected with 'rtnl_lock()'
to serialize access and prevent race conditions while detaching and
closing the network device. This ensure a safe transition when the Kexec
utility calls the shutdown hook, facilitating seamless loading and
booting of a new kernel from the currently running one.

Signed-off-by: Abin Joseph <abin.joseph@amd.com>
Link: https://patch.msgid.link/20250610114111.1708614-1-abin.joseph@amd.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/cadence/macb_main.c