aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/benet/be.h5
-rw-r--r--drivers/net/benet/be_main.c17
2 files changed, 13 insertions, 9 deletions
diff --git a/drivers/net/benet/be.h b/drivers/net/benet/be.h
index 0b73dcf26924..a7db870d1641 100644
--- a/drivers/net/benet/be.h
+++ b/drivers/net/benet/be.h
@@ -49,6 +49,7 @@
49#define OC_DEVICE_ID1 0x700 /* Device Id for BE2 cards */ 49#define OC_DEVICE_ID1 0x700 /* Device Id for BE2 cards */
50#define OC_DEVICE_ID2 0x710 /* Device Id for BE3 cards */ 50#define OC_DEVICE_ID2 0x710 /* Device Id for BE3 cards */
51#define OC_DEVICE_ID3 0xe220 /* Device id for Lancer cards */ 51#define OC_DEVICE_ID3 0xe220 /* Device id for Lancer cards */
52#define OC_DEVICE_ID4 0xe228 /* Device id for VF in Lancer */
52 53
53static inline char *nic_name(struct pci_dev *pdev) 54static inline char *nic_name(struct pci_dev *pdev)
54{ 55{
@@ -58,6 +59,7 @@ static inline char *nic_name(struct pci_dev *pdev)
58 case OC_DEVICE_ID2: 59 case OC_DEVICE_ID2:
59 return OC_NAME_BE; 60 return OC_NAME_BE;
60 case OC_DEVICE_ID3: 61 case OC_DEVICE_ID3:
62 case OC_DEVICE_ID4:
61 return OC_NAME_LANCER; 63 return OC_NAME_LANCER;
62 case BE_DEVICE_ID2: 64 case BE_DEVICE_ID2:
63 return BE3_NAME; 65 return BE3_NAME;
@@ -383,7 +385,8 @@ struct be_adapter {
383#define BE_GEN2 2 385#define BE_GEN2 2
384#define BE_GEN3 3 386#define BE_GEN3 3
385 387
386#define lancer_chip(adapter) (adapter->pdev->device == OC_DEVICE_ID3) 388#define lancer_chip(adapter) ((adapter->pdev->device == OC_DEVICE_ID3) || \
389 (adapter->pdev->device == OC_DEVICE_ID4))
387 390
388extern const struct ethtool_ops be_ethtool_ops; 391extern const struct ethtool_ops be_ethtool_ops;
389 392
diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c
index 7322a511e936..ce6edac007a7 100644
--- a/drivers/net/benet/be_main.c
+++ b/drivers/net/benet/be_main.c
@@ -42,6 +42,7 @@ static DEFINE_PCI_DEVICE_TABLE(be_dev_ids) = {
42 { PCI_DEVICE(BE_VENDOR_ID, OC_DEVICE_ID1) }, 42 { PCI_DEVICE(BE_VENDOR_ID, OC_DEVICE_ID1) },
43 { PCI_DEVICE(BE_VENDOR_ID, OC_DEVICE_ID2) }, 43 { PCI_DEVICE(BE_VENDOR_ID, OC_DEVICE_ID2) },
44 { PCI_DEVICE(EMULEX_VENDOR_ID, OC_DEVICE_ID3)}, 44 { PCI_DEVICE(EMULEX_VENDOR_ID, OC_DEVICE_ID3)},
45 { PCI_DEVICE(EMULEX_VENDOR_ID, OC_DEVICE_ID4)},
45 { 0 } 46 { 0 }
46}; 47};
47MODULE_DEVICE_TABLE(pci, be_dev_ids); 48MODULE_DEVICE_TABLE(pci, be_dev_ids);
@@ -3161,7 +3162,8 @@ static int be_get_config(struct be_adapter *adapter)
3161 3162
3162 memset(mac, 0, ETH_ALEN); 3163 memset(mac, 0, ETH_ALEN);
3163 3164
3164 if (be_physfn(adapter)) { 3165 /* A default permanent address is given to each VF for Lancer*/
3166 if (be_physfn(adapter) || lancer_chip(adapter)) {
3165 status = be_cmd_mac_addr_query(adapter, mac, 3167 status = be_cmd_mac_addr_query(adapter, mac,
3166 MAC_ADDRESS_TYPE_NETWORK, true /*permanent */, 0); 3168 MAC_ADDRESS_TYPE_NETWORK, true /*permanent */, 0);
3167 3169
@@ -3203,6 +3205,7 @@ static int be_dev_family_check(struct be_adapter *adapter)
3203 adapter->generation = BE_GEN3; 3205 adapter->generation = BE_GEN3;
3204 break; 3206 break;
3205 case OC_DEVICE_ID3: 3207 case OC_DEVICE_ID3:
3208 case OC_DEVICE_ID4:
3206 pci_read_config_dword(pdev, SLI_INTF_REG_OFFSET, &sli_intf); 3209 pci_read_config_dword(pdev, SLI_INTF_REG_OFFSET, &sli_intf);
3207 if_type = (sli_intf & SLI_INTF_IF_TYPE_MASK) >> 3210 if_type = (sli_intf & SLI_INTF_IF_TYPE_MASK) >>
3208 SLI_INTF_IF_TYPE_SHIFT; 3211 SLI_INTF_IF_TYPE_SHIFT;
@@ -3212,10 +3215,6 @@ static int be_dev_family_check(struct be_adapter *adapter)
3212 dev_err(&pdev->dev, "SLI_INTF reg val is not valid\n"); 3215 dev_err(&pdev->dev, "SLI_INTF reg val is not valid\n");
3213 return -EINVAL; 3216 return -EINVAL;
3214 } 3217 }
3215 if (num_vfs > 0) {
3216 dev_err(&pdev->dev, "VFs not supported\n");
3217 return -EINVAL;
3218 }
3219 adapter->sli_family = ((sli_intf & SLI_INTF_FAMILY_MASK) >> 3218 adapter->sli_family = ((sli_intf & SLI_INTF_FAMILY_MASK) >>
3220 SLI_INTF_FAMILY_SHIFT); 3219 SLI_INTF_FAMILY_SHIFT);
3221 adapter->generation = BE_GEN3; 3220 adapter->generation = BE_GEN3;
@@ -3381,9 +3380,11 @@ static int __devinit be_probe(struct pci_dev *pdev,
3381 bool link_up; 3380 bool link_up;
3382 u16 vf, lnk_speed; 3381 u16 vf, lnk_speed;
3383 3382
3384 status = be_vf_eth_addr_config(adapter); 3383 if (!lancer_chip(adapter)) {
3385 if (status) 3384 status = be_vf_eth_addr_config(adapter);
3386 goto unreg_netdev; 3385 if (status)
3386 goto unreg_netdev;
3387 }
3387 3388
3388 for (vf = 0; vf < num_vfs; vf++) { 3389 for (vf = 0; vf < num_vfs; vf++) {
3389 status = be_cmd_link_status_query(adapter, &link_up, 3390 status = be_cmd_link_status_query(adapter, &link_up,