Skip to contentSkip to conversation

net/ice/base: fix switch rules not cleared on warm reset

PATCH New Steve Yang 1 participant 1 message Aug 12, 2022 Network drivers

lore
Share & tools
lore

Steve Yang

author
#0 lore raw

PATCH 1/1 net/ice/base: fix switch rules not cleared on warm reset

When users killed app forcely (e.g.: kill -9 pid), the driver reset couldn't make all registers of NIC recovery to initial status. For example, the switch filter rules, which involved the vlan tag, couldn't be added.

Tell the Firmware to shut down the AdminQ to avoid possible error when process was killed abnormally.

Fixes 453d087ccaff ("net/ice/base: add common functions")
---
 drivers/net/ice/base/ice_common.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/net/ice/base/ice_common.c +5 -0
index db87bacd97..66b51be29d 100644
@@ -926,6 +926,11 @@ enum ice_status ice_init_hw(struct ice_hw *hw)
 	if (status)
 		goto err_unroll_cqinit;
 
+	/* Tell the Firmware to shut down the AdminQ to avoid possible error
+	 * when process was killed abnormally.
+	 */
+	ice_aq_q_shutdown(hw, true);
+
 	status = ice_init_nvm(hw);
 	if (status)
 		goto err_unroll_cqinit;
Signature · 1 line
2.25.1