]> git.baikalelectronics.ru Git - kernel.git/commit
ibmvnic: Set to CLOSED state even on error
authorSukadev Bhattiprolu <sukadev@linux.ibm.com>
Thu, 11 Feb 2021 01:41:43 +0000 (17:41 -0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 11 Feb 2021 22:33:14 +0000 (14:33 -0800)
commit7c5b42898ebbd92ddf771645a784ba86cca3540a
tree0e17c32a81dccc057ec9353da21181550e3aeb19
parent4528b3250747cef74d84f9f70f7f957794f0478a
ibmvnic: Set to CLOSED state even on error

If set_link_state() fails for any reason, we still cleanup the adapter
state and cannot recover from a partial close anyway. So set the adapter
to CLOSED state. That way if a new soft/hard reset is processed, the
adapter will remain in the CLOSED state until the next ibmvnic_open().

Fixes: 737c138fc2f6 ("ibmvnic: Reorganize device close")
Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.ibm.com>
Reported-by: Abdul Haleem <abdhalee@in.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/ibm/ibmvnic.c