Commit Graph

29585 Commits

Author SHA1 Message Date
Gary Jennejohn
588974c99a Fix some places where the macro L0IFPIUNIT was used instead of the correct
form L0IFPI2UNIT. This could result in a panic if the user tried to
trace using isdntrace(8). I fixed this locally but forgot to commit it.

Reminded by:	"Wittig, Christoph" <wc@medianet-world.de>
2002-01-02 12:55:04 +00:00
Mike Smith
3e759f3681 If the CLK_VAL register is 0 bits wide, the system does not support
CPU throttling, so don't do some bogus math to check it.
2002-01-02 10:53:10 +00:00
Gary Jennejohn
26a4599362 i4bisppp also needs net/if_spppsubr.c.
MFC after:	1 month
2002-01-02 09:15:18 +00:00
Alan Cox
23f139432e o Properly check the file descriptor passed to aio_cancel(2). (Previously,
no out-of-bounds check was performed on the file descriptor.)
 o Eliminate some excessive white space from aio_cancel(2).
2002-01-02 07:04:38 +00:00
Ian Dowse
1278d57acd Permit NFS filesystems to be forcibly unmounted when the server is
down, even if there are hung processes and the mount is non-
interruptible.

This works by having nfs_unmount call a new function nfs_nmcancelreqs()
in the FORCECLOSE case. It scans the list of outstanding requests
and marks as interrupted any requests belonging to the specified
mount. Then it waits up to 30 seconds for all requests to terminate.
A few other changes are necessary to support this:
- Unconditionally set a socket timeout so that even hard mounts
  are guaranteed to occasionally check the R_SOFTTERM flag on
  requests. For hard mounts this flag can only be set by
  nfs_nmcancelreqs().
- Reject requests on a mount that is currently being unmounted.
- Never grant the receive lock to a request that has been cancelled.

This should also avoid an old problem where a forced NFS unmount
could cause a crash; it occurred when a VOP on an unlocked vnode
(usually VOP_GETATTR) was in progress at the time of the forced
unmount.
2002-01-02 00:41:26 +00:00
Jake Burkholder
5e8af3b31d Print parm6 too in the !KTR_EXTEND case. 2002-01-01 21:47:38 +00:00
Jake Burkholder
cbecdd5743 1. Lower the poll timeout for the ofw console driver from hz / 50 to hz / 4.
This gives a bit of a sluggish console, but it prevents the console from
   getting stuck if we poll too fast, as well as other badness on certain
   machines.
2. Fix a test for != 0 that should have been > 0.

Noticed by:	Jamey Wood <Jamey.Wood@Sun.COM> and myself
Submitted by:	tmm (2)
2002-01-01 21:45:30 +00:00
Jake Burkholder
48cff2ea0b Correctly identify the cpu in certain ultra 1s.
Noticed by:	Jamey Wood <Jamey.Wood@Sun.COM>
Submitted by:	tmm
2002-01-01 21:26:57 +00:00
Jake Burkholder
2f3a74c449 Define __ASM__ so that libc will know not to define C things. 2002-01-01 21:21:05 +00:00
Jake Burkholder
947f30e25e Add a define for the fp restore soft trap type.
Only declare C things if __ASM__ is not defined.
2002-01-01 21:19:46 +00:00
Jake Burkholder
9b9706d39d Add constants needed by user trap code. 2002-01-01 21:17:14 +00:00
Jake Burkholder
fa60dcbea4 Enable virtual caching for kernel pages. When we enabled virtual caching
for certain user pages, stores to kernel pages would not update the
affected cache lines, which would sometimes cause the wrong data to be
returned for loads from kernel pages.  This was especially fatal when
the addresses affected held the kernel stack pointer, and a random
value was loaded into it.
Fix a harmless off by one error in a dcache_inval_phys call.
2002-01-01 21:14:58 +00:00
Jake Burkholder
52d966e949 Add some more info to traces.
Fix a potential race in setting up the per-cpu pointer if the special
restore fails on return to user mode fails and we need to trap back
into the kernel to fault in more stack.
Remove debug code.
2002-01-01 21:04:27 +00:00
Jake Burkholder
d89dbeb9e4 Ensure that the syscall trap vector is properly aligned. 2002-01-01 21:00:29 +00:00
Jake Burkholder
1ca0488670 Implement sysarch(SPARC_UTRAP_INSTALL).
Forgot this file in last commit.
2002-01-01 20:57:51 +00:00
Jake Burkholder
cbe522d307 Implement user trap delivery as specified by the sparc abi. This provides
an efficient way for the kernel to bounce certain mundane traps back to
userland for handling there.  A user trap handler returns directly to the
trapping user code, rather than going through the kernel again.  Only a
handful of instructions are actually executed in kernel mode.
Implement sysarch(SPARC_UTRAP_INSTALL).
Add code to handle sharing of the user trap table across forks and unsharing
at exec.

This can be used to implement efficient tracking of floating point register
usage in userland, fe by a thread library, and to handle alignment fault
fixups and instruction emulation in userland, for which the code may need
to be different for 32bit and 64bit binaries.
2002-01-01 20:56:28 +00:00
Jake Burkholder
d79083a390 Add a panic stack, which is used as a known good stack when there is
something wrong with the kernel stack.
Add code to check the kernel stack pointer in various important places
and try hard not to go down in flames if its wrong.
2002-01-01 20:26:46 +00:00
Jake Burkholder
cee5e561b6 Add a soft trap for restoring the fpu registers from the pcb. 2002-01-01 20:15:39 +00:00
Jake Burkholder
f264c6fbf8 Fix long lines in the trap table due to the abi specificied trap types
having overly long names.
2002-01-01 20:10:51 +00:00
Søren Schmidt
a643d91a46 Update of the VIA 82c686b southbridge data corruption fix, also
include more possible chipset candidates.
2002-01-01 19:58:11 +00:00
Alan Cox
62d69898f9 o Remove an errant ';' introduced in the last revision.
o Remove an unused variable.
2002-01-01 19:44:01 +00:00
Seigo Tanimura
05331bc6d4 - Do not uiomove with a mutex locked.
- Move from msleep/wakeup to condvar.

- Return either zero or a positive errno value from a function.
  Return additional result via references.

- Unify the typedef of callback functions.
2002-01-01 17:36:26 +00:00
Robert Watson
0e97c01d6d o Remove premature use of nmp->nm_cred, it hasn't been initialized yet. 2002-01-01 16:17:55 +00:00
Dag-Erling Smørgrav
36bf75f010 This file does not need to include procfs.h. This fixes a bunch of warnings. 2002-01-01 14:46:57 +00:00
Chris D. Faulhaber
47453701a1 Add support for Nikon Coolpix E775 and E885 cameras.
PR:		33407 (E885)
Submitted by:	Brian Behlendorf <brian@hyperreal.org> (E885)
2002-01-01 13:28:43 +00:00
Warner Losh
cbffb1a325 Welcome 2002. Happy new year. 2002-01-01 09:20:52 +00:00
Julian Elischer
6d823e816b Add the nullmodem device 2002-01-01 05:16:03 +00:00
Alan Cox
eae43d0e56 o Some style(9)-motivated changes to white space. 2002-01-01 00:40:29 +00:00
Doug Ambrisko
9598826172 Save stack space by converting areq in sc->areq.
Reviewed by:	Brooks Davis <brooks@freebsd.org>
		Warner Losh <imp@freebsd.org>
Approved by:	Brooks Davis <brooks@freebsd.org>
		Warner Losh <imp@freebsd.org>
2001-12-31 22:12:42 +00:00
Doug Ambrisko
0d6fcb5c0e Fix bugs in the structure for rx_frame by making gap length one byte and
a packed array so sizeof work.  This broke RFMON mode and passing
up 802.11 packets.

The Linux emulation code was derived from the open source Linux driver to
maintain compatibility.

LEAP support is added, hints from Richard Johnson.  I've verified this
locally with PC350v42510.img firmware.  More bug fixing from Marco to
fix long passwords.

Change DELAYs in flash part of driver to FLASH_DELAY which uses tsleep
so it doesn't look like your system died during a flash update.

Install header files in /usr/include/dev/an

Cleanup some ifmedia bugs add "Home" key mode to ifmedia and ancontrol.
This way you can manage 2 keys a little easier.  Map the home mode into
key 5.  Enhance ifconfig to dump the various configured SSIDs.  I use
a bunch of different ones and roam between them.  Use the syntax similar
to the WEP keys to deal with setting difference SSIDs.

Bump up up the Card capabilities RID since they added 2 bytes to it
in the latest firmware.  Thankfully we changed it from a terminal
failure so the card still worked but the driver whined.

Some cleanup patches from Marco Molteni.

Submitted by:	Richard Johnson <raj@cisco.com>
		Marco Molteni <molter@tin.it>
		and myself
Various checks: David Wolfskill <david@catwhisker.org>
Reviewed by:	Brooks Davis <brooks@freebsd.org>
		Warner Losh <imp@freebsd.org>
Approved by:	Brooks Davis <brooks@freebsd.org>
		Warner Losh <imp@freebsd.org>
Obtained from:	Linux emulation API's from Aironet driver.
2001-12-31 22:01:44 +00:00
Robert Watson
147839396c o Pass td into nfs_mountroot() to eliminate an XXX'd curthread use.
Since it's in the parent function anyway, might as well pass it
  another layer down.

Obtained from:	TrustedBSD Project
2001-12-31 21:00:00 +00:00
Robert Watson
1b17a3c9ca o Remove premature leakage of use of td_ucred from base source tree:
instead, use td->td_proc->p_ucred.
2001-12-31 20:56:59 +00:00
Matthew Dillon
587bd8bf0a Grrr. The tlb code is strewn over 3 files and I misread it. Revert
the last change (it was a NOP), and remove the XXX comments that no longer
apply.
2001-12-31 20:32:53 +00:00
Robert Watson
474c19561b o Add missing #include's of sys/proc.h, missed in merge, required to
dereference td->td_proc->p_ucred.
2001-12-31 20:05:26 +00:00
Matthew Dillon
b00dcfdf74 You know those 'XXX what about SMP' comments in pmap_kenter()? Well,
they were right.  Fix both kenter() and kremove() for SMP by ensuring that
the tlb is flushed on other cpu's.  This will directly solve random-corruption
panic issues in -stable when it is MFC'd.  Better to be safe then sorry, we
can optimize this later.

Original Suspicion by: peter
Maybe MFC: immediately on re's permission
2001-12-31 20:02:46 +00:00
Boris Popov
fc75194c3c Spelling fixes.
PR:		kern/33131
Submitted by:	Anders Andersson <anders@hack.org>
MFC after:	1 week
2001-12-31 19:29:43 +00:00
Robert Watson
9c4d63da6d o Make the credential used by socreate() an explicit argument to
socreate(), rather than getting it implicitly from the thread
  argument.

o Make NFS cache the credential provided at mount-time, and use
  the cached credential (nfsmount->nm_cred) when making calls to
  socreate() on initially connecting, or reconnecting the socket.

This fixes bugs involving NFS over TCP and ipfw uid/gid rules, as well
as bugs involving NFS and mandatory access control implementations.

Reviewed by:	freebsd-arch
2001-12-31 17:45:16 +00:00
Joerg Wunsch
c4552f53b1 Remove unused includes. 2001-12-31 09:31:30 +00:00
Yoshihiro Takahashi
68eb13c9a1 Disabled the olpt driver temporarily to avoid 'repeat make_dev' panic. 2001-12-31 09:02:24 +00:00
Ian Dowse
6a4b84ea0d When the old nfsm_adv() macro was moved to nfsm_adv_xx(), a '>='
must have been inadvertently changed to '>'. This broke nfsm_adv()
in the case where the advancement count is equal to the amount of
data remaining in the current mbuf. Instead of moving the current
position N bytes forward, nfs_adv() could end up moving it back to
N bytes from the start of the mbuf data.

This should fix the client-side readdirplus problems that have been
reported since September.
2001-12-31 06:56:31 +00:00
Alan Cox
5ca50a4bc9 o Correct an off-by-one error in aio_suspend(2).
PR:		18350
2001-12-31 03:13:24 +00:00
Alan Cox
516d256401 o Use "td->td_proc" instead of "curproc" where possible.
o Eliminate the unnecessary initialization of several static variables
   to zero.
2001-12-31 02:03:39 +00:00
Josef Karthauser
6035292097 Synchronise with NetBSD.
In order of importance:
* Make ugen use updated frlengths.
* More tests for NULL pipes.
* Generate better error codes on bulk write.
* Error messages in general.
2001-12-31 00:52:17 +00:00
Marcel Moolenaar
200281abc1 Revert previous definition of cpu_throw(). Non-MP configurations
were broken as well.
2001-12-30 23:39:15 +00:00
Josef Karthauser
a2036daf1c Partial sync with NetBSD:
Replace LE() macro with htole32()/le32toh().
2001-12-30 23:02:31 +00:00
Joerg Wunsch
ee037f26bc Implement an option to administratively disable the negotiation of
IPv6 on an sppp interface.  In an IPv6-enabled kernel, every IPv6
interface automatically gets an IPv6 address assigned (and IPv6
multicast packets sent at initialization time).  For sppp links where
we know our remote peer wouldn't support IPv6 at all, there's no point
in attempting to negotiate IPV6CP (or to even dial out for an IPv6
packet at all for dial-on-demand interfaces).

I wish there were a more generic way to administratively disable IPv6
on an interface instead.  ume told me there isn't.

While i was at it, converted both, enable_vj and enable_ipv6 into flag
bits in struct sppp (enable_vj used to be an int of its own).

MFC after:	1 month
2001-12-30 20:42:29 +00:00
Poul-Henning Kamp
e42d6981f2 GC an alternate trap_pfault() which has rotted away behind an "#ifdef notyet"
since 21-Mar-95 .
2001-12-30 19:43:59 +00:00
Joerg Wunsch
230ce3668b Fix two typos in previous commit. 2001-12-30 19:37:41 +00:00
Joerg Wunsch
909b37a414 Merge last-minute fix from the i4b file made by gj:
Protect mtx_init() invocations with mtx_intialized() checks to avoid a
reported panic.

MFC after:	1 month
2001-12-30 19:02:27 +00:00
Alan Cox
477b78a0df Eliminate semexit_hook using at_exit(9) and rm_at_exit(9).
Reviewed by:	alfred
2001-12-30 18:55:09 +00:00