be2net: don't report EVB for older chipsets when SR-IOV is disabled
[cascardo/linux.git] / drivers / net / ethernet / emulex / benet / be_main.c
index 4ecd8c2..88f427c 100644 (file)
@@ -4617,6 +4617,9 @@ static int be_ndo_bridge_getlink(struct sk_buff *skb, u32 pid, u32 seq,
 
        /* BE and Lancer chips support VEB mode only */
        if (BEx_chip(adapter) || lancer_chip(adapter)) {
+               /* VEB is disabled in non-SR-IOV profiles on BE3/Lancer */
+               if (!pci_sriov_get_totalvfs(adapter->pdev))
+                       return 0;
                hsw_mode = PORT_FWD_TYPE_VEB;
        } else {
                status = be_cmd_get_hsw_config(adapter, NULL, 0,