diff options
-rw-r--r-- | drivers/net/ethernet/intel/i40e/i40e_main.c | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c index 853eb2f7e558..5b5bea159bd5 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_main.c +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c | |||
@@ -8756,9 +8756,14 @@ struct i40e_vsi *i40e_vsi_setup(struct i40e_pf *pf, u8 type, | |||
8756 | __func__); | 8756 | __func__); |
8757 | return NULL; | 8757 | return NULL; |
8758 | } | 8758 | } |
8759 | /* We come up by default in VEPA mode */ | 8759 | /* We come up by default in VEPA mode if SRIOV is not |
8760 | veb->bridge_mode = BRIDGE_MODE_VEPA; | 8760 | * already enabled, in which case we can't force VEPA |
8761 | pf->flags &= ~I40E_FLAG_VEB_MODE_ENABLED; | 8761 | * mode. |
8762 | */ | ||
8763 | if (!(pf->flags & I40E_FLAG_VEB_MODE_ENABLED)) { | ||
8764 | veb->bridge_mode = BRIDGE_MODE_VEPA; | ||
8765 | pf->flags &= ~I40E_FLAG_VEB_MODE_ENABLED; | ||
8766 | } | ||
8762 | i40e_config_bridge_mode(veb); | 8767 | i40e_config_bridge_mode(veb); |
8763 | } | 8768 | } |
8764 | for (i = 0; i < I40E_MAX_VEB && !veb; i++) { | 8769 | for (i = 0; i < I40E_MAX_VEB && !veb; i++) { |
@@ -9869,6 +9874,15 @@ static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
9869 | goto err_switch_setup; | 9874 | goto err_switch_setup; |
9870 | } | 9875 | } |
9871 | 9876 | ||
9877 | #ifdef CONFIG_PCI_IOV | ||
9878 | /* prep for VF support */ | ||
9879 | if ((pf->flags & I40E_FLAG_SRIOV_ENABLED) && | ||
9880 | (pf->flags & I40E_FLAG_MSIX_ENABLED) && | ||
9881 | !test_bit(__I40E_BAD_EEPROM, &pf->state)) { | ||
9882 | if (pci_num_vf(pdev)) | ||
9883 | pf->flags |= I40E_FLAG_VEB_MODE_ENABLED; | ||
9884 | } | ||
9885 | #endif | ||
9872 | err = i40e_setup_pf_switch(pf, false); | 9886 | err = i40e_setup_pf_switch(pf, false); |
9873 | if (err) { | 9887 | if (err) { |
9874 | dev_info(&pdev->dev, "setup_pf_switch failed: %d\n", err); | 9888 | dev_info(&pdev->dev, "setup_pf_switch failed: %d\n", err); |