summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/ibm/ibmvnic.h
diff options
context:
space:
mode:
authorThomas Falcon <tlfalcon@linux.vnet.ibm.com>2018-05-23 13:37:56 -0500
committerDavid S. Miller <davem@davemloft.net>2018-05-24 22:19:25 -0400
commit5153698e551b4b824e3d35da59914e1b4f815baa (patch)
treedbc4fe85d2235f33204fafa0069133d302bdd011 /drivers/net/ethernet/ibm/ibmvnic.h
parentc3f22415474d36194cb7785d9a236523bce0d829 (diff)
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>
Diffstat (limited to 'drivers/net/ethernet/ibm/ibmvnic.h')
-rw-r--r--drivers/net/ethernet/ibm/ibmvnic.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/ibm/ibmvnic.h b/drivers/net/ethernet/ibm/ibmvnic.h
index 22391e8805f6..edfc312d3523 100644
--- a/drivers/net/ethernet/ibm/ibmvnic.h
+++ b/drivers/net/ethernet/ibm/ibmvnic.h
@@ -865,6 +865,7 @@ struct ibmvnic_crq_queue {
int size, cur;
dma_addr_t msg_token;
spinlock_t lock;
+ bool active;
};
union sub_crq {