obrien [Wed, 16 May 2001 22:21:43 +0000 (22:21 +0000)]
Move the int typedefs to the top so they can be used in defining other types.
Ensure every platform has __offsetof.
Make multiple inclusion detection consistent with other
<platform>/include/*.h files.
nsayer [Wed, 16 May 2001 20:34:42 +0000 (20:34 +0000)]
Since the root-on-insecure-tty code was added to telnetd, a dependency
on char *line was added to libtelnet. Put a dummy one in to keep the
linker happy.
nsayer [Wed, 16 May 2001 18:27:09 +0000 (18:27 +0000)]
Catch any attempted buffer overflows. The magic numbers in this code
(512) are a little distressing, but the method really needs to be
extended to allow server-supplied DH parameters anyway.
iedowse [Wed, 16 May 2001 18:04:37 +0000 (18:04 +0000)]
Change the second argument of vflush() to an integer that specifies
the number of references on the filesystem root vnode to be both
expected and released. Many filesystems hold an extra reference on
the filesystem root vnode, which must be accounted for when
determining if the filesystem is busy and then released if it isn't
busy. The old `skipvp' approach required individual filesystem
xxx_unmount functions to re-implement much of vflush()'s logic to
deal with the root vnode.
All 9 filesystems that hold an extra reference on the root vnode
got the logic wrong in the case of forced unmounts, so `umount -f'
would always fail if there were any extra root vnode references.
Fix this issue centrally in vflush(), now that we can.
This commit also fixes a vnode reference leak in devfs, which could
result in idle devfs filesystems that refuse to unmount.
imp [Wed, 16 May 2001 07:32:04 +0000 (07:32 +0000)]
Separate out isa attachment to its own file. The pci attachment will
soon attach directly to pcic rather than the kludge pci-pcic device we
have now.
In some ways, this is similar to the work PAO3 did to try to support
cardbus bridges. In some ways different. This and future commits
will be taking from the spirit of many of those changes. pcicvar.h is
completely different from the pcicvar.h that appeared in PAO3, but
similar in concept.
jhb [Wed, 16 May 2001 00:47:27 +0000 (00:47 +0000)]
Lock the procfs functions for doing a single step and reading/writing
registers better. Hold sched_lock not only for checking the flag but
also while performing the actual operation to ensure the process doesn't
get swapped out by another CPU while we the operation is being performed.
imp [Tue, 15 May 2001 23:34:42 +0000 (23:34 +0000)]
A new driver for the MECIA. This is the NEC Original PCMCIA
controller found in many of the early NOTE98 machines that were
produced. This controller is completely unlike the intel 82365, so
I've separated it out from the main pcic driver.
jhb [Tue, 15 May 2001 23:13:58 +0000 (23:13 +0000)]
- Remove unneeded include of sys/ipl.h.
- Require the proc lock be held for killproc() to allow for the vmdaemon to
kill a process when memory is exhausted while holding the lock of the
process to kill.
jhb [Tue, 15 May 2001 22:20:44 +0000 (22:20 +0000)]
- Use PROC_LOCK_ASSERT instead of a direct mtx_assert.
- Don't hold Giant in the swapper daemon while we walk the list of
processes looking for a process to swap back in.
- Don't bother grabbing the sched_lock while checking a process' sleep
time in swapout_procs() to ensure that a process has been idle for at
least swap_idle_threshold2 before swapping it out. If we lose the race
we just let a process stay in memory until the next call of
swapout_procs().
- Remove some unneeded spl's, sched_lock does all the locking needed in
this case.
wpaul [Tue, 15 May 2001 22:19:50 +0000 (22:19 +0000)]
Fix instance of (struct ti_softc *) that should have been
(struct nge_softc *), which the compiler never complained about.
I guess it doesn't matter, a pointer is a pointer, but looked weird
to me.
wpaul [Tue, 15 May 2001 21:42:43 +0000 (21:42 +0000)]
Adjust the descriptor structures a little by making the software parts
be unions with enough padding to make sure they always end up being
a multiple of 8 bytes in size, since the 83820/83821 chips require
descriptors to be aligned on 64-bit boundaries. I happened to get it
right for the 32-bit descriptor/x86 case, but botched everything else.
Things should work properle on 32-bit/64-bit platforms now.
Note that the 64-bit descriptor format isn't being used currently.
gibbs [Tue, 15 May 2001 19:41:12 +0000 (19:41 +0000)]
ahc_eisa.c:
ahc_pci.c:
Prepare for making ahc a module by adding module dependency
and version info.
aic7770.c:
Remove linux header ifdefs. The headers are handled differently
in Linux where local includes (those using "'s instead of <>'s)
are allowed.
Don't map our interrupt until after we are fully setup to
handle interrupts. Our interrupt line may be shared so
an interrupt could occur at any time.
aic7xxx.c:
Remove linux header ifdefs.
current->curr to avoid Linux's use of current as a
#define for the current task on some architectures.
Add a helper function, ahc_assert_atn(), for use in
message phases we handle manually. This hides the fact
that U160 chips with the expected phase matching disabled
need to have SCSISIGO updated differently.
if (ahc_check_residual(scb) != 0)
ahc_calc_residual(scb);
else
ahc_set_residual(scb, 0);
becomes:
ahc_update_residual(scb);
Modify scsi parity error (or CRC error) handling to
reflect expected phase being disabled on U160 chips.
Move SELTO handling above BUSFREE handling so we can
use the new busfree interrupt behavior on U160 chips.
In ahc_build_transfer_msg() filter the period and ppr_options
prior to deciding whether a PPR message is required.
ppr_options may be forced to zero which will effect our
decision.
Correct a long standing but latent bug in ahc_find_syncrate().
We could choose a DT only rate even though DT transfers were
disabled. In the CAM environment this was unlikely as CAM
filters our rate to a non-DT value if the device does not
support such rates.
When displaing controller characteristics, include the
speed of the chip. This way we can modify the transfer
speed based on optional features that are enabled/disabled
in a particular application.
Add support for switching from fully blown tagged queing
to just using simple queue tags should the device reject
an ordered tag.
Remove per-target "current" disconnect and tag queuing
enable flags. These should be per-device and are not
referenced internally be the driver, so we let the OSM
track this state if it needs to.
Use SCSI-3 message terminology.
aic7xxx.h:
The real 7850 does not support Ultra modes, but there are
several cards that use the generic 7850 PCI ID even though
they are using an Ultra capable chip (7859/7860). We start
out with the AHC_ULTRA feature set and then check the
DEVSTATUS register to determine if the capability is really
present.
current -> curr
ahc_calc_residual() is no longer static allowing it to
be called from ahc_update_residual() in aic7xxx_inline.h.
Update some serial eeprom definitions for the latest
BIOS versions.
aic7xxx.reg:
Add a combined DATA_PHASE mask to the SCSIPHASE register
definition to simplify some sequencer code.
aic7xxx.seq:
Take advantage of some performance features available only
on the U160 chips. The auto-ack feature allows us to ack
data-in phases up to the data-fifo size while the sequencer
is still setting up the DMA engine. This greatly reduces
read transfer latency and simplifies testing for transfer
complete (check SCSIEN only). We also disable the expected
phase feature, and enable the new bus free interrupt behavior,
to avoid a few instructions.
Re-arrange the Ultra2+ data phase handling to allow us to
do more work in parallel with the data fifo flushing on a
read.
On an SDTR, ack the message immediately so the target can
prepare the next phase or message byte in parallel with
our work to honor the message.
aic7xxx_93cx6.c:
Remove linux header ifdefs.
aic7xxx_freebsd.c:
current -> curr
Add a module event handler.
Handle tag downgrades in our ahc_send_async() handler.
We won't be able to downgrade to "basic queuing" until
CAM is made aware of this queuing type.
gshapiro [Tue, 15 May 2001 16:01:40 +0000 (16:01 +0000)]
Make the default .mc file be `hostname`.mc if SENDMAIL_MC make.conf knob
is not set. This allows admins to create a per-machine configuration file
while leaving the freebsd.mc template pristine. Provide a rule to create
`hostname`.mc from freebsd.mc if it doesn't exist.
tanimura [Tue, 15 May 2001 10:19:57 +0000 (10:19 +0000)]
Back out scanning file descriptors with holding a process lock.
selrecord() requires allproc sx in pfind(), resulting in lock order
reversal between allproc and a process lock.
peter [Tue, 15 May 2001 09:52:03 +0000 (09:52 +0000)]
Hack to work around braindeath in libtelnet:sra.c. The sra.o file
references global variables from telnetd, but is also linked into
telnet as well. I was tempted to back out the last sra.c change
as it is 100% bogus and should be taken out and shot, but for now
this bandaid should get world working again. :-(
nsayer [Tue, 15 May 2001 05:13:45 +0000 (05:13 +0000)]
Add battery state monitoring to apmd.
The new syntax available in the config file is:
apm_battery [0-9]+(%|[Mm) (dis|)charging { ... }
The stuff in the braces is the same as the existing case. nn% checks for
a certain percentage of life remaining and nnM checks for a cerain
number of minutes remaining. Specifying "discharge" means that you're
interested in knowing when the battery reaches a certain level while AC
power is off, "charging" the opposite.
The man page needs to be updated.
The code can be fooled. If you SIGHUP the daemon and the battery level
matches a rule it will be performed once per SIGHUP. If the battery
level matches a rule and you repeatedly apply and take away AC power,
the rule will be run once per occurance. This, however, is a feature.
:-) The code also only runs when select() times out, so getting APM
events more often than the timeout interval will result in the rules not
being run. These are things that remain to be overcome.
nsayer [Tue, 15 May 2001 04:47:14 +0000 (04:47 +0000)]
If the uid of the attempted authentication is 0 and if the pty is
insecure, do not succeed. Copied from login.c. This functionality really
should be a PAM module.
dd [Tue, 15 May 2001 00:31:19 +0000 (00:31 +0000)]
Add a -J replstr option that allows the user to tell xargs to insert
the data read from standard input at a specific point in the command
line arguments rather than at the end.
imp [Mon, 14 May 2001 23:08:58 +0000 (23:08 +0000)]
Remove static array of slots. We now have state information for each
slot in a softc for each unit that we probe. Also remove validunits
static, since it is no longer necessary.
obrien [Mon, 14 May 2001 22:45:26 +0000 (22:45 +0000)]
Make it easy for people to use define DWARF2 exceptions unwinding.
If "WANT_DWARF2_UNWIND" you get it. Note that this is a different C++ ABI
than the FreeBSD default. So you will need to recompile all your C++ apps
that uses exceptions if you turn this on. I am adding it here for Yahoo!'s
use and for those that want to be early adopters to what I will make as the
default with the GCC 3.0 import.
bmah [Mon, 14 May 2001 22:31:51 +0000 (22:31 +0000)]
In some cases, there are some <sect1></sect1> elements that will have
version control information that is different from the rest of their
containing document (or at least other sections). For release notes
only, allow output of <sect1info><pubdate></pubdate></sect1info>
text, and add it to three sections of RELNOTESng where it's kind of
important ("What's New" in the release notes, "Supported Device" in
the arch-independent hardware list, and the processors section of the
alpha hardware list).
imp [Mon, 14 May 2001 21:08:20 +0000 (21:08 +0000)]
Fix the so called "static bug" in polling mode. Some desktop cards
have bad grounding characteristics which allow small static discharges
(or sunspots, we're not 100% sure which) to reach the bridge chip.
This causes the bridge chip to wedge/reset itself. There's no known
cure short of rebooting.
The bug manifests itself by the STAT_CHG return 0xff when read. This
is impossible because the upper bits are reserved (and therefore
zero). In addition, some of the lower bits are one only for memory
cards, which OLDCARD doesn't support, so if they are set, something
seriously foobar'd is going on.
So far we've seen this in exactly one brand of pcmcia <-> isa bridge
which plug and play identifies only as "VIA PCMCIA CARD". This card
just has buffers on the isa card and the actual bridge chip on the
remote slot, which is connected by long ribbon cables. We think this
long cable run, coupled with the lack of coupling capacitors is a
major reason why it is so static sensitive while its bretheren aren't.
joerg [Mon, 14 May 2001 20:22:49 +0000 (20:22 +0000)]
Initial import of fdread(1), a logical counterpart to fdwrite(1).
Its main purpose is to adapt automatically to the floppy parameters
(in particular the track size for efficient reading), and to allow a
simple error recovery for CRC-errored sectors. Requires the newly
added fdc(4) options.
wpaul [Mon, 14 May 2001 19:13:02 +0000 (19:13 +0000)]
Close PR 22208: bring chip out of suspend mode, because Windows might
have put the chip to sleep at shutdown. This is really only for the
VT6102, but it doesn't hurt the older chips.