sos [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.
tegge [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>
jkh [Mon, 13 Dec 1999 01:57:00 +0000 (01:57 +0000)]
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
jkh [Mon, 13 Dec 1999 01:38:14 +0000 (01:38 +0000)]
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 [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 [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 [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 [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 [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 [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.
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
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>
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>
green [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.
jkh [Sun, 12 Dec 1999 04:58:02 +0000 (04:58 +0000)]
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.
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.
cg [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)
Currently we have a problem in that `dhclient' bails when configuring the
second interface as port 68 is already in use (by the `dhclient' started
for the first interface).
obrien [Sun, 12 Dec 1999 01:04:36 +0000 (01:04 +0000)]
Do not add routes for localhost to the `dhclient' controlled interface.
Doing so is bogus if the loop-back interface was not configured.
Typically ``network_interfaces="auto"'' will return the list of
interfaces such that "lo0" is not first. Thus there are times when
`dhclient' configs an interface before "lo0" is configured.
Under BSD4.4, there's no need to add the above route, as it will be
automatically generated by the kernel.
PR: conf/14098, misc/15183
Submitted by: luoqi (true identification of the problem)
ken [Sat, 11 Dec 1999 23:00:44 +0000 (23:00 +0000)]
Quirk all Pioneer changers as changers up front, instead of waiting for the
second LUN to show up.
mjacob's change (which is correct) in rev 1.21 of cam_periph.c to elminiate
infinite retries of the SCSI busy status bit seems to have broken probing
of Pioneer changers that aren't already quirked.
The right way to fix this is probably to change things around so we can
guarantee 100% sequential probing of LUN-based changers even if they aren't
quirked. This should fix things for now, though.
dcs [Sat, 11 Dec 1999 21:43:38 +0000 (21:43 +0000)]
Add reference to hier(7). This gets motd just over 25 lines. I'm
don't like it, but I think this can greatly ease the learning curve
of Linux-immigrants.
eivind [Sat, 11 Dec 1999 16:13:02 +0000 (16:13 +0000)]
Lock reporting and assertion changes.
* lockstatus() and VOP_ISLOCKED() gets a new process argument and a new
return value: LK_EXCLOTHER, when the lock is held exclusively by another
process.
* The ASSERT_VOP_(UN)LOCKED family is extended to use what this gives them
* Extend the vnode_if.src format to allow more exact specification than
locked/unlocked.
This commit should not do any semantic changes unless you are using
DEBUG_VFS_LOCKS.
Discussed with: grog, mch, peter, phk
Reviewed by: peter
peter [Sat, 11 Dec 1999 14:48:24 +0000 (14:48 +0000)]
While comparing this with OpenBSD (ie: trying to figure out what mkstemps()
is good for... :-)), I discovered that part of the change when mkstemps()
was brought in was missed - it was missing the termination case to make
sure it doesn't walk into the suffix. This isn't the same code OpenBSD
has, I think this is a little better as we terminate the loop in a better
spot.
grog [Sat, 11 Dec 1999 14:27:12 +0000 (14:27 +0000)]
Check in correct versions of files. Somehow null files got committed
last time.
There's a possibility that there are still things wrong with the
commit. I wasn't able to build the version I committed, and I won't
be for another few days. If any committer finds further omissions,
the original source archive is on freefall:~grog/picobsd.tar.gz. Feel
free to correct.
Reported-by: "Louis A. Mamakos" <louie@TransSys.COM>
peter [Sat, 11 Dec 1999 13:00:18 +0000 (13:00 +0000)]
Merge cyclic changes from 1.10.7 into our mainline. I did this seperately
as cvs update -j had kittens over the whole thing and I ended up merging
it by hand.
peter [Sat, 11 Dec 1999 10:54:06 +0000 (10:54 +0000)]
Reclaim UPAGES_HOLE (8k) that was chopped out of process address space.
The UPAGES have not been there since Jan '96, but the hole was preserved
for BSD/OS binary compatability. This has been fixed other ways (%ebx
now has a pointer to PS_STRINGS), and the stack is nowhere near where
it used to be so this hack isn't required anymore.
peter [Sat, 11 Dec 1999 10:21:34 +0000 (10:21 +0000)]
Don't simulate a pseudo address-space beyond VM_MAXUSER_ADDRESS that
maps onto the upages. We used to use this extensively, particularly
for ps and gdb. Both of these have been "fixed". ps gets the p_stats
via eproc along with all the other stats, and gdb uses the regs, fpregs
etc files.
Once apon a time the UPAGES were mapped here, but that changed back
in January '96. This essentially kills my revisions 1.16 and 1.17.
The 2-page "hole" above the stack can be reclaimed now.
dfr [Sat, 11 Dec 1999 09:58:06 +0000 (09:58 +0000)]
Allow kernel accesses to a small region of the user stack which is used
by the Linux emulator (and other emulators) for syscall argument
translation. The x86 port currently seems to allow unrestricted kernel
accesses to user memory.
jlemon [Sat, 11 Dec 1999 04:05:52 +0000 (04:05 +0000)]
According to RFC 793, a reset should be honored if the sequence number
is within the receive window. Follow this behavior, instead of only
allowing resets at last_ack_sent.