sfxge: allow VFs to have locally administered MAC addresses

Submitted by:   Mark Spender <mspender at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4328
This commit is contained in:
Andrew Rybchenko 2015-12-01 15:29:51 +00:00
parent 63fa4a6afc
commit f2588d15ef
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=291586

View File

@ -1071,18 +1071,18 @@ hunt_board_cfg(
/* MAC address for this function */
if (EFX_PCI_FUNCTION_IS_PF(encp)) {
rc = efx_mcdi_get_mac_address_pf(enp, mac_addr);
if ((rc == 0) && (mac_addr[0] & 0x02)) {
/*
* If the static config does not include a global MAC
* address pool then the board may return a locally
* administered MAC address (this should only happen on
* incorrectly programmed boards).
*/
rc = EINVAL;
}
} else {
rc = efx_mcdi_get_mac_address_vf(enp, mac_addr);
}
if ((rc == 0) && (mac_addr[0] & 0x02)) {
/*
* If the static config does not include a global MAC address
* pool then the board may return a locally administered MAC
* address (this should only happen on incorrectly programmed
* boards).
*/
rc = EINVAL;
}
if (rc != 0)
goto fail4;