be2net: call ENABLE_VF cmd for Skyhawk-R too
authorVasundhara Volam <vasundhara.volam@emulex.com>
Tue, 1 Oct 2013 10:29:59 +0000 (15:59 +0530)
committerDavid S. Miller <davem@davemloft.net>
Tue, 1 Oct 2013 16:45:52 +0000 (12:45 -0400)
This cmd needs to be sent to FW when enabling VFs (currently used only
for Lancer.) Also, avoid calling the cmd when driver loads and finds that
VFs are already enabled from a previous load.

Signed-off-by: Vasundhara Volam <vasundhara.volam@emulex.com>
Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/emulex/benet/be_cmds.c
drivers/net/ethernet/emulex/benet/be_main.c

index 331dfdc7a4fbd1bd8c3cbc032ab5880748d60f80..86105305d5528e99a991413ee1eca3208f5cf0ad 100644 (file)
@@ -3511,7 +3511,7 @@ int be_cmd_enable_vf(struct be_adapter *adapter, u8 domain)
        struct be_cmd_enable_disable_vf *req;
        int status;
 
-       if (!lancer_chip(adapter))
+       if (BEx_chip(adapter))
                return 0;
 
        spin_lock_bh(&adapter->mcc_lock);
index be129874c8154767c1b761088115d697802efeb2..961e9f0500c57635f08670d0a88181bc3e808b94 100644 (file)
@@ -2923,7 +2923,8 @@ static int be_vf_setup(struct be_adapter *adapter)
                        goto err;
                vf_cfg->def_vid = def_vlan;
 
-               be_cmd_enable_vf(adapter, vf + 1);
+               if (!old_vfs)
+                       be_cmd_enable_vf(adapter, vf + 1);
        }
 
        if (!old_vfs) {