Commit Graph

22259 Commits

Author SHA1 Message Date
Bruce Evans
008bec716e Handle slip options in the usual way (generate a dummy options file in
the module Makefile and don't clutter the sources with ifdefs).

Fixed nearby formatting bugs.
2000-09-26 18:34:30 +00:00
Bruce Evans
c22d4cefb0 Removed fresh garbage (old way of configuring number of units) and old
garbage (very old way of configuring INET).

Fixed a style bug (hard-coded ${.TARGET}).
2000-09-26 18:20:37 +00:00
Bruce Evans
44065af7e1 Backed out previous commit (SMPng megacommit: support for garbage added
to ppp_tty.c by the megacommit, and garbage added here).
2000-09-26 18:09:02 +00:00
Bruce Evans
1bcd237fec Removed unused includes (garbage left over/created by the SMPng megacommit). 2000-09-26 17:48:55 +00:00
Mitsuru IWASAKI
72d5eef642 Add struct proc *acpi_thread in acpi_softc. 2000-09-26 17:42:34 +00:00
Takanori Watanabe
e126cbaaca Clear intrrupt before kthread gets ready.
Submitted by:	iwasaki
2000-09-26 12:39:37 +00:00
Takanori Watanabe
0aaa98f3a5 Add event queueing kernel thread and GPE related code. 2000-09-26 12:09:57 +00:00
Mitsuru IWASAKI
ff3f2f5ca4 Document the pmtimer driver.
Pointed-out by:	esu@yk.rim.or.jp (Shinya Esu)
2000-09-26 11:27:30 +00:00
KATO Takenori
0506e3e8c0 Recognize new Pentium III Xeon (stepping A0).
PR:		21233
Submitted by:	ade
2000-09-26 08:59:55 +00:00
Alan Cox
b92bb032d8 aio_qphysio: Eliminate one instance of an out-of-range check that is
performed twice.  Eliminate initialization that is already performed
 by _aio_aqueue.

aio_physwakeup: Eliminate redundant synchronization that is already
 performed by bufdone.
2000-09-26 06:35:22 +00:00
Takanori Watanabe
b9a22da4cf Make size of dynamic loader argument variable to support
various executable file format.

Reviewed by:	peter
2000-09-26 05:09:21 +00:00
Boris Popov
e500f61fde ext2fs depends on ufs code, so update it to properly handle v_lock field.
Noticed by:	bde
2000-09-26 01:31:46 +00:00
Bosko Milekic
9d8c8a672c Finally make do_tcpdrain sysctl live under correct parent, _net_inet_tcp,
as opposed to _debug. Like before, default value remains 1.
2000-09-25 23:40:22 +00:00
Justin T. Gibbs
1c1c47a3e9 Correct a logic mistake introduced in a recent cleanup of
ahc_build_transfer_msg() that would cause use to fail to send the
DT_REQ ppr_option in a PPR message for periods where DT transfers
are required.
2000-09-25 21:56:19 +00:00
Nick Sayer
54d2be5a40 In theory, m_dup should not be necessary, as m_copypacket should be
sifficient. But somewhere (I believe in the UDP stuff), someone is
overwriting an mbuf without calling m_pullup() first. This results in
broad- and multi-cast traffic that is passed through the bridge getting
corrupted.

This should be backed out when there is some assurance that the upper
layers (and I suppose all of the device drivers) are fixed.

Suggested by: archie
2000-09-25 17:24:02 +00:00
Alan Cox
b5fbbe9599 Remove (long) unused fields from struct __aiocb_private. 2000-09-25 17:02:47 +00:00
Boris Popov
4451405fbd Fix vnode locking bugs in the nullfs.
Add correct support for v_object management, so mmap() operation should
work properly.
Add support for extattrctl() routine (submitted by semenu).

At this point nullfs can be considered as functional and much more stable.
In fact, it should behave as a "hard" "symlink" to underlying filesystem.

Reviewed in general by:		mckusick, dillon
Parts of logic obtained from:	NetBSD
2000-09-25 15:38:32 +00:00
Boris Popov
67e871664b Add a lock structure to vnode structure. Previously it was either allocated
separately (nfs, cd9660 etc) or keept as a first element of structure
referenced by v_data pointer(ffs). Such organization leads to known problems
with stacked filesystems.

From this point vop_no*lock*() functions maintain only interlock lock.
vop_std*lock*() functions maintain built-in v_lock structure using lockmgr().
vop_sharedlock() is compatible with vop_stdunlock(), but maintains a shared
lock on vnode.

If filesystem wishes to export lockmgr compatible lock, it can put an address
of this lock to v_vnlock field. This indicates that the upper filesystem
can take advantage of it and use single lock structure for entire (or part)
of stack of vnodes. This field shouldn't be examined or modified by VFS code
except for initialization purposes.

Reviewed in general by:	mckusick
2000-09-25 15:24:04 +00:00
Boris Popov
f568640168 Increase pollution of LK_* name space and add flag LK_THISLAYER which
limits locking depth in the vnode stack by current layer.
2000-09-25 15:04:15 +00:00
Poul-Henning Kamp
93ce5ab049 GC some old no longer supported options. 2000-09-25 12:38:55 +00:00
Daniel C. Sobral
530df9baad Get rid of garbage left on the stack. 2000-09-25 11:36:55 +00:00
Daniel C. Sobral
a360c980c2 What could possibly have possessed me to forget the "0 (arguments)"
in two of the three boot words in the "boot" redefinition, I have no
clue. Fix it.

Noticed by: bp
Noticed by: adrian
2000-09-25 11:18:02 +00:00
Seigo Tanimura
0593938b26 Allocate memory resource to access the attribute memory of a card.
Reviewed by:	imp
2000-09-25 06:01:42 +00:00
Mitsuru IWASAKI
1653e9c321 Formatting fix on ACPI options. Sort them, comment out negative options.
Suggested by:	bde
2000-09-25 02:43:51 +00:00
John Baldwin
65e893c9b9 Fix the assmebly mutex macros to handle saving/restoring interrupt state
properly.  Fix the recursive mutex macros to actually compile.  At the
moment we only use MTX_EXIT anyways.
2000-09-24 23:34:21 +00:00
Søren Schmidt
511e9e7251 Fix the breakage that snatched the ioports from the fdc device.
Fix promise support.
2000-09-24 18:19:43 +00:00
Alexander Langer
4445327516 Add Makefile to build an if_ed kernel module. Works on both, i386 and
alpha.

No response from:	the world
2000-09-24 09:13:54 +00:00
Bosko Milekic
ddacb30f2d Get rid of a panic that occurs in ether_demux() by dereferencing a NULL mbuf
pointer, when bridging and bridge_ipfw are enabled, and when bdg_forward()
happens to free the packet and make our pointer NULL. There may be
more similar problems like this one with calls to bdg_forward().

PR: Related to kern/19551
Reviewed by: jlemon
2000-09-24 04:08:38 +00:00
John Baldwin
fd2802cfe0 Add a KASSERT() to catch instances where the mutex that we pass in to
msleep() are recursed.

Suggested by:	cp
2000-09-24 00:33:51 +00:00
Archie Cobbs
763fcb92c5 Use m_dup() instead of m_copypacket() for the time being. Not all
of the code in the kernel properly checks for read-onlyness before
writing into an mbuf data area. When that code is fixed, the m_dup()
can go back to being m_copypacket().

Requested by:	nsayer
2000-09-23 23:22:27 +00:00
Cameron Grant
29fa94c796 add feeder_fmt.c 2000-09-23 22:21:39 +00:00
Cameron Grant
c9c6ba09e4 prepare for adding a rate conversion feeder.
move format conversion feeders to feeder_fmt.c - no pertinent history so no
repo-copy.
2000-09-23 22:11:32 +00:00
Cameron Grant
33c878f034 only probe mandatory channels on known bad codecs 2000-09-23 22:00:09 +00:00
Hajimu UMEMOTO
20cb9f9efe Make ip6fw as loadable module. 2000-09-23 18:50:59 +00:00
John Baldwin
1204fd85a4 Enable the snd_maestro module and have the snd_driver module depend on it.
Approved by:	cg
2000-09-23 17:35:37 +00:00
John Baldwin
4d7e8d916d Enable the ESS Maesto driver.
Approved by:	cg
2000-09-23 17:10:40 +00:00
Paul Saab
92b123a002 Move MAXCPU from machine/smp.h to machine/param.h to fix breakage
with !SMP kernels.  Also, replace NCPUS with MAXCPU since they are
redundant.
2000-09-23 12:18:06 +00:00
KATO Takenori
b8c4558548 Merged from sys/i386/i386/machdep.c revision 1.411. 2000-09-23 06:38:59 +00:00
KATO Takenori
75a6b88a20 Merged from sys/i386/conf/GENERIC revision 1.279. 2000-09-23 06:38:04 +00:00
KATO Takenori
5159493b40 Merged from sys/conf/options.i386 revision 1.139. 2000-09-23 06:36:46 +00:00
Mike Smith
cc16a42a56 Don't include proc.h now that mutex.h does it for us. 2000-09-23 00:12:31 +00:00
Jason Evans
9a02e8c68f Don't #include <sys/proc.h>, since machine/mutex.h does it now. 2000-09-23 00:01:37 +00:00
Jason Evans
c6d1d1cf5d #include <sys/proc.h> in order to get curproc. This seems to be the lesser
of two evils; the greater evil is requiring sys/proc.h to be included
before including machine/mutex.h.
2000-09-23 00:00:50 +00:00
Paul Saab
7321545f26 Remove the NCPU, NAPIC, NBUS, NINTR config options. Make NAPIC,
NBUS, NINTR dynamic and set NCPU to a maximum of 16 under SMP.

Reviewed by:	peter
2000-09-22 23:40:10 +00:00
Robert Watson
100d2c187c o Introduce vn_extattr_rm(), a helper function in the style of
vn_extattr_get() and vn_extattr_set().  vn_extattr_rm() removes the
  specified extended attribute from a vnode, authorizing the change as
  the kernel (NULL cred).

Obtained from:	TrustedBSD Project
2000-09-22 22:33:13 +00:00
Justin T. Gibbs
083d01f20d Add Perforce RCSIDs for easy revision correlation to my local tree.
Add support for constructing a table of critical section regions in
the firmware image.  The kernel driver will soon have support for
single stepping the sequencer outside of a critical region prior
to starting exception handling.
2000-09-22 22:19:55 +00:00
Justin T. Gibbs
c498406d58 Add Perforce RCSIDs for easy revision correlation to my local tree.
ahc_pci.c:
	Bring back the AHC_ALLOW_MEMIO option at least until the
	memory mapped I/O problem on the SuperMicro 370DR3 is
	better understood.

aic7xxx.c:
	If we see a spurious SCSI interrupt, attempt to clear it and
	continue by unpausing the sequencer.

	Change the interface to ahc_send_async().  Some async messages
	need to be broadcast to all the luns of a target or all the
	targets of a bus.  This is easier to achieve by passing explicit
	channel, target, and lun parameters instead of attempting to
	construct a device info struct to match.

	Filter the sync parameters for the PPR message in exactly the
	same way we do for an old fashioned SDTR message.

	Correct some typos and correct a panic message.

	Handle rejected PPR messages.

	In ahc_handle_msg_reject(), let ahc_build_transfer_msg() build
	any additional transfer messages instead of doing this inline.

aic7xxx.h:
	Increase the size of both msgout_buf and msgin_buf to
	better accomodate PPR messages.

aic7xxx_freebsd.c:
	Update for change in ahc_send_async() parameters.

aic7xxx_freebsd.h
	Update for change in ahc_send_async() parameters.

	Honor AHC_ALLOW_MEMIO.

aic7xxx_pci.c:
	Check the error register before going into full blown PCI
	interrupt handling.  This avoids a few costly PCI configuration
	space reads when we run our PCI interrupt handler because another
	device sharing our interrupt line is more active than we are.

	Also unpause the sequencer after processing a PCI interrupt.
2000-09-22 22:18:05 +00:00
Justin T. Gibbs
ea6487b395 Use quoted includes instead of full path references inside the aic7xxx
sequencer files.  Different platforms place the included files in different
locations and it is easier to modify the include path passed as arguments
to the assembler than adding #ifdef support to the assembler.

Remove a spurious 'nop' instruction.
2000-09-22 22:06:44 +00:00
Justin T. Gibbs
321ea9d933 Use quoted includes instead of full path references inside the aic7xxx
sequencer files.  Different platforms place the included files in different
locations and it is easier to modify the include path passed as arguments
to the assembler than adding #ifdef support to the assembler.
2000-09-22 22:06:28 +00:00
Justin T. Gibbs
430538becb Remove duplicate FreeBSD RCSID. 2000-09-22 22:04:17 +00:00
Bill Paul
7d326fa793 Tweak the aue driver so that the homePNA PHYs will be detected and
attached by the pnaphy driver. This seems to work fine with my sample
ADMtek adapter (which has both 10/100 ethernet and homePNA connectors
and hardware).
2000-09-22 18:53:05 +00:00
Archie Cobbs
ee79f58e34 Remove unnecessary #include's as reported by phk's script. 2000-09-22 16:51:14 +00:00
Jeroen Ruigrok van der Werven
6878e27edd Document which RFC introduced CMSG_SPACE() and CMSG_LEN(). 2000-09-22 14:43:08 +00:00
KATO Takenori
a3e04bd352 Merged from sys/isa/sio.c revision 1.315. 2000-09-22 12:56:55 +00:00
KATO Takenori
3f605d2ffc Merged from sys/i386/i386/machdep.c revision 1.410. 2000-09-22 12:54:50 +00:00
KATO Takenori
7dd8cc5686 Merged from sys/i386/conf/GENERIC revision 1.278. 2000-09-22 12:53:49 +00:00
KATO Takenori
6473734288 Merged from sys/boot/i386/loader/main.c revision 1.23. 2000-09-22 12:51:22 +00:00
KATO Takenori
87eae000dd Merged from sys/boot/i386/libi386/Makefile revision 1.19. 2000-09-22 12:49:15 +00:00
Eivind Eklund
453aaa0dff Style fixes:
* Add lots of comments
* Convert a couple of assertions to KASSERT()
* Minimal whitespace & misapplied {} fixes
* Convert #if 0 to #if COMPILING_LINT for code we presently do not
  support, but want to keep available.

Reviewed by:	adrian, markm
2000-09-22 12:22:36 +00:00
Eivind Eklund
210a5403ee Remove addalias() prototype (staticized in kern/vfs_subr.c) 2000-09-22 11:54:58 +00:00
Eivind Eklund
bba25953af Staticize addalias() 2000-09-22 11:54:48 +00:00
Jeroen Ruigrok van der Werven
04da7244c6 Fix comment about the bsd-api-new-02a draft. This has been superceded
by RFC 2553.
2000-09-22 10:52:00 +00:00
Yoshihiro Takahashi
12ad26560f Removed unneeded include files.
Submitted by:	phk
2000-09-22 09:59:23 +00:00
John Baldwin
e268a9aae5 - Wrap functions and variables that aren't used in the alpha console probe
with #ifndef __alpha__/#endif
- Add function prototypes for functions used during the alpha console
  probe and gdb port setup inside of #ifdef __alpha__/#endif.
2000-09-22 08:42:30 +00:00
John Baldwin
86ab18a705 Fix several 64-bit-ism warnings due to sizeof(int) != sizeof(void *) on
the alpha.
2000-09-22 08:40:05 +00:00
Doug Rabson
8a90ed65a6 Remove atomic_*_{32,64} since they are now inline. If you haven't rebuilt
modules since atomic.h was updated, now is the time.
2000-09-22 08:30:59 +00:00
John Baldwin
7cedb9d130 Fixing a sorting error in teh subsystem list. 7 < 8, not 8 < 7. 2000-09-22 05:49:24 +00:00
John Baldwin
c60db3e23a Teach MTX_EXIT_RECURSE that the recursion count is a 32-bit integer,
not a 16-bit one.
2000-09-22 04:30:33 +00:00
Bill Paul
d9c1afbeab Typo in comment (decent performances -> decent performance). 2000-09-22 04:03:10 +00:00
Bill Paul
325931c901 Make pcn_miibus_readreg() latch onto the first PHY that it finds (as
a result of mii_phy_probe()) and use that rather than hardcoding a
constant. The hardcoded way was too specific to the particular card
I had and caused PHY probing to fail on at least one laptop with a
built-in AMD chip.

Reported by: rjk@grauel.com (Richard J Kuhns)
2000-09-22 03:49:12 +00:00
Mike Smith
bdf3d8b954 Create an event (idle_event) which is invoked every time around the
idle loop.  Machine-dependant code can elect to eg. take power-saving
actions when this event is invoked.
2000-09-22 03:19:24 +00:00
Mike Smith
72b535ef45 Implement halt-on-idle in the !SMP case, which should significantly
reduce power consumption on most systems.
2000-09-22 03:18:20 +00:00
Mike Smith
6595c331f3 Make the EVENTHANDLER mechanism MP-safe. Events can now be invoked
without holding the Giant lock.
2000-09-22 03:17:35 +00:00
Warner Losh
8456e16e24 o Merge in changes to the NetBSD sources:
pcmciavar.h	1.9->1.12
		1.12, enami, minor coding nits
		1.11, augustss, (pcmcia_devinfo NRFB)
		1.10, cgd, add generic lookup routines
	pcmcia.c	1.14->1.23
		1.23, drochner, (probe code printing, NRFB)
		1.22, augustss, KNF
		1.21, uch, (hpcmips tweaks NRFB)
		1.20, chopps, remove bogus debug
		1.19, enami, minor coding nits
		1.18, augustss, (pcmcia_devinfo NRFB)
		1.17, nathanw, LP64 printf fixes
		1.16, cgd, add generic lookup routines
		1.15, aymeric, printf fixes
	NRFB == not relevant to freebsd
o Expand the pccard matching routines to include the ability to match
  against the CIS strings since our current driver database is based on
  that.
o Add lots more ivars to get the information necessary to snag these values.
2000-09-22 01:15:26 +00:00
Mike Smith
e3c457130c Fix a race in ASR_ccbAdd and ASR_ccbRemove, which were both manipulating
the ccb queue without masking interrupts.

Submitted by:	Petr Lampa <lampa@fee.vutbr.cz>
2000-09-21 20:21:30 +00:00
Matt Jacob
aa57fd6fa5 some copyright cleanups 2000-09-21 20:16:04 +00:00
Bill Paul
b2f5cb03e7 Add the PCI device ID for the on-board ethernet controllers on the
Intel 815E motherboard, which I believe is an i82562. Seems to work
just fine with the fxp driver.
2000-09-21 20:01:57 +00:00
Robert Watson
907da7c385 o Permit UFS Extended Attributes to be associated with special devices
and FIFOs.

Obtained from:	TrustedBSD Project
2000-09-21 19:06:02 +00:00
Robert Watson
f0958be482 o Add two constants mapping ACLs into extended attribute names
o Add '.'s in comments to style(9)-ify them.
o Clean up whitespace a little.

Obtained from:	TrustedBSD Project
2000-09-21 19:05:30 +00:00
Robert Watson
988ee790d4 o Change locking rules for VOP_GETACL() to indicate that vnode locks
must be held when retrieving ACLs from vnodes.  This is required for
  EA-based UFS ACL implementations.
o Update vacl_get_acl() so that it does appropriate vnode locking.
o Remove static from M_ACL malloc define so that it is accessible for
  consumers of ACLs other than in kern_acl.c

Obtained from:	TrustedBSD Project
2000-09-21 18:43:32 +00:00
Archie Cobbs
65b9a0da90 Allocate all memory (including within node constructors) with M_NOWAIT
instead of M_WAITOK, to allow for maximum flexibility.
2000-09-21 18:01:23 +00:00
Archie Cobbs
840f71272d Allocate memory with M_NOWAIT instead of M_WAITOK because we could
be called in an interrupt context.
2000-09-21 17:33:33 +00:00
Brian S. Dean
9d90941a83 Add a couple of debug register helper functions to assist in setting
and clearing watchpoints.

Reviewed by:	jwd@FreeBSD.org, -hackers@
2000-09-21 17:07:27 +00:00
Matt Jacob
c0cfc79790 Inintialize the queue index stuff from what the f/w sends back- just
in case it's insane enough to not do what you tell it to.

Print out (LOGINFO level) initiator ID.
2000-09-21 17:06:45 +00:00
Matt Jacob
e685c1a69e Remove unneeded include
(from phk@freebsd.org)
2000-09-21 17:05:32 +00:00
Matt Jacob
d33f5e590e remove unneeded includes
(obtained from phk@freebsd.org)
2000-09-21 16:32:38 +00:00
Alfred Perlstein
21a9039725 comment vfs_export functions, requested by: eivind 2000-09-21 15:55:55 +00:00
Mitsuru IWASAKI
fe44e2ea94 Fix LINT breakage by options ACPI_NO_OSDFUNC_INLINE.
Also space/tab-fix in NOTE.
Grrr, my bad.

Pointed-out by:	eivind
2000-09-21 13:01:19 +00:00
Don Lewis
eabc23efb3 Remove unneeded #include that was a remnant of an earlier version of
my uidinfo patch.

Found by:	phk
2000-09-21 09:04:17 +00:00
John Baldwin
1fe4c660db Add in and document two new debugging options used in the mutex code:
SMP_DEBUG and WITNESS.
2000-09-21 06:56:11 +00:00
Ruslan Ermilov
0122d6f195 Fixed the calculations with UDP header length field.
The field is in network byte order and contains the
size of the header.

Reviewed by:	brian
2000-09-21 06:52:59 +00:00
John Baldwin
c508c1b632 Add in documentation and examples of the KTR kernel config options.
Prompted by:	phk's kernel include script
2000-09-21 06:50:02 +00:00
Mark Murray
4a8612fd41 Remove unneeded includes.
Submitted by:	phk
2000-09-21 06:23:16 +00:00
Mitsuru IWASAKI
80d92dc27e Add new function in AML interpreter; aml_invoke_method().
Also remove unneeded includes in aml_obj.c and aml_parse.c.

This new function takes 'struct aml_name *' as a argument rather than
'char *' where aml_invoke_method_by_name() does.  It's worth to have
these two interfaces in many cases.
2000-09-20 22:53:39 +00:00
Warner Losh
d186a392ba o Remove 9 unnecessary includes.
o Add Vpp power at 5.0V rather than 0. Setting it to zero violates
  the pccard spec.  Most pcic devices in use today don't let us
  violate the spec, but some older ones do.  Bill Paul sent this to
  me a long time ago and I thought I'd commit it before now.
o Add some debug stuff hidden behind bootverbose.
2000-09-20 20:02:49 +00:00
Warner Losh
ab708f6194 No need to generate opt_compat_oldisa.h 2000-09-20 19:52:03 +00:00
Warner Losh
4d678f2674 remove 5 unnecessary includes, per phk's script 2000-09-20 19:34:17 +00:00
Warner Losh
07dad7e607 Remove 7 unnecessary includes frmo phk's script 2000-09-20 19:31:37 +00:00
Warner Losh
baebc9fa44 Remove 8 unnecessary includes from phk's script 2000-09-20 19:05:32 +00:00
Archie Cobbs
474afc4230 Add support for the "nullconsole" console type, for systems with
neither a video console nor a serial port. Use it if the RB_MUTE
flag is set.

Submitted by:	Doug Ambrisko <ambrisko@whistle.com>
Reviewed by:	jhb
2000-09-20 18:13:36 +00:00
Bill Paul
94741b4657 Remove one debug line that snuck in by accident. 2000-09-20 17:32:17 +00:00
Bill Paul
73334a4329 Add a new driver for the AMD PCnet/FAST, FAST+ and Home PCI adapters.
Previously, these cards were supported by the lnc driver (and they
still are, but the pcn driver will claim them first), which is fine
except the lnc driver runs them in 16-bit LANCE compatibility mode.
The pcn driver runs these chips in 32-bit mode and uses the RX alignment
feature to achieve zero-copy receive. (Which puts it in the same
class as the xl, fxp and tl chipsets.) This driver is also MI, so it
will work on the x86 and alpha platforms. (The lnc driver is still
needed to support non-PCI cards. At some point, I'll need to newbusify
it so that it too will me MI.)

The Am79c978 HomePNA adapter is also supported.
2000-09-20 17:30:22 +00:00
Robert Watson
e084835893 o Add additional comment describing vaccess() behavior.
Requested by:	eivind
Reviewed by:	eivind, adrian
2000-09-20 17:18:12 +00:00
Bill Paul
b54acb744c Add a homePNA PHY driver. This is really only a stub: MII-based homePNA
PHYs tend to look like 10mbps PHYs with no autonegotiation. This allows
us to display the proper media type and link status however.
2000-09-20 17:04:30 +00:00
Bill Paul
337771f919 regenerate 2000-09-20 17:02:32 +00:00
Bill Paul
9d960ff86d Add the ID for the built-in homePNA PHY in the AMD 79C798 controller. 2000-09-20 17:02:16 +00:00
Søren Schmidt
e7590dc69d Clean up the VIA id's a bit and add the K[TX]133 chipsets 2000-09-20 07:05:44 +00:00
Søren Schmidt
c50cf4ac06 Remove unneeded includes
Pointed out by: phk
2000-09-20 07:00:24 +00:00
Justin T. Gibbs
dfd86f14c0 Remove the last two uses of ahc->unit in the FreeBSD version of the driver.
ahc->unit is depricated and will be going away as soon as the Linux
driver catches up.  In the FreeBSD case, it is always initialized to 0
and this caused some strangeness in registering multiple ahc controllers
with CAM.

Noticed by:	Tor.Egge@fast.no
2000-09-20 04:46:15 +00:00
Mitsuru IWASAKI
d9e2f78b50 Ignore power button and sleep button events for 5 sec.
Wakeup event is generated by power button and/or sleep button on some
laptops but this also generates SCI interrupt, and shutdown the system
as result.  So this kind of mechanism is introduced so that acpi
driver ignore given events for certain period.
2000-09-20 01:53:11 +00:00
Mitsuru IWASAKI
c369b3b021 Improve region I/O sub-routines by re-writing most of low level part
of AML interpreter.
 - Delete and cleanup a lot of almost duplicated code in kernel/userland.
 - Add new common functions for kernel/userland code.
      aml_adjust_readvalue(), aml_adjust_updatevalue(),
      aml_region_handle_alloc(), aml_region_handle_free() and
      aml_region_io().
 - Add primitive functions for both versions of kernel/userland in order to
   have shared code as much as possible.
      aml_region_read_simple(), aml_region_write_simple(),
      aml_region_prompt_read(), aml_region_prompt_write() and
      aml_region_prompt_update_value().
 - Consider update rule and access type in field flags. Also add a lot of
   definitions for the flags.
 - Fix bugs on bit manipulation for read/write operations.
 - Fix bugs on IndexField I/O part.  Also add workaround for temporary
   object corruption during StoreOp interpretation.
2000-09-20 01:01:32 +00:00
Bill Paul
857fd445c3 If this is a Davicom DM9102A and we're enabling the homePNA link, force
dc_link to 1 and don't activate the tick routine. Without this, dc_start()
always thinks the link is down and never transmits in homePNA mode.
2000-09-20 00:59:17 +00:00
Mike Smith
ead270f1e3 Mention the AAC_COMPAT_LINUX option 2000-09-19 23:56:27 +00:00
Peter Wemm
6413a4bc9d Fully initialize msqids[]. This could lead to ENOSPC and other strange
stuff.

PR: 21085
Submitted by:  Marcin Cieslak <saper@SYSTEM.PL>
2000-09-19 22:59:22 +00:00
Warner Losh
90c1e037f3 Add card_if.h 2000-09-19 14:24:55 +00:00
Søren Schmidt
8563f77dc9 Add support for tagged queuing on ATA drives. There is only support for
IBM's DPTA and DTLA series of drives (no other disk vendors are known
to support this) on non-Promise controllers (promise controllers lockup
when given the tagged queuing specific commands).
It gives especially master/slave comboes about 5% better performance.

Add support for the Promise ATA100 OEM chip (pdc20265)

Add support for the Cyrix 5530

Change the way status is read from the drives, use the alternate
status reg when possible.

Better support for DEVFS, the acdXtY devices are now created when needed.

Lots of little cleanups.
2000-09-19 11:08:39 +00:00
Eivind Eklund
300019c450 Better error message when booting an SMP kernel on an UP system. 2000-09-19 10:40:52 +00:00
Eivind Eklund
c16dc61bd2 Document ENABLE_VFS_IOOPT 2000-09-19 10:36:19 +00:00
Poul-Henning Kamp
b0d17ba69e Rename lminor() to dev2unit(). This function gives a linear unit number
which hides the 'hole' in the minor bits.

Introduce unit2minor() to do the reverse operation.

Fix some some make_dev() calls which didn't use UID_* or GID_* macros.

Kill the v_hashchain alias macro, it hides the real relationship.

Introduce experimental SI_CHEAPCLONE flag set it on cloned bpfs.
2000-09-19 10:28:44 +00:00
Poul-Henning Kamp
19cf3044c1 GC some LFS lint. 2000-09-19 10:25:01 +00:00
Julian Elischer
a62b20c4a1 When sending a packet back to a network interface to simulate an arrived
packet, make sure that the packet has the interface marked in the first mbuf,
the same a truely arrived packets would have.
2000-09-19 08:35:44 +00:00
Warner Losh
2276cee521 Implement indirection in the pccard probe/attach. This should make it
possible to have different probe/attach semantics between the two
systems and yet still use the same driver for both.

Compatibility methods for OLDCARD drivers.  We use these routines to make
it possible to call the OLDCARD driver's probe routine in the context that
it expects.  For OLDCARD these are implemented as pass throughs to the
device_{probe,attach} routines.  For NEWCARD they are implemented such
such that probe becomes strictly a matching routine and attach does both
the old probe and old attach.

compat devices should use the following:

	/* Device interface */
	DEVMETHOD(device_probe),	pccard_compat_probe),
	DEVMETHOD(device_attach),	pccard_compat_attach),
	/* Card interface */
	DEVMETHOD(card_compat_match,	foo_match),	/* newly written */
	DEVMETHOD(card_compat_probe,	foo_probe),	/* old probe */
	DEVMETHOD(card_compat_attach,	foo_attach),	/* old attach */

This will allow a single driver binary image to be used for both
OLDCARD and NEWCARD.

Drivers wishing to not retain OLDCARD compatibility needn't do this.

ep driver minorly updated.

sn driver updated more than minorly.  Add module dependencies to allow
module to load.  Also change name to if_sn.  Add some debugging code.
attempt to fix the cannot allocate memory problem I'd been seeing.
Minor formatting nits.
2000-09-19 04:39:20 +00:00
Jonathan Lemon
8343765bcb Allow the user to make direct BIOS intcalls (via vm86 system) if they
successfully authenticate as root via the suser() call.
2000-09-19 03:27:31 +00:00
Archie Cobbs
2b9cf2f709 Rename "struct session" to "struct sess_con" to avoid conflict with
upcoming "struct session" in proc.h.

Requested by:	jasone
2000-09-19 03:22:06 +00:00
Mike Smith
30d57611e8 Include <sys/proc.h> so that we can dereference something in the proc
structure.  Looks like someone removed a nested include somewhere else.

Submitted by:	gallatin, dg
2000-09-19 00:35:03 +00:00
Daniel C. Sobral
504119265e Check for the correct minimum version required by the current code.
I hope I got this right... :-)
2000-09-18 22:42:54 +00:00
David Greenman
9492779067 Removed NetBSD support, which bit-rotted long ago.
Changed new SMP locking macros given the new situation.
2000-09-18 21:12:19 +00:00
Robert Watson
c4ff4a8467 Include <sys/proc.h> to silence suser() compiler warning.
Approved by:	markm
2000-09-18 20:42:04 +00:00
John Polstra
0824e46a71 Update the prototype for "r_brk" to correspond with the change in
"src/libexec/rtld-elf/rtld.c" revision 1.48.  This eliminates a
warning when building the dynamic linker, and it doesn't seem to
hurt anything else.
2000-09-18 20:40:32 +00:00
Robert Watson
bec1333db4 o Disallow privileged processes in jail() from directly accessing
system namespace extended attributes.
o Document privilege/jail() interaction relating to extended
  attributes.

Obtained from:	TrustedBSD Project
2000-09-18 18:10:13 +00:00
Robert Watson
cf48f6e42c o Allow privileged processes in jail() to override sticky bit behavior
on directories.
o Allow privileged processes in jail() to create inodes with the
  setgid bit set even if they are not a member of the group denoted
  by the file creation gid.  This occurs due to inherited gid's from
  parent directories on file creation, allowing a user to create a
  file with a gid that is not in the creating process's credentials.

Obtained from:	TrustedBSD Project
2000-09-18 18:03:49 +00:00
Robert Watson
f5770bb46a o Add a comment clarifying interaction between jail(), privileged processes,
and UFS file flags.  Here's what the comment says, for reference:

	Privileged processes in jail() are permitted to modify
	arbitrary user flags on files, but are not permitted
	to modify system flags.

  In other words, privilege does allow a process in jail to modify user
  flags for objects that the process does not own, but privilege will
  not permit the setting of system flags on the file.

Obtained from:	TrustedBSD Project
2000-09-18 17:58:15 +00:00
Robert Watson
ea57890740 o Add missing PRISON_ROOT allowing a privileged process in a jail() to not
remove the setuid/setgid bits by virtue of a change to a file with those
  bits set, even if the process doesn't own the file, or isn't a group
  member of the file's gid.

Obtained from:	TrustedBSD Project
2000-09-18 17:53:22 +00:00
Dag-Erling Smørgrav
cd595ef506 Fix cut'n'paste bogon.
Submitted by:	Jim Pirzyk <Jim.Pirzyk@disney.com>
2000-09-18 17:46:01 +00:00
Paul Saab
b429049a5d Add new line character to debugging printf's. 2000-09-18 17:03:03 +00:00
Robert Watson
4da6e3d109 o Substitute suser() calls for direct credential checks, which is now
safe as suser() no longer sets ASU.
o Note that in some cases, the PRISON_ROOT flag is used even though no
  process structure is passed, to indicate that if a process structure
  (and hence jail) was available, it would be ok.  In the long run,
  the jail identifier should probably be moved to ucred, as the uidinfo
  information was.
o Some uid 0 checks remain relating to the quota code, which I'll leave
  for another day.

Reviewed by:	phk, eivind
Obtained from:	TrustedBSD Project
2000-09-18 16:13:02 +00:00
Søren Schmidt
53d07b1ebb Only read to the end of the select track. 2000-09-18 12:13:32 +00:00
Seigo Tanimura
c74c29ca6b Since the unit number of a midi/sequencer device is expressed in 4
bits, we can configure only up to 16 units.
2000-09-18 10:17:38 +00:00
Poul-Henning Kamp
eb7ba7f95c Ignore attempts to set flags to zero. This quenches a syslog warning
from login(1).
2000-09-18 09:40:01 +00:00
Matt Jacob
81372ff0ed Steal 512KB more from system memory for heap instead of 256KB. We died
without the extra space. What a pity.
2000-09-18 08:19:04 +00:00
Matt Jacob
8c8c7c234b Run SECONDARY_LOAD_ADDRESS down to 0x2000a000- this still leaves
(barely) enough room for boot1 and gives us 8KB more to play with
in the loader.
2000-09-18 08:17:57 +00:00
Matt Jacob
4b3f16308b Make the stack 12K- we seem to need a bit more.
Rename 'stack' to 'stackbase' as this variable
more correctly denotes what it is.
2000-09-18 08:16:38 +00:00
Matthew N. Dodd
098b8a1eb0 Initialize 'hints_loaded' to 0.
This allows static hints to work properly.
2000-09-17 23:57:52 +00:00
Cameron Grant
341f16cc60 dynamify- probe codec for supported channels
add channel mappings for mixer
2000-09-17 23:51:00 +00:00
Cameron Grant
7dfc932548 fix warnings 2000-09-17 23:46:32 +00:00
David Greenman
7d854d93af Added a couple more missing FXP_SPLVAR()'s. 2000-09-17 23:23:22 +00:00
David Greenman
b184b38e2b As a minor optimization, do suspended checking more like it was originally
in the PR - before the while loop.
2000-09-17 23:04:57 +00:00
David Greenman
04ea20fcf4 Added missing FXP_SPLVAR() to fxp_intr(). 2000-09-17 22:59:58 +00:00
David Greenman
2053b07d7e Attempt to replicate the new fxp SMP locking in the changes committed
in the previous (APM suspend/resume) commit.
2000-09-17 22:20:33 +00:00
David Greenman
7dced78a28 Added support for APM suspend/resume.
PR:		18756
Submitted by:	mike ryan <msr@elision.org>, with modifications by me.
2000-09-17 22:12:12 +00:00
Chuck Paterson
87807fded9 Add include of proc.h to make compile without SMP defined. This
change is likely interm, the include happens automagically
when SMP is defined.

Obtained from:	Jason Evans.
2000-09-17 22:01:21 +00:00
Dag-Erling Smørgrav
8461bdba85 Silence a warning. 2000-09-17 19:41:26 +00:00
Bruce Evans
21144e2fde Brought back schedsofttty() (SMPng casualty). Didn't bring back the
other schedsoft*() functions since they have never been used.

Removed confused comment about not needing these functions.  The
functions delay scheduling of SWIs until the next hardclock tick.
For devices that only deliver a few characters per interrupt, this
reduces the number of calls to the scheduler by a large factor (about
115 for each sio port at 115200 bps).
2000-09-17 16:37:30 +00:00
MIHIRA Sanpei Yoshiro
5935ef4c44 add PIOCSRESOURCE(IOC_GET_RESOURCE_RANGE)
Now /usr/sbin/pccardd read free resource(io,irq) range with
this ioctl.

Original Idea from:	PAO3
2000-09-17 15:37:53 +00:00
Bruce Evans
df6bd679e7 Declare sigexit() as non-returning.
Fixed some style bugs.
2000-09-17 15:23:10 +00:00
Bruce Evans
33510ef17a Unpessimized CURSIG(). The fast path through CURSIG() was broken in
the 128-bit sigset_t changes by moving conditionally (rarely) executed
code to the beginning where it is always executed, and since this code
now involves 3 128-bit operations, the pessimization was relatively
large.  This change speeds up lmbench's pipe latency benchmark by
3.5%.

Fixed style bugs in CURSIG().
2000-09-17 15:12:04 +00:00
Bruce Evans
fbbeeb6cd6 Uninlined CURSIG() and unpolluted <sys/signalvar.h>. CURSIG() had become
very bloated, first with 128-bit sigset_t's, then with locking in the
SMP case, then with locking in all cases.  The space bloat was probably
also time bloat, partly because the fast path through CURSIG() was
pessimized by the sigset_t changes.  This change speeds up lmbench's
pipe-based latency benchmark by 4% on a Celeron.  <sys/signalvar.h>
had become very polluted to support the bloat.
2000-09-17 14:28:33 +00:00
Kenjiro Cho
e645a1ca27 change the evaluation order of the rsvp socket in rsvp_input()
in favor of the new-style per-vif socket.

this does not affect the behavior of the ISI rsvpd but allows
another rsvp implementation (e.g., KOM rsvp) to take advantage
of the new style for particular sockets while using the old style
for others.

in the future, rsvp supporn should be replaced by more generic
router-alert support.

PR:		kern/20984
Submitted by:	Martin Karsten <Martin.Karsten@KOM.tu-darmstadt.de>
Reviewed by:	kjc
2000-09-17 13:50:12 +00:00
Poul-Henning Kamp
e4bdf25dc8 Properly jail UDP sockets. This is quite a bit more tricky than TCP.
This fixes a !root userland panic, and some cases where the wrong
interface was chosen for a jailed UDP socket.

PR:		20167, 19839, 20946
2000-09-17 13:35:42 +00:00
Poul-Henning Kamp
24b261c720 Reverse last commit, a better fix has been found. 2000-09-17 13:34:18 +00:00
Chuck Paterson
0f4dc94cfc Add locking to make able to run without the Giant lock being held. This
is enabling as all entries are still called with Giant being held.
Maintaining compatability with NetBSD makes what should be very simple
kinda ugly.

Reviewed by:	Jason Evans
2000-09-17 13:26:25 +00:00
Bruce Evans
621dbe43df Added used include of <sys/mutex.h> (don't depend on pollution in
<sys/signalvar.h>).
2000-09-17 12:20:49 +00:00
Poul-Henning Kamp
e2cabba9d7 Make sure UDP sockets are explicitly bind(2)'ed [sic] before we connect(2)
them.

PR:     20946
Isolated by:    Aaron Gifford <agifford@infowest.com>
2000-09-17 11:34:33 +00:00
Boris Popov
3ff1a2f43e Add new flag PDIRUNLOCK to the component.cn_flags which should be set by
filesystem lookup() routine if it unlocks parent directory. This flag should
be carefully tracked by filesystems if they want to work properly with nullfs
and other stacked filesystems.

VFS takes advantage of this flag to perform symantically correct usage
of vrele() instead of vput() if parent directory already unlocked.

If filesystem fails to track this flag then previous codepath in VFS left
unchanged.

Convert UFS code to set PDIRUNLOCK flag if necessary. Other filesystmes will
be changed after some period of testing.

Reviewed in general by:	mckusick, dillon, adrian
Obtained from:	NetBSD
2000-09-17 07:26:42 +00:00
Don Lewis
69f15de9b1 Silence lame compiler warning.
Submitted by:	bde
2000-09-16 23:59:37 +00:00
Poul-Henning Kamp
a2cdd9d93e Move SPECNAMELEN from <sys/conf.h> to <sys/param.h> 2000-09-16 21:57:16 +00:00
Justin T. Gibbs
f175cbb663 Today is just not my day. Really get the right file. 2000-09-16 21:55:31 +00:00
Daniel C. Sobral
818c39998e Use _ instead or - where proper, according to the style I have been
using.

Overload "?" so it will also show loader.4th commands.
2000-09-16 21:04:49 +00:00
Justin T. Gibbs
ae7c64e466 Pull the correct file over to freefall. 2000-09-16 20:59:12 +00:00
Poul-Henning Kamp
3a1c157588 I have no idea how a '#' became a '*'...
Spotted by:	Bernd Walter <ticso@cicely5.cicely.de>
2000-09-16 20:45:11 +00:00
Daniel C. Sobral
df3c7d3993 Solve a name clash.
Add something to help debugging.
2000-09-16 20:20:44 +00:00
Justin T. Gibbs
cb4d93cdbf Add PCIM_CMD_MWRICEN, the bit in the command register in PCI space
that enables memory write and invalidate cycles on a bus master.
2000-09-16 20:06:13 +00:00
Justin T. Gibbs
32da3127a3 Move aicasm to its own subdirectory. 2000-09-16 20:02:39 +00:00
Justin T. Gibbs
717d424718 Move aicasm to its own subdirectory.
Separate our platform independent hooks from core driver functionality
shared between platforms (FreeBSD and Linux at this time).

Add sequencer workarounds for several chip->chipset interactions.

Correct external SCB corruption problem on aic7895 based cards (3940AUW).

Lots of cleanups resulting from the port to another OS.
2000-09-16 20:02:28 +00:00
Justin T. Gibbs
0562034333 Update for aic7xxx driver reorganization. 2000-09-16 20:00:13 +00:00
Daniel C. Sobral
c888e59b84 The default search path for kernel and modules was bogus. It makes no
sense for /boot/kernel to come last.
2000-09-16 19:59:41 +00:00
Daniel C. Sobral
54329571cf The module_path set by default was bogus. It had /boot/kernel last,
which makes little sense.
2000-09-16 19:56:23 +00:00
Daniel C. Sobral
7b9e034490 Both boot and boot-conf were using a different algorithm from the one
used by start to find the kernel. Fix this.

Also, boot would proceed immediately in the absence of a path as
argument. Check first if a kernel has already been loaded, and, if
not, fall back to load kernel&modules behavior.

Some further factorizing. I deem this code to be mostly readable by
now! :-)

Many thanks to: Makoto MATSUSHITA <matusita@jp.FreeBSD.org>
2000-09-16 19:49:52 +00:00
Poul-Henning Kamp
2404c3f99d Make LINT link.
cy driver is broken post SMPng.
2000-09-16 19:04:24 +00:00
Poul-Henning Kamp
fa0c13fabb Add proper prototype for dkcksum(); 2000-09-16 18:57:51 +00:00
Poul-Henning Kamp
a164712178 Remove SMP hack. 2000-09-16 18:57:18 +00:00
Poul-Henning Kamp
c866ec47e3 Make LINT compile. 2000-09-16 18:55:05 +00:00
Poul-Henning Kamp
3045b21279 Make LINT compile. 2000-09-16 18:48:11 +00:00
Poul-Henning Kamp
574abd2926 Make LINT compile again. 2000-09-16 18:46:05 +00:00
Poul-Henning Kamp
1534d6d899 Remove a few leftover CLBYTES related bits.
This was in the good old days to patch up a logical pagesize on hardware
with stupid VM pagesize.  Vaxen I belive.
2000-09-16 18:28:24 +00:00
Poul-Henning Kamp
ae2276e657 Remove a pointless casting of a gid_t to a gid_t. 2000-09-16 18:20:27 +00:00
Brian Somers
30fa52a6fa Call bpfattach() correctly from if_ppp.c
Submitted by:	Andy Adams <ala@merit.edu>
PR:		18506
2000-09-16 14:17:15 +00:00
Poul-Henning Kamp
fc87418be0 Turn dkcksum() into an __inline function.
Change its type to u_int_16_t.
2000-09-16 13:43:00 +00:00
Poul-Henning Kamp
c80d29139c Add canonical checks to devfs_setattr(). 2000-09-16 12:06:58 +00:00
Warner Losh
45713b37cd Change the interface to pccard_function_init. The interface is such
that it looks for an acceptible one.  Once it finds it, it should set
the resources for the device.  I say "should" because I've not written
that.  Also set an ivar for the child of pccard.  Minor fix to the
attach message printed, we lose the slot number, which I'll have to
restore later.  Adjust the pccard ivar so that we can save the
function that corresponds to this driver so we can enable and disable
it more easily.  Save a pointer to the function so we know what we're
dealing with.

There should be some way for the driver to specify which cfg it wants
to activate.  For now the pccard_function_init function just picks
one, but we'll have to revisit this going forward.  I'm not doing it
now because I'd need some way to activate the card many times and I'm
not sure that is desirable or even safe with some cards.
2000-09-16 06:52:20 +00:00
Jonathan Lemon
af1270f87f It is possible for a TCP callout to be removed from the timing wheel,
but have a network interrupt arrive and deactivate the timeout before
the callout routine runs.  Check for this case in the callout routine;
it should only run if the callout is active and not on the wheel.
2000-09-16 00:53:53 +00:00
John Baldwin
4cc6117e1d Remove some commented out cruft. 2000-09-15 23:00:46 +00:00
John Baldwin
7ab37af1ed - Add a new process flag P_NOLOAD that marks a process that should be
ignored during load average calcuations.
- Set this flag for the idle processes and the softinterrupt process.
2000-09-15 22:00:23 +00:00
John Baldwin
f6a0af8015 Idle processes are always runnable, so let them state at SRUN. 2000-09-15 19:49:48 +00:00
John Baldwin
db72809d24 Release Giant before starting up init.
Submitted by:	jake
2000-09-15 19:25:29 +00:00
John Baldwin
3c63a78388 Use driver_intr_t instead of the now defunct inthand2_t. 2000-09-15 19:09:15 +00:00
Hajimu UMEMOTO
deebc91386 examined the gateway (from the routing table) only when the address
family of the gateway is AF_INET6.

Submitted by:	JINMEI Tatuya <jinmei@isl.rdc.toshiba.co.jp>
2000-09-15 17:21:35 +00:00
Ruslan Ermilov
4996f02545 Add -Wmissing-prototypes. 2000-09-15 15:37:16 +00:00
Nick Hibma
5c83e80d3f Reserve major number 156 for uscanner 2000-09-15 10:27:01 +00:00
Daniel C. Sobral
1cb190742f Factorize, reorganize, and move code around.
The boot-conf and boot code had various bugs, and some of it was big,
ugly, unwieldy, and, sometimes, plain incorrect. I'm just about
completely replaced these ugly parts with something much more manageable.

Minor changes were made to the well-factorized parts of it, to accomodate
the new code.

Of note:

	* make sure boot-conf has the exact same behavior wrt boot order
as start.

	* Correct both boot and boot-conf so they'll work correctly when
compiled in, as they both had some bugs, minor and major.

	* Remove all the crud from loader.4th back into support.4th, for
the first time since boot-conf was first improved. Hurray!

I'm fairly satisfied with the code at this time. Time to see about those
man pages...
2000-09-15 08:05:52 +00:00