[U-Boot-Users] [PATCH] lan91c96 driver MAC address detection

Wolfgang Denk wd at denx.de
Tue May 4 19:02:18 CEST 2004


In message <40978D65.7030805 at mpc-data.co.uk> you wrote:
>
> > You cannot use BOOTP (nor ony  other  network  related  protocol)  to
> > detect a MAC address!!!
> I think that either we operate on utterly different brainwave-lengths 
> or theres some kind of language barrier issue here!

BOOTP is a well-defined protocol which is  based  on  the  assumption
that  you  have  a  network  interface  that  can be used to send and
receive packets. To do so, the interface must be  initialized.  BOOTP
does  in  NO  WAY  work if your interface does not have a MAC address
set. Especially, it does NOT retrieve the MAC address from anywhere.

> If you issue a 'bootp' command to u-boot via its interface as I stated, 
> the following call sequence happens if you're using the lan91c96 (with 
> patch) or smc91111 ethernet devices :
>   
>    do_bootp()                     [cmd_net.c]
>     netboot_common()              [cmd_net.c]
>      NetLoop()                    [net.c]
>       eth_init()                  [lan91c96.c]

Stop here. eth_init() performs the  initialization  of  the  ethernet
interface,  if  this  did  not  happen before, because an initialized
ethernet interface is a precondition to use BOOTP.

> So in practical use, issuing a bootp detects the mac address of the 
> adapter. 

No, no, no. This is plainly wrong.

> Well, the following network related protocol calls :
>   do_tftpb()
>   do_rarpb()
>   do_dhcp()
>   do_nfs()
> all call netboot_common() so will in effect detect the MAC address as 
> well ;-)

None of these protocols has ato do  anything  with  setting  the  MAC
address. Please don't mix things up.

You could as well claim that bootp sets the baudrate  of  the  serial
console,  because  to  run  bootp  you must execute an initialization
sequence which includes the serial port, thus setting the baudrate.

IT AIN'T SO!


Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
Oh, that sound of male ego.  You travel halfway across the galaxy and
it's still the same song.
	-- Eve McHuron, "Mudd's Women", stardate 1330.1




More information about the U-Boot mailing list