]> git.baikalelectronics.ru Git - kernel.git/commit
ibmvnic: Introduce active CRQ state
authorThomas Falcon <tlfalcon@linux.vnet.ibm.com>
Wed, 23 May 2018 18:37:56 +0000 (13:37 -0500)
committerDavid S. Miller <davem@davemloft.net>
Fri, 25 May 2018 02:19:25 +0000 (22:19 -0400)
commit0298e1bd0bf72dea59766f43edf9a6ebef284c29
treedbc4fe85d2235f33204fafa0069133d302bdd011
parent5de2aa0d11d4da79da166e71b767f10ff5f28bc1
ibmvnic: Introduce active CRQ state

Introduce an "active" state for a IBM vNIC Command-Response Queue. A CRQ
is considered active once it has initialized or linked with its partner by
sending an initialization request and getting a successful response back
from the management partition.  Until this has happened, do not allow CRQ
commands to be sent other than the initialization request.

This change will avoid a protocol error in case of a device transport
event occurring during a initialization. When the driver receives a
transport event notification indicating that the backing hardware
has changed and needs reinitialization, any further commands other
than the initialization handshake with the VIOS management partition
will result in an invalid state error. Instead of sending a command
that will be returned with an error, print a warning and return an
error that will be handled by the caller.

Signed-off-by: Thomas Falcon <tlfalcon@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/ibm/ibmvnic.c
drivers/net/ethernet/ibm/ibmvnic.h