net: hns: All ports can not work when insmod hns ko after rmmod
When system panic and kdump starts the second kernel, net port can not work. There are another two test cases have the similar reason: 1. Remove the 4 modules:hns_enet_drv/hns_dsaf/hnae/hns_mdio, and install them again, must use "ifconfig down/ifconfig up" command pair to bring port to work. This patch calls phy_stop function when init phy to fix this bug. 2. Remove the 2 modules:hns_enet_drv/hns_dsaf, and install them again, all ports can not use anymore, because of the phy devices register failed(phy devices already exists). Phy devices are registered when hns_dsaf installed, this patch removes them when hns_dsaf removed. The two cases are sometimes related, fixing the second case also requires fixing the first case, so fix them together. Feature or Bugfix:Bugfix Signed-off-by: NYonglong Liu <liuyonglong@huawei.com> Reviewed-by: Nhuangdaode <huangdaode@hisilicon.com>
Showing
想要评论请 注册 或 登录