phk [Sat, 24 Jan 2004 21:48:43 +0000 (21:48 +0000)]
Deal with MOD_FREQUENCY before MOD_OFFSET because the latter is the
one which runs the actual update. This fixes a bug where there were
a delay in applying the frequency adjustment. In extreme cases this
could result in marginal stability of the kernel-pll.
jeff [Sat, 24 Jan 2004 21:38:52 +0000 (21:38 +0000)]
- Recruit some new ULE users by making it the default scheduler in GENERIC.
ULE will be in a probationary period to determine whether it will be left
as the default in 5.3 which would likely mean the rest of the 5.x series.
alc [Sat, 24 Jan 2004 21:31:06 +0000 (21:31 +0000)]
1. Statically initialize swap_pager_full and swap_pager_almost_full to the
full state. (When swap is added their state will change appropriately.)
2. Set swap_pager_full and swap_pager_almost_full to the full state when
the last swap device is removed.
Combined these changes eliminate nonsense messages from the kernel on swap-
less machines.
Item 2 submitted by: Divacky Roman <xdivac02@stud.fit.vutbr.cz>
Prodding by: phk
sobomax [Sat, 24 Jan 2004 21:23:12 +0000 (21:23 +0000)]
Add support for Crystalfontz CFA-631 USB LCD (uftdi(4) driver).
For some very unclear reason this device contains a FTDI 8U232AM USB->COM
adapter, but reports different device id than original 8U232AM. At the same
time, it reports vendor id of FTDI.
Sponsored by: Porta Software Ltd
MFC after: 2 weeks
sobomax [Sat, 24 Jan 2004 21:13:13 +0000 (21:13 +0000)]
- Move performance-controlling sysctls into hw.p4tcc.* tree;
Suggested by: nate
- get rid of "magick" values in code and make sysctl's reflecting reality
on processor versions which have one or another frequency "forbidden"
due to errata.
sobomax [Sat, 24 Jan 2004 21:13:12 +0000 (21:13 +0000)]
- Move performance-controlling sysctls into hw.p4tcc.* tree;
Suggested by: nate
- get rid of "magick" values in code and make sysctl's reflecting reality
on processor versions which have one or another frequency "forbidden"
due to errata.
tjr [Sat, 24 Jan 2004 08:43:06 +0000 (08:43 +0000)]
Copy workaround from FFS: open device for write access even if
the user requests a read-only mount. This is necessary because we
don't do the VOP_OPEN again if they upgrade a read-only mount to
read-write.
mjacob [Fri, 23 Jan 2004 23:23:31 +0000 (23:23 +0000)]
If we have ISP_ROLE_INITIATOR set, make sure that we clear ICBOPT_INI_DISABLE
from the fwoptions. Likewise, we *set* ICBOPT_INI_DISABLE if we don't have
initiator role.
des [Fri, 23 Jan 2004 23:04:26 +0000 (23:04 +0000)]
Add support for using cvsup instead of cvs to update the source tree.
Fix the "clean" command: don't try to rmdir symlinks, and run chflags
before trying to delete the chroot tree.
Tweak some error and info messages.
das [Fri, 23 Jan 2004 22:48:16 +0000 (22:48 +0000)]
Merge vfprintf.c, v1.61 and 1.62. For compatibility with __hdtoa()
and to reduce diffs between vfprintf.c and vfwprintf.c, declare xdigs*
to be char arrays rather than wchar_t arrays.
wpaul [Fri, 23 Jan 2004 22:28:22 +0000 (22:28 +0000)]
Deal with keys with descriptions that have empty fields in some of
their lines.
Properly discard PCMCIA device declarations. I plan to support
PCMCIA cards, but they don't work yet, and it appears some .INF files
declare both PCI and PCMCIA device instances.
rwatson [Fri, 23 Jan 2004 21:07:52 +0000 (21:07 +0000)]
Don't grab Giant in crfree(), since prison_free() no longer requires it.
The uidinfo code appears to be MPSAFE, and is referenced without Giant
elsewhere. While this grab of Giant was only made in fairly rare
circumstances (actually GC'ing on refcount==0), grabbing Giant here
potentially introduces lock order issues with any locks held by the
caller. So this probably won't help performance much unless you change
credentials a lot in an application, and leave a lot of file descriptors
and cached credentials around. However, it simplifies locking down
consumers of the credential interfaces.
rwatson [Fri, 23 Jan 2004 20:44:26 +0000 (20:44 +0000)]
Defer the vrele() on a jail's root vnode reference from prison_free()
to a new prison_complete() task run by a task queue. This removes
a requirement for grabbing Giant in crfree(). Embed the 'struct task'
in 'struct prison' so that we don't have to allocate memory from
prison_free() (which means we also defer the FREE()).
With this change, I believe grabbing Giant from crfree() can now be
removed, but need to check the uidinfo code paths.
To avoid header pollution, move the definition of 'struct task'
to _task.h, and recursively include from taskqueue.h and jail.h; much
preferably to all files including jail.h picking up a requirement to
include taskqueue.h.
philip [Fri, 23 Jan 2004 20:30:52 +0000 (20:30 +0000)]
Add missing options from pcvt_conf.h to options.i386. This
allows the kernel build to survive config when these options
are specified in the config file.
harti [Fri, 23 Jan 2004 16:22:49 +0000 (16:22 +0000)]
Create the OID and tree files while building the modules and the daemon
instead of creating them by hand and storing them in the CVS tree. Add
gensnmptree to the bootstrap tools (it is used to generated these files).
This simplifies the update procedure.
ache [Fri, 23 Jan 2004 05:52:31 +0000 (05:52 +0000)]
Fix various panic() strings to reflect true function name to allow
easy grep.
Small code reorganization to look more logic.
Copy ffs_write check from prev. commit to ffs_extwrite.
ache [Fri, 23 Jan 2004 05:38:02 +0000 (05:38 +0000)]
ffs_read:
Replace wrong check returned EFBIG with EOVERFLOW handling from POSIX:
36708 [EOVERFLOW] The file is a regular file, nbyte is greater than 0, the
starting position is before the end-of-file, and the starting position is
greater than or equal to the offset maximum established in the open file
description associated with fildes.
ffs_write:
Replace u_int64_t cast with uoff_t cast which is more natural for types
used.
ffs_write & ffs_read:
Remove uio_offset and uio_resid checks for negative values, the caller
supposed to do it already. Add comments about it.
andre [Thu, 22 Jan 2004 23:22:14 +0000 (23:22 +0000)]
Split the overloaded variable 'win' into two for their specific purposes:
recwin and sendwin. This removes a big source of confusion and makes
following the code much easier.
Reviewed by: sam (mentor)
Obtained from: DragonFlyBSD rev 1.6 (hsu)
cperciva [Thu, 22 Jan 2004 21:01:14 +0000 (21:01 +0000)]
Two fixes for script(1):
1. Don't do tty stuff to stdin if stdin isn't a tty.
2. When running in non-interactive mode, don't select(2)
on the standard input.
ru [Thu, 22 Jan 2004 17:51:02 +0000 (17:51 +0000)]
Catch up with etc/Makefile,v 1.324 -- split "install" and "distribution"
targets, have "distribution" always install original (as from the release
media) files, whether SENDMAIL_MC is set or not. Do error handling the
make(1) way.
jhb [Thu, 22 Jan 2004 16:07:03 +0000 (16:07 +0000)]
Fix the PCI attach routine to properly setup the IRQ and port resource
rid's and to deallocate resources if a failure occurs during attach. This
patch also fixes the driver to return failure if bus_alloc_resource() for
the IRQ fails rather than panic'ing on the next line by passing a NULL
resource to bus_setup_intr(). The other attachments already do all this.
rse [Thu, 22 Jan 2004 13:34:11 +0000 (13:34 +0000)]
Fix generation of random multicast MAC address.
In case no real/physical IEEE 802 address is available, both the expired
"draft-leach-uuids-guids-01" (section "4. Node IDs when no IEEE 802
network card is available") and RFC 2518 (section "6.4.1 Node Field
Generation Without the IEEE 802 Address") recommend (quoted from RFC
2518):
"The ideal solution is to obtain a 47 bit cryptographic quality random
number, and use it as the low 47 bits of the node ID, with the _most_
significant bit of the first octet of the node ID set to 1. This bit
is the unicast/multicast bit, which will never be set in IEEE 802
addresses obtained from network cards; hence, there can never be a
conflict between UUIDs generated by machines with and without network
cards."
Unfortunately, this incorrectly explains how to implement this and
the FreeBSD UUID generator code inherited this generation bug from
the broken reference code in the standards draft. They should instead
specify the "_least_ significant bit of the first octet of the node ID"
as the multicast bit in a memory and hexadecimal string representation
of a 48-bit IEEE 802 MAC address.
This standards bug arised from a false interpretation, as the multicast
bit is actually the _most_ significant bit in IEEE 802.3 (Ethernet)
_transmission order_ of an IEEE 802 MAC address. The standards authors
forgot that the bitwise order of an _octet_ from a MAC address _memory_
and hexadecimal string representation is still always from left (MSB,
bit 7) to right (LSB, bit 0).
Fortunately, this UUID generation bug could have occurred on systems
without any Ethernet NICs only.
grehan [Thu, 22 Jan 2004 07:23:36 +0000 (07:23 +0000)]
Userland signed char fixes for PPC build. Problems were using a char
return for getopt() and comparing to -1, ditto with fgetc() and EOF,
and using the kg_nice value from <sys/user.h>
Submitted by: Stefan Farfeleder <stefan@fafoe.narf.at>
Reviewed by: obrien, bde (a while back)
Tested lightly on: ppc, i386, make universe
grehan [Thu, 22 Jan 2004 06:56:00 +0000 (06:56 +0000)]
Make proc's kg_nice/ki_nice explicitly signed for PPC. This is a
no-op on {i386/alpha/ia64/sparc64} where chars are signed by
default. Should help ARM and S390 which also suffer from this.
Tested on: ppc, i386, objdump disasm before/after diffs
Reviewed by: obrien, bde (a while back)
cperciva [Thu, 22 Jan 2004 04:33:00 +0000 (04:33 +0000)]
Fix alignment of size field in `ls -lh` -- the width was being computed
from log[10](largest file size), but when outputting in human-friendly
format the width is always at most 4. (eg. "123K", " 12K", "1.2K".)
cperciva [Thu, 22 Jan 2004 04:24:15 +0000 (04:24 +0000)]
Two fixes here:
1. If fgets fails, don't go into an infinite cpu-intensive loop. Instead,
check to see if the terminal still exists, and sleep(1) otherwise.
2. When we check to see if the terminal still exists, make sure we're not
mislead by EINTR. This could have been a security issue, but fortunately
the current implementation of tcgetattr doesn't EINTR.
onoe [Thu, 22 Jan 2004 03:23:28 +0000 (03:23 +0000)]
Fix definition of IFM_MODE, which should be refrected the change of
IFM_IEEE80211_ mode. Also ifconfig(8) must be recompiled.
Pointed out by Sam Leffeler.