igb: delay VF reset notification until after interrupts are enabed
This update delays the VF reset notification until after interrupts are enabled. Otherwise there is a chance of having the VF try to reset itself too soon and being ignored by the PF as a result. Signed-off-by: Alexander Duyck <alexander.h.duyck@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:
committed by
David S. Miller
parent
06cf2666c7
commit
d4960307ea
@@ -1165,6 +1165,13 @@ int igb_up(struct igb_adapter *adapter)
|
|||||||
rd32(E1000_ICR);
|
rd32(E1000_ICR);
|
||||||
igb_irq_enable(adapter);
|
igb_irq_enable(adapter);
|
||||||
|
|
||||||
|
/* notify VFs that reset has been completed */
|
||||||
|
if (adapter->vfs_allocated_count) {
|
||||||
|
u32 reg_data = rd32(E1000_CTRL_EXT);
|
||||||
|
reg_data |= E1000_CTRL_EXT_PFRSTD;
|
||||||
|
wr32(E1000_CTRL_EXT, reg_data);
|
||||||
|
}
|
||||||
|
|
||||||
netif_tx_start_all_queues(adapter->netdev);
|
netif_tx_start_all_queues(adapter->netdev);
|
||||||
|
|
||||||
/* Fire a link change interrupt to start the watchdog. */
|
/* Fire a link change interrupt to start the watchdog. */
|
||||||
@@ -1948,6 +1955,13 @@ static int igb_open(struct net_device *netdev)
|
|||||||
|
|
||||||
igb_irq_enable(adapter);
|
igb_irq_enable(adapter);
|
||||||
|
|
||||||
|
/* notify VFs that reset has been completed */
|
||||||
|
if (adapter->vfs_allocated_count) {
|
||||||
|
u32 reg_data = rd32(E1000_CTRL_EXT);
|
||||||
|
reg_data |= E1000_CTRL_EXT_PFRSTD;
|
||||||
|
wr32(E1000_CTRL_EXT, reg_data);
|
||||||
|
}
|
||||||
|
|
||||||
netif_tx_start_all_queues(netdev);
|
netif_tx_start_all_queues(netdev);
|
||||||
|
|
||||||
/* Fire a link status change interrupt to start the watchdog. */
|
/* Fire a link status change interrupt to start the watchdog. */
|
||||||
@@ -5785,19 +5799,18 @@ static int igb_set_vf_mac(struct igb_adapter *adapter,
|
|||||||
static void igb_vmm_control(struct igb_adapter *adapter)
|
static void igb_vmm_control(struct igb_adapter *adapter)
|
||||||
{
|
{
|
||||||
struct e1000_hw *hw = &adapter->hw;
|
struct e1000_hw *hw = &adapter->hw;
|
||||||
u32 reg_data;
|
|
||||||
|
|
||||||
if (!adapter->vfs_allocated_count)
|
/* replication is not supported for 82575 */
|
||||||
|
if (hw->mac.type == e1000_82575)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* VF's need PF reset indication before they
|
if (adapter->vfs_allocated_count) {
|
||||||
* can send/receive mail */
|
igb_vmdq_set_loopback_pf(hw, true);
|
||||||
reg_data = rd32(E1000_CTRL_EXT);
|
igb_vmdq_set_replication_pf(hw, true);
|
||||||
reg_data |= E1000_CTRL_EXT_PFRSTD;
|
} else {
|
||||||
wr32(E1000_CTRL_EXT, reg_data);
|
igb_vmdq_set_loopback_pf(hw, false);
|
||||||
|
igb_vmdq_set_replication_pf(hw, false);
|
||||||
igb_vmdq_set_loopback_pf(hw, true);
|
}
|
||||||
igb_vmdq_set_replication_pf(hw, true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* igb_main.c */
|
/* igb_main.c */
|
||||||
|
Reference in New Issue
Block a user