Loading
net/hinic: Fix reboot -f stuck for a long time
driver inclusion category: bugfix bugzilla: 4472 ----------------------------------------------------------------------- After the user executes the reboot -f command, the kernel restart process is followed. One of the steps is device shutdown. The main process of reboot is stuck in the hns3 NIC shutdown callback process and stuck in the kernel's rtnl lock. The reason why the card is locked in the rtnl is that the system sar, ip, ethtool and other commands are acquiring the information on the network card through the sys fs interface. Rtnl lock is required before accessing the device. When accessing the hinic network card, first lock the rtnl, and then transfer to the hinic callback hinic_get_link_ksettings to get the data. The network card sends a request to the chip through the assembly command and waits for the chip to respond. When the device is shut down, the chip has been shut down and cannot respond. The driver can only wait for a timeout (synchronously wait for 10s), then the rtnl lock will be held for 10 seconds before releasing. The hinic driver sets the card to the absent state in the shutdown interface, forcing all commands not to be sent to the chip to avoid the command being stuck for a long time. Signed-off-by:Chiqijun <chiqijun@huawei.com> Reviewed-by:
Zengweiliang <zengweiliang.zengweiliang@huawei.com> Signed-off-by:
Yang Yingliang <yangyingliang@huawei.com>