Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 6 Feb 2013 19:08:59 GMT
From:      "Bjoern A. Zeeb" <bz@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 221805 for review
Message-ID:  <201302061908.r16J8xAE080507@skunkworks.freebsd.org>

index | next in thread | raw e-mail

http://p4web.freebsd.org/@@221805?ac=10

Change 221805 by bz@bz_zenith on 2013/02/06 19:08:31

	Move the factory Ethernet hardware address blacklist checking down
	to where the test can actually do something useful (and works).

Affected files ...

.. //depot/projects/ctsrd/beribsd/src/sys/dev/altera/atse/if_atse.c#10 edit

Differences ...

==== //depot/projects/ctsrd/beribsd/src/sys/dev/altera/atse/if_atse.c#10 (text+ko) ====

@@ -688,18 +688,6 @@
 	    sc->atse_eth_addr[2] != 0x00)
 		return (0);
 
-	/* Handle factory default ethernet addresss: 00:07:ed:ff:ed:15 */
-	if (sc->atse_eth_addr[0] == 0x00 && sc->atse_eth_addr[1] == 0x07 &&
-	    sc->atse_eth_addr[2] == 0xed && sc->atse_eth_addr[3] == 0xff &&
-	    sc->atse_eth_addr[4] == 0xed && sc->atse_eth_addr[5] == 0x15) {
-
-		device_printf(sc->atse_dev, "Factory programmed Ethernet "
-		    "hardware address blacklisted.  Falling back to random "
-		    "address to avoid collisions.\n");
-		device_printf(sc->atse_dev, "Please re-program your flash.\n");
-		goto get_random;
-	}
-
 	if ((atse_ethernet_option_bits_flag &
 	    ATSE_ETHERNET_OPTION_BITS_READ) == 0)
 		goto get_random;
@@ -723,6 +711,18 @@
 	sc->atse_eth_addr[4] = atse_ethernet_option_bits[8];
 	sc->atse_eth_addr[5] = atse_ethernet_option_bits[9];
 
+	/* Handle factory default ethernet addresss: 00:07:ed:ff:ed:15 */
+	if (sc->atse_eth_addr[0] == 0x00 && sc->atse_eth_addr[1] == 0x07 &&
+	    sc->atse_eth_addr[2] == 0xed && sc->atse_eth_addr[3] == 0xff &&
+	    sc->atse_eth_addr[4] == 0xed && sc->atse_eth_addr[5] == 0x15) {
+
+		device_printf(sc->atse_dev, "Factory programmed Ethernet "
+		    "hardware address blacklisted.  Falling back to random "
+		    "address to avoid collisions.\n");
+		device_printf(sc->atse_dev, "Please re-program your flash.\n");
+		goto get_random;
+	}
+
 	/*
 	 * If we find a locally administered address with a 0x0 ending
 	 * adjust by device unit.  If not and this is not the first


help

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