diff options
author | Thomas Falcon <tlfalcon@linux.ibm.com> | 2019-06-08 00:03:53 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-06-10 05:51:28 +0300 |
commit | 1f94608b0ce141be5286dde31270590bdf35b86a (patch) | |
tree | 56b1db1a928fdd1aa498fecbeadfbf2548c93ecb /drivers/net/ethernet/ibm | |
parent | 4172eadb086407ac571f5e5be640b07b1a66ae87 (diff) | |
download | linux-1f94608b0ce141be5286dde31270590bdf35b86a.tar.xz |
ibmvnic: Do not close unopened driver during reset
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: Thomas Falcon <tlfalcon@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/ibm')
-rw-r--r-- | drivers/net/ethernet/ibm/ibmvnic.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c index 3da392bfd659..bc2a91205eec 100644 --- a/drivers/net/ethernet/ibm/ibmvnic.c +++ b/drivers/net/ethernet/ibm/ibmvnic.c @@ -1745,7 +1745,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) |