提交 f6c25dec 编写于 作者: T Thomas Falcon 提交者: Xie XiuQi

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: NThomas Falcon <tlfalcon@linux.ibm.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 56e625aa
...@@ -1754,7 +1754,8 @@ static int do_reset(struct ibmvnic_adapter *adapter, ...@@ -1754,7 +1754,8 @@ static int do_reset(struct ibmvnic_adapter *adapter,
ibmvnic_cleanup(netdev); 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) { adapter->reset_reason != VNIC_RESET_FAILOVER) {
rc = __ibmvnic_close(netdev); rc = __ibmvnic_close(netdev);
if (rc) if (rc)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册