Commit Graph

26200 Commits

Author SHA1 Message Date
Brian Somers
4a48819fbc Add DIGIIO_SETALTPIN and DIGIIO_GETALTPIN ioctl values 2001-06-20 14:51:58 +00:00
Hajimu UMEMOTO
ff2428299f made sure to use the correct sa_len for rtalloc().
sizeof(ro_dst) is not necessarily the correct one.
this change would also fix the recent path MTU discovery problem for the
destination of an incoming TCP connection.

Submitted by:	JINMEI Tatuya <jinmei@kame.net>
Obtained from:	KAME
MFC after:	2 weeks
2001-06-20 12:32:48 +00:00
Brian Somers
a48de39daf Close a race where we were releasing the unit resource at the start
of tunclose() rather than the end, and tunopen() grabbed that unit
before tunclose() finished (one process is allocating it while another
is freeing it!).

It may be worth hanging some sort of rw mutex around all specinfo
calls where d_close and the detach handler get a write lock and all
other functions get a read lock.  This would guarantee certain levels
of ``atomicity'' (is that a word?) that people may expect (I believe
Solaris does something like this).
2001-06-20 10:06:28 +00:00
Warner Losh
bd947818c1 Revert last change: it was unintended at this time. 2001-06-20 06:24:28 +00:00
Warner Losh
24236dfc83 Add new entries for:
TI1210, TI4410 and TI4450
and fix what looks like a typo in the OZ6860 entry.

Obtained from: NetBSD
2001-06-20 06:21:17 +00:00
Andrey A. Chernov
531918e6e8 Add B921600 (yes, some serial ports can do this, but generic sio not support
them yet)
2001-06-20 03:26:41 +00:00
John Baldwin
69a78d4666 Put the scheduler, vmdaemon, and pagedaemon kthreads back under Giant for
now.  The proc locking isn't actually safe yet and won't be until the proc
locking is finished.
2001-06-20 00:48:20 +00:00
Dag-Erling Smørgrav
4ee5ccb607 Constify the module name. This silences a few warnings ("initialization
discards qualifier"), and probably adds a few where module names are
compared to or passed as non-const strings.

Not-objected-to-by:	bde
2001-06-19 21:40:14 +00:00
Garrett Wollman
5e331acd24 Actually document TCPDEBUG. 2001-06-19 17:07:15 +00:00
Garrett Wollman
1a02faf608 Fix punctuation in comment. 2001-06-19 17:00:55 +00:00
Munechika SUMIKAWA
64fbad5899 Suppress update ifnet.iflastchange when processing packets for SNMP
requirements(RFC1573, interface MIB). This change for 4.4BSD was
first introduced in if_ethersubr.c:1.17->1.18.

BTW, iflastchange on all of IFs are inconsistent. e.g.
     ether, tun: update
     fddi, tokenring, ppp: not update
I'll make patch later.

Obtained from:	KAME
MFC after:	2 weeks
2001-06-19 15:53:51 +00:00
Munechika SUMIKAWA
05b6760d2a Add IFT_L2VLAN for supported NDP type. IPv6 over VLAN works now.
Obtained from:	KAME
MFC after:	2 weeks
2001-06-19 14:48:02 +00:00
Benno Rice
5fa25b1b0e More verbose version of identifycpu() which also contains many more CPU
versions/revisions.

Modified from the original patch to mark G3 and G4 processors as such.

Submitted by:	Jeff Schottmiller <jeff@neoscale.com>
2001-06-19 13:27:33 +00:00
Peter Wemm
5c9321595d Convert the elf loader to the new linker set layout for elf files.
This should make dependencies at load time work like before.  Oops.

Noticed by:	markm
2001-06-19 07:41:07 +00:00
Peter Wemm
357f511a58 Fix some of the worst formatting bug (seperate commit) 2001-06-19 06:48:58 +00:00
Bill Paul
7437599f41 Fix some memory bugs with regard to jumbo buffers. I made a mistake when
converting from the old external mbuf buffer code to the new (with the
MEXTADD() macro). Also free free list memory correctly in
foo_free_jumbo_mem() routines: grab the head of the list, then
remove it, _then_ free() it.

This fixes the memory corruption problem I've been chasing in the level 1
driver.
2001-06-18 22:04:40 +00:00
Jim Pirzyk
7b32dc4ee4 Added CTLTYPE_{UINT|LONG|ULONG} types.
PR:		kern/21132
Reviewed by:	no objections to by -arch
MFC after:	1 month
2001-06-18 21:07:04 +00:00
Garrett Wollman
37336173d3 After one too many PRs on the subject, bite the bullet and define IOV_MAX
and its associated constants.  Implement _SC_IOV_MAX in the usual way.
Be a bit sloppy about the namespace question; this should get cleared up
in time for 5.0.

MFC after:	1 month
2001-06-18 20:24:54 +00:00
Cameron Grant
b30d115684 stop csa from panicing in clkrun_hack() - we were using free'd memory
don't leak memory in clkrun_hack()

Submitted by:	grog (partially)
2001-06-18 19:58:03 +00:00
John Baldwin
6fad32afc9 Lock Giant in postsig() for the KTRACE case as ktrpsig() needs Giant when
it writes out to the trace file.

Reported by:	peter, gallatin, and others
2001-06-18 19:23:43 +00:00
John Baldwin
ce1a1f42fb Initialize mutexes needed early on all in the same place so that the
startup routine more closely matches that of alpha and ia64.  At some
point the common mutexes shared across all platforms probably should move
into sys/kern_mutex.c.
2001-06-18 19:19:38 +00:00
John Baldwin
0865563a93 - Add support for decoding syscall names. (Brought over from the new alpha
trace code that was brought over from NetBSD.)
- Check for "syscall_with_err_pushed" as the label prior to a syscall trap
  frame rather than "Xlcall_syscall" and "Xint0x80_syscall".  We don't
  have a valid trapframe during the short range of code that those two
  symbols now cover.
- Simplify db_next_frame() to avoid duplicating the code for the different
  trap frame types.
- Don't try to trace a swapped-out process.  (Brought over from NetBSD via
  the new alpha trace code.)
2001-06-18 19:17:30 +00:00
John Baldwin
3128cdd847 Include sys/pcpu.h to get the prototype for globaldata_register() to quiet
a warning.
2001-06-18 19:06:14 +00:00
Thomas Moestl
916076fefc Call bus_teardown_intr when csa_attach fails after the interrupt has
been set up.

PR:		kern/28178
Reviewed by:	cg
MFC after:	2 weeks
2001-06-18 18:36:34 +00:00
Brian Somers
9c4013d76c Use linker_reference_module() instead of hard-coding the digi_*
module path.
2001-06-18 15:10:20 +00:00
Brian Somers
09dbb40410 Add linker_reference_module().
This function loads a module if required, otherwise bumps the reference
count -- the opposite of linker_file_unload().
2001-06-18 15:09:33 +00:00
Brian Somers
3f99abb8b6 Credit John Prince and Eric Hernes for their work. 2001-06-18 15:02:33 +00:00
Hajimu UMEMOTO
c3aacd9ec2 call pfxlist_onlink_check() at the end of in6_tmpifadd(), to make sure
a temporary address generated from a detached public one also detached.

Submitted by:	JINMEI Tatuya <jinmei@isl.rdc.toshiba.co.jp>
Obtained from:	KAME
2001-06-18 11:37:06 +00:00
Brian Somers
21ff14e0f9 Don't remove the SI_CHEAPCLONE for unsupported minors 2001-06-18 09:22:30 +00:00
Brian Somers
2deed49982 Remove the SI_CHEAPCLONE flag when hanging resources off the dev_t 2001-06-18 09:21:59 +00:00
Cameron Grant
74ffd13814 use devclass_get_maxunit() correctly 2001-06-18 00:10:47 +00:00
Cameron Grant
faeebea2b8 revise dsp_clone() to return the first nonbusy channel instead of simply
cycling channel numbers.

remove unused fields from struct snddev_info.
2001-06-17 23:23:06 +00:00
Cameron Grant
5210620e98 fix a potential panic in dsp_clone() if no pcm devices were detected 2001-06-17 20:15:29 +00:00
Yoshihiro Takahashi
6c551e8d24 Don't assume that resource type is ioport and rid equal 0. 2001-06-17 13:33:59 +00:00
Benno Rice
c585bae1c2 The final commit for the first phase of PowerPC support.
This adds the config stuff needed to build kernels.

Reviewed by:	obrien
2001-06-17 09:39:44 +00:00
Yoshihiro Takahashi
3d1421a7f8 Allocate all resources using keyboard controller. 2001-06-17 04:43:28 +00:00
Warner Losh
0c0625cf94 Move cardbus and pccard bus bridge devices to near the bridge chips. This
is so that all the pccard options are together and this reduces diffs with
GENERIC.
2001-06-17 02:02:33 +00:00
Warner Losh
0f51bb10a0 MFGENERIC:
1.307		Turn on kernel debug support
	1.309		Turn off pcm
	1.311		move wx to miibus chipsets
	1.312		Comment out USERCONFIG

Reminded by: mihira-san <sanpei@sanpei.org>
2001-06-17 01:57:39 +00:00
Peter Wemm
b85db19691 Move setugid() a little sooner to before we release tracing in case
crdup() or change_e*id() block on malloc() or mutex.
2001-06-16 23:34:23 +00:00
Warner Losh
8d3428c0b4 Some people are having problems with insert/eject. Add some debug
information until the problems can be tracked down.  Right now these
are unconditional, but later it will be hidden behind a boot verbose.

Also, if there are no events listed in the event mask, return right
away.  Specifically avoid writing back interrupt acks in this case.
2001-06-16 23:26:18 +00:00
Peter Wemm
46700f1259 Use INTR_TYPE_AV for the interrupt handlers because:
1: most drivers are sensitive to timing, and
2: the handlers are MPSAFE and need a chance to get into the kernel
before some other non-mpsafe handler blocks the ithread on Giant in
shared irq cases.

Reviewed by:	cg  (in principle)
2001-06-16 22:59:46 +00:00
Peter Wemm
5a280d9cd1 Add INTR_TYPE_AV so that we can get to the PI_AV priority in the ithread
handlers.  This is beneficial since it means that pcm's MPSAFE handler
can get run before things that will block on Giant in the shared irq
case.
2001-06-16 22:42:19 +00:00
Peter Wemm
c1e152312d Clean up some junk. The bogus trapframe on the stack was removed from the
MI code in August 2000 elsewhere.
2001-06-16 22:07:32 +00:00
Cameron Grant
d95502a838 use a global devclass for all drivers - i'm not entirely sure why this
worked before.

mixer, dsp and sndstat are seperate devices - give them their own cdevsws
instead of demuxing requests sent to a single cdevsw.

use the si_drv1/si_drv2 fields in dev_t structures for holding information
specific to an open instance of mixer/dsp.

nuke /dev/{dsp,dspW,audio}[0-9]* links - this functionality is now provided
using cloning.

various locking fixes.
2001-06-16 21:25:10 +00:00
Hajimu UMEMOTO
c56df4e782 less warning
warning: cast discards qualifiers from pointer target type
2001-06-16 19:32:37 +00:00
Alexander Langer
90f76f2df0 Fix "alignemnt" typo. 2001-06-16 15:28:28 +00:00
Mark Murray
eb6bd5940f This file was a horrible mixture of styles old and new.
Apply style(9).
2001-06-16 10:47:34 +00:00
Benno Rice
707fed2004 OpenFirmware kernel support, as used by the PowerPC and hopefully other
ports later on.

This includes the basic MI interface routines as well as a console driver.
The MD code is kept in the MD directories.

Reviewed by:	obrien
2001-06-16 07:17:56 +00:00
Benno Rice
d27f1d4c12 This commit (along with one pending in sys/dev/ofw and one in sys/conf) give
us our first minimal glimpse of PowerPC support.

With this code we can get to the "mountroot>" prompt on my Apple iMac.  We
can't get any further due to lack of clock and interrupt handling, among other
things.  This does however mean that pmap and VM are initialising.

We're fairly dependant on OpenFirmware at this point, but I hope to add
support for other classes of firmware at a later stage.

Reviewed by:	obrien, dfr
2001-06-16 07:14:07 +00:00
Jonathan Lemon
9fa416ca19 Fix warnings:
112: warning: cast to pointer from integer of different size
125: warning: cast to pointer from integer of different size
2001-06-16 07:02:47 +00:00