Re: cvs commit: src/sys/boot/common dev_net.c src/sys/boot/uboot/lib console.c copy.c glue.c libuboot.h net.c time.c

From: Marius Strobl <marius_at_alchemy.franken.de>
Date: Sun, 13 Apr 2008 00:15:01 +0200
On Wed, Mar 12, 2008 at 04:01:34PM +0000, Rafal Jaworowski wrote:
> raj         2008-03-12 16:01:34 UTC
> 
>   FreeBSD src repository
> 
>   Modified files:
>     sys/boot/common      dev_net.c 
>     sys/boot/uboot/lib   console.c copy.c glue.c libuboot.h net.c 
>                          time.c 
>   Log:
>   Eliminate artificial increasing of 'netdev_opens' counter in loader's net_open().
>   
>   This was introduced as a workaround long time ago for some Alpha firmware
>   (which is now gone), and actually prevented net_close() to ever be
>   called.
>   
>   Certain firmwares (U-Boot) need local shutdown operations to be performed on a
>   network controller upon transaction end: such platform-specific hooks are
>   supposed to be called via netif_close() (from within net_close()).
>   
>   This change effectively reverts the following CVS commit:
>   
>       sys/boot/common/dev_net.c
>   
>       revision 1.7
>       date: 2000/05/13 15:40:46;  author: dfr;  state: Exp;  lines: +2 -1
>       Only probe network settings on the first open of the network device.
>       The alpha firmware takes a seriously long time to open the network device
>       the first time.
>   

On at least sparc64 reverting this causes ofwn_init() to be called
over and over again, which doesn't seem to be the right thing to do
either.

Marius

Sun Fire V100 (UltraSPARC-IIe 500MHz), No Keyboard
OpenBoot 4.0, 256 MB memory installed, Serial #51583895.
Ethernet address 0:3:ba:13:1b:97, Host ID: 83131b97.



Executing last command: boot net:dhcp                                 
Boot device: /pci_at_1f,0/ethernet_at_c:dhcp  File and args: 
36800 Consoles: Open Firmware console  

Booting with sun4u support.

FreeBSD/sparc64 bootstrap loader, Revision 1.0
(marius_at_flak.lan.zeist.de, Sat Apr 12 22:48:49 CEST 2008)
bootpath="/pci_at_1f,0/ethernet_at_c:dhcp"
boot: ethernet address: 00:03:ba:13:1b:97
boot: ethernet address: 00:03:ba:13:1b:97
boot: ethernet address: 00:03:ba:13:1b:97
boot: ethernet address: 00:03:ba:13:1b:97
boot: ethernet address: 00:03:ba:13:1b:97
Loading /boot/defaults/loader.conf 
boot: ethernet address: 00:03:ba:13:1b:97
boot: ethernet address: 00:03:ba:13:1b:97
boot: ethernet address: 00:03:ba:13:1b:97
boot: ethernet address: 00:03:ba:13:1b:97
boot: ethernet address: 00:03:ba:13:1b:97
boot: ethernet address: 00:03:ba:13:1b:97
boot: ethernet address: 00:03:ba:13:1b:97
boot: ethernet address: 00:03:ba:13:1b:97
boot: ethernet address: 00:03:ba:13:1b:97
/boot/kernel/kernel data=0x6abd48+0x70568 syms=[0x8+0x75630+0x8+0x63cc2]
boot: ethernet address: 00:03:ba:13:1b:97
boot: ethernet address: 00:03:ba:13:1b:97
Received on Sat Apr 12 2008 - 22:15:03 UTC