]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
25 years agoFix a temp file race occurring only when -j is used.
hoek [Sun, 22 Aug 1999 05:28:13 +0000 (05:28 +0000)]
Fix a temp file race occurring only when -j is used.

Noticed by: ru
Obtained from: OpenBSD

25 years agoFix assorted style problems and bring up to date.
jkh [Sun, 22 Aug 1999 05:14:23 +0000 (05:14 +0000)]
Fix assorted style problems and bring up to date.

Submitted by: Alexey M. Zelkin <phantom@cris.net>
PR: 13271

25 years agoFix potential buffer overflow when using gtags.
hoek [Sun, 22 Aug 1999 03:48:31 +0000 (03:48 +0000)]
Fix potential buffer overflow when using gtags.

Submitted by: Shigio Yamaguchi [3]shigio@wafu.netgate.net (gtags author)
PR: bin/7607

25 years agoAssorted bug fixes.
yokota [Sun, 22 Aug 1999 03:31:13 +0000 (03:31 +0000)]
Assorted bug fixes.

keyboard.c
- Call tcsetattr() in VGLKeyboardEnd() to restore tty, only when
  tty attributes have been previously saved.
  PR: misc/9524
  Submitted by: Katusyuki 'kei' Maeda (kei@nanet.co.jp)
- Set up the tty raw mode correctly.

main.c
- Restore VESA_800x600 raster text mode correctly in VGLEnd().
  Submitted by: des

text.c
- Allocate the correct size of a font buffer in VGLSetFontFile().
  I forgot the submitter ;-(

simple.c, bitmap.c
- Fix address calculation for the VGA mode X in VGLGetXY() and
  VGLBitmapCopy().
- Fix typo (dsty -> dstx) in __VGLBitmapCopy().

Reviewed by: sos

25 years agoUse the new vfs_timestamp() function to create the timestamps used
jdp [Sun, 22 Aug 1999 01:46:57 +0000 (01:46 +0000)]
Use the new vfs_timestamp() function to create the timestamps used
by utimes(path, NULL).  This gives them the same precision as the
timestamps produced by write operations.  Do likewise for lutimes()
and futimes().

Suggested by bde.

25 years agoAllow authkey to be changed independently of the current phase.
brian [Sun, 22 Aug 1999 01:29:53 +0000 (01:29 +0000)]
Allow authkey to be changed independently of the current phase.

25 years agoCrap, I knew I was going to forget something: add missing miibus method
wpaul [Sun, 22 Aug 1999 00:56:39 +0000 (00:56 +0000)]
Crap, I knew I was going to forget something: add missing miibus method
description file which slipped through the cracks.

Pointed out by: Doug <Doug@gorean.org>

25 years agoSupport full-precision file timestamps. Until now, only the seconds
jdp [Sun, 22 Aug 1999 00:15:16 +0000 (00:15 +0000)]
Support full-precision file timestamps.  Until now, only the seconds
have been maintained, and that is still the default.  A new sysctl
variable "vfs.timestamp_precision" can be used to enable higher
levels of precision:

      0 = seconds only; nanoseconds zeroed (default).
      1 = seconds and nanoseconds, accurate within 1/HZ.
      2 = seconds and nanoseconds, truncated to microseconds.
    >=3 = seconds and nanoseconds, maximum precision.

Level 1 uses getnanotime(), which is fast but can be wrong by up
to 1/HZ.  Level 2 uses microtime().  It might be desirable for
consistency with utimes() and friends, which take timeval structures
rather than timespecs.  Level 3 uses nanotime() for the higest
precision.

I benchmarked levels 0, 1, and 3 by copying a 550 MB tree with
"cpio -pdu".  There was almost negligible difference in the system
times -- much less than 1%, and less than the variation among
multiple runs at the same level.  Bruce Evans dreamed up a torture
test involving 1-byte reads with intervening fstat() calls, but
the cpio test seems more realistic to me.

This feature is currently implemented only for the UFS (FFS and
MFS) filesystems.  But I think it should be easy to support it in
the others as well.

An earlier version of this was reviewed by Bruce.  He's not to
blame for any breakage I've introduced since then.

Reviewed by: bde (an earlier version of the code)

25 years agoRemove two unused variable declarations.
alc [Sun, 22 Aug 1999 00:01:46 +0000 (00:01 +0000)]
Remove two unused variable declarations.

25 years agoClean up after removing sys/eventhandler.h from sys/systm.h at the last
msmith [Sat, 21 Aug 1999 22:10:49 +0000 (22:10 +0000)]
Clean up after removing sys/eventhandler.h from sys/systm.h at the last
minute.  This should cover all of the missed cases (and should let LINT
build again).

25 years agoDon't print a "," after the last superblock.
billf [Sat, 21 Aug 1999 22:07:27 +0000 (22:07 +0000)]
Don't print a "," after the last superblock.

Submitted by: adrian

25 years agoAdd missing include.
billf [Sat, 21 Aug 1999 21:35:59 +0000 (21:35 +0000)]
Add missing include.

Submitted by: Mitsuru IWASAKI <iwasaki@jp.FreeBSD.org>
Reviewed by: Alex Perel <veers@disturbed.net>

25 years agoUfff. cflags -> chflags. I could have sworn this change has been in
imp [Sat, 21 Aug 1999 20:54:40 +0000 (20:54 +0000)]
Ufff.  cflags -> chflags.  I could have sworn this change has been in
my last three successful make buildworlds...

Noticed by: phk

25 years agoMention rwhod(8) in the SEE ALSO section
brian [Sat, 21 Aug 1999 20:26:59 +0000 (20:26 +0000)]
Mention rwhod(8) in the SEE ALSO section

25 years agoRemove MII/PHY related junk from here. It's not needed anymore.
wpaul [Sat, 21 Aug 1999 19:03:37 +0000 (19:03 +0000)]
Remove MII/PHY related junk from here. It's not needed anymore.

25 years agoTo christen the brand new security category for syslog, we get IPFW
green [Sat, 21 Aug 1999 18:35:55 +0000 (18:35 +0000)]
To christen the brand new security category for syslog, we get IPFW
using syslog(3) (log(9)) for its various purposes! This long-awaited
change also includes such nice things as:
* macros expanding into _two_ comma-delimited arguments!
* snprintf!
* more snprintf!
* linting and criticism by more people than you can shake a stick at!
* a slightly more uniform message style than before!
 and last but not least
* no less than 5 rewrites!

Reviewed by: committers

25 years agoThis commit adds device driver support for the Sundance Technologies ST201
wpaul [Sat, 21 Aug 1999 18:34:58 +0000 (18:34 +0000)]
This commit adds device driver support for the Sundance Technologies ST201
PCI fast ethernet controller. Currently, the only card I know that uses
this chip is the D-Link DFE-550TX. (Don't ask me where to buy these: the
only cards I have are samples sent to me by D-Link.)

This driver is the first to make use of the miibus code once I'm sure
it all works together nicely, I'll start converting the other drivers.

The Sundance chip is a clone of the 3Com 3c90x Etherlink XL design
only with its own register layout. Support is provided for ifmedia,
hardware multicast filtering, bridging and promiscuous mode.

25 years agoFix possible buffer overflow with finger and fingerd.
imp [Sat, 21 Aug 1999 18:25:38 +0000 (18:25 +0000)]
Fix possible buffer overflow with finger and fingerd.

Submitted by: Lukasz Luzar <lluzar@noname.kki.krakow.pl> and
Eivind Eklund <eivind@yes.no>

This patch is actually a combination of those two patches.

25 years agoThis is the addition of a syslog(3) security.* top-level category. This
green [Sat, 21 Aug 1999 18:24:29 +0000 (18:24 +0000)]
This is the addition of a syslog(3) security.* top-level category. This
should be used from now on for anything security but not auth-related.
Included are updates for all relevant manpages and also to /etc files,
creating a new /var/log/security. Nothing in the system logs to
/var/log/security yet as of the time of this commit.

Reviewed by: rgrimes, imp, chris

25 years agoUse more compiler friendly test for overflow.
phk [Sat, 21 Aug 1999 18:22:44 +0000 (18:22 +0000)]
Use more compiler friendly test for overflow.

Submitted by: bde

25 years agoClear all file flags when taking ownership of devices. Do not ignore
imp [Sat, 21 Aug 1999 18:19:49 +0000 (18:19 +0000)]
Clear all file flags when taking ownership of devices.  Do not ignore
chown failures in some places, but instead log them like we do all
other errors.

25 years agoRemove all flags from devices before we try to assert ownership and
imp [Sat, 21 Aug 1999 18:15:55 +0000 (18:15 +0000)]
Remove all flags from devices before we try to assert ownership and
set permissions.

Bug not fixed:
We silently ignore failures of chflags, chmod and chown.

25 years agoadded usb0 to 'all' target for usbd(8)
gehenna [Sat, 21 Aug 1999 18:01:42 +0000 (18:01 +0000)]
added usb0 to 'all' target for usbd(8)

25 years agoAdd warnings, ala mktemp, to tempnam and tmpnam as a reminder that
imp [Sat, 21 Aug 1999 17:56:44 +0000 (17:56 +0000)]
Add warnings, ala mktemp, to tempnam and tmpnam as a reminder that
these are inherently unsafe interfaces.

Do not allow TMPDIR to override path for setuid/setgid programs.

25 years agoThis commit adds support for the NetBSD MII abstraction layer and
wpaul [Sat, 21 Aug 1999 17:40:53 +0000 (17:40 +0000)]
This commit adds support for the NetBSD MII abstraction layer and
MII-compliant PHY drivers. Many 10/100 ethernet NICs available today
either use an MII transceiver or have built-in transceivers that can
be programmed using an MII interface. It makes sense then to separate
this support out into common code instead of duplicating it in all
of the NIC drivers. The mii code also handles all of the media
detection, selection and reporting via the ifmedia interface.

This is basically the same code from NetBSD's /sys/dev/mii, except
it's been adapted to FreeBSD's bus architecture. The advantage to this
is that it automatically allows everything to be turned into a
loadable module. There are some common functions for use in drivers
once an miibus has been attached (mii_mediachg(), mii_pollstat(),
mii_tick()) as well as individual PHY drivers. There is also a
generic driver for all PHYs that aren't handled by a specific driver.
It's possible to do this because all 10/100 PHYs implement the same
general register set in addition to their vendor-specific register
sets, so for the most part you can use one driver for pretty much
any PHY. There are a couple of oddball exceptions though, hence
the need to have specific drivers.

There are two layers: the generic "miibus" layer and the PHY driver
layer. The drivers are child devices of "miibus" and the "miibus" is
a child of a given NIC driver. The "miibus" code and the PHY drivers
can actually be compiled and kldoaded as completely separate modules
or compiled together into one module. For the moment I'm using the
latter approach since the code is relatively small.

Currently there are only three PHY drivers here: the generic driver,
the built-in 3Com XL driver and the NS DP83840 driver. I'll be adding
others later as I convert various NIC drivers to use this code.

I realize that I'm cvs adding this stuff instead of importing it
onto a separate vendor branch, but in my opinion the import approach
doesn't really offer any significant advantage: I'm going to be
maintaining this stuff and writing my own PHY drivers one way or
the other.

25 years agoThe "depends-list" target disappeared in r.1.300 (Dec. 12, 1998) of
hoek [Sat, 21 Aug 1999 17:22:29 +0000 (17:22 +0000)]
The "depends-list" target disappeared in r.1.300 (Dec. 12, 1998) of
bsd.port.mk.  Replace its occurrence in this file with a synonym.

PR: docs/13255

25 years agoQuiet some overly chatty debug output, do some minor cleanups to
jkh [Sat, 21 Aug 1999 07:13:20 +0000 (07:13 +0000)]
Quiet some overly chatty debug output, do some minor cleanups to
the DHCP support code.

25 years agoMFS: Revert shared lib major version number back to 3.
obrien [Sat, 21 Aug 1999 07:10:11 +0000 (07:10 +0000)]
MFS:  Revert shared lib major version number back to 3.

25 years agoDetect if the the offset used to read from a raw device loose bits
phk [Sat, 21 Aug 1999 06:48:16 +0000 (06:48 +0000)]
Detect if the the offset used to read from a raw device loose bits
when converted to block number.

25 years agoImplement a new generic mechanism for attaching handler functions to
msmith [Sat, 21 Aug 1999 06:24:40 +0000 (06:24 +0000)]
Implement a new generic mechanism for attaching handler functions to
events, in order to pave the way for removing a number of the ad-hoc
implementations currently in use.

Retire the at_shutdown family of functions and replace them with
new event handler lists.

Rework kern_shutdown.c to take greater advantage of the use of event
handlers.

Reviewed by: green

25 years agoRemove superfluous `preserve' entry.
chris [Sat, 21 Aug 1999 04:43:59 +0000 (04:43 +0000)]
Remove superfluous `preserve' entry.

PR: docs/13279

25 years agoFix spelling error: compliment -> complement
chris [Sat, 21 Aug 1999 04:37:39 +0000 (04:37 +0000)]
Fix spelling error: compliment -> complement

25 years agoFix power management register definitions.
wpaul [Sat, 21 Aug 1999 01:10:45 +0000 (01:10 +0000)]
Fix power management register definitions.

25 years agoAdd a NULL pointer check whose absence could cause segmentation
jdp [Fri, 20 Aug 1999 22:33:44 +0000 (22:33 +0000)]
Add a NULL pointer check whose absence could cause segmentation
violations in certain obscure cases involving failed dlopens.  Many
thanks to Archie Cobbs for providing me with a good test case.

Eliminate a block that existed only to localize a declaration.

25 years agoLoosen up the constructed argument segment generation slightly; rather than
msmith [Fri, 20 Aug 1999 21:08:41 +0000 (21:08 +0000)]
Loosen up the constructed argument segment generation slightly; rather than
trying to size it intelligently just make it 64k and leave it up to the caller
to ensure that the arguments all fit within that range.

This should resolve the issue that some people were seeing with the PnP BIOS
scan crashing on a large PnP node.

25 years agomove sanity check of timeval struct so as not to segfault when passed
alfred [Fri, 20 Aug 1999 21:06:20 +0000 (21:06 +0000)]
move sanity check of timeval struct so as not to segfault when passed
a null pointer.

Pointed out by: Thomas Gellekum <tg@ihf.rwth-aachen.de>
Reviewed by:    eivind

25 years agoFirst small steps at merging DEVFS and PHK's Dev_t stuff.
julian [Fri, 20 Aug 1999 20:25:00 +0000 (20:25 +0000)]
First small steps at merging DEVFS and PHK's Dev_t stuff.

25 years agoFixes for some style bugs in the initial version of this file:
ken [Fri, 20 Aug 1999 19:42:01 +0000 (19:42 +0000)]
Fixes for some style bugs in the initial version of this file:

- missing reformatting protection in copyright.
- missing blank line after copyright.
- unusual spelling of idempotency macro (no trailing underscore).
- unusual value of idempotency macro (1 instead of <empty>).
- space instead of tab after #define's.
- unnecessary namespace pollution and extra code to give it.
- tab instead of space after #endif.

Submitted by: bde

25 years agoRestore INTERNALLIB.
abial [Fri, 20 Aug 1999 18:32:45 +0000 (18:32 +0000)]
Restore INTERNALLIB.

Noticed by: bde,jdp

25 years agoMAXLINE not MAX_CMDLINE
mdodd [Fri, 20 Aug 1999 17:40:33 +0000 (17:40 +0000)]
MAXLINE not MAX_CMDLINE

Noticed by: Norman C. Rice <nrice@emu.sourcee.com>

25 years agoFix MLINKS.
mdodd [Fri, 20 Aug 1999 17:37:22 +0000 (17:37 +0000)]
Fix MLINKS.

Noticed by: Norman C. Rice <nrice@emu.sourcee.com>

25 years agoFinally: fix test -x as completely as possible.
green [Fri, 20 Aug 1999 16:19:26 +0000 (16:19 +0000)]
Finally: fix test -x as completely as possible.

Reviewed by: bde
Reworked by: bde

25 years agoFix stupid error (xse -> xsc).
mdodd [Fri, 20 Aug 1999 14:36:40 +0000 (14:36 +0000)]
Fix stupid error (xse -> xsc).
Notice that 'unit' wasn't defined once I changed the parameters of the func.

These things make me feel like wading in with a flamethrowr or something.

Too much cruft!
</rant>

25 years agoFix a nasty kld bug where modules with objects of type GLOB_DAT which had
gallatin [Fri, 20 Aug 1999 14:21:35 +0000 (14:21 +0000)]
Fix a nasty kld bug where modules with objects of type GLOB_DAT which had
non-zero addends were being loaded incorrectly

25 years agoSet ifp->if_init to the right function.
mdodd [Fri, 20 Aug 1999 14:12:14 +0000 (14:12 +0000)]
Set ifp->if_init to the right function.
if_init_f_t is passed void * containing the address of ifp->if_softc
not the unit number.

Someone tell me if these things don't work as I don't have the hardware
needed to test them. (thats a first.)

I'll get if_ze and if_zp later.

Pointed out by: Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>

25 years agoWhen checking if there is a stack to free, observe the fact that it
jb [Fri, 20 Aug 1999 12:17:09 +0000 (12:17 +0000)]
When checking if there is a stack to free, observe the fact that it
might have been mmapped, and if so, passing the pointer to free() is
really not a good idea.

[ In the next millenium, when I've taken over the world, I'm going
  to ban 8 character tabs. You've been warned. ]

25 years agoRemove unused MANBIN directive.
ru [Fri, 20 Aug 1999 10:44:51 +0000 (10:44 +0000)]
Remove unused MANBIN directive.

25 years agoThere may exist two kinds of IBM BlueLightning CPU. One is that 5/2
kato [Fri, 20 Aug 1999 09:31:18 +0000 (09:31 +0000)]
There may exist two kinds of IBM BlueLightning CPU.  One is that 5/2
test does not change undefined flag like Cyrix CPUs.  Another is that
5/2 test changes undefined flag like Intel CPUs.  Latter one could not
be detected and was recognized 486DX CPU.  To solve this,
finishidentcpu() calls identblue() when cpu_vendor is null string
(that is, CPUID instruction is not supported) and cpu == CPU_486.
Tests have been done on IBM BlueLightning CPUs, i486SX and i486DX.

25 years ago* Consistantly surround macro parameters with ()
obrien [Fri, 20 Aug 1999 09:01:55 +0000 (09:01 +0000)]
* Consistantly surround macro parameters with ()
* Consistantly put spaces after "," in macro param lists
* Consistantly align continuation characters.
* Don't need to supply all variations of __FOO__ in CPP_PREDEFINES,
  gcc will do that for us.

25 years agoA "=" should have been "+=".
obrien [Fri, 20 Aug 1999 08:53:23 +0000 (08:53 +0000)]
A "=" should have been "+=".

Submitted by: Mikhail Teterin <mi@aldan.algebra.com>

25 years agoFix some cut and paste damage.
mdodd [Fri, 20 Aug 1999 07:14:46 +0000 (07:14 +0000)]
Fix some cut and paste damage.

Noticed by: Norman C. Rice <nrice@emu.sourcee.com>

25 years agoFix EINVAL related descriptions.
rse [Fri, 20 Aug 1999 07:00:22 +0000 (07:00 +0000)]
Fix EINVAL related descriptions.

25 years agovm_page_alloc and contigmalloc1:
alc [Fri, 20 Aug 1999 06:32:00 +0000 (06:32 +0000)]
vm_page_alloc and contigmalloc1:
Verify that free pages are not dirty.

Submitted by: dillon

25 years agoUpdate blackhole(4)
csgr [Fri, 20 Aug 1999 05:47:05 +0000 (05:47 +0000)]
Update blackhole(4)

25 years agoFix short timeout problems with the pt(4) driver:
ken [Fri, 20 Aug 1999 03:48:11 +0000 (03:48 +0000)]
Fix short timeout problems with the pt(4) driver:

- increase the default timeout from 10 seconds to 60 seconds
- add a new kernel option, SCSI_PT_DEFAULT_TIMEOUT, that lets users specify
  the default timeout for the pt driver to use
- add two new ioctls, one to get the timeout for a given pt device, the
  other to set the timeout for a given pt device.  The idea is that
  userland applications using the device can set the timeout to suit their
  purposes.  The ioctls are defined in a new header file, sys/ptio.h

PR: 10266
Reviewed by: gibbs, joerg

25 years agoReduce default timeout on remote serial debugging sessions from 20
grog [Fri, 20 Aug 1999 02:58:16 +0000 (02:58 +0000)]
Reduce default timeout on remote serial debugging sessions from 20
seconds to 1 second.  This fixes a problem where gdb would appear to
hang on flaky serial connections.  There's a theoretical problem that
the relatively short timeout could cause problems on slow links, but
you can override the default value with the 'set remotetimeout'
command.

Approved-by: dfr

25 years agoWhat the heck was I thinking? Nobody else saw this? Sheesh.
mdodd [Fri, 20 Aug 1999 01:24:35 +0000 (01:24 +0000)]
What the heck was I thinking?  Nobody else saw this?  Sheesh.

(num > MAX) ? MAX : num

rather than

(MAX > num) ? MAX : num

Also, make things a little easier to read while I'm here.

25 years agoAdd 2 functions: el_data_set() and el_data_get() which do what you
mdodd [Fri, 20 Aug 1999 01:17:12 +0000 (01:17 +0000)]
Add 2 functions: el_data_set() and el_data_get() which do what you
would expect.  (Allow user data to be associated with an EditLine context).

As this changes no existing interfaces and doesn't alter any structs
visable to the user I've been told that its not necessary to bump
the version of the library.

25 years agoChange the name of the static variable 'files' to 'linker_files' in
grog [Fri, 20 Aug 1999 00:18:07 +0000 (00:18 +0000)]
Change the name of the static variable 'files' to 'linker_files' in
order to be able to refer to it uniquely from the kernel debugger.

Approved-by:  peter

25 years agotime_to_sleep->tv_nsec > 1000000000
alfred [Thu, 19 Aug 1999 23:18:07 +0000 (23:18 +0000)]
time_to_sleep->tv_nsec > 1000000000
-to-
time_to_sleep->tv_nsec >= 1000000000

25 years agoSanity check time structures passed in, return EINVAL like the system
alfred [Thu, 19 Aug 1999 23:06:11 +0000 (23:06 +0000)]
Sanity check time structures passed in, return EINVAL like the system
calls do to avoid corrupting the thread library's concept of wakeup
time.

PR: kern/12141
Reviewed by: deischen, eivind

25 years agoMake gcc work on the Alpha again. alpha/alpha.h is used instead of svr4.h
peter [Thu, 19 Aug 1999 21:19:36 +0000 (21:19 +0000)]
Make gcc work on the Alpha again.  alpha/alpha.h is used instead of svr4.h

25 years agoQuieten ppp at startup.
brian [Thu, 19 Aug 1999 21:15:16 +0000 (21:15 +0000)]
Quieten ppp at startup.

25 years agoLet processes retrieve their argv through procfs. Revert to the original
marcel [Thu, 19 Aug 1999 19:41:08 +0000 (19:41 +0000)]
Let processes retrieve their argv through procfs. Revert to the original
behaviour in all other cases.

Submitted by: Andrew Gordon <arg@arg1.demon.co.uk>

25 years agoo Add the -foreground switch. This switch behaves like -background except
brian [Thu, 19 Aug 1999 18:15:52 +0000 (18:15 +0000)]
o Add the -foreground switch.  This switch behaves like -background except
  that ppp stays in the foreground.
o Add the -quiet switch to quieten ppps startup
o Add the -nat flag and discourage the use of the -alias flag.  Both do
  the same thing.
o Correct some nat usage strings.
o Change the internal ``alias'' command to ``nat''.

25 years agohandle under/overflow of time values in a more robust manner,
alfred [Thu, 19 Aug 1999 16:49:53 +0000 (16:49 +0000)]
handle under/overflow of time values in a more robust manner,
there may be an overflow that need to be adjusted more than once.

Pointed out by: Fabian Thylmann <fthylmann@stats.net>

Reviewed by: eivind, jb

25 years agoFix a typo and a bug.
peter [Thu, 19 Aug 1999 16:06:08 +0000 (16:06 +0000)]
Fix a typo and a bug.
- One RTP_PRIO_REALTIME was meant to be RTP_PRIO_IDLE.
- RTP_PRIO_FIFO was not handled.
- Move the usual case first for setrunqueue() etc.

25 years agoReplace the tulip_delay_300ns() with a DELAY(1). Hammering the PCI bus
peter [Thu, 19 Aug 1999 15:07:20 +0000 (15:07 +0000)]
Replace the tulip_delay_300ns() with a DELAY(1).  Hammering the PCI bus
to achieve a delay is pretty mean.

Andrew reports:
"The tulip_delay_300ns() is, well, bloody stupid on machines with a
heavily loaded PCI bus.  It tries to do a delay by assuming PCI reads
will take a certain amount of time & issues a large amount of
(expensive, 5% CPU when your PCI bus is heavily loaded) pci reads.

Locally, we've replaced the calls to tulip_delay_300ns(sc) in the EMIT
macros with a simple DELAY(1) and not seen any problems.  Plus we've
gained about 50Mb/sec throughput on our gigabit network cards because
of the added PCI bus bandwidth available."

Also, I do not understand why, but this change appears to stop the
Transmit Fifo underrun on one of my systems (but not the Alpha PC164SX).
This shouldn't make that much of a difference since the mii bus isn't
touched all that often, but perhaps when it does get accessed and hence
hammers the register, it was causing the chip to get upset.

Submitted by: Andrew Gallatin <gallatin@cs.duke.edu>

25 years agoUndo my previous commit and do it differently. Break the ffs() etc macros
peter [Thu, 19 Aug 1999 14:54:40 +0000 (14:54 +0000)]
Undo my previous commit and do it differently.  Break the ffs() etc macros
into two parts - one to do the bsfl and the other to convert the result
(base 0) to ffs()-like (base 1) in inline C.  This enables the optimizer
to be a lot smarter in certain cases, like where it knows that the argument
is non-zero and we want ffs(known non zero arg) - 1.  This appears to
produce identical code to the old inline when the argument is unknown.

25 years agoConvert all the nfs macros to do { blah } while (0) to ensure it
peter [Thu, 19 Aug 1999 14:50:12 +0000 (14:50 +0000)]
Convert all the nfs macros to do { blah } while (0) to ensure it
works correctly in if/else etc.  egcs had probably picked up most of the
problems here before with "ambiguous braces" etc, but this should
increase the robustness a bit.  Based on an idea from Eivind Eklund.

25 years agoTake integer rounding into account in the buffer size approximation
sheldonh [Thu, 19 Aug 1999 13:04:08 +0000 (13:04 +0000)]
Take integer rounding into account in the buffer size approximation
macro. So now it's (1 +) for the sign and (+ 1) for rounding.

Reported by: bde

25 years agoStyle issues in previous commit:
sheldonh [Thu, 19 Aug 1999 11:36:12 +0000 (11:36 +0000)]
Style issues in previous commit:

        Use an upward approximation of the number of characters required
        for decimal representations of uid_t, gid_t and u_quad_t, intead
of arbitrary values that may not be safe in the future.

Fix disordering.

Requested by: bde

25 years agoMove two of the DBX config directives to the common configuration header.
obrien [Thu, 19 Aug 1999 09:16:23 +0000 (09:16 +0000)]
Move two of the DBX config directives to the common configuration header.
Also simply CPP_PREDEFINES a little.

25 years agoNuke /usr/share/misc/pkg_manage.
ru [Thu, 19 Aug 1999 07:10:26 +0000 (07:10 +0000)]
Nuke /usr/share/misc/pkg_manage.

PR: 13228
Submitted by: "Alexey M. Zelkin" <phantom@cris.net>

25 years agoLink libcrypt_p.a to the DES profiled library, if this library is present.
jkoshy [Thu, 19 Aug 1999 06:36:24 +0000 (06:36 +0000)]
Link libcrypt_p.a to the DES profiled library, if this library is present.

PR: misc/7759
Submitted by: Carl Mascott <cmascott@world.std.com>
Reviewed by: jkh

25 years agoFix breakage if blackhole=1 and tiflags & TH_SYN, plus
csgr [Thu, 19 Aug 1999 05:22:12 +0000 (05:22 +0000)]
Fix breakage if blackhole=1 and tiflags & TH_SYN, plus
style(9) fixes

Submitted by:  Jonathon Lemon

25 years agoUse el_source() so we pick up .editrc
mdodd [Thu, 19 Aug 1999 04:10:33 +0000 (04:10 +0000)]
Use el_source() so we pick up .editrc

25 years agoSmall tweak: in xl_rxeof(), rxstat should be u_int32_t, not u_int16_t.
wpaul [Thu, 19 Aug 1999 03:47:18 +0000 (03:47 +0000)]
Small tweak: in xl_rxeof(), rxstat should be u_int32_t, not u_int16_t.

25 years agoAdd support for command line editing and history.
mdodd [Thu, 19 Aug 1999 03:29:15 +0000 (03:29 +0000)]
Add support for command line editing and history.

Remove src/contrib/bind/bin/nslookup/commands.c as it is generated by lex
from commands.l.

Submitted by: lpc/cdcontrol patches originally by msmith.
Reviewed by: msmith (in theory)

25 years agoTry using the builtin ffs() for egcs, it (by random inspection)
peter [Thu, 19 Aug 1999 00:32:48 +0000 (00:32 +0000)]
Try using the builtin ffs() for egcs, it (by random inspection)
generates slightly better code and avoids the incl then subl when
using ffs(foo) - 1.

25 years agoUpdate for MI switch code, and trim a heap of unused (I believe) entries.
peter [Thu, 19 Aug 1999 00:20:10 +0000 (00:20 +0000)]
Update for MI switch code, and trim a heap of unused (I believe) entries.

25 years agoUse the MI process selection. We use a quick routine to decide whether
peter [Thu, 19 Aug 1999 00:18:48 +0000 (00:18 +0000)]
Use the MI process selection.  We use a quick routine to decide whether
to get the mplock and enter the kernel to run a process in the SMP case.

25 years agoUse MI switch code for process selection. This gets run queues entirely
peter [Thu, 19 Aug 1999 00:16:52 +0000 (00:16 +0000)]
Use MI switch code for process selection.  This gets run queues entirely
out of the asm code, and as a bonus implements rtprio and idprio for the
Alpha. Previously if you ran an idprio process, you were assured of a
deadlock.

25 years agoUpdate for run queue code.
peter [Thu, 19 Aug 1999 00:15:27 +0000 (00:15 +0000)]
Update for run queue code.

25 years agoDon't initialize run queues here, do it all in one place.
peter [Thu, 19 Aug 1999 00:14:43 +0000 (00:14 +0000)]
Don't initialize run queues here, do it all in one place.

25 years agoRun queue heads have moved to TAILQ's.
peter [Thu, 19 Aug 1999 00:13:58 +0000 (00:13 +0000)]
Run queue heads have moved to TAILQ's.

25 years agoUpdate for MI switch components. struct prochd is replaced by TAILQ's.
peter [Thu, 19 Aug 1999 00:13:15 +0000 (00:13 +0000)]
Update for MI switch components.  struct prochd is replaced by TAILQ's.
Use a spare pad field for saving the run queue index.

25 years ago(forced commit, cvs aborted part way though)
peter [Thu, 19 Aug 1999 00:10:39 +0000 (00:10 +0000)]
(forced commit, cvs aborted part way though)

Extract the next runnable process selection out of cpu_switch() into a
fairly machine independent C routine.  gcc actually does a pretty good
job of this.

Reviewed by:    msmith (in principle)

25 years agoSort xrefs.
mpp [Thu, 19 Aug 1999 00:10:37 +0000 (00:10 +0000)]
Sort xrefs.

Submitted by: Alexey Zelkin <phantom@cris.net>

25 years agoExtract the next runnable process selection out of cpu_switch() into a
peter [Thu, 19 Aug 1999 00:06:53 +0000 (00:06 +0000)]
Extract the next runnable process selection out of cpu_switch() into a
fairly machine independent C routine.  gcc actually does a pretty good
job of this.

Reviewed by: msmith (in principle)

25 years agoMake these actually compile. I got a little delete happy pruning includes
mdodd [Wed, 18 Aug 1999 22:14:24 +0000 (22:14 +0000)]
Make these actually compile.  I got a little delete happy pruning includes
and used 'command' instead of 'cmd' in a few cases.  Also clear up some
unused variables.

Pointed out by: phk

25 years agoAdd pin-numbers for easy reference.
phk [Wed, 18 Aug 1999 20:45:57 +0000 (20:45 +0000)]
Add pin-numbers for easy reference.

25 years agoDocument some common ENVIRONMENT variables.
mpp [Wed, 18 Aug 1999 19:53:04 +0000 (19:53 +0000)]
Document some common ENVIRONMENT variables.

PR: docs/13233
Submitted by: Alexey Zelkin <phantom@cris.net>

25 years agoAdd pam_radius.so manual page.
abial [Wed, 18 Aug 1999 19:04:24 +0000 (19:04 +0000)]
Add pam_radius.so manual page.

Reviewed by: jdp

25 years agoprintf("%x",dev); -> printf("%s",devtoname(dev));
nsayer [Wed, 18 Aug 1999 17:42:41 +0000 (17:42 +0000)]
printf("%x",dev); -> printf("%s",devtoname(dev));

25 years agoSlight tweak to tcp.blackhole to add optional behaviour to
csgr [Wed, 18 Aug 1999 15:40:05 +0000 (15:40 +0000)]
Slight tweak to tcp.blackhole to add optional behaviour to
drop any segment arriving at a closed port.
tcp.blackhole=1 - only drop SYN without RST
tcp.blackhole=2 - drop everything without RST
tcp.blackhole=0 - always send RST - default behaviour

This confuses nmap -sF or -sX or -sN quite badly.

25 years agoMention ``alias enable no'', not ``alias enable off''.
brian [Wed, 18 Aug 1999 15:35:54 +0000 (15:35 +0000)]
Mention ``alias enable no'', not ``alias enable off''.

25 years agoHopefully make IFMEDIA_DEBUG compile. if_xname[] is a NetBSD addition,
peter [Wed, 18 Aug 1999 13:13:01 +0000 (13:13 +0000)]
Hopefully make IFMEDIA_DEBUG compile.  if_xname[] is a NetBSD addition,
we need if_name, if_unit.  (maybe we should pick up if_xname[] ?)

Pointed out by: jkb@yahoo-inc.com

25 years agoThe "LINUX" option isn't actually used or referenced anywhere. The stuff
peter [Wed, 18 Aug 1999 11:28:36 +0000 (11:28 +0000)]
The "LINUX" option isn't actually used or referenced anywhere.  The stuff
that goes to opt_dontuse.h is so an opt_*.h file doesn't get created even
though an option may be used for bringing stuff in via files[.*].

Pointed out by: bde

25 years ago1) rename dev->self to be consistent
n_hibma [Wed, 18 Aug 1999 10:24:59 +0000 (10:24 +0000)]
1) rename dev->self to be consistent
2) use device_printf
3) properly tear down and disable interrupts when init fails