ibmvnic: Harden device Command Response Queue handshake
authorThomas Falcon <tlfalcon@linux.ibm.com>
Mon, 31 Aug 2020 16:59:57 +0000 (11:59 -0500)
committerDavid S. Miller <davem@davemloft.net>
Tue, 1 Sep 2020 20:23:23 +0000 (13:23 -0700)
commit36a782fdcc2bfe39265ac4640f29404493b52a55
tree34b19cd337bb9810b8afd2a5a3126fee1ea5ebdd
parent150f29f5e6ea55d8a7d368b162a4e9947a95d2f5
ibmvnic: Harden device Command Response Queue handshake

In some cases, the device or firmware may be busy when the
driver attempts to perform the CRQ initialization handshake.
If the partner is busy, the hypervisor will return the H_CLOSED
return code. The aim of this patch is that, if the device is not
ready, to query the device a number of times, with a small wait
time in between queries. If all initialization requests fail,
the driver will remain in a dormant state, awaiting a signal
from the device that it is ready for operation.

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