be2net: Fix VF driver load for Lancer
authorPadmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Wed, 18 Jul 2012 02:51:58 +0000 (02:51 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 18 Jul 2012 16:28:38 +0000 (09:28 -0700)
Lancer FW has added new capability checks for VFs.
Driver should only use those capabilities which are allowed for VFs.

Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@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 ddfca658559d57c09105a9c1ea9dd1cb7a1b8c30..793249053066e62e3b912f8147778df88cb19692 100644 (file)
@@ -1631,7 +1631,8 @@ int be_cmd_rx_filter(struct be_adapter *adapter, u32 flags, u32 value)
                /* Reset mcast promisc mode if already set by setting mask
                 * and not setting flags field
                 */
-               req->if_flags_mask |=
+               if (!lancer_chip(adapter) || be_physfn(adapter))
+                       req->if_flags_mask |=
                                cpu_to_le32(BE_IF_FLAGS_MCAST_PROMISCUOUS);
 
                req->mcast_num = cpu_to_le32(netdev_mc_count(adapter->netdev));
index f18375cd75eeba6370180e3dc57632b4d61e832b..4d967717449067d2802d09957a48c66f0b4241aa 100644 (file)
@@ -2772,6 +2772,13 @@ static int be_setup(struct be_adapter *adapter)
                en_flags |= BE_IF_FLAGS_RSS;
        }
 
+       if (lancer_chip(adapter) && !be_physfn(adapter)) {
+               en_flags = BE_IF_FLAGS_UNTAGGED |
+                           BE_IF_FLAGS_BROADCAST |
+                           BE_IF_FLAGS_MULTICAST;
+               cap_flags = en_flags;
+       }
+
        status = be_cmd_if_create(adapter, cap_flags, en_flags,
                                  &adapter->if_handle, 0);
        if (status != 0)