Commit Graph

26304 Commits

Author SHA1 Message Date
Jim Pirzyk
3398752a77 Applied the patch to fix HARP ATM that was broken when KAME IPv6 came
into FreeBSD.

PR:		kern/23620
Submitted by:	rh@matriplex.com
MFC after:	1 month
2001-06-20 17:09:14 +00:00
Ian Dowse
11fbe665c0 The serial console break-to-debugger support only functioned while
the console device was open. At other times, the interrupts that
are used to detect the break signal or ~^B sequence were disabled,
so these events would not be noticed until the next open (e.g. the
next kernel printf). This was mainly a problem while there was no
getty running on the console, such as during bootup or shutdown.

For serial consoles with break-to-debugger support, we now enable
the generation of interrupts at attach time, and we leave them
enabled while the device is closed.

Reviewed by:	bde (I've since made chages as per his suggestions)
2001-06-20 16:47:23 +00:00
Dag-Erling Smørgrav
0e79fe6f0e Constify (silence warnings introduced by last commit to sys/module.h) 2001-06-20 16:08:45 +00:00
Brian Somers
4b65cac846 Allow individual ports to use alternate pin settings (swap dsr & cd)
via the new DIGIIO_SETALTPIN ioctl, and allow the port's ALTPIN setting
to be queried via DIGIIO_GETALTPIN.

The initial state and lock devices are normally used to set and/or
lock ALTPIN settings although the device itself may also be used.

ALTPIN settings are applied per-device and apply to both the callin
and callout device at the same time.
2001-06-20 14:52:08 +00:00
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
Warner Losh
7077bc34aa Save the IRQ that we get in pci attachment.
Print type of pci bridge we find.
Force the IRQ of pci bridges upon all its children.
Allocate the resources on behalf of the bridge when we're testing to see if
they exist.

This should help people who don't read updating instructions very well.

This patch started out with an idea from Shigeru Yamamoto-san in -current.
2001-06-16 06:33:01 +00:00
Peter Wemm
b62ddc1363 Work around what looks like a bad make(1) bug. For some reason,
make(1) wants to build loader.sym *before* the .o files.  Eliminating
one seeminly intermediate step avoids the problem.  Somehow, it seems
that variables are not getting expanded at the right time.
Any explanations would be appreciated...

Changing:
${BASE}.sym: ${OBJS} ${LIBSTAND} ${LIBFICL} ${LIBALPHA} ${CRT} vers.o
	${LD} ...
To:
BASEOBJS= ${OBJS} ${LIBSTAND} ${LIBFICL} ${LIBALPHA} ${CRT} vers.o

${BASE}.sym: ${BASEOBJS}
	echo ${BASEOBJS}
	${LD} ...
.. the echo only shows LIBFICL, CRT and vers.o. ${OBJS} is not included.
2001-06-16 06:28:07 +00:00
Warner Losh
11cedf79a8 On PC-98, map IRQ 6 to IRQ 7 at the pcic level. That is, when we're
told to use IRQ 6, progam the pcic to use irq 7 instead.  Evidentally,
at least some of the cards are wired this way.  If you want to use irq
6, configure it.  All the mapping is done just before we set the
interrupt registers.  See [FreeBSD98-testers 5064] for details.

Added commentary about valid interrupts on some CBUS pc98 CL PD6722
based cards.

Submitted by: Hiroshi TSUKADA-san <hiroshi@kiwi.ne.jp>
2001-06-16 06:18:16 +00:00
David E. O'Brien
5ed2687ff2 style(9) and remove a left over Alpha comment 2001-06-16 06:17:35 +00:00
David E. O'Brien
3caacd361d style cleanup 2001-06-16 06:17:16 +00:00
Warner Losh
1b8dd28309 Add PC-9821RA-E01. This appears that PC-9821 Ra20 has this either
built in, or as an addon card (My Japanese isn't quite good enough to
know which).  [FreeBSD98-testers 5098] contains all the details.

Submitted by: Kawanobe Koh-san <kawanobe@st.rim.or.jp>
2001-06-16 06:10:53 +00:00
David E. O'Brien
41edaa30e9 style police 2001-06-16 05:59:45 +00:00
David E. O'Brien
a1881c1e89 This Intel derived file uses C++ style comments.
(I'll be we know which compiler and platform they developed this on...)
Minimally change them to C89 comments to make GCC happy.  (this is kinda funny
as the file has piece derived from FreeBDS 3.2)

Also fix FreeBSD id style.
2001-06-16 05:58:54 +00:00
David E. O'Brien
c38fe280a8 Fix FreeBSD id style. 2001-06-16 05:56:13 +00:00
David E. O'Brien
16aaa88017 style(9) 2001-06-16 05:55:32 +00:00
Bill Paul
80782fbf93 Mind-o in last commit: s/==/>=/ when checking MTU size. *blush* 2001-06-16 04:02:37 +00:00
Bill Paul
cb2f755c7f Fix the last serious bug I've been chasing:
The DP83820/83821 has an undocumented limitation concerning jumbo frames
and TX checksum offload. In order for TX checksum offload to work, the
outgoing frame must fit entirely within the TX FIFO, which is 8192 bytes
in size. This isn't a problem, until you try to send a 9000-byte frame,
at which point the TX DMA engine goes to sleep. It turns out that if
you want to send a jumbo frame larger than 8170 bytes (8192 - 64), you
have to turn off the TX checksum support.

As a workaround, I changed nge_ioctl() so that if the user selects an
MTU larger than 8152 bytes, we clear the if_hwassist flags. The flags
will be set again once the MTU is reduced to a smaller value.
2001-06-16 03:38:44 +00:00
David E. O'Brien
cb38c47462 style(9) + fix FreeBSD id's. 2001-06-16 02:12:36 +00:00
David E. O'Brien
09e40de52f Add CVS id. 2001-06-15 22:54:33 +00:00
Andrey A. Chernov
e566a4211b Bump FreeBSD_version to indicate locale renaming 2001-06-15 22:40:10 +00:00
John Baldwin
7474a22698 I'm a dunce. Clean up some warnings by axeing some unused variables from
the previous commit.
2001-06-15 21:09:44 +00:00
Jonathan Lemon
08aadfbb98 Do not perform arp send/resolve on an interface marked NOARP.
PR: 25006
MFC after: 2 weeks
2001-06-15 21:00:32 +00:00
Jonathan Lemon
7b748f0a21 Correctly hook up the write kqfilter to pipes.
Submitted by:  Niels Provos <provos@citi.umich.edu>
2001-06-15 20:45:01 +00:00
John Baldwin
931c1e20e4 Updates and tweaks to the new trace functionality:
- Use db_printf() instead of printf().
- Clean up decode_syscall() to use regular if-then-else rather than goto's.
- Use the same method of parsing PID's for per-process traces as the x86
  code does: that is, if the address passed in is not a valid kernel
  address, treat it is a decimal pid.
- If the pid of the current process is specified, fall back to using the
  "default" parameters for the trace as curproc's pcb is not valid at this
  point.

MFC after:	1 week
2001-06-15 20:27:44 +00:00
Bill Paul
c921560563 Turn TCP and UDP hardware RX checksumming back on. jlemon pointed out where
I'd gone wrong before: we have to set csum_data to 0xffff, not 0.
2001-06-15 19:02:55 +00:00
Bill Paul
1bacd83aea Fix TX bug: when using TCP/IP checksum offload on TX, we tell the chip
we want the checksums calculated on a per-packet basis using control bits
in the extsts field of the DMA descriptor structure. For TX, the chip
seems to want these bits set in the field of the first descriptor in
a fragment chain, not the last.
2001-06-15 18:43:19 +00:00
Dag-Erling Smørgrav
56fe60b131 #if 0 out pfs_null() to silence the warning about it not being referenced. 2001-06-15 12:30:46 +00:00
Peter Wemm
e634a8c804 oops. prepare_usermode() died in August 2000 in the MI and x86 code.
Issue raised by:	scottl
2001-06-15 09:59:27 +00:00
Peter Wemm
67b6051349 Bah, back out part of previous commit. I got too carried away.
linux_debug_map[] is referred to from elsewhere.
2001-06-15 08:18:24 +00:00
Peter Wemm
c864c67bad Fix warning:
163: passing arg 4 of `resource_string_value' from incompatible pointer type
2001-06-15 08:01:21 +00:00
Peter Wemm
e9813a0763 Fix warnings:
585: warning: missing braces around initializer
605: warning: missing braces around initializer
2001-06-15 07:56:36 +00:00
Peter Wemm
17e904e08d Fix warnings:
908: warning: long unsigned int format, unsigned int arg (arg 3)
887: warning: `timezero' defined but not used
2001-06-15 07:53:20 +00:00
Peter Wemm
a2c94cc717 Fix warnings:
235: warning: unsigned int format, pointer arg (arg 3)
621: warning: cast discards qualifiers from pointer target type
2001-06-15 07:50:54 +00:00
Peter Wemm
ec0b1e6727 Fix warning:
239: warning: no previous prototype for `linux_debug'
2001-06-15 07:48:21 +00:00
Peter Wemm
2e17a05929 Fix warning:
413: warning: long unsigned int format, vm_offset_t arg (arg 2)
2001-06-15 07:46:18 +00:00
Peter Wemm
78236790cd Fix warning:
1973: warning: int format, long int arg (arg 5)
2001-06-15 07:44:39 +00:00
Peter Wemm
d43c883ddc Fix warning:
298: warning: assignment makes pointer from integer without a cast
2001-06-15 07:42:58 +00:00
Peter Wemm
a074038186 Fix warnings:
412: warning: long unsigned int format, unsigned int arg (arg 3)
418: warning: long unsigned int format, unsigned int arg (arg 3)
424: warning: long unsigned int format, unsigned int arg (arg 3)
2001-06-15 07:39:12 +00:00
Peter Wemm
69223861fe Fix warning: 203: implicit declaration of function `kernel_sysctlbyname' 2001-06-15 07:37:01 +00:00
Peter Wemm
bc66c1fd1f Fix warning: (int/long mixup in printf)
475: warning: unsigned int format, long unsigned int arg (arg 3)
2001-06-15 07:35:25 +00:00
Peter Wemm
65f1bb65fe Fix warning. s/char/unsigned char/ in "(char *)eth"
294: warning: ethernet address is not type unsigned char *
2001-06-15 07:34:29 +00:00
Peter Wemm
6cac567e1b Fix warning: 848: warning: label `nosupport' defined but not used 2001-06-15 07:33:09 +00:00
Peter Wemm
d490e63aa7 Fix warning; remove unused variable 2001-06-15 07:32:25 +00:00
Peter Wemm
bd1c51b1e7 Remove unused variable 2001-06-15 07:31:15 +00:00
Peter Wemm
b93c3c5ed6 Fix some warnings in kern_environment.c. Make the getenv*() family
take a const 'name', since they dont modify anything.
159: warning: passing arg 1 of `getenv_int' discards qualifiers...
167: warning: passing arg 1 of `getenv' discards qualifiers from pointer..
2001-06-15 07:29:17 +00:00
Peter Wemm
b48746a5da Fix warning: 186: warning: label `done' defined but not used 2001-06-15 07:26:39 +00:00
Peter Wemm
70439d2750 Fix warning: 568: warning: `portal_badop' defined but not used 2001-06-15 00:38:03 +00:00
Peter Wemm
215db1379e Fix a stack of KAME netinet6/in6.h warnings:
592: warning: `struct mbuf' declared inside parameter list
595: warning: `struct ifnet' declared inside parameter list
2001-06-15 00:37:27 +00:00
Peter Wemm
f14f48a226 Fix warning (exposed NetBSD code):
94: warning: `ntfs_bmap' declared `static' but never defined
2001-06-15 00:32:07 +00:00
Peter Wemm
e75a45be56 Fix warnings (mostly harmless, due to struct bio being embedded in buf):
738: warning: passing arg 1 of `biodone' from incompatible pointer type
745: warning: passing arg 1 of `biodone' from incompatible pointer type
2001-06-15 00:30:27 +00:00
Peter Wemm
42c187b77e Fix warning: 552: warning: `fdesc_badop' defined but not used 2001-06-15 00:27:21 +00:00
Peter Wemm
1d63bf5236 Fix warning: 128: warning: initialization makes pointer from integer
Note: this file has lots of #if __FreeBSD__ >= 4 etc which needs to be
changed to __FreeBSD_version >= 400000 etc.
2001-06-15 00:26:41 +00:00
Peter Wemm
953d6e00e9 Fix warnings:
vinumhdr.h:80: warning: redundant redeclaration of `vinum_cdevsw'
 vinumext.h:239: warning: previous declaration of `vinum_cdevsw'
in each of the following files:
 vinum.c, vinumconfig.c, vinumdaemon.c, vinuminterrupt.c, vinumio.c,
 vinumioctl.c, vinumlock.c, vinummemory.c, vinumraid5.c, vinumrequest.c,
 vinumrevive.c, vinumstate.c, vinumutil.c
2001-06-15 00:23:11 +00:00
Peter Wemm
c5d8f2e6b1 Fix warnings:
musycc.c:449: warning: long unsigned int format, unsigned int arg (arg 3)
musycc.c:449: warning: long unsigned int format, unsigned int arg (arg 4)
musycc.c:453: warning: long unsigned int format, unsigned int arg (arg 3)
musycc.c:453: warning: long unsigned int format, unsigned int arg (arg 4)
musycc.c:453: warning: long unsigned int format, unsigned int arg (arg 5)
These warnings used to be confined to the alpha but are on all now.
2001-06-15 00:19:43 +00:00
Peter Wemm
5c176b95c2 Fix warning: 110: initialization makes pointer from integer without a cast
This was passing a (d_kqfilter_t *)-1 as the kqfilter function pointer.
Fortunately there was no D_KQFILTER in d_flags, so this was harmless.
2001-06-15 00:16:59 +00:00
Peter Wemm
14aa34173c Fix warning: 193: warning: label `done' defined but not used 2001-06-15 00:13:54 +00:00
Peter Wemm
22941bd78f Fix warnings:
554: passing arg 4 of `resource_string_value' from incompatible pointer type
576: passing arg 4 of `resource_string_value' from incompatible pointer type
593: passing arg 4 of `resource_string_value' from incompatible pointer type
2001-06-15 00:13:18 +00:00
Peter Wemm
70d73137b9 Fix warnings:
1831: warning: unused variable `noise'
1831: warning: unused variable `sig'
2001-06-15 00:10:30 +00:00
Peter Wemm
3a88b43443 Fix warning: 179: warning: label `done' defined but not used 2001-06-15 00:09:28 +00:00
Peter Wemm
988401088c Fix warnings:
1267: warning: suggest parentheses around comparison in operand of &
2087: warning: unused variable `li'
2001-06-15 00:07:27 +00:00
Peter Wemm
13f961dbfd Warning fix: coda_fbsd.c:113: warning: unused variable `ret' 2001-06-15 00:02:27 +00:00
Matt Jacob
773fa867f2 If we're not going to use am7990_shutdown, comment it all out.
MFC after:	2 weeks
2001-06-14 19:36:37 +00:00
Matt Jacob
1aaf1de145 Fix Assembler buglet: Warning: .end directive names different symbol than .ent
MFC after:	2 weeks
2001-06-14 19:33:16 +00:00
Matt Jacob
cb62bc53d1 We've had problems with data corruption occuring on
commands that complete (with no apparent error) after
we receive a LIP. This has been observed mostly on
Local Loop topologies. To be safe, let's just mark
all active commands as dead if we get a LIP and we're
on a private or public loop.

MFC after:	4 weeks
2001-06-14 17:13:24 +00:00
Joerg Wunsch
c45b4c1e58 Implement a loadable module for the oltr Olicom Token Ring driver. I
could only get a chance of testing it under 4.3, but together with the
if_oltr.c fixes at least it seems to work now.  If someone has the chance
to test this under -current, please do.

Unfortunaltey, the TR code itself (if_iso88025subr.c) is not written
in a way that would allow to make a seaparate KLD out of it.  By now,
just link it directly into the oltr KLD since it's probably the POLA
to be able to load the TR code together with the only TR hardware
driver we've got by now.

I've got one single unexplained panic (in doreti_switch or somewhere
there, calling a 0xc1XXXXXX address that did no longer belong to the
kernel at all) after unloading the modules once, thus i don't propose
a MFC of this module despite my testing has been done solely on 4.3,
unless someone is really going to test this stuff in -current.
2001-06-14 15:16:04 +00:00
Joerg Wunsch
d6287c5081 Do only call oltr_stop() if we are not already in OL_STOPPED state.
This avoids a null pointer deref panic in TRlldClose() inside the
vendor-supplied object code.  It's now possible to unload the driver
at all.

Implement deallocation of malloc()ed memory regions.

MFC after:	2 months
2001-06-14 15:08:40 +00:00
Cameron Grant
b8f0d9e0b2 various locking fixes, rework open logic and channel registration
PR:             kern/28084
2001-06-14 13:31:30 +00:00
Yoshihiro Takahashi
4d153eaeb6 Commented out USERCONFIG and VISUAL_USERCONFIG options. 2001-06-14 11:32:54 +00:00
Yoshihiro Takahashi
eb975db359 Removed unused files. 2001-06-14 11:15:00 +00:00
Yoshihiro Takahashi
5c936ade5b Correct typo. 2001-06-14 11:09:11 +00:00
Yoshihiro Takahashi
38b70454e3 Moved the wd33c93 specific file to sys/dev/ic. 2001-06-14 11:05:48 +00:00
Boris Popov
93131977c4 Remove bogus include. 2001-06-14 11:05:01 +00:00
Boris Popov
4587152a71 Coda do not call vop_defaultop(), so add nesessary calls for VM objects.
Submitted by:	Greg Troxel <gdt@ir.bbn.com>
MFC after:	2 days
2001-06-14 09:28:30 +00:00
Peter Wemm
ee24290963 As per comments in sys/linker_set.h:
BANG! BANG! BANG! BANG! BANG! BANG! CLICK! CLICK! CLICK! CLICK! CLICK!
<reload>
BANG! BANG! BANG! BANG! BANG! BANG! CLICK! CLICK! CLICK! CLICK! CLICK!
2001-06-14 01:28:56 +00:00
Peter Wemm
44fa54f5f6 Nuke old gensetdefs based linker sets with extreme prejudice 2001-06-14 01:23:57 +00:00
Kirk McKusick
eb87cd754f Build on the change in revision 1.98 by Tor.Egge@fast.no.
The symptom being treated in 1.98 was to avoid freeing a
pagedep dependency if there was still a newdirblk dependency
referencing it. That change is correct and no longer prints
a warning message when it occurs. The other part of revision
1.98 was to panic when a newdirblk dependency was encountered
during a file truncation. This fix removes that panic and
replaces it with code to find and delete the newdirblk
dependency so that the truncation can succeed.
2001-06-13 23:13:13 +00:00
Andrew Gallatin
a7f595f8a2 initialize mp_ncpus in cpu_mp_probe() so that if the probe fails and
cpu_mp_start() is never called, mp_ncpus will have a non-zero value.
This prevents systat from dying with an arithmatic exception caused
by a divide-by-zero error on UP alphas running a GENERIC kernel.
2001-06-13 20:40:24 +00:00
Matt Jacob
aa56d911a6 the last argument to copyinstr is of t ype size_t, not u_int 2001-06-13 18:58:11 +00:00
Hajimu UMEMOTO
1d752b5e0f fix recursive mtx_lock() call.
Submitted by:	mjacob
2001-06-13 18:53:53 +00:00
Hajimu UMEMOTO
e22115bbf1 Make compilable. addlog(...) was replaced with log(-1, ...)
Reported by:	peter
2001-06-13 17:30:55 +00:00
Peter Wemm
f41325db5f With this commit, I hereby pronounce gensetdefs past its use-by date.
Replace the a.out emulation of 'struct linker_set' with something
a little more flexible.  <sys/linker_set.h> now provides macros for
accessing elements and completely hides the implementation.

The linker_set.h macros have been on the back burner in various
forms since 1998 and has ideas and code from Mike Smith (SET_FOREACH()),
John Polstra (ELF clue) and myself (cleaned up API and the conversion
of the rest of the kernel to use it).

The macros declare a strongly typed set.  They return elements with the
type that you declare the set with, rather than a generic void *.

For ELF, we use the magic ld symbols (__start_<setname> and
__stop_<setname>).  Thanks to Richard Henderson <rth@redhat.com> for the
trick about how to force ld to provide them for kld's.

For a.out, we use the old linker_set struct.

NOTE: the item lists are no longer null terminated.  This is why
the code impact is high in certain areas.

The runtime linker has a new method to find the linker set
boundaries depending on which backend format is in use.

linker sets are still module/kld unfriendly and should never be used
for anything that may be modular one day.

Reviewed by:	eivind
2001-06-13 10:58:39 +00:00
Peter Wemm
db957588c9 Patch up a blunder I made a few days ago. nmbcnt was being initialized
too late.

Noted by:      bmilekic
Pointy-hat to: peter
2001-06-13 00:36:41 +00:00
Hajimu UMEMOTO
75f5bc80a1 FreeBSD already avoided namespace pollution (rev.1.45).
Submitted by:	bde
2001-06-12 11:12:23 +00:00
Peter Wemm
2398f0cd1d Hints overhaul:
- Replace some very poorly thought out API hacks that should have been
  fixed a long while ago.
- Provide some much more flexible search functions (resource_find_*())
- Use strings for storage instead of an outgrowth of the rather
  inconvenient temporary ioconf table from config().  We already had a
  fallback to using strings before malloc/vm was running anyway.
2001-06-12 09:40:04 +00:00
Hajimu UMEMOTO
46f48be960 Restore the code wrongly nuked by previous commit.
Following changed was made by previous commit:

  - IPV6CP supporting in kernel level ppp from NetBSD.

Submitted by:	y.shirasaki@ntt.com
2001-06-12 08:52:54 +00:00
Peter Wemm
1ae2c6005e -Wunused cleanup 2001-06-12 07:01:27 +00:00
Peter Wemm
6697e35149 Move the -I../../../include or -I/usr/include to the last entry on the
cc arguments.  Otherwise ipfilter's bogus #include lines will compile
reference /usr/include/netinet/ip_frag.h etc.
2001-06-12 06:06:18 +00:00
Dag-Erling Smørgrav
336d3d2ab3 Say one thing, do the other... nextpid -> lastpid 2001-06-11 23:00:35 +00:00
Dag-Erling Smørgrav
9c0247ff80 Linprocfs builds on Alpha now. 2001-06-11 21:57:18 +00:00
Dag-Erling Smørgrav
4c17857638 Implement proc/cpuinfo for the Alpha (thanks to gallatin).
Implement proc/pid/cmdline.
2001-06-11 21:55:40 +00:00
Dag-Erling Smørgrav
8f7e4eb568 Rename nextpid to lastpid and externalize it. 2001-06-11 21:54:19 +00:00
Hajimu UMEMOTO
aae773e460 Nuke wrongly introduced experimental stuff during KAME merge.
Following changed was made by previous commit:

  - add a pointer to struct mauxtag.  two integer was too restrictive.
  - add m_aux_{add,find}2.
  - make sure to nuke mbuf pointed to m_aux.
2001-06-11 20:14:45 +00:00
Matthew Dillon
ef6a93ef81 Cleanup the tabbing 2001-06-11 19:17:05 +00:00
Dag-Erling Smørgrav
fe46349692 Blah, I cut out a tad too much in the previous commit. (thanks again, Jake!) 2001-06-11 18:43:32 +00:00
Dag-Erling Smørgrav
e3b373228c copyin(9) doesn't return ENAMETOOLONG. (thanks, Jake!) 2001-06-11 18:36:18 +00:00
Andrew Gallatin
4d38dc6689 Use struct device * rather than device_t for (*pci_intr_route args), so
as to match other prototypes in the file.
2001-06-11 18:19:44 +00:00
Dag-Erling Smørgrav
b0def2b548 Add sbuf_copyin(). Also add 'b' variants of sbuf_{cat,copyin,cpy}() which
ignore NUL bytes in the source string.
2001-06-11 17:05:52 +00:00
Dag-Erling Smørgrav
21ceb6efa2 For some reason, though the module builds just fine without <sys/lock.h>,
LINT fails to build without it.
2001-06-11 15:04:48 +00:00
Hajimu UMEMOTO
3384154590 Sync with recent KAME.
This work was based on kame-20010528-freebsd43-snap.tgz and some
critical problem after the snap was out were fixed.
There are many many changes since last KAME merge.

TODO:
  - The definitions of SADB_* in sys/net/pfkeyv2.h are still different
    from RFC2407/IANA assignment because of binary compatibility
    issue.  It should be fixed under 5-CURRENT.
  - ip6po_m member of struct ip6_pktopts is no longer used.  But, it
    is still there because of binary compatibility issue.  It should
    be removed under 5-CURRENT.

Reviewed by:	itojun
Obtained from:	KAME
MFC after:	3 weeks
2001-06-11 12:39:29 +00:00
Dag-Erling Smørgrav
52ebde4fba Add PSEUDOFS, and note that LINPROCFS depends on it. 2001-06-11 11:04:36 +00:00
Dag-Erling Smørgrav
81cbd9b091 Add pseudofs and the new linprocfs here. 2001-06-11 11:02:10 +00:00