]> git.baikalelectronics.ru Git - kernel.git/commit
ibmvnic: Make CRQ interrupt tasklet wait for all capabilities crqs
authorThomas Falcon <tlfalcon@linux.vnet.ibm.com>
Wed, 15 Feb 2017 18:18:00 +0000 (12:18 -0600)
committerDavid S. Miller <davem@davemloft.net>
Sun, 19 Feb 2017 23:12:03 +0000 (18:12 -0500)
commit409998641fa8f63ec85d3f50fee59441adfe2840
tree05bf4c589d05660a4f204f6a77c149b228f1992b
parentef3420a616885347e1e0819b4f3e35b88be34140
ibmvnic: Make CRQ interrupt tasklet wait for all capabilities crqs

After sending device capability queries and requests to the vNIC Server,
an interrupt is triggered and the responses are written to the driver's
CRQ response buffer. Since the interrupt can be triggered before all
responses are written and visible to the partition, there is a danger
that the interrupt handler or tasklet can terminate before all responses
are read, resulting in a failure to initialize the device.

To avoid this scenario, when capability commands are sent, we set
a flag that will be checked in the following interrupt tasklet that
will handle the capability responses from the server. Once all
responses have been handled, the flag is disabled; and the tasklet
is allowed to terminate.

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