Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 Apr 2008 13:07:51 +0200
From:      Rafal Jaworowski <raj@semihalf.com>
To:        Marius Strobl <marius@alchemy.franken.de>
Cc:        cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org
Subject:   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
Message-ID:  <4805DE07.8050008@semihalf.com>
In-Reply-To: <20080412221501.GB44768@alchemy.franken.de>
References:  <200803121601.m2CG1ZbG072258@repoman.freebsd.org> <20080412221501.GB44768@alchemy.franken.de>

next in thread | previous in thread | raw e-mail | index | archive | help
Marius Strobl 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.

I think this is expected: the loader/libstand seem to call
devopen()->net_open(), devclose()->net_close() upon each file access, but it
doesn't seem harmful, only additional output is seen in this case. Previously,
due to this artificial increase of 'netdev_opens' counter, the devclose()
method for network device was never called.

Rafal



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