David E. O'Brien [Tue, 14 Dec 1999 04:48:17 +0000 (04:48 +0000)]
Install `chown' into /sbin rather than /usr/sbin as `chown' is needed by
`MAKEDEV'. And one might need to `MAKEDEV' inorder to get a device node
in order to mount /usr from.
Completely rip-out and redesign sysinstall's refresh model as well
as redoing all the menus to have proper, or at least non-hallucinogenic,
keyboard accelerators.
This requires my recent update to libdialog to work properly and will
probably also exhibit some other "interesting" behavior while the last
few missing screen clears are found (which is why I'm not going to MFC
immediately). At least now, however, sysinstall does not gratuitously
redraw random screens at the drop of a hat and drive serial console
installers out of their minds.
Brian Feldman [Tue, 14 Dec 1999 02:23:14 +0000 (02:23 +0000)]
Bug fix:
The variables "m_mclalloc_wid" and "m_mballoc_wid" were not in the
proper place. They should have been in uipc_mbuf.c and have been global,
not in mbuf.h and local per each file that uses mbuf.h.
Sorta bug fix:
In mbuf.h, the definitions of various things for KERNEL and not
KERNEL cases were very screwy. This fixes all of that which I could
find.
Bill Paul [Mon, 13 Dec 1999 21:45:13 +0000 (21:45 +0000)]
Fix some problems reported by Mike Pritchard:
- Add a flag DC_TX_INTR_ALWAYS which causes the transmit code to
request a TX done interrupt for every packet. The PNIC seems to need
this to insure that the sent TX buffers get reaped in a timely fashion.
- Try to unreset the SIA as soon as possible after resetting the whole
chip.
- Change dcphy to support either 10/100 or 10Mbps only NICs. The
built-in 21143 ethernet in Compaq Presario machines is 10Mbps only
and it doesn't work right if we try to advertise 100Mbps modes during
autoneg. When restricted to only 10mbps modes, it works fine.
Note that for now, I detect this condition by checking the PCI
subsystem ID on this NIC (which has a Compaq vendor/device ID).
Yes, I know that's what the SROM is supposed to be for. I'm deliberately
ignoring the SROM wherever possible. Sue me.
The latter two fixes allow if_dc to work correctly with the built-in
ethernet on certain Compaq Presario boxes. There are liable to be quite
a few people using these as their home systems who might want to try
FreeBSD; may as well be nice to them.
Now if anybody out there has an Alpha miata with 10Mbps ethernet and
can show me the output from pciconf -l on their system, I'd be grateful.
Warner Losh [Mon, 13 Dec 1999 17:55:23 +0000 (17:55 +0000)]
Add notes from recent HEADS UP messages:
o soren updated the ata driver. Please use 1213 or newer if
you have problems with the old stuff.
o Enshrine the night of bared axes against wd. Strongly push
users to move to ata driver.
o Alpha users need to recompile klds after 11/29.
o Mention the sound driver bridge code commit of 11/22.
o change examples in 1205 entry from wd to ad.
o Talk about new dc driver replacing all of the drivers that
Bill Paul has ever written.[*]
Matthew Dillon [Mon, 13 Dec 1999 17:34:45 +0000 (17:34 +0000)]
Add a readahead heuristic to the NFS server side code. While the server
cannot unilaterally pass data to a client it can reduce the physical
disk transaction overhead by reading larger blocks. This results in
better pipelining of requests/responses over the network and an almost
100% increase in cpu efficiency on the server. On a 100BaseTX network
NFS read performance increases from 8.5 MBytes/sec to 10 MB/sec (maxed
out), and cpu efficiency increases from 72% idle to 80% idle on the server.
Reviewed by: Alfred Perlstein <bright@wintelcom.net>
Matthew Dillon [Mon, 13 Dec 1999 17:09:34 +0000 (17:09 +0000)]
Forgot a log message in the last commit. Fix an mbuf leak in
nfs_srvcache.c related duplicate requests on a heavily loaded
server. If a duplicate request is received while the previous
request is still being processed from the cache, the previous
mbuf chain in the cache will be replaced without first being freed.
Boris Popov [Mon, 13 Dec 1999 16:24:22 +0000 (16:24 +0000)]
Bring up an if_ef driver which allows support for four ethernet
frame types. Currently it supports only IPX protocol and doesn't
affect existing functionality when not loaded.
Reviewed by: Ollivier Robert <roberto@keltia.freenix.fr>
Ollivier Robert [Mon, 13 Dec 1999 14:09:56 +0000 (14:09 +0000)]
Please welcome the brand new ntp4 daemon & utilities in the FreeBSD tree.
This is the second part of the commit (the third -- link in usr.sbin/Makefile)
will be done after a more complete review by phk & obrien.
NOTE: the number of drivers included in the default configuration is very
minimal, mainly local clocks and the one I use RAWDCF. Anyone wanting to
have a more complete version will find recompilation very easy.
It builds and runs on both alpha & i386. It also does survive "make world".
Søren Schmidt [Mon, 13 Dec 1999 10:19:39 +0000 (10:19 +0000)]
Add DMA support for the SiS 5591 and old PIIX chipsets.
Add a missing DELAY(1) in ata_wait.
Change the info from ad_version, so the ATA version from the disk can
be used to quantify the DAM modes valid for this drive, ie be more
selective with turning DMA on on older disks that should not support it..
Fix the probe for BIOS enabled DMA in the generic case, master/slave
was reversed in the test.
Check the return for ata_command in all cases, and print warnings if
it fails.
Call ata_dmainit with all dmamodes off when falling back to PIO mode,
that should take care of both the Promise & HPT366 controllers not
being able to handle the fallback...
Cleanup the printf's in the drivers, use the prober device name (if
possible) instead of ataN-master/slave.
Tor Egge [Mon, 13 Dec 1999 02:55:47 +0000 (02:55 +0000)]
Fix two problems with pipe_write():
1. Data written beyond end of pipe buffer, causing kernel memory corruption.
- Check that space is still valid after obtaining the pipe lock.
- Defer the calculation of transfer size until the pipe
lock has been obtained.
- Update the pipe buffer pointers while holding the pipe lock.
2. Writes of size <= PIPE_BUF not always atomic.
- Allow an internal write to span two contiguous segments,
so writes of size <= PIPE_BUF can be kept atomic
when wrapping around from the end to the start of the
pipe buffer.
PR: 15235
Reviewed by: Matt Dillon <dillon@FreeBSD.org>
The current code incorrectly assumes that all vlans
are configured, and/or associated with a parent device. If you
receive a frame for a VLAN that's not in the list, you walk off
the end of the list. Boom.
Submitted by: C. Stephen Gunn <csg@waterspout.com>
PR: 15291
sys/net/if_vlan.c fails to maintain the IFF_RUNNING flag on the
vlan interfaces it manages. This prevents the interface from
actually sending or receiving data.
Submitted by: C. Stephen Gunn <csg@waterspout.com>
PR: 15290
Marcel Moolenaar [Sun, 12 Dec 1999 21:24:07 +0000 (21:24 +0000)]
o Add gensetdefs to the list of tools.
o Don't set CFLAGS in the bootstrap env. It is very likely to be
overridden my any CFLAGS setting in /etc/make.conf. Setting it
here is almost useless. So far, it doesn't seem necessary.
Peter Wemm [Sun, 12 Dec 1999 20:34:11 +0000 (20:34 +0000)]
Remove a whole bunch of "CFLAGS+= -DFSNAME" cruft. It hasn't been
needed for ages, but keeps getting cut/pasted into new Makefiles.
(Once apon a time it was used to activate mount arguments in
<sys/mount.h>, but that was killed with extreme prejudice long ago)
Peter Wemm [Sun, 12 Dec 1999 16:45:58 +0000 (16:45 +0000)]
Use the -c and -h args of vnode_if.sh to generate only the .h file that
we use. The .c half is statically compiled into the kernel. It's kinda
silly to generate a .h file on the fly that has inlines to call the
.c stuff when the .c code is fixed.
Also, zap the special treatment for VFS_KLD modules. This treatment
applies to lots of things, not just VFS's.
Peter Wemm [Sun, 12 Dec 1999 16:43:05 +0000 (16:43 +0000)]
Use a seperate -c and -h mode. The vnode_if.c file is compiled only into
the kernel while the vnode_if.h header is a bunch of inlines to call the
code that is in the kernel. Generating the .h file on the fly is kinda
bogus because it has to match the one compiled into the kernel.
IMHO we should have kern/vnode_if.c and sys/vnode_if.h committed in the
tree but that's another battle.
Peter Wemm [Sun, 12 Dec 1999 16:34:43 +0000 (16:34 +0000)]
Put on asbestos suit and put a splcam() around the 'Mounting root from..'
message to stop it splitting. Every single scsi machine I've seen seems
to reliably collide with this and it's rather annoying.
Peter Wemm [Sun, 12 Dec 1999 14:47:23 +0000 (14:47 +0000)]
Remove some horrible #if 0'd code that has no hope of working now. It
used to edit the old-style isa_devtab config tables to insert a mapping
for a pci device into the isa tables so that the wdc driver could probe
it later. This has been #if 0'd since April.
Mark Newton [Sun, 12 Dec 1999 11:25:33 +0000 (11:25 +0000)]
Replace the svr4_sys_getdents64() routine with a port of linux_getdents() --
differences between the VFS interface between FreeBSD and NetBSD make
it easier to pick up the Linux one than to continue development with the
NetBSD port.
This patch fixes a bug which caused duplicate filenames to be seen by
callers to svr4_sys_getdents64(), leading to malformed directory listings
from Solaris client programs.
Obtained from: The Linuxulator, with a pointer from marcel
Matthew Dillon [Sun, 12 Dec 1999 07:06:39 +0000 (07:06 +0000)]
Fix a number of server-side issues related to aborting badly formed
NFS packets, mainly initializing structure pointers to NULL which
are conditionally freed prior to return.
PR: kern/15249
Submitted by: Ian Dowse <iedowse@maths.tcd.ie>
Matthew Dillon [Sun, 12 Dec 1999 06:09:57 +0000 (06:09 +0000)]
Synopsis of problem being fixed: Dan Nelson originally reported that
blocks of zeros could wind up in a file written to over NFS by a client.
The problem only occurs a few times per several gigabytes of data. This
problem turned out to be bug #3 below.
bug #1:
B_CLUSTEROK must be cleared when an NFS buffer is reverted from
stage 2 (ready for commit rpc) to stage 1 (ready for write).
Reversions can occur when a dirty NFS buffer is redirtied with new
data.
Otherwise the VFS/BIO system may end up thinking that a stage 1
NFS buffer is clusterable. Stage 1 NFS buffers are not clusterable.
bug #2:
B_CLUSTEROK was inappropriately set for a 'short' NFS buffer (short
buffers only occur near the EOF of the file). Change to only set
when the buffer is a full biosize (usually 8K). This bug has no
effect but should be fixed in -current anyway. It need not be
backported.
bug #3:
B_NEEDCOMMIT was inappropriately set in nfs_flush() (which is
typically only called by the update daemon). nfs_flush()
does a multi-pass loop but due to the lack of vnode locking it
is possible for new buffers to be added to the dirtyblkhd list
while a flush operation is going on. This may result in nfs_flush()
setting B_NEEDCOMMIT on a buffer which has *NOT* yet gone through its
stage 1 write, causing only the commit rpc to be made and thus
causing the contents of the buffer to be thrown away (never sent to
the server).
The patch also contains some cleanup, which only applies to the commit
into -current.
Reviewed by: dg, julian
Originally Reported by: Dan Nelson <dnelson@emsphone.com>
Brian Feldman [Sun, 12 Dec 1999 05:52:51 +0000 (05:52 +0000)]
This is Bosko Milekic's mbuf allocation waiting code. Basically, this
means that running out of mbuf space isn't a panic anymore, and code
which runs out of network memory will sleep to wait for it.
I shouldn't have incremented PART_OFF; it was wrong and broke label
display to boot. Also fix some various warning fluff while I'm in
here cleaning up.
Matthew Dillon [Sun, 12 Dec 1999 03:19:33 +0000 (03:19 +0000)]
Add MAP_NOSYNC feature to mmap(), and MADV_NOSYNC and MADV_AUTOSYNC to
madvise().
This feature prevents the update daemon from gratuitously flushing
dirty pages associated with a mapped file-backed region of memory. The
system pager will still page the memory as necessary and the VM system
will still be fully coherent with the filesystem. Modifications made
by other means to the same area of memory, for example by write(), are
unaffected. The feature works on a page-granularity basis.
MAP_NOSYNC allows one to use mmap() to share memory between processes
without incuring any significant filesystem overhead, putting it in
the same performance category as SysV Shared memory and anonymous memory.
Cameron Grant [Sun, 12 Dec 1999 02:30:19 +0000 (02:30 +0000)]
make sb dependant on sbc
add support for non-pnp cards to sbc
move card identification to sbc
channel-swapping code is in sb now instead of dsp
vibra16x support is still broken, but will be fixed soon
note: sbc is now compulsory for sb cards
for pnp cards use:
device sbc0
for non-pnp cards eg:
device sbc0 at isa? port 0x240 irq 5 drq 3 flags 0x15
(hints as oldpcm)