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

Commit e65dd528 authored by Thomas Falcon's avatar Thomas Falcon Committed by Greg Kroah-Hartman
Browse files

ibmvnic: Do not close unopened driver during reset



[ Upstream commit 1f94608b0ce141be5286dde31270590bdf35b86a ]

Check driver state before halting it during a reset. If the driver is
not running, do nothing. Otherwise, a request to deactivate a down link
can cause an error and the reset will fail.

Signed-off-by: default avatarThomas Falcon <tlfalcon@linux.ibm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 374180b1
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1754,7 +1754,8 @@ static int do_reset(struct ibmvnic_adapter *adapter,

	ibmvnic_cleanup(netdev);

	if (adapter->reset_reason != VNIC_RESET_MOBILITY &&
	if (reset_state == VNIC_OPEN &&
	    adapter->reset_reason != VNIC_RESET_MOBILITY &&
	    adapter->reset_reason != VNIC_RESET_FAILOVER) {
		rc = __ibmvnic_close(netdev);
		if (rc)