diff options
author | Mammatha Edhala <mammatha.edhala@emulex.com> | 2011-05-18 07:26:22 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-05-19 01:30:56 +0400 |
commit | 12f4d0a8770ab26639091d0b2509b19681daad69 (patch) | |
tree | 91db0c4c7ac2735261e653b5a3a1903825e45f86 /drivers/net/benet/be_main.c | |
parent | 0be6bc62cdd5e1bed75b2122ba7d26fc245b534b (diff) | |
download | linux-12f4d0a8770ab26639091d0b2509b19681daad69.tar.xz |
be2net: Enable SR-IOV for Lancer
Enable SR-IOV for Lancer
Signed-off-by: Mammatha Edhala <mammatha.edhala@emulex.com>
Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/benet/be_main.c')
-rw-r--r-- | drivers/net/benet/be_main.c | 17 |
1 files changed, 9 insertions, 8 deletions
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) = { { PCI_DEVICE(BE_VENDOR_ID, OC_DEVICE_ID1) }, { PCI_DEVICE(BE_VENDOR_ID, OC_DEVICE_ID2) }, { PCI_DEVICE(EMULEX_VENDOR_ID, OC_DEVICE_ID3)}, + { PCI_DEVICE(EMULEX_VENDOR_ID, OC_DEVICE_ID4)}, { 0 } }; MODULE_DEVICE_TABLE(pci, be_dev_ids); @@ -3161,7 +3162,8 @@ static int be_get_config(struct be_adapter *adapter) memset(mac, 0, ETH_ALEN); - if (be_physfn(adapter)) { + /* A default permanent address is given to each VF for Lancer*/ + if (be_physfn(adapter) || lancer_chip(adapter)) { status = be_cmd_mac_addr_query(adapter, mac, MAC_ADDRESS_TYPE_NETWORK, true /*permanent */, 0); @@ -3203,6 +3205,7 @@ static int be_dev_family_check(struct be_adapter *adapter) adapter->generation = BE_GEN3; break; case OC_DEVICE_ID3: + case OC_DEVICE_ID4: pci_read_config_dword(pdev, SLI_INTF_REG_OFFSET, &sli_intf); if_type = (sli_intf & SLI_INTF_IF_TYPE_MASK) >> SLI_INTF_IF_TYPE_SHIFT; @@ -3212,10 +3215,6 @@ static int be_dev_family_check(struct be_adapter *adapter) dev_err(&pdev->dev, "SLI_INTF reg val is not valid\n"); return -EINVAL; } - if (num_vfs > 0) { - dev_err(&pdev->dev, "VFs not supported\n"); - return -EINVAL; - } adapter->sli_family = ((sli_intf & SLI_INTF_FAMILY_MASK) >> SLI_INTF_FAMILY_SHIFT); adapter->generation = BE_GEN3; @@ -3381,9 +3380,11 @@ static int __devinit be_probe(struct pci_dev *pdev, bool link_up; u16 vf, lnk_speed; - status = be_vf_eth_addr_config(adapter); - if (status) - goto unreg_netdev; + if (!lancer_chip(adapter)) { + status = be_vf_eth_addr_config(adapter); + if (status) + goto unreg_netdev; + } for (vf = 0; vf < num_vfs; vf++) { status = be_cmd_link_status_query(adapter, &link_up, |