]> git.baikalelectronics.ru Git - kernel.git/commit
ibmvnic: Fix reset return from closed state
authorJohn Allen <jallen@linux.vnet.ibm.com>
Wed, 14 Mar 2018 15:41:29 +0000 (10:41 -0500)
committerDavid S. Miller <davem@davemloft.net>
Wed, 14 Mar 2018 17:08:14 +0000 (13:08 -0400)
commit652b441d33d77276566ba270b50475e3cd7b2ec2
tree10f952c7f06fd745b47d9fd20c7942d018118686
parentef614ab8cebd4c13db545458a7f902e4c81f733f
ibmvnic: Fix reset return from closed state

The case in which we handle a reset from the state where the device is
closed seems to be bugged for all types of reset. For most types of reset
we currently exit the reset routine correctly, but don't set the state to
indicate that we are back in the "closed" state. For some specific cases,
we don't exit the reset routine at all and resetting will cause a closed
device to be opened.

This patch fixes the problem by unconditionally checking the reset_state
and correctly setting the adapter state before returning.

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