]> git.baikalelectronics.ru Git - kernel.git/commit
i40e: fix FW_LLDP flag on init
authorAlan Brady <alan.brady@intel.com>
Wed, 27 Dec 2017 13:19:19 +0000 (08:19 -0500)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Fri, 26 Jan 2018 21:23:23 +0000 (13:23 -0800)
commit72959a2da2e00a05d17134f2e18902623b2ab8b7
treea8748f91369b8310f7b0dcab6e29f1bc9ee26cfc
parente36616ddf59338aa4f4780c2d4b06dab8f4f2ae6
i40e: fix FW_LLDP flag on init

Using ethtool --set-priv-flags disable-fw-lldp <on/off> is persistent
across reboots/reloads so we need some mechanism in the driver to detect
if it's on or off on init so we can set the ethtool private flag
appropriately.  Without this, every time the driver is reloaded the flag
will default to off regardless of whether it's on or off in FW.

We detect this by first attempting to program DCB and if AQ fails
returning I40E_AQ_RC_EPERM, we know that LLDP is disabled in FW.

Signed-off-by: Alan Brady <alan.brady@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e_main.c