PERFORCE change 221804 for review

Bjoern A. Zeeb bz at FreeBSD.org
Wed Feb 6 17:58:47 UTC 2013


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

Change 221804 by bz at bz_zenith on 2013/02/06 17:58:31

	Add the hard coded blackist for the one-for-all factory
	Ethernet address in flash.  Later we might want to pass a
	blacklist by other means I guess.
	
	X-Note: untested as my unflashed board will not currently boot.

Affected files ...

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

Differences ...

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

@@ -45,6 +45,7 @@
  * - blacklist the one special factory programmed ethernet address (for now
  *   hardcoded, later from loader?)
  * - resolve all XXX, left as reminders to shake out details later
+ * - Jumbo frame support
  */
 
 #include <sys/cdefs.h>
@@ -687,6 +688,18 @@
 	    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;


More information about the p4-projects mailing list