From: Greg Rose Date: Wed, 24 Mar 2010 09:36:08 +0000 (+0000) Subject: ixgbe: In SR-IOV mode insert delay before bring the adapter up X-Git-Tag: v2.6.34-rc3~9^2~25 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=5809a1ae77721931ca7bd7aeacb37fdabe6f07c0;p=~emulex%2Finfiniband.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 Signed-off-by: Jeff Kirsher Signed-off-by: David S. Miller --- diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index d75c46ff31f..d2cda9e5963 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c @@ -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); }