wosch [Fri, 30 Mar 2001 10:31:46 +0000 (10:31 +0000)]
* A comment in apropos.sh contains the misspelled word
"locailzed"; it should read "localized".
* The "test" operator can be a bit dangerous (e.g., if
a newbie writes a script named "test" and has it call
"apropos", which calls "test, ...).
* In its use as "whatis", apropos formats the first
line of the output differently than the following
lines. Specifically, it leaves out all but one of
the spaces that precede the dash in the first line.
peter [Fri, 30 Mar 2001 10:25:40 +0000 (10:25 +0000)]
Integrate the IPv6 entries with the rest of them to avoid things getting
out of sync. A similar change was made by itojun on the OpenBSD tree
a few weeks ago. This should stop people disabling one server and
forgetting the other one (eg: ftp and/or telnet)
ru [Fri, 30 Mar 2001 08:04:25 +0000 (08:04 +0000)]
`buildopts' may affect the selection of object files.
Make sure we pass $(BUILDOPTS) to the `clean' target
so that `make clean' works on the same set of object
files. Otherwise, we may end up with an incorrectly
built and up-to-date object file.
rwatson [Thu, 29 Mar 2001 22:59:44 +0000 (22:59 +0000)]
o Restructure privilege check associated with process visibility for
ps_showallprocs such that if superuser is present to override process
hiding, the search falls through [to success]. When additional
restrictions are placed on process visibility, such as MAC, new clauses
will be placed above the return(0).
obrien [Thu, 29 Mar 2001 20:18:45 +0000 (20:18 +0000)]
Removed the ``#if 0'' that turned bounds_check_with_label() into worse
than a NOP. bounds_check_with_label() would return -1 yet NOT set any
of the bio flags to show an error. This meant the caller would not
properly see that bounds_check_with_label() did not do any work. This
prevented newfs(8) from being able to write a file system on any partition
other than `c' on a `ccd'.
The logs of this file do not tell _why_ bounds_check_with_label() was
emasculated. Nor are there any `XXX' comments. So we'll unemasculated
it, and see what breaks.
wpaul [Thu, 29 Mar 2001 19:11:45 +0000 (19:11 +0000)]
Fix a couple style nits, no code changes. Turn one magic number into
a #defined constant, wrap a few long lines, etc... Also remove stupid
'all your base are belong to us' joke from comment that I don't really
care to see immortalized in the source tree.
orion [Thu, 29 Mar 2001 15:36:31 +0000 (15:36 +0000)]
- Added suspend/resume support.
- Added 4 speaker enable to initialization sequence.
- Removed delays between register pokes which appear to aggravate a
problem this card has sampling at 44.1kHz. With any form of delay,
skew relative to system clock at 44.1kHz is usually in range 0-25%
(now 0-3%). No other rates exhibit this problem.
- Changed structs cmi_* to sc_*.
Approved by: Cameron Grant <gandalf@vilnya.demon.co.uk>
asmodai [Thu, 29 Mar 2001 14:04:19 +0000 (14:04 +0000)]
Change NO_MAKEDEV to a finer granularity method:
NO_MAKEDEV_INSTALL and NO_MAKEDEV_RUN. The former implying the latter.
The names imply what they do. The last commit by DES based on a PR defeated
the original idea behind NO_MAKEDEV, which was not to run MAKEDEV, but to do
the installation of MAKEDEV. This should satisfy both parties on the MAKEDEV
challenge.
Reflect this in mergemaster, this might later on be decided to be set to
NO_MAKEDEV_INSTALL, for now I kept to the old behaviour.
asmodai [Thu, 29 Mar 2001 14:03:29 +0000 (14:03 +0000)]
Change NO_MAKEDEV to a finer granularity method:
NO_MAKEDEV_INSTALL and NO_MAKEDEV_RUN. The former implying the latter.
The names imply what they do. The last commit by DES based on a PR defeated
the original idea behind NO_MAKEDEV, which was not to run MAKEDEV, but to do
the installation of MAKEDEV. This should satisfy both parties on the MAKEDEV
challenge.
Reflect this in the documentation.
asmodai [Thu, 29 Mar 2001 14:03:07 +0000 (14:03 +0000)]
Change NO_MAKEDEV to a finer granularity method:
NO_MAKEDEV_INSTALL and NO_MAKEDEV_RUN. The former implying the latter.
The names imply what they do. The last commit by DES based on a PR defeated
the original idea behind NO_MAKEDEV, which was not to run MAKEDEV, but to do
the installation of MAKEDEV. This should satisfy both parties on the MAKEDEV
challenge.
bde [Thu, 29 Mar 2001 10:06:50 +0000 (10:06 +0000)]
Fixed wrong include in synopsis. <sys/param.h> is a prerequisite for
<sys/mutex.h> due to #include spam in <sys/mutex.h>. (More precisely,
<sys/time.h> is the prerequisite, but that is provided by standard
#include spam in <sys/param.h>.)
gibbs [Thu, 29 Mar 2001 00:36:35 +0000 (00:36 +0000)]
aic7770.c:
aic7xxx_pci.c:
Enable board generation of interrupts only once our handler is
in place and all other setup has occurred.
aic7xxx.c:
More conversion of data types to ahc_* names. tmode_tstate and
tmode_lstate are the latest victims.
Clean up the check condition path by branching early rather
than indenting a giant block of code.
Add support for target mode initiated sync negotiation.
The code has been tested by forcing the feature on for
all devices, but for the moment is left inaccesible until
a decent mechanism for controlling the behavior is complete.
Implementing this feature required the removal of the
old "target message request" mechanism. The old method
required setting one of the 16 bit fields to initiate
negotiation with a particular target. This had the nice
effect of being easy to change the request and have it
effect the next command. We now set the MK_MESSAGE bit
on any new command when negotiation is required. When
the negotiation is successful, we walk through and clean
up the bit on any pending commands. Since we have to walk
the commands to reset the SCSI syncrate values so no additional
work is required. The only drawback of this approach is that
the negotiation is deferred until the next command is queued to
the controller. On the plus side, we regain two bytes of
sequencer scratch ram and 6 sequencer instructions.
When cleaning up a target mode instance, never remove the
"master" target mode state object. The master contains
all of the saved SEEPROM settings that control things like
transfer negotiations. This data will be cloned as the
defaults if a target mode instance is re-instantiated.
Correct a bug in ahc_set_width(). We neglected to update
the pending scbs to reflect the new parameters. Since
wide negotiation is almost always followed by sync
negotiation it is doubtful that this had any real
effect.
When in the target role, don't complain about
"Target Initiated" negotiation requests when an initiator
negotiates with us.
Defer enabling board interrupts until after ahc_intr_enable()
is called.
Pull all info that used to be in ahc_timeout for the FreeBSD
OSM into ahc_dump_card_state(). This info should be printed
out on all platforms.
aic7xxx.h:
Add the SCB_AUTO_NEGOITATE scb flag. This allows us to
discern the reason the MK_MESSAGE flag is set in the hscb
control byte. We only want to clear MK_MESSAGE in
ahc_update_pending_scbs() if the MK_MESSAGE was set due
to an auto transfer negotiation.
Add the auto_negotiate bitfield for each tstate so that
behavior can be controlled for each of our enabled SCSI
IDs.
Use a bus interrupt handler vector in our softc rather
than hard coding the PCI interrupt handler. This makes
it easier to build the different bus attachments to
the aic7xxx driver as modules.
aic7xxx.reg:
Remove the TARGET_MSG_REQUEST definition for sequencer ram.
aic7xxx.seq:
Fix a few target mode bugs:
o If MK_MESSAGE is set in an SCB, transition to
message in phase and notify the kernel so that
message delivery can occur. This is currently
only used for target mode initiated transfer
negotiation.
o Allow a continue target I/O to compile without
executing a status phase or disconnecting. If
we have not been granted the disconnect privledge
but this transfer is larger than MAXPHYS, it may
take several CTIOs to get the job done.
Remove the tests of the TARGET_MSG_REQUEST field in scratch ram.
aic7xxx_freebsd.c:
Add support for CTIOs that don't disconnect. We now defer
the clearing of our pending target state until we see a
CTIO for that device that has completed sucessfully.
Be sure to return early if we are in a target only role
and see an initiator only CCB type in our action routine.
If a CTIO has the CAM_DIS_DISCONNECT flag set, propogate
this flag to the SCB. This flag has no effect if we've
been asked to deliver status as well. We will complete
the command and release the bus in that case.
Handle the new auto_negotiate field in the tstate correctly.
Make sure that SCBs for "immediate" (i.e. to continue a non
disconnected transaction) CTIO requests get a proper mapping
in the SCB lookup table. Without this, we'll complain when
the transaction completes.
Update ahc_timeout() to reflect the changes to ahc_dump_card_state().
aic7xxx_inline.h:
Use ahc->bus_intr rather than ahc_pci_intr.
peter [Thu, 29 Mar 2001 00:05:51 +0000 (00:05 +0000)]
Hint: usbdevs_data.h and usbdevs.h are marked:
* THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
Put the Epson 1240 scanner device in the correct place.
peter [Wed, 28 Mar 2001 23:55:51 +0000 (23:55 +0000)]
Mostly pick up OpenBSD's rev 1.14 by deraadt@ and millert@.
I've left out a couple of unused args between internal functions.
Use MAXPATHLEN, not MAXPATHLEN + 1 in a couple of places.
Pass a pointer to the end of the target filename space.
rwatson [Wed, 28 Mar 2001 20:50:15 +0000 (20:50 +0000)]
o introduce u_cansee(), which performs access control checks between
two subject ucreds. Unlike p_cansee(), u_cansee() doesn't have
process lock requirements, only valid ucred reference requirements,
so is prefered as process locking improves. For now, back p_cansee()
into u_cansee(), but eventually p_cansee() will go away.
phk [Wed, 28 Mar 2001 17:51:03 +0000 (17:51 +0000)]
Change ntp_flags to "-b" to inspire people to set it right.
Note that "right" in this case is not universally recognized, but
NTP-practittioners as opposed to theoretians generally agree that
getting "inside the window" using ntpdate is TRTTD on PC hardware.
PR: 25514
Submitted by: Chris Johnson <cjohnson-pr@palomine.net>
jhb [Wed, 28 Mar 2001 16:11:51 +0000 (16:11 +0000)]
Close a race condition where if we were obtaining a sleep lock and no spin
locks were held, we could be preempted and switch CPU's in between the time
that we set a variable to the list of spin locks on our CPU and the time
that we checked that variable to ensure no spinlocks were held while
grabbing a sleep lock. Losing the race resulted in checking some other
CPU's spin lock list and bogusly panicing.
yar [Wed, 28 Mar 2001 15:52:12 +0000 (15:52 +0000)]
Fix a number of minor bugs in the VLAN code:
* Initialize the "struct sockaddr_dl sdl" correctly in vlan_setmulti().
PR: kern/22181
* The driver used to call malloc(..., M_NOWAIT), but to not check the
return value. Change malloc(..., M_NOWAIT) to malloc(..., M_WAITOK)
because the corresponding part of code is called from the upper
half of the kernel only.
PR: kern/22181
* Make sure a parent interface is up and running before invoking
its if_start() routine in order to avoid system panic.
PR: kern/22179 kern/24741 i386/25478
* Do not copy all the flags from a parent mindlessly.
PR: kern/22179
* Do not call if_down() on a parent interface if it's already down.
Call if_down() at splimp because if_down() needs that.
ru [Wed, 28 Mar 2001 15:07:48 +0000 (15:07 +0000)]
Define MAN to ${PROG}.1 if no manpages were specified, but still
provide MAN1 for backwards compatibility. Third party software
may still have dependancy lines of this form:
hm [Wed, 28 Mar 2001 14:11:15 +0000 (14:11 +0000)]
In case the driver runs on an HP NetRaid controller, attempt to properly
decode the BIOS and firmware version and announce the board as HP NetRaid.
This has been tested with a NetRaid 3si controller, the BIOS/firmware
printout should also work for other NetRaid controllers but the type
detection for other NetRaids (such as the 1si) will not work due to the
lack of hardware.
jhb [Wed, 28 Mar 2001 12:39:40 +0000 (12:39 +0000)]
- s/mutexes/locks/g in appropriate comments.
- Rename the 'show mutexes' ddb command to 'show locks' since it shows
a list of all the lock objects held by the current process.
ru [Wed, 28 Mar 2001 12:15:22 +0000 (12:15 +0000)]
Merged src/lib/libtelnet rev.1.9 (fixed removing of obsolete shared
library: wrong library directory, wrong library extension and wrong
comment). This is mainly of historical interest, if any. The library
that gets removed is aout.
Also, backout the beforeinstall -> afterinstall change in rev.1.20
that was required to install proper telnet.h into /usr/include/arpa.
The actual problem is in <bsd.lib.mk>, and I am going to fix it.
peter [Wed, 28 Mar 2001 10:56:11 +0000 (10:56 +0000)]
OpenBSD's g_Ctoc() returned a false error when the target buffer was
exactly the right size. Do it differently - pass a length rather than an
end-of-string+1 pointer as this is more convenient anyway. Get rid of
the bogus +1's.
peter [Wed, 28 Mar 2001 09:53:16 +0000 (09:53 +0000)]
Fix g_Ctoc() interface, approximately based on OpenBSD's recent changes.
Also, set gl_pathv to NULL after we free it, especially when dealing
with realloc failures.
jhb [Wed, 28 Mar 2001 09:03:24 +0000 (09:03 +0000)]
Rework the witness code to work with sx locks as well as mutexes.
- Introduce lock classes and lock objects. Each lock class specifies a
name and set of flags (or properties) shared by all locks of a given
type. Currently there are three lock classes: spin mutexes, sleep
mutexes, and sx locks. A lock object specifies properties of an
additional lock along with a lock name and all of the extra stuff needed
to make witness work with a given lock. This abstract lock stuff is
defined in sys/lock.h. The lockmgr constants, types, and prototypes have
been moved to sys/lockmgr.h. For temporary backwards compatability,
sys/lock.h includes sys/lockmgr.h.
- Replace proc->p_spinlocks with a per-CPU list, PCPU(spinlocks), of spin
locks held. By making this per-cpu, we do not have to jump through
magic hoops to deal with sched_lock changing ownership during context
switches.
- Replace proc->p_heldmtx, formerly a list of held sleep mutexes, with
proc->p_sleeplocks, which is a list of held sleep locks including sleep
mutexes and sx locks.
- Add helper macros for logging lock events via the KTR_LOCK KTR logging
level so that the log messages are consistent.
- Add some new flags that can be passed to mtx_init():
- MTX_NOWITNESS - specifies that this lock should be ignored by witness.
This is used for the mutex that blocks a sx lock for example.
- MTX_QUIET - this is not new, but you can pass this to mtx_init() now
and no events will be logged for this lock, so that one doesn't have
to change all the individual mtx_lock/unlock() operations.
- All lock objects maintain an initialized flag. Use this flag to export
a mtx_initialized() macro that can be safely called from drivers. Also,
we on longer walk the all_mtx list if MUTEX_DEBUG is defined as witness
performs the corresponding checks using the initialized flag.
- The lock order reversal messages have been improved to output slightly
more accurate file and line numbers.
jlemon [Wed, 28 Mar 2001 07:01:45 +0000 (07:01 +0000)]
Back out previous commit until I figure out a way to do it properly.
We really want to be able to say "auto NWAY", "limited NWAY", and
"no NWAY". Unfortunately, this does not appear to be possible with
the current mediaopt structure.
jhb [Wed, 28 Mar 2001 03:08:59 +0000 (03:08 +0000)]
- Fix a whitespace bogon with p_blocked.
- Move p_intr_nesting_level, p_aioinfo, and p_ithd into the zero'd area
so that we don't have to explicitly zero them during fork().
jhb [Wed, 28 Mar 2001 02:44:11 +0000 (02:44 +0000)]
Use mtx_intr_enable() on sched_lock to ensure child processes always start
with interrupts enabled rather than calling the no-longer MI function
enable_intr(). This is bogus anyways and in theory shouldn't even be
needed.