Commit 31f6b61d authored by Yonglong Liu's avatar Yonglong Liu Committed by David S. Miller
Browse files

net: hns: Clean rx fbd when ae stopped.



If there are packets in hardware when changing the speed or duplex,
it may cause hardware hang up.

This patch adds the code to wait rx fbd clean up when ae stopped.

Signed-off-by: default avatarYonglong Liu <liuyonglong@huawei.com>
Signed-off-by: default avatarPeng Li <lipeng321@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 5778b13b
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -379,6 +379,9 @@ static void hns_ae_stop(struct hnae_handle *handle)

	hns_ae_ring_enable_all(handle, 0);

	/* clean rx fbd. */
	hns_rcb_wait_fbd_clean(handle->qs, handle->q_num, RCB_INT_FLAG_RX);

	(void)hns_mac_vm_config_bc_en(mac_cb, 0, false);
}