Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2372a5f1 authored by Amit Kumar Salecha's avatar Amit Kumar Salecha Committed by David S. Miller
Browse files

qlcnic: fix context cleanup



Before going for recovery, every pci-func should check fw state,
irrespective of device state. This to avoid unnecssary sending
of command for ctx destroy.

Signed-off-by: default avatarAmit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e0a67e2d
Loading
Loading
Loading
Loading
+1 −3
Original line number Original line Diff line number Diff line
@@ -2301,10 +2301,8 @@ qlcnic_check_health(struct qlcnic_adapter *adapter)
	if (qlcnic_check_temp(adapter))
	if (qlcnic_check_temp(adapter))
		goto detach;
		goto detach;


	if (adapter->need_fw_reset) {
	if (adapter->need_fw_reset)
		qlcnic_dev_request_reset(adapter);
		qlcnic_dev_request_reset(adapter);
		goto detach;
	}


	state = QLCRD32(adapter, QLCNIC_CRB_DEV_STATE);
	state = QLCRD32(adapter, QLCNIC_CRB_DEV_STATE);
	if (state == QLCNIC_DEV_NEED_RESET || state == QLCNIC_DEV_NEED_QUISCENT)
	if (state == QLCNIC_DEV_NEED_RESET || state == QLCNIC_DEV_NEED_QUISCENT)