Subject: Re: ASDG EB920 with no MAC Address PROM
To: John Schuncke <jlschuncke@cox.net>
From: Ignatios Souvatzis <is@netbsd.org>
List: port-amiga
Date: 12/18/2004 21:53:34
Hello,

On Sat, Dec 18, 2004 at 03:21:03AM +0000, John Schuncke wrote:
> Under AmigaOS, the eb920.device device driver and the s2util setup 
> program can apparently force a MAC address onto an EB920 card, 

Uhm... I guess it's forced into the driver, not the card.

> overcoming the lack of a hardwired MAC address. I don't imagine this is 
> a solution when I'm directly booting into NetBSD.

I think you're right, see above.

> 
> Solaris' version of the ifconfig command can force a MAC onto a network 
> interface, but that isn't supported in NetBSD. I guess there's little 
> call for it.

There was some discussion, but nobody actually offered code. It's not
trivial, as it interferes with, e.g., IPv4 ARP and IPv6 neighbour
discovery.

> Short of coming up with an address PROM for the card, is there any way I 
> can config an address into the card during system startup or interface 
> establishment?

Well, sort of. Can you build your own kernel? Then use the appended patch
as a quick workaround. 

Regards,
	-is


--- if_ed.c	Sun Nov 21 21:43:37 2004
+++ if_ed.c.new	Sat Dec 18 21:44:28 2004
@@ -258,6 +258,15 @@
 	for (i = 0; i < ETHER_ADDR_LEN; i++)
 		myaddr[i] = *(prom + 2 * i);
 
+	/* XXX dirty hack. */
+	if (myaddr[0] == 0xff) {
+		/*
+		 * first character must have low 2 bits of 10, e.g.
+		 * 'B', 'F', ...
+		 */
+		memcpy(myaddr, "B92099", 6);
+	}
+
 	/* Set interface to stopped condition (reset). */
 	ed_stop(sc);