i40e: Look up MAC address in Open Firmware or IDPROM
authorSowmini Varadhan <sowmini.varadhan@oracle.com>
Mon, 7 Dec 2015 20:06:34 +0000 (15:06 -0500)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Fri, 8 Jan 2016 09:12:47 +0000 (01:12 -0800)
commitb499ffb0a22c6cd3762b44fd6489f7384f40437d
tree5c011e3e070c77904fa45ee4c4c4e946f497496e
parentefd8e39acc51cafe7dbc656ba63eea9034238ee7
i40e: Look up MAC address in Open Firmware or IDPROM

This is the i40e equivalent of commit c762dff24c06 ("ixgbe: Look up MAC
address in Open Firmware or IDPROM").

As with that fix, attempt to look up the MAC address in Open Firmware
on systems that support it, and use IDPROM on SPARC if no OF address
is found.

In the case of the i40e there is an assumption that the default mac
address has already been set up as the primary mac filter on probe,
so if this filter is obtained from the Open Firmware or IDPROM, an
explicit write is needed via i40e_aq_mac_address_write() and
i40e_aq_add_macvlan() invocation.

The I40E_FLAG_PF_MAC flag in the platform-private i40e_pf structure
tracks whether a platform-specific mac address was found, in which
case calls to i40e_aq_mac_address_write() and i40e_aq_add_macvlan()
will be triggered.

Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Acked-by: Shannon Nelson <shannon.nelson@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.h
drivers/net/ethernet/intel/i40e/i40e_main.c