Skip to content

Commit ad47e09

Browse files
Yufeng Mogregkh
authored andcommitted
net: hns3: disable mac in flr process
commit b81d894 upstream. The firmware will not disable mac in flr process. Therefore, the driver needs to proactively disable mac during flr, which is the same as the function reset. Fixes: 35d93a3 ("net: hns3: adjust the process of PF reset") Signed-off-by: Yufeng Mo <moyufeng@huawei.com> Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent b76522c commit ad47e09

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7005,11 +7005,12 @@ static void hclge_ae_stop(struct hnae3_handle *handle)
70057005
hclge_clear_arfs_rules(handle);
70067006
spin_unlock_bh(&hdev->fd_rule_lock);
70077007

7008-
/* If it is not PF reset, the firmware will disable the MAC,
7008+
/* If it is not PF reset or FLR, the firmware will disable the MAC,
70097009
* so it only need to stop phy here.
70107010
*/
70117011
if (test_bit(HCLGE_STATE_RST_HANDLING, &hdev->state) &&
7012-
hdev->reset_type != HNAE3_FUNC_RESET) {
7012+
hdev->reset_type != HNAE3_FUNC_RESET &&
7013+
hdev->reset_type != HNAE3_FLR_RESET) {
70137014
hclge_mac_stop_phy(hdev);
70147015
hclge_update_link_status(hdev);
70157016
return;

0 commit comments

Comments
 (0)