summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorNeerav Parikh <neerav.parikh@intel.com>2014-12-14 02:55:11 +0100
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2015-01-16 13:37:49 +0100
commitb686ece59ba824e87b850e6348b37013a220ec60 (patch)
tree97c435d015973cb5f1bf5cdc15c7d9272a647f63 /drivers
parenti40e: check I40E_FLAG_PTP before handling Tx or Rx timestamps (diff)
downloadlinux-b686ece59ba824e87b850e6348b37013a220ec60.tar.xz
linux-b686ece59ba824e87b850e6348b37013a220ec60.zip
i40e: Issue "Stop LLDP" command for firmware older than v4.3
Disable firmware LLDP agent for NICs with firmware version lower than v4.3. Added a message when driver disables the firmware LLDP agent on such NICs. Change-ID: Ia8abf89439c70cb50e23db82753d7d282265506b Signed-off-by: Neerav Parikh <neerav.parikh@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e_main.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index 0cc02665a8e3..d7efc1cd0732 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -9245,6 +9245,16 @@ static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
goto err_configure_lan_hmc;
}
+ /* Disable LLDP for NICs that have firmware versions lower than v4.3.
+ * Ignore error return codes because if it was already disabled via
+ * hardware settings this will fail
+ */
+ if (((pf->hw.aq.fw_maj_ver == 4) && (pf->hw.aq.fw_min_ver < 3)) ||
+ (pf->hw.aq.fw_maj_ver < 4)) {
+ dev_info(&pdev->dev, "Stopping firmware LLDP agent.\n");
+ i40e_aq_stop_lldp(hw, true, NULL);
+ }
+
i40e_get_mac_addr(hw, hw->mac.addr);
if (!is_valid_ether_addr(hw->mac.addr)) {
dev_info(&pdev->dev, "invalid MAC address %pM\n", hw->mac.addr);