]> git.proxmox.com Git - mirror_ubuntu-bionic-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)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Mon, 27 Aug 2018 14:40:05 +0000 (16:40 +0200)
commitd12f2504fb3ec6b2a950177da4624b1eed5f04d9
tree4e4bba23619c89a0da602a31175d70a5a38ac7a7
parent85c3a3708dec22b76deb49fb62d0838135218372
ibmvnic: Fix reset return from closed state

BugLink: http://bugs.launchpad.net/bugs/1786352
[ Upstream commit e676d81c8990f511d60698a1a8abaa438b3f9d3d ]

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>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/net/ethernet/ibm/ibmvnic.c