]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
27 years agoFixed syscall arg checking in clock_settime(). Stack garbage was
bde [Sun, 3 Aug 1997 07:26:50 +0000 (07:26 +0000)]
Fixed syscall arg checking in clock_settime().  Stack garbage was
checked to be >= 0.  This bug was introduced in rev.1.26.

Reported by: John Hay <jhay@mikom.csir.co.za>

27 years agoconfig.new/config.8 seems to be new in Lite2. Remove it like the rest of
bde [Sun, 3 Aug 1997 06:40:01 +0000 (06:40 +0000)]
config.new/config.8 seems to be new in Lite2.  Remove it like the rest of
config.new.

27 years agoREADME is for Lite2. We don't want it.
bde [Sun, 3 Aug 1997 06:38:27 +0000 (06:38 +0000)]
README is for Lite2.  We don't want it.

27 years agoThis commit was generated by cvs2svn to compensate for changes in r27850,
bde [Sat, 2 Aug 1997 19:36:03 +0000 (19:36 +0000)]
This commit was generated by cvs2svn to compensate for changes in r27850,
which included commits to RCS files with non-trunk default branches.

27 years agoImport Lite2's src/usr.sbin, except for timed. All changed files
bde [Sat, 2 Aug 1997 19:36:03 +0000 (19:36 +0000)]
Import Lite2's src/usr.sbin, except for timed.  All changed files
except one unimportant one have already left the vendor branch.

27 years agoMakefile.dist is a non-bmaked version of Makefile. We don't want it.
bde [Sat, 2 Aug 1997 18:52:16 +0000 (18:52 +0000)]
Makefile.dist is a non-bmaked version of Makefile.  We don't want it.

27 years agoImport Lite2's src/libexec, except for makekey (which was spammed
bde [Sat, 2 Aug 1997 18:46:42 +0000 (18:46 +0000)]
Import Lite2's src/libexec, except for makekey (which was spammed
by a repository copy from 1.1.5 and patched back to Lite1) and
rbootd/bootdir/SYSHPBSD (which is binary).  All changed files have
already left the vendor branch.

27 years agoThis commit was generated by cvs2svn to compensate for changes in r27847,
bde [Sat, 2 Aug 1997 18:46:42 +0000 (18:46 +0000)]
This commit was generated by cvs2svn to compensate for changes in r27847,
which included commits to RCS files with non-trunk default branches.

27 years agoRemoved unused #includes.
bde [Sat, 2 Aug 1997 14:33:27 +0000 (14:33 +0000)]
Removed unused #includes.

27 years agoSynchronize with sys/i386/conf/options.i386 revision 1.54.
kato [Sat, 2 Aug 1997 10:23:17 +0000 (10:23 +0000)]
Synchronize with sys/i386/conf/options.i386 revision 1.54.

27 years agoSynchronize with sys/i386/conf/files.i386 revision 1.170.
kato [Sat, 2 Aug 1997 06:58:53 +0000 (06:58 +0000)]
Synchronize with sys/i386/conf/files.i386 revision 1.170.

27 years agoSynchronize with sys/i386/conf/options.i386 revision 1.53.
kato [Sat, 2 Aug 1997 06:58:07 +0000 (06:58 +0000)]
Synchronize with sys/i386/conf/options.i386 revision 1.53.

27 years agoSanitise the Wavelan entries.
msmith [Sat, 2 Aug 1997 05:20:14 +0000 (05:20 +0000)]
Sanitise the Wavelan entries.
Submitted by: bde

27 years agoReinstate some of the previous fixes which were clobbered in r1.6.
msmith [Sat, 2 Aug 1997 05:19:32 +0000 (05:19 +0000)]
Reinstate some of the previous fixes which were clobbered in r1.6.

27 years agoImplement dlsym(RTLD_NEXT, symbol).
jdp [Sat, 2 Aug 1997 04:56:44 +0000 (04:56 +0000)]
Implement dlsym(RTLD_NEXT, symbol).

27 years agoAdd /etc/rc.shutdown capability to init.
davidn [Sat, 2 Aug 1997 00:22:52 +0000 (00:22 +0000)]
Add /etc/rc.shutdown capability to init.
Add sample /etc/rc.shutdown (which is just a shell for now).
Submitted by: Ollivier Robert <roberto@keltia.freenix.fr>

27 years agoDocument the bogus standard requirement of delaying the close.
wollman [Fri, 1 Aug 1997 20:26:47 +0000 (20:26 +0000)]
Document the bogus standard requirement of delaying the close.
Also include a reference to the FINGER RFC.

27 years agoSo somebody actually found language in the FINGER RFC which requires
wollman [Fri, 1 Aug 1997 20:10:44 +0000 (20:10 +0000)]
So somebody actually found language in the FINGER RFC which requires
implementations to leave the client side open until the server closes.
While this is totally idiotic, it seems as if some servers actually require
it (e.g., the one at mit.mit.edu).  So, we bow to the weight of the bogus
standard and disable the initial close.  Hopefully now fetch(1) can serve
the role of T/TCP demonstration application.

27 years agoOops, fix manpage title.
msmith [Fri, 1 Aug 1997 15:17:54 +0000 (15:17 +0000)]
Oops, fix manpage title.

27 years agoFix -p switch.
davidn [Fri, 1 Aug 1997 15:06:21 +0000 (15:06 +0000)]
Fix -p switch.

27 years agoMove tcl packages to libdata/pkg
phk [Fri, 1 Aug 1997 13:16:40 +0000 (13:16 +0000)]
Move tcl packages to libdata/pkg

27 years agoMy previous commit was incomplete because it ignored the READ case.
jmz [Fri, 1 Aug 1997 12:48:35 +0000 (12:48 +0000)]
My previous commit was incomplete because it ignored the READ case.
Now set explicitly the block size to 2048 when the device is opened
for reading.

27 years agoSupport functions for working with x86 PC-architecture BIOS.
msmith [Fri, 1 Aug 1997 06:07:13 +0000 (06:07 +0000)]
Support functions for working with x86 PC-architecture BIOS.
Initially functionality is confined to 32-bit BIOS functions, however
it is envisioned that BIOS support may be enlisted for other
activities in the future.

27 years agoSupport for PC BIOS functions.
msmith [Fri, 1 Aug 1997 06:04:59 +0000 (06:04 +0000)]
Support for PC BIOS functions.

27 years agoAdd new BIOS-related files.
msmith [Fri, 1 Aug 1997 06:04:34 +0000 (06:04 +0000)]
Add new BIOS-related files.

27 years agoManpage for new BIOS functionality.
msmith [Fri, 1 Aug 1997 06:04:08 +0000 (06:04 +0000)]
Manpage for new BIOS functionality.
(Skeletal, could do with some extra references.)

27 years agoBack out the changes to set the resolver timeout. All they seem to do
jkh [Fri, 1 Aug 1997 04:41:38 +0000 (04:41 +0000)]
Back out the changes to set the resolver timeout.  All they seem to do
is _break_ dns lookups entirely, and since reading the relevant docs and
source code does not enlighten for now, I'll remove this until more
basic research has been done into controlling the resolver's timeout
values.

27 years agoUpdate wlconfig to match new Wavelan (wl) driver.
msmith [Fri, 1 Aug 1997 03:50:23 +0000 (03:50 +0000)]
Update wlconfig to match new Wavelan (wl) driver.
Submitted by: Jim Binkley <jrb@cs.pdx.edu>

27 years agoSignificant bugfix and upgrade for the Wavelan (wl) driver.
msmith [Fri, 1 Aug 1997 03:36:12 +0000 (03:36 +0000)]
Significant bugfix and upgrade for the Wavelan (wl) driver.
This now includes code to handle the 2.4GHz WaveModem-based cards.

Submitted by: Jim Binkley <jrb@cs.pdx.edu>

27 years agoNew defines for the Wavelan (wl) driver.
msmith [Fri, 1 Aug 1997 03:33:43 +0000 (03:33 +0000)]
New defines for the Wavelan (wl) driver.
Submitted by: Jim Binkley <jrb@cs.pdx.edu>

27 years agoNew LINT comments and options for the Wavelan (wl) driver.
msmith [Fri, 1 Aug 1997 03:33:08 +0000 (03:33 +0000)]
New LINT comments and options for the Wavelan (wl) driver.
Submitted by: Jim Binkley <jrb@cs.pdx.edu>

27 years agoNew manpage for the Wavelan (wl) driver.
msmith [Fri, 1 Aug 1997 03:32:39 +0000 (03:32 +0000)]
New manpage for the Wavelan (wl) driver.
Submitted by: Jim Binkley <jrb@cs.pdx.edu>

27 years agoRemove extraneous prototypes.
brian [Fri, 1 Aug 1997 02:02:28 +0000 (02:02 +0000)]
Remove extraneous prototypes.

27 years agoRemove the annoying "cmp: EOF" message when
brian [Fri, 1 Aug 1997 01:25:21 +0000 (01:25 +0000)]
Remove the annoying "cmp: EOF" message when
dmesg changes.

27 years agoFixed imen alignment.
fsmp [Thu, 31 Jul 1997 17:28:56 +0000 (17:28 +0000)]
Fixed imen alignment.

Submitted by: Bruce Evans <bde@zeta.org.au>

27 years agoFixed imen declaration.
fsmp [Thu, 31 Jul 1997 17:28:20 +0000 (17:28 +0000)]
Fixed imen declaration.

Submitted by: Bruce Evans <bde@zeta.org.au>

27 years agoNologin is also a valid 'invalid' shell
pst [Thu, 31 Jul 1997 15:25:35 +0000 (15:25 +0000)]
Nologin is also a valid 'invalid' shell

27 years agoSynchronize with sys/i386/isa/isa.c revision 1.99.
kato [Thu, 31 Jul 1997 13:11:50 +0000 (13:11 +0000)]
Synchronize with sys/i386/isa/isa.c revision 1.99.

27 years agoSynchronize with sys/i386/conf/files.i386 and sys/i386/isa/wd.c
kato [Thu, 31 Jul 1997 13:10:54 +0000 (13:10 +0000)]
Synchronize with sys/i386/conf/files.i386 and sys/i386/isa/wd.c
revisions 1.169 and 1.133, respectively.

27 years agoUse relative symlinks so they work even when ${DESTDIR} is not empty.
asami [Thu, 31 Jul 1997 11:32:25 +0000 (11:32 +0000)]
Use relative symlinks so they work even when ${DESTDIR} is not empty.

Reviewed by: jkh, bde

27 years agoOops, boot2 got too big. make VESA_SUPPORT nondefault.
phk [Thu, 31 Jul 1997 11:30:30 +0000 (11:30 +0000)]
Oops, boot2 got too big.  make VESA_SUPPORT nondefault.

27 years agoFiddle with DNS options so that queries are also controlled by
jkh [Thu, 31 Jul 1997 11:28:58 +0000 (11:28 +0000)]
Fiddle with DNS options so that queries are also controlled by
the MEDIA_TIMEOUT variable.  Just -current for now on this one as
I'm still wanting to play with this a bit and see what the ramifications
of doing this are.
Requested by: pst

27 years agoMake serial console based installs actually work by:
jkh [Thu, 31 Jul 1997 11:08:47 +0000 (11:08 +0000)]
Make serial console based installs actually work by:

1. Detecting the split /dev/ttyv0 / /dev/console case, e.g. you've
   booted with the -h flag and you have a VGA card also.

2. Adding an extra "menu" for selecting terminal type and adding ANSI
   to the list of compiled-in terms.

3. Opening the proper file descriptors before disowning ourselves.
Requested by: pst

27 years agoWhups - use a slightly more up-to-date version.
jkh [Thu, 31 Jul 1997 10:59:50 +0000 (10:59 +0000)]
Whups - use a slightly more up-to-date version.

27 years agoMake README.TXT for floppies reference work.
jkh [Thu, 31 Jul 1997 10:57:31 +0000 (10:57 +0000)]
Make README.TXT for floppies reference work.

27 years agoTouch a default kernel.config file to shut the boot blocks up about it
jkh [Thu, 31 Jul 1997 09:52:10 +0000 (09:52 +0000)]
Touch a default kernel.config file to shut the boot blocks up about it
when not present.

27 years agoAdd new ports-german collection.
asami [Thu, 31 Jul 1997 09:38:00 +0000 (09:38 +0000)]
Add new ports-german collection.

27 years agoMore whitespace/tab fixes.
asami [Thu, 31 Jul 1997 08:31:50 +0000 (08:31 +0000)]
More whitespace/tab fixes.

Submitted by: bde

27 years agoAdd support for booting in VESA 0x102 videomode. Corresponding patches to
phk [Thu, 31 Jul 1997 08:07:54 +0000 (08:07 +0000)]
Add support for booting in VESA 0x102 videomode.  Corresponding patches to
syscons are being reviewed by sos.

27 years agoConsistently use tabs in the leading comments.
asami [Thu, 31 Jul 1997 08:06:29 +0000 (08:06 +0000)]
Consistently use tabs in the leading comments.

Submitted by: bde (yes, I'm serious)

27 years agoUse err(3). Add prototypes. Silent -Wall.
charnier [Thu, 31 Jul 1997 06:59:26 +0000 (06:59 +0000)]
Use err(3). Add prototypes. Silent -Wall.

27 years agoCosmetic in usage string and err() messages.
charnier [Thu, 31 Jul 1997 06:57:47 +0000 (06:57 +0000)]
Cosmetic in usage string and err() messages.

27 years agoUse err(3).
charnier [Thu, 31 Jul 1997 06:54:45 +0000 (06:54 +0000)]
Use err(3).

27 years agoUse err(3). Add missing flags in usage string.
charnier [Thu, 31 Jul 1997 06:53:36 +0000 (06:53 +0000)]
Use err(3). Add missing flags in usage string.

27 years agoDo not set the application variable LDDESTDIR. Note that it is still honored
asami [Thu, 31 Jul 1997 06:12:04 +0000 (06:12 +0000)]
Do not set the application variable LDDESTDIR.  Note that it is still honored
in a few places (in bsd.lib.mk and bsd.prog.mk); this merely fixed part of
the brokenness by not setting it here.

This fixes building of secure telnetd when DESTDIR is defined.
(Otherwise, it will try to link libtelnet from ${DESTDIR}/usr/lib.)

Reviewed by: bde, jkh

27 years agoMoved the free case to top of MPgetlock and MPtrylock
fsmp [Thu, 31 Jul 1997 06:06:52 +0000 (06:06 +0000)]
Moved the free case to top of MPgetlock and MPtrylock
Added some lock hit profiling.

27 years agoConverted the TEST_LOPRIO code to default.
fsmp [Thu, 31 Jul 1997 05:43:05 +0000 (05:43 +0000)]
Converted the TEST_LOPRIO code to default.
Created mplock functions that save/restore NO registers.
Minor cleanup.

27 years agoConverted the TEST_LOPRIO code to default.
fsmp [Thu, 31 Jul 1997 05:42:06 +0000 (05:42 +0000)]
Converted the TEST_LOPRIO code to default.
removed PEND_INTS 1st try
direct call to MPtrylock

27 years agoConverted the TEST_LOPRIO code to default.
fsmp [Thu, 31 Jul 1997 05:39:49 +0000 (05:39 +0000)]
Converted the TEST_LOPRIO code to default.

27 years agoAdd cvsup.uk.freebsd.org.
jdp [Thu, 31 Jul 1997 04:40:11 +0000 (04:40 +0000)]
Add cvsup.uk.freebsd.org.

27 years agoFix handling of mixed colors+attributes case by merging from ncurses 4.1
ache [Wed, 30 Jul 1997 19:04:08 +0000 (19:04 +0000)]
Fix handling of mixed colors+attributes case by merging from ncurses 4.1

27 years agoFix logical background handling by merging it from ncurses 4.1
ache [Wed, 30 Jul 1997 17:21:39 +0000 (17:21 +0000)]
Fix logical background handling by merging it from ncurses 4.1
No new user-visible functions added

27 years agoUpdate the list of CVSup mirror sites.
jdp [Wed, 30 Jul 1997 15:57:35 +0000 (15:57 +0000)]
Update the list of CVSup mirror sites.

27 years agofix a few problems with pty. warn about how if you only have 1 pty
jmg [Wed, 30 Jul 1997 10:05:18 +0000 (10:05 +0000)]
fix a few problems with pty.  warn about how if you only have 1 pty
defined, your really getting 32.  Also warn about how you can't have
more than 256 pty's when your using DEVFS (non DEVFS can use more, just
the makedev script doesn't know how to make >256).  it also doesn't
allocate more memory than needed in this case.

Make sure that the signal passed in TIOCSIG isn't 0 as it might cause
a panic.  I personally haven't seen this happen, but after a similar
bug in syscons crashed my machine, I'm acutely aware of this one. :)

27 years agoifdef out ttytype definition, mytinfo not have it and configure confused
ache [Wed, 30 Jul 1997 03:26:37 +0000 (03:26 +0000)]
ifdef out ttytype definition, mytinfo not have it and configure confused

27 years agoSet up the alias address before executing
brian [Tue, 29 Jul 1997 22:37:04 +0000 (22:37 +0000)]
Set up the alias address before executing
the contents of ppp.linkup.

27 years agoFix problem caused by a chunk of the previous patch having been
se [Tue, 29 Jul 1997 21:50:04 +0000 (21:50 +0000)]
Fix problem caused by a chunk of the previous patch having been
applied to the wrong source code lines (non-fatal, since it just
made an auto variable become visible at the global level).

27 years agoAdd -lm since "ping" now requires the math library for its
jkh [Tue, 29 Jul 1997 21:32:52 +0000 (21:32 +0000)]
Add -lm since "ping" now requires the math library for its
furlong-per-fortnight calculations of ping time.

27 years agoModify passwd and chpass to use new AF_LOCAL RPC interface instead of
wpaul [Tue, 29 Jul 1997 15:45:36 +0000 (15:45 +0000)]
Modify passwd and chpass to use new AF_LOCAL RPC interface instead of
old kludged-up 'yppasswd_comm' support.

27 years agoModify rpc.yppasswdd to use the new AF_LOCAL transport in the RPC library
wpaul [Tue, 29 Jul 1997 15:43:21 +0000 (15:43 +0000)]
Modify rpc.yppasswdd to use the new AF_LOCAL transport in the RPC library
instead of its own kludged up version. This makes the special 'superuser-only'
update procedure work just like a real RPC service.

27 years agoTwo minor, pedantic fixes from bde for my last pedantic fixes, plus
imp [Tue, 29 Jul 1997 13:24:01 +0000 (13:24 +0000)]
Two minor, pedantic fixes from bde for my last pedantic fixes, plus
the following from recent OpenBSD changes.  These changes (and all
I've made) should be merged back into 2.2 when they are vetted in
-current.

common.c:
OpenBSD 1.7: mickey: #if __STDC__ --> #ifdef __STDC__

displayq.c:
OpenBSD 1.8: deraadt: 1 byte oflows; millert

rmjob.c:
OpenBSD 1.8: deraadt: 1 byte oflows; millert

cmds.c:
OpenBSD 1.9: grr: restore traditional "all" keyword option - see lpc(8)
[[ This makes lpc status all work again -- imp ]]

printjob.c:
OpenBSD 1.17: deraadt: use sendmail -t
OpenBSD 1.16: mickey: #if __STDC__ --> #ifdef __STDC__
OpenBSD 1.15: deraadt: 1 byte oflow; Don.Lewis@tsc.tdk.com

recvjob.c:
OpenBSD 1.11: mickey: #if __STDC__ --> #ifdef __STDC__

lpr.c:
OpenBSD 1.19: mickey: #if __STDC__ --> #ifdef __STDC__

Obtained from: OpenBSD

27 years agoAdd support for busmaster DMA on some PCI IDE chipsets.
sos [Tue, 29 Jul 1997 12:57:25 +0000 (12:57 +0000)]
Add support for busmaster DMA on some PCI IDE chipsets.

I changed a few bits here and there, mainly renaming wd82371.c
to ide_pci.c now that it's supposed to handle different chipsets.

It runs on my P6 natoma board with two Maxtor drives, and also
on a Fujitsu machine I have at work with an Opti chipset and
a Quantum drive.

Submitted by:cgull@smoke.marlboro.vt.us <John Hood>

Original readme:

*** WARNING ***

This code has so far been tested on exactly one motherboard with two
identical drives known for their good DMA support.

This code, in the right circumstances, could corrupt data subtly,
silently, and invisibly, in much the same way that older PCI IDE
controllers do.  It's ALPHA-quality code; there's one or two major
gaps in my understanding of PCI IDE still.  Don't use this code on any
system with data that you care about; it's only good for hack boxes.
Expect that any data may be silently and randomly corrupted at any
moment.  It's a disk driver.  It has bugs.  Disk drivers with bugs
munch data.  It's a fact of life.

I also *STRONGLY* recommend getting a copy of your chipset's manual
and the ATA-2 or ATA-3 spec and making sure that timing modes on your
disk drives and IDE controller are being setup correctly by the BIOS--
because the driver makes only the lamest of attempts to do this just
now.

*** END WARNING ***

that said, i happen to think the code is working pretty well...

WHAT IT DOES:

this code adds support to the wd driver for bus mastering PCI IDE
controllers that follow the SFF-8038 standard.  (all the bus mastering
PCI IDE controllers i've seen so far do follow this standard.)  it
should provide busmastering on nearly any current P5 or P6 chipset,
specifically including any Intel chipset using one of the PIIX south
bridges-- this includes the '430FX, '430VX, '430HX, '430TX, '440LX,
and (i think) the Orion '450GX chipsets.  specific support is also
included for the VIA Apollo VP-1 chipset, as it appears in the
relabeled "HXPro" incarnation seen on cheap US$70 taiwanese
motherboards (that's what's in my development machine).  it works out
of the box on controllers that do DMA mode2; if my understanding is
correct, it'll probably work on Ultra-DMA33 controllers as well.
it'll probably work on busmastering IDE controllers in PCI slots, too,
but this is an area i am less sure about.

it cuts CPU usage considerably and improves drive performance
slightly.  usable numbers are difficult to come by with existing
benchmark tools, but experimentation on my K5-P90 system, with VIA
VP-1 chipset and Quantum Fireball 1080 drives, shows that disk i/o on
raw partitions imposes perhaps 5% cpu load.  cpu load during
filesystem i/o drops a lot, from near 100% to anywhere between 30% and
70%.  (the improvement may not be as large on an Intel chipset; from
what i can tell, the VIA VP-1 may not be very efficient with PCI I/O.)
disk performance improves by 5% or 10% with these drives.

real, visible, end-user performance improvement on a single user
machine is about nil. :) a kernel compile was sped up by a whole three
seconds.  it *does* feel a bit better-behaved when the system is
swapping heavily, but a better disk driver is not the fix for *that*
problem.

THE CODE:

this code is a patch to wd.c and wd82371.c, and associated header
files.  it should be considered alpha code; more work needs to be
done.

wd.c has fairly clean patches to add calls to busmaster code, as
implemented in wd82371.c and potentially elsewhere (one could imagine,
say, a Mac having a different DMA controller).

wd82371.c has been considerably reworked: the wddma interface that it
presents has been changed (expect more changes), many bugs have been
fixed, a new internal interface has been added for supporting
different chipsets, and the PCI probe has been considerably extended.

the interface between wd82371.c and wd.c is still fairly clean, but
i'm not sure it's in the right place.  there's a mess of issues around
ATA/ATAPI that need to be sorted out, including ATAPI support, CD-ROM
support, tape support, LS-120/Zip support, SFF-8038i DMA, UltraDMA,
PCI IDE controllers, bus probes, buggy controllers, controller timing
setup, drive timing setup, world peace and kitchen sinks.  whatever
happens with all this and however it gets partitioned, it is fairly
clear that wd.c needs some significant rework-- probably a complete
rewrite.

timing setup on disk controllers is something i've entirely punted on.
on my development machine, it appears that the BIOS does at least some
of the necessary timing setup.  i chose to restrict operation to
drives that are already configured for Mode4 PIO and Mode2 multiword
DMA, since the timing is essentially the same and many if not most
chipsets use the same control registers for DMA and PIO timing.

does anybody *know* whether BIOSes are required to do timing setup for
DMA modes on drives under their care?

error recovery is probably weak.  early on in development, i was
getting drive errors induced by bugs in the driver; i used these to
flush out the worst of the bugs in the driver's error handling, but
problems may remain.  i haven't got a drive with bad sectors i can
watch the driver flail on.

complaints about how wd82371.c has been reindented will be ignored
until the FreeBSD project has a real style policy, there is a
mechanism for individual authors to match it (indent flags or an emacs
c-mode or whatever), and it is enforced.  if i'm going to use a source
style i don't like, it would help if i could figure out what it *is*
(style(9) is about half of a policy), and a way to reasonably
duplicate it.  i ended up wasting a while trying to figure out what
the right thing to do was before deciding reformatting the whole thing
was the worst possible thing to do, except for all the other
possibilities.

i have maintained wd.c's indentation; that was not too hard,
fortunately.

TO INSTALL:

my dev box is freebsd 2.2.2 release.  fortunately, wd.c is a living
fossil, and has diverged very little recently.  included in this
tarball is a patch file, 'otherdiffs', for all files except wd82371.c,
my edited wd82371.c, a patch file, 'wd82371.c-diff-exact', against the
2.2.2 dist of 82371.c, and another patch file,
'wd82371.c-diff-whitespace', generated with diff -b (ignore
whitespace).  most of you not using 2.2.2 will probably have to use
this last patchfile with 'patch --ignore-whitespace'.  apply from the
kernel source tree root. as far as i can tell, this should apply
cleanly on anything from -current back to 2.2.2 and probably back to
2.2.0.  you, the kernel hacker, can figure out what to do from here.
if you need more specific directions, you probably should not be
experimenting with this code yet.

to enable DMA support, set flag 0x2000 for that drive in your config
file or in userconfig, as you would the 32-bit-PIO flag.  the driver
will then turn on DMA support if your drive and controller pass its
tests.  it's a bit picky, probably.  on discovering DMA mode failures
or disk errors or transfers that the DMA controller can't deal with,
the driver will fall back to PIO, so it is wise to setup the flags as
if PIO were still important.

'controller wdc0 at isa? port "IO_WD1" bio irq 14 flags 0xa0ffa0ff
vector wdintr' should work with nearly any PCI IDE controller.

i would *strongly* suggest booting single-user at first, and thrashing
the drive a bit while it's still mounted read-only.  this should be
fairly safe, even if the driver goes completely out to lunch.  it
might save you a reinstall.

one way to tell whether the driver is really using DMA is to check the
interrupt count during disk i/o with vmstat; DMA mode will add an
extremely low number of interrupts, as compared to even multi-sector
PIO.

boot -v will give you a copious register dump of timing-related info
on Intel and VIAtech chipsets, as well as PIO/DMA mode information on
all hard drives.  refer to your ATA and chipset documentation to
interpret these.

WHAT I'D LIKE FROM YOU and THINGS TO TEST:

reports.  success reports, failure reports, any kind of reports. :)
send them to cgull+ide@smoke.marlboro.vt.us.

i'd also like to see the kernel messages from various BIOSes (boot -v;
dmesg), along with info on the motherboard and BIOS on that machine.

i'm especially interested in reports on how this code works on the
various Intel chipsets, and whether the register dump works
correctly.  i'm also interested in hearing about other chipsets.

i'm especially interested in hearing success/failure reports for PCI
IDE controllers on cards, such as CMD's or Promise's new busmastering
IDE controllers.

UltraDMA-33 reports.

interoperation with ATAPI peripherals-- FreeBSD doesn't work with my
old Hitachi IDE CDROM, so i can't tell if I've broken anything. :)

i'd especially like to hear how the drive copes in DMA operation on
drives with bad sectors.  i haven't been able to find any such yet.

success/failure reports on older IDE drives with early support for DMA
modes-- those introduced between 1.5 and 3 years ago, typically
ranging from perhaps 400MB to 1.6GB.

failure reports on operation with more than one drive would be
appreciated.  the driver was developed with two drives on one
controller, the worst-case situation, and has been tested with one
drive on each controller, but you never know...

any reports of messages from the driver during normal operation,
especially "reverting to PIO mode", or "dmaverify odd vaddr or length"
(the DMA controller is strongly halfword oriented, and i'm curious to
know if any FreeBSD usage actually needs misaligned transfers).

performance reports.  beware that bonnie's CPU usage reporting is
useless for IDE drives; the best test i've found has been to run a
program that runs a spin loop at an idle priority and reports how many
iterations it manages, and even that sometimes produces numbers i
don't believe.  performance reports of multi-drive operation are
especially interesting; my system cannot sustain full throughput on
two drives on separate controllers, but that may just be a lame
motherboard.

THINGS I'M STILL MISSING CLUE ON:

* who's responsible for configuring DMA timing modes on IDE drives?
the BIOS or the driver?

* is there a spec for dealing with Ultra-DMA extensions?

* are there any chipsets or with bugs relating to DMA transfer that
should be blacklisted?

* are there any ATA interfaces that use some other kind of DMA
controller in conjunction with standard ATA protocol?

FINAL NOTE:

after having looked at the ATA-3 spec, all i can say is, "it's ugly".
*especially* electrically.  the IDE bus is best modeled as an
unterminated transmission line, these days.

for maximum reliability, keep your IDE cables as short as possible and
as few as possible.  from what i can tell, most current chipsets have
both IDE ports wired into a single buss, to a greater or lesser
degree.  using two cables means you double the length of this bus.

SCSI may have its warts, but at least the basic analog design of the
bus is still somewhat reasonable.  IDE passed beyond the veil two
years ago.

  --John Hood, cgull@smoke.marlboro.vt.us

27 years agoChange /var/run owner to root - sendmail can't write sendmail.pid
ache [Tue, 29 Jul 1997 11:23:14 +0000 (11:23 +0000)]
Change /var/run owner to root - sendmail can't write sendmail.pid
otherwise due to safeopen

27 years agoAdd usage(), use err(3).
charnier [Tue, 29 Jul 1997 06:54:16 +0000 (06:54 +0000)]
Add usage(), use err(3).
Rewrote man page in mdoc format.

27 years agoRemove prog, unused variables.
charnier [Tue, 29 Jul 1997 06:51:41 +0000 (06:51 +0000)]
Remove prog, unused variables.
Cosmetic in usage string.

27 years agoUse err(3) instead of local redefinition.
charnier [Tue, 29 Jul 1997 06:49:16 +0000 (06:49 +0000)]
Use err(3) instead of local redefinition.

27 years agoUse err(3).
charnier [Tue, 29 Jul 1997 06:47:18 +0000 (06:47 +0000)]
Use err(3).
sprintf -> snprintf from OpenBSD.
Add usage(), prototypes.
Use MAXPATHLEN instead of 128 from OpenBSD.
Obtained from: OpenBSD

27 years agoAdd usage().
charnier [Tue, 29 Jul 1997 06:42:33 +0000 (06:42 +0000)]
Add usage().

27 years agoReturn to using disable/enable_intr() for guarding DMA register access.
msmith [Tue, 29 Jul 1997 05:24:36 +0000 (05:24 +0000)]
Return to using disable/enable_intr() for guarding DMA register access.
Mask the read value from the count register in order to return zero correctly
after TC, as per intel datasheet : "If it is not autoinitialised, this
register will have a count of FFFFH after TC"

27 years agoFix boatloads of buffer overflows from the OpenBSD tree.
imp [Tue, 29 Jul 1997 04:17:19 +0000 (04:17 +0000)]
Fix boatloads of buffer overflows from the OpenBSD tree.
Be pedantic about always using sizeof(blah) vs sizeof (blah) or sizeof blah.
Obtained from:OpenBSD

27 years agoAllow hosts specified by IP number (avoiding
brian [Mon, 28 Jul 1997 22:17:48 +0000 (22:17 +0000)]
Allow hosts specified by IP number (avoiding
a DNS lookup)
Update doc including the [host:]port syntax.

27 years agoMake compile with rev. 1.101 of ncr.c, which added support for
se [Mon, 28 Jul 1997 21:33:45 +0000 (21:33 +0000)]
Make compile with rev. 1.101 of ncr.c, which added support for
loading of the SCIPTS microcode into the NCR on-chip RAM.

27 years agoAdd support for loading the SCRIPTS microcode into the on-chip RAM
se [Mon, 28 Jul 1997 21:32:05 +0000 (21:32 +0000)]
Add support for loading the SCRIPTS microcode into the on-chip RAM
of the Symbios 53c825A, 53c875 and 53c895 SCSI chips.

Submitted by: Gerard Roudier <groudier@club-internet.fr>

27 years agoUse malloc to save space for temp SUNIT variable
ache [Mon, 28 Jul 1997 14:57:10 +0000 (14:57 +0000)]
Use malloc to save space for temp SUNIT variable
Submitted by: bde

27 years agoFix for PR #4147: apparently BIND now returns a status of NO_RECOVERY
wpaul [Mon, 28 Jul 1997 14:13:57 +0000 (14:13 +0000)]
Fix for PR #4147: apparently BIND now returns a status of NO_RECOVERY
at the end of gethostanswer()/getanswer()/whatever where it used to
return TRY_AGAIN. This breaks the domain list traversal in ypserv's
async DNS lookup module: it would only retry using the domain(s) from
the 'domain' or 'search' lines in /etc/resolv.conf if __dns_getanswer()
returned TRY_AGAIN.

Changed the test so that either TRY_AGAIN or NO_RECOVERY will work.
This seemed to me the best solution in the event somebody tries to
compile this code on an older system with a different version of BIND.
(You shouldn't do that of course, but then there's a lot of things
in the world that you shouldn't do and people do them anyway.)

27 years agoPedant attack! Use variable names consistent with discourse in
msmith [Mon, 28 Jul 1997 09:13:11 +0000 (09:13 +0000)]
Pedant attack!  Use variable names consistent with discourse in
comments.  Remove reduntant extra addition that was unncessary, and
unneeded mask (asuming inb works correctly).

Submitted by: Stephen McKay <syssgm@dtir.qld.gov.au>

27 years agoUse disable_intr() / read/write_eflags() to ensure that interrupt
msmith [Mon, 28 Jul 1997 07:49:40 +0000 (07:49 +0000)]
Use disable_intr() / read/write_eflags() to ensure that interrupt
handlers don't skew the results of isa_dmastatus.  The function can be
safely called with interrupts disabled.

Submitted by: Stephen McKay <syssgm@dtir.qld.gov.au>

27 years agoCosmetic in usage string.
charnier [Mon, 28 Jul 1997 07:01:02 +0000 (07:01 +0000)]
Cosmetic in usage string.

27 years agoModified the PEND_INTS algorithm to fix the ISA INT loss problem.
fsmp [Mon, 28 Jul 1997 03:59:54 +0000 (03:59 +0000)]
Modified the PEND_INTS algorithm to fix the ISA INT loss problem.

Noticed by: dave adkins <adkin003@gold.tc.umn.edu> and others.

27 years agoImprove dependancy behaviour a little more.
msmith [Mon, 28 Jul 1997 03:33:04 +0000 (03:33 +0000)]
Improve dependancy behaviour a little more.

This is still pretty disgusting.

Submitted by: bde

27 years agoFix file descriptor leaks.
brian [Mon, 28 Jul 1997 01:02:27 +0000 (01:02 +0000)]
Fix file descriptor leaks.

27 years agoCount the "proto" arg after a single address,
brian [Sun, 27 Jul 1997 23:26:23 +0000 (23:26 +0000)]
Count the "proto" arg after a single address,
Check correctly for "deny" packets.
Submitted by: Dave Bodenstab <imdave@mcs.net>

27 years agoAdd a simple example section.
wosch [Sun, 27 Jul 1997 23:10:33 +0000 (23:10 +0000)]
Add a simple example section.

27 years agoAdd getbkgd() macro
ache [Sun, 27 Jul 1997 21:01:16 +0000 (21:01 +0000)]
Add getbkgd() macro

27 years agoRemove a reference to /c/phk, this should be handled by the magic script
phk [Sun, 27 Jul 1997 20:21:05 +0000 (20:21 +0000)]
Remove a reference to /c/phk, this should be handled by the magic script
in src/tools.

27 years agoMove tmpnc struct out of stack, too large
ache [Sun, 27 Jul 1997 19:28:26 +0000 (19:28 +0000)]
Move tmpnc struct out of stack, too large
Suggested by: bde

27 years agoSupport 4MB pages.
bde [Sun, 27 Jul 1997 18:29:04 +0000 (18:29 +0000)]
Support 4MB pages.

27 years agoList help.h a a dependancy for editline.c
msmith [Sun, 27 Jul 1997 10:47:49 +0000 (10:47 +0000)]
List help.h a a dependancy for editline.c
Use 'beforedepend' instead of '.depend' to hang automatically-generated
headers off.

XXX the latter is bogus without a 'beforeall' target and explicit ordering
of dependancy generation for targets.

27 years agoAdd the ability for the pageout daemon to measure stats on memory usage before
dyson [Sun, 27 Jul 1997 04:49:19 +0000 (04:49 +0000)]
Add the ability for the pageout daemon to measure stats on memory usage before
the system is out of memory.  The daemon does a minimal amount of work that
increases as the system becomes more likely to run out of memory and page in/out.

The default tuning is fairly low in background CPU usage, and sysctl variables
have been added to enable flexable operation.  This is an experimental feature
that will likely be changed and improved over time.

27 years agoFix a very subtile problem that causes unnessary numbers of objects backing
dyson [Sun, 27 Jul 1997 04:44:12 +0000 (04:44 +0000)]
Fix a very subtile problem that causes unnessary numbers of objects backing
a single logical object.
Submitted by: Alan Cox <alc@cs.rice.edu>