From 3ba9bcb4b68fa63f38bca910ccd4a1bf3cb4195f Mon Sep 17 00:00:00 2001 From: Mitch Williams Date: Fri, 9 Jan 2015 11:18:15 +0000 Subject: [PATCH] i40e: add locking around VF reset During VF deallocation, we need to lock out the VF reset code. However, we cannot depend on simply masking the interrupt, as this does not lock out the service task, which can still call the reset routine. Instead, leave the interrupt enabled, but add locking around the VF disable and reset routines. For the disable code, we wait to get the lock, as the reset code will take a finite amount of time to run. For the reset code, we just return if we fail to get the lock. Since we know that the VFs are being disabled, we don't need to handle the reset. This fixes a panic when disabling SR-IOV. Change-ID: Iea0a6cdef35c331f48c6d5b2f8e6f0e86322e7d8 Signed-off-by: Mitch Williams Tested-by: Jim Young Signed-off-by: Jeff Kirsher --- Reading git-format-patch failed