Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 1 Dec 2015 15:29:51 +0000 (UTC)
From:      Andrew Rybchenko <arybchik@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r291586 - head/sys/dev/sfxge/common
Message-ID:  <201512011529.tB1FTpDW088695@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: arybchik
Date: Tue Dec  1 15:29:51 2015
New Revision: 291586
URL: https://svnweb.freebsd.org/changeset/base/291586

Log:
  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

Modified:
  head/sys/dev/sfxge/common/hunt_nic.c

Modified: head/sys/dev/sfxge/common/hunt_nic.c
==============================================================================
--- head/sys/dev/sfxge/common/hunt_nic.c	Tue Dec  1 15:26:46 2015	(r291585)
+++ head/sys/dev/sfxge/common/hunt_nic.c	Tue Dec  1 15:29:51 2015	(r291586)
@@ -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;
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201512011529.tB1FTpDW088695>