diff options
author | raj <raj@FreeBSD.org> | 2008-03-12 16:01:34 +0000 |
---|---|---|
committer | raj <raj@FreeBSD.org> | 2008-03-12 16:01:34 +0000 |
commit | 7e7a99d55a83a8319b7b43dc69930dddc3698080 (patch) | |
tree | 51a866e675475040268a8ee7f99064e59ed6e48e /sys/boot/uboot/lib/time.c | |
parent | 9efc2e038a05dfaeb46eb8a0737e4a3acbfe619e (diff) | |
download | FreeBSD-src-7e7a99d55a83a8319b7b43dc69930dddc3698080.zip FreeBSD-src-7e7a99d55a83a8319b7b43dc69930dddc3698080.tar.gz |
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.
Also suppress excessive output while netbooting via loader, unless debugging.
While there, make sys/boot/uboot more style(9) compliant.
Reviewed by: imp
Approved by: cognet (mentor)
Diffstat (limited to 'sys/boot/uboot/lib/time.c')
-rw-r--r-- | sys/boot/uboot/lib/time.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/boot/uboot/lib/time.c b/sys/boot/uboot/lib/time.c index 2ec700c..f1cf7ee 100644 --- a/sys/boot/uboot/lib/time.c +++ b/sys/boot/uboot/lib/time.c @@ -48,6 +48,7 @@ time(time_t *tloc) int getsecs() { + return (time(NULL)); } @@ -57,5 +58,6 @@ getsecs() void delay(int usecs) { + ub_udelay(usecs); } |