]> git.baikalelectronics.ru Git - kernel.git/commit
ibmvnic: Fix error recovery on login failure
authorJohn Allen <jallen@linux.ibm.com>
Mon, 16 Jul 2018 15:29:30 +0000 (10:29 -0500)
committerDavid S. Miller <davem@davemloft.net>
Mon, 16 Jul 2018 21:39:47 +0000 (14:39 -0700)
commitd3c13f9a6cc1a083ebfefc3f9629d45225d084a8
tree8abcf8f5a7d0ca729b6b28e77ce0f4a8d5d5e78f
parent35e4c3cb991b7d2c9505c8fc2290a076df3eebe5
ibmvnic: Fix error recovery on login failure

Testing has uncovered a failure case that is not handled properly. In the
event that a login fails and we are not able to recover on the spot, we
return 0 from do_reset, preventing any error recovery code from being
triggered.  Additionally, the state is set to "probed" meaning that when we
are able to trigger the error recovery, the driver always comes up in the
probed state. To handle the case properly, we need to return a failure code
here and set the adapter state to the state that we entered the reset in
indicating the state that we would like to come out of the recovery reset
in.

Signed-off-by: John Allen <jallen@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/ibm/ibmvnic.c