mirror of https://gitee.com/openkylin/linux.git
ixgbe: In SR-IOV mode insert delay before bring the adapter up
VFs running in guest VMs do not respond in as timely a manner to PF indication it is going down as they do when running in the host domain. If the adapter is in SR-IOV mode insert a two second delay to guarantee that all VFs have had time to respond to the PF reset. In any case resetting the PF while VFs are active should be discouraged but if it must be done then there will be a two second delay to help synchronize resets among the PF and all the VFs. Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
65deeed7b3
commit
5809a1ae77
|
@ -3056,6 +3056,14 @@ void ixgbe_reinit_locked(struct ixgbe_adapter *adapter)
|
|||
while (test_and_set_bit(__IXGBE_RESETTING, &adapter->state))
|
||||
msleep(1);
|
||||
ixgbe_down(adapter);
|
||||
/*
|
||||
* If SR-IOV enabled then wait a bit before bringing the adapter
|
||||
* back up to give the VFs time to respond to the reset. The
|
||||
* two second wait is based upon the watchdog timer cycle in
|
||||
* the VF driver.
|
||||
*/
|
||||
if (adapter->flags & IXGBE_FLAG_SRIOV_ENABLED)
|
||||
msleep(2000);
|
||||
ixgbe_up(adapter);
|
||||
clear_bit(__IXGBE_RESETTING, &adapter->state);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue