Commit Graph

45206 Commits

Author SHA1 Message Date
njl
948d8dbe1d Fix hw.acpi.os_name by renaming it to hw.acpi.osname. The "_name" suffix
is reserved by the loader, and thus any tunable name with that suffix will
be silently discarded.

Document this in the header and man page so that other developers do not
develop so many bumps on the head after banging it against the wall.

Detective work by:	Mark Santcroos, grehan
2004-02-14 03:17:30 +00:00
green
a9d7538c98 T -CURRENT DO NOT CRASH UPON ^T K PLZ THX.
Also, use sched_pctcpu() instead of assuming td->td_kse is non-NULL.
2004-02-14 01:30:06 +00:00
mlaier
538e0a14ed Do not expose ip_dn_find_rule inline function to userland and unbreak world.
----------------------------------------------------------------------
2004-02-13 22:26:36 +00:00
bde
e359757db5 MFffs (ffs_vfsops.c 1.76 (part of the big soft updates commit): lock
the vnode around calls to vinvalbuf()).  Apparently no one has tested
ext2fs with DEBUG_VOP_LOCKS.  Vnode locking for vinvalbuf() might not
be required in non-soft-updates cases, but it is now asserted.

MFffs (uncommitted related and nearby cleanups: don't unlock the vnode
after vinvalbuf() only to have to relock it almost immediately; don't
refer to devices classified by vn_isdisk() as block devices).
2004-02-13 20:23:16 +00:00
mlaier
04fd428a9f Do not check receive interface when pfil(9) hook changed address.
Approved by: bms(mentor)
2004-02-13 19:20:43 +00:00
mlaier
203c8d565b This set of changes eliminates the use of MT_TAG "pseudo mbufs", replacing
them mostly with packet tags (one case is handled by using an mbuf flag
since the linkage between "caller" and "callee" is direct and there's no
need to incur the overhead of a packet tag).

This is (mostly) work from: sam

Silence from: -arch
Approved by: bms(mentor), sam, rwatson
2004-02-13 19:14:16 +00:00
bms
1bb6a033ad Brucification.
Submitted by:	bde
2004-02-13 18:21:45 +00:00
bde
026939350b Fixed a misplaced ifdef that prevented npx.c building without "device isa"
ISA.  npx has few isa dependencies, but it does unconditional outb()'s to
the isa bus in the !SMP case, and it attaches to isa if "device isa" is
configured in order to support PNP-ISA.  The ifdef for the latter was
misplaced.

PR:		62595
2004-02-13 18:04:51 +00:00
bde
41bc53fc92 Fixed longstanding brokenness of inode updates. The waitfor flag was
dishonored in rev.1.1 by commenting out the code that honored it.  This
gave the worst disadvantages of async mounts in an uncontrollable way.

Honoring the flag costs about 50% in real time in worst cases on a new
but not very fast ATA drive with write caching (probably more on drives
without write caching).  The old misbehavior can be recovered using
async mounts after implementing them in mount_ext2fs(8) (just put the
MNT_ASYNC flag in mount_ext2fs's table of supported options like it
is in mount's table).
2004-02-13 17:49:03 +00:00
nyan
3a262f367e MFi386: Get rid of unnecessary use of m4(1) by using cpp(1) instead.
Repocopied by:	joe
2004-02-13 15:39:59 +00:00
nyan
fbcedf1cdb MFi386: revisions 1.74 and 1.75.
- kzip(8) is long dead.
  - Clean CLEANFILES.
2004-02-13 15:26:22 +00:00
nyan
d38a3f0ad7 MFi386: revision 1.20 (don't strip kgzldr.o) 2004-02-13 15:24:25 +00:00
ume
585813300a - wrap mappedaddr block by #ifdef INET for IPv6-only kernel in future.
- rejects IPv6 packet toward IPv4-mapped address if its source address
  is not an IPv4-mapped IPv6 address, since the converted IPv4 packets
  would have an unexpected IPv4 source address.
- when V6ONLY socket option is set, discard packets destined to a
  v4/ipv4 mapped ipv6 address.
- have PULLDOWN_TEST codepath.
- get rid of in6_mcmatch().

Obtained from:	KAME
2004-02-13 15:11:47 +00:00
ume
0eaf776adc supported IPV6_RECVPATHMTU socket option.
Obtained from:	KAME
2004-02-13 14:50:01 +00:00
ru
26afc87c3d Merged from kmod.mk,v 1.152: strip debugging symbols even when not
configured for debugging.  This saves some bytes, and produces the
same "kernel" object as if it was configured for debugging.
2004-02-13 13:21:41 +00:00
ru
c48aea48f5 Don't override the standard SYSTEM_LD setting from kern.pre.mk.
Instead, use the linker script to record the correct entry point.
2004-02-13 12:28:53 +00:00
phk
21d7048add Back out my last commit to syscons, things seem to be far more evil
than suspected.

and obviously nobody runs the patches I post to -current :-(

Poul-Henning
2004-02-13 12:04:15 +00:00
ru
c508277ee6 Reduce the number of knobs controlling the build of debug modules
to one, DEBUG_FLAGS, which is also compatible with <bsd.prog.mk>.
Previously one had to set both DEBUG and DEBUG_FLAGS to build the
.ko.debug with debugging symbols which was boring when doing this
manually.
2004-02-13 10:40:54 +00:00
ru
589585cd81 Removed -g from CFLAGS. There is a better way to build debugging
versions of the modules, and unconditionally putting -g in CFLAGS
has negative impact on the size of the resulting .ko object, even
now that debugging symbols are always stripped.
2004-02-13 10:11:01 +00:00
ru
f5f2071dcc We didn't strip debugging symbols from .ko if DEBUG was undefined. 2004-02-13 09:39:45 +00:00
marcel
fc3280ec4a Don't create a mapfile during link. It's not needed for the build. 2004-02-13 04:45:41 +00:00
marcel
347a2e0865 o Don't build with -fpic. It's not needed and inconsistent with how
other constributions are compiled.
o  Remove powerpc specific additions to CFLAGS.
2004-02-13 04:43:41 +00:00
bde
14080bdf42 MFextfs: backed out secondary changes in rev.1.40 that had become just
style bugs (a variable that is used only once, and misformattings).
2004-02-13 03:05:12 +00:00
kuriyama
e8acd43805 Fix style bugs in previous commit.
Submitted by:	bde
2004-02-13 02:02:06 +00:00
phk
1dd409d2a5 Remove the absolute count g_access_abs() function since experience has
shown that it is not useful.

Rename the relative count g_access_rel() function to g_access(), only
the name has changed.

Change all g_access_rel() calls in our CVS tree to call g_access() instead.

Add an #ifndef BURN_BRIDGES #define of g_access_rel() for source
code compatibility.
2004-02-12 22:42:11 +00:00
ru
071ceb0963 Fixed the fatal bug introduced in previous commit: don't strip
kgzldr.o -- kgzipping with such a loader produces bad images.
2004-02-12 22:06:33 +00:00
ru
150ec265ee Clean CLEANFILES. 2004-02-12 21:43:50 +00:00
phk
ac89298171 Don't use makedev() to hack up dev_t's early in boot, do it right
with make_dev() (and avoid doing it again later).
2004-02-12 21:32:59 +00:00
alc
54d32050ff Further reduce the use of Giant in vm_map_delete(): Perform pmap_remove()
on system maps, besides the kmem_map, without Giant.

In collaboration with:	tegge
2004-02-12 20:56:06 +00:00
jhb
43c20e7cc7 Use the PCIR_BAR() macro rather than a magic number to specify the BAR
for controller memory.
2004-02-12 20:47:03 +00:00
phk
f720444124 Correct the cleanup of the alias dev_t for /dev/urandom: being an
alias it depends on the aliased dev_t and disappears automatically
when that is removed.

Submitted by:	"Bjoern A. Zeeb" <bzeeb+freebsd@zabbadoz.net>
2004-02-12 20:46:49 +00:00
jhb
138e77f708 Fix a whitespace nit. 2004-02-12 20:45:01 +00:00
phk
2153be178c Give both consumers and providers a {void *private, u_int index} which
the implementing class can use to hang internal info from.
2004-02-12 20:32:11 +00:00
bms
6e8738d1d5 Update the prototype for tcpsignature_apply() to reflect the spelling of
the types used by m_apply()'s callback function, f, as documented in mbuf(9).

Noticed by:	njl
2004-02-12 20:16:09 +00:00
bms
fd325b0789 style(9) pass; whitespace and comments.
Submitted by:	njl
2004-02-12 20:12:48 +00:00
bms
ac0d979519 Remove an unnecessary initialization that crept in from the code which
verifies TCP-MD5 digests.

Noticed by:	njl
2004-02-12 20:08:28 +00:00
bde
486a6ad7c5 MFffs (ffs_vfsops.c 1.227: clean up open mode bandaid). This reduces
gratuitous differences with ffs a little.
2004-02-12 17:54:58 +00:00
bde
ec07884b70 Fixed some minor style bugs (English usage and formatting of binary
operators) in and near revs.1.169-1.170 (open mode bandaid).  This
(or better a proper fix) should have been done before cloning the
bandaid to many other file systems.
2004-02-12 16:52:24 +00:00
grehan
06d48e1164 Work-in-progress for the 'Kauai' ATA device in Mac notebooks. The
device seems to be the macio ATA cell with a PCI front-end, and
has no relation to PIIX-style ATA/PCI devices.
2004-02-12 09:17:16 +00:00
grehan
ffd4cd9736 Add sys file required for IEEE fp functions.
Submitted by:  Suleiman Souhlal <refugee@segfaulted.com>
2004-02-12 09:12:11 +00:00
kuriyama
99d2f7cb5d Reverse lock order by using local variable. This will shut up "acquiring
duplicate lock of same type" message.

Reviewed by:	mckusick
2004-02-12 08:52:08 +00:00
ru
8c9e37a3b1 Tidy up makefiles.
Tested by:	marcel
2004-02-12 08:10:34 +00:00
grehan
77d91981ae Remove register keyword and constify tmp values. This fixes
PPC compile warning - PPC is the only consumer of this code
path.
2004-02-12 03:23:13 +00:00
green
c270474e0b Always socantsendmore() before deallocating a socket. This, in turn,
calls selwakeup() if necessary (which it is, if you don't want freed
memory hanging around on your td->td_selq).

Props to:	alfred
2004-02-12 01:48:40 +00:00
wpaul
5861d141d6 Correct instance of *timeout that should have been timeout.
Noticed by: mlaier
2004-02-11 23:11:12 +00:00
ru
aa19ffafed kzip(8) is long dead. 2004-02-11 22:25:25 +00:00
truckman
09ced2971e When reparenting a process to init, make sure that p_sigparent is
set to SIGCHLD.  This avoids the creation of orphaned Linux-threaded
zombies that init is unable to reap.  This can occur when the parent
process sets its SIGCHLD to SIG_IGN.  Fix a similar situation in the
PT_DETACH code.

Tested by:	"Steven Hartland" <killing AT multiplay.co.uk>
2004-02-11 22:06:02 +00:00
ru
4ae2790aed Overhaul makefiles. 2004-02-11 22:01:17 +00:00
wpaul
b735cc2279 Add yet more bulletproofing. This is to guard against the case that
ndis_init_nic() works one during attach, but fails later. Many things
will blow up if ndis_init_nic() fails and we aren't careful.
2004-02-11 21:53:40 +00:00
ru
9e71dd46a9 _start.S -> _start.s as the latter is pure asm file.
Repocopied by:	joe
2004-02-11 21:17:04 +00:00
pjd
d6cf40b908 Added g_print_bio() function to print informations about given bio.
Approved by:	phk, scottl (mentor)
2004-02-11 18:21:32 +00:00
jhb
e53f012bc7 Argh! Fix a bogon. lim_cur() was returning the hard (max) limit rather
than the soft (cur) limit.

Submitted by:	bde
2004-02-11 18:04:13 +00:00
bde
5f79da8879 Removed more vestiges of vfs_ioopt:
- rev.1.42 of ffs_readwrite.c added a special case in ffs_read() for reads
  that are initially at EOF, and rev.1.62 of ufs_readwrite.c fixed
  timestamp bugs in it.  Removal of most of vfs_ioopt made it just and
  optimization, and removal of the vm object reference calls made it less
  than an optimization.  It was cloned in rev.1.94 of ufs_readwrite.c as
  part of cloning ffs_extwrite() although it was always less than an
  optimization in ffs_extwrite().
- some comments, compound statements and vertical whitespace were vestiges
  of dead code.
2004-02-11 15:27:26 +00:00
tjr
5f4cbe868c Use automatic major number allocation for the nfs4 device instead of
stealing #29, which is already reserved for mcd.
2004-02-11 13:31:30 +00:00
grehan
2403327a91 Interrupt statistics, vmstat -i now works.
Submitted by:  Suleiman Souhlal <refugee@segfaulted.com>
Slightly modified by: grehan
Derived from:  i386
2004-02-11 13:18:31 +00:00
tjr
44dac51c79 Un-reserve major 144 (nsmb) now that we are using automatic allocation. 2004-02-11 12:58:06 +00:00
tjr
363f5518c7 Use automatic major number allocation for nsmb devices. 2004-02-11 12:49:49 +00:00
grehan
a6911b1556 Clean up header files, which fixes compile warning. 2004-02-11 10:49:30 +00:00
grehan
03baee05d3 - constify devinfo strings to eliminate compile warning
- remove trailing whitespace
2004-02-11 10:15:15 +00:00
thomas
e29b900073 (atapi_cb): Reenable automatic retrieve of sense data on error, making
it asynchronous to avoid incorrect use of ata_atapicmd within an
 ATAPI callback.

Tested by:	harti
2004-02-11 10:14:08 +00:00
bms
b11716b2a5 Fix a typo; left out preprocessor conditional for sigoff variable, which
is only used by TCP_SIGNATURE code.

Noticed by:	Roop Nanuwa
2004-02-11 09:46:54 +00:00
ru
33e9fd9b16 Get rid of unnecessary use of m4(1) by using cpp(1) instead.
(John tells me there were problems when trying this before,
but it appears to be safe these day.)

OK'ed by:	jhb
Repocopied by:	joe
2004-02-11 08:42:38 +00:00
grehan
74e5a083bb - fix compile warnings
- removed obsolete NetBSD-derived ADB conditionals
2004-02-11 08:07:19 +00:00
grehan
131cdb72e9 - fixed trailing whitespace and indentation
- removed unused variable to fix compile warning
2004-02-11 07:58:43 +00:00
grehan
d2e3febf15 Fix compile warning 2004-02-11 07:48:19 +00:00
grehan
9657eea224 - remove trailing whitespace
- fix compile warnings. badaddr() will go to a header file soon.
2004-02-11 07:44:56 +00:00
grehan
97a4b15401 Cleaned up param.h:
- culled long-dead #define's
 - segment register defs moved to sr.h
 - NPMAPS moved to pmap.h
 - KERNBASE moved to vmparam.h
 - removed include of <machine/cpu.h> and fixed src files that
   relied on this.

Modifying segment register code no longer causes gcc rebuilds :-)
2004-02-11 07:27:34 +00:00
grehan
266664fca0 Invalide pcb's fpu cpu # by setting it to INT_MAX, not NULL. 2004-02-11 07:19:15 +00:00
grehan
9c732a0abb Add sysctl hw.uma_mdpages to track how many pages have been allocated
by UMA_MD_SMALL_ALLOC
2004-02-11 04:42:48 +00:00
bms
320d5d9482 Initial import of RFC 2385 (TCP-MD5) digest support.
This is the first of two commits; bringing in the kernel support first.
This can be enabled by compiling a kernel with options TCP_SIGNATURE
and FAST_IPSEC.

For the uninitiated, this is a TCP option which provides for a means of
authenticating TCP sessions which came into being before IPSEC. It is
still relevant today, however, as it is used by many commercial router
vendors, particularly with BGP, and as such has become a requirement for
interconnect at many major Internet points of presence.

Several parts of the TCP and IP headers, including the segment payload,
are digested with MD5, including a shared secret. The PF_KEY interface
is used to manage the secrets using security associations in the SADB.

There is a limitation here in that as there is no way to map a TCP flow
per-port back to an SPI without polluting tcpcb or using the SPD; the
code to do the latter is unstable at this time. Therefore this code only
supports per-host keying granularity.

Whilst FAST_IPSEC is mutually exclusive with KAME IPSEC (and thus IPv6),
TCP_SIGNATURE applies only to IPv4. For the vast majority of prospective
users of this feature, this will not pose any problem.

This implementation is output-only; that is, the option is honoured when
responding to a host initiating a TCP session, but no effort is made
[yet] to authenticate inbound traffic. This is, however, sufficient to
interwork with Cisco equipment.

Tested with a Cisco 2501 running IOS 12.0(27), and Quagga 0.96.4 with
local patches. Patches for tcpdump to validate TCP-MD5 sessions are also
available from me upon request.

Sponsored by:	sentex.net
2004-02-11 04:26:04 +00:00
njl
40ef205141 Prefer buttons defined in the AML over the ones in the FADT. Some
systems define power/sleep buttons in both places but only deliver
notifies to the ones defined in the AML.

Also, reduce length of various function handler names.

PR:
Submitted by:
Reviewed by:
Approved by:
Obtained from:
MFC after:
2004-02-11 02:57:33 +00:00
grehan
5ddba9dd32 Correctly create interrupt key for PCI, which is the OpenFirmware
pci-hi/med/lo + node 'interrupts' property. This worked by
accident until recent notebooks required correct operation.

Tested by:  Suleiman Souhlal <refugee@segfaulted.com>
2004-02-10 23:57:35 +00:00
wpaul
f2d8ede0c0 Add some bulletproofing: don't allow the ndis_get_info() or ndis_set_info()
routines to do anything except return error if the miniport adapter context
is not set (meaning we either having init'ed the driver yet, or the
initialization failed).

Also, be sure to NULL out the adapter context along with the
miniport characteristics pointers if calling the MiniportInitialize()
method fails.
2004-02-10 23:01:53 +00:00
ru
e96509b7a9 Since loader(8) on SPARC64 is a pure ELF executable (as opposed
to other architectures), there is no reason not to strip(1) it.

Tested by:	kensmith
2004-02-10 22:11:36 +00:00
pdeuskar
79971db84d Only reset the phy when it is absolutely required.
This should fix the issues with long *init* times when
you do ifconfig em0 alias.

MFC after:	3 days
2004-02-10 21:31:09 +00:00
nectar
c4f1593752 Fix a panic in pseudofs(9) that could occur when doing an I/O
operation with a large request or large offset.

Reported by:	Joel Ray Holveck <joelh@piquan.org>
Submitted by:	des
2004-02-10 21:06:47 +00:00
alc
21ca8437e2 Correct a long-standing race condition in the inactive queue scan. (See
the added comment for low-level details.)  The effect of this race
condition is a panic "vm_page_cache: caching a dirty page, ..."

Reviewed by:	tegge
MFC after:	7 days
2004-02-10 18:34:27 +00:00
pjd
0989a71dbd Now we have g_topology_assert_not(), so use it to detect deadlocks.
Approved by:	phk, scottl (mentor)
2004-02-10 15:55:17 +00:00
pjd
ef4c1cddb3 Added macro which will be used to assert, that the topology lock is not held.
Approved by:	phk, scottl (mentor)
2004-02-10 15:53:28 +00:00
phk
54f138e886 Change the kernels definition of NODEV from ((dev_t)-1) to NULL. 2004-02-10 15:23:47 +00:00
phk
5d013a5e90 don't call sbuf_clear() right after sbuf_new(), it is not necessary. 2004-02-10 10:54:19 +00:00
tjr
f7cfe0fc21 Fixes problems that occurred when a file was removed and a directory
created with the same name, and vice versa:
- Immediately recycle vnodes of files & directories that have been deleted
or renamed.
- When looking an entry in the VFS name cache or smbfs's private
cache, make sure the vnode type is consistent with the type of file
the server thinks it is, and re-create the vnode if it isn't.

The alternative to this is to recycle vnodes unconditionally when their
use count drops to 0, but this would make all the caching we do
mostly useless.

PR:		62342
MFC after:	2 weeks
2004-02-10 05:53:02 +00:00
grehan
d1793ee09c Loader makefile cleanup.
Submitted by:  ru
2004-02-09 21:54:54 +00:00
des
f011561045 Remove VFS_STATFS() call which violated the lock order and wasn't
really required anyway.

PR:		kern/61994
Submitted by:	Bjoern Groenvall <bg@sics.se>
2004-02-09 20:33:42 +00:00
wpaul
93971f7a24 Add stub implementations of KfLowerIrql() and KfRaiseIrql() (both of
which are _fastcall).
2004-02-09 19:13:58 +00:00
ume
56f3b234c8 fix build with FAST_IPSEC.
Reported by:	cjc
2004-02-09 16:02:16 +00:00
nyan
046cd65463 MFi386: Factor out -nostdlib and use PROG. 2004-02-09 16:01:45 +00:00
ru
8efe90a34f MFi386.
- Factor out common settings and put them in an upper level Makefile.inc.
- Properly use PROG for real programs, not their products.
- Further reduce diffs to i386 versions.

Tested on:	sparc64 (panther)
2004-02-09 14:17:02 +00:00
ru
2e8c68a86d - Factor out -nostdlib to an upper level Makefile.inc.
- Now that bsd.prog.mk deals with programs linked with -nostdlib
  better, and has a notion of an "internal" program, use PROG
  where possible.  This has a good impact on the contents of
  .depend files and causes programs to be linked with cc(1).

XXX: boot2 couldn't be converted as it's actually two programs.

Tested on:	i386, amd64
2004-02-09 14:11:58 +00:00
grehan
e8e57bc572 Disable branch-target instruction cache on MPC7457 as outlined
in Motorola processor errata.

Submitted by:  Suleiman Souhlal <refugee@segfaulted.com>
2004-02-09 07:04:01 +00:00
scottl
dda7fc6c8d Fall back to INTR_MPSAFE if INTR_FAST registration fails.
PR:	kern/62276
2004-02-09 05:29:05 +00:00
grehan
081c5b926b Recognize MPC7547 (aka G4+) 2004-02-09 02:25:24 +00:00
grehan
46bb873ff6 Definitions for MPC7457 CPU type and HID0 bits 2004-02-09 00:12:50 +00:00
wpaul
64209cc580 Make NdisMMapIoSpace() guard against NULL/uninitialized resource pointers too. 2004-02-08 20:39:35 +00:00
wpaul
0df0d5bbb8 Make NdisMMapIoSpace() handle the case where a device has both mem
and altmem ranges mapped.
2004-02-08 20:32:41 +00:00
mjacob
9cb3b2f2c1 Remove condition variables and status associated with target mode
enabling. Instead, go to an interrupt/polled model.

Fix get_lun_statep so we don't panic if there are no wildcard luns enabled.

MFC after:	6 days
2004-02-08 19:17:56 +00:00
mjacob
850dea8d47 Remove condition variables and status associated with target mode
enabling. Instead, go to an interrupt/polled model.

MFC after:	6 days
2004-02-08 19:16:01 +00:00
ume
77c080228f - obey ip6po_minmtu.
- notify a proper path MTU to applications.

Obtained from:	KAME
2004-02-08 18:22:27 +00:00
scottl
ee1f57fd97 Allow amr(4) to get a dynamic major number instead of a static one.
Submitted by:	Andre Guibert de Bruet
2004-02-08 16:07:22 +00:00
le
1afc6ae290 Don't free ressources that haven't been allocated. This should fix
the "disappearing subdisks" problem when new subdisks can't be created
due to some errors.

This is in fact an ugly hack, but a more elegant solution would probably
require a redesign of vinum in several places.

Approved by: joerg (mentor)
2004-02-08 15:27:58 +00:00
phk
ab91e4e4ff Polish the work/state engine in preparation for HW-crypto support. 2004-02-08 10:19:18 +00:00
phk
8899718529 Add a missing error case return.
Problem reported by:	Flemming Jacobsen <fj@batmule.dk>
2004-02-08 09:39:02 +00:00
silby
d566351d7f Add the SF_NODISKIO flag to sendfile. This flag causes sendfile to be
mindful of blocking on disk I/O and instead return EBUSY when such
blocking would occur.

Results from the DeBox project indicate that blocking on disk I/O
can slow the performance of a kqueue/poll based webserver.  Using
a flag such as SF_NODISKIO and throwing connections that would block
to helper processes/threads helped increase performance.

Currently, only the Flash webserver uses this flag, although it could
probably be applied to thttpd with relative ease.

Idea by:	Yaoping Ruan & Vivek Pai
2004-02-08 07:35:48 +00:00
silby
4be32a408c Move m_uiotombuf from uio.h to mbuf.h, where I should have put it in
the first place.

Suggested by:	bde
2004-02-08 03:19:08 +00:00
peter
a4233943d4 I forgot to add the NO_MODULES override for NOTES 2004-02-08 00:39:38 +00:00
wpaul
769a44a973 Don't hold NDIS_LOCK() around call to ndis_getstate_80211() since it
may block on ndis_get_info().
2004-02-07 23:52:58 +00:00
wpaul
55b4db9ba1 Argh. kthread_suspend() when in P_KTHREAD context, tsleep() when not,
not the other way around.
2004-02-07 23:47:10 +00:00
ru
82db57343f Argh, unbreak "make depend" for AMD64.
Reported by:	kris
2004-02-07 23:30:45 +00:00
phk
f5c0480119 We don't need to hold Giant to create the worker kthread. 2004-02-07 23:01:17 +00:00
wpaul
e59bc1101c Correct an intance of mtx_pool_lock() that should have been mtx_pool_unlock(). 2004-02-07 22:19:20 +00:00
scottl
a17a29a3f2 Remove the use of AACQ_COMPLETE here since there is no longer a completion
queue.
2004-02-07 20:54:29 +00:00
phk
73c5b7a93f I guess nobody has needed to use the SVR4olator to create device
nodes, or if they did, they're now locked away on the Kurt Gdel
memorial home for the numerically confused:

Don't cast a kernel pointer (from makedev(9)) to an integer (maj+minor combo).
2004-02-07 18:54:34 +00:00
scottl
76a0c24b82 Do some small cleanups to comments and remove AACQ_COMPLETE definitions since
the completion queue is long-gone.
2004-02-07 17:40:38 +00:00
ru
4e8453939a MFi386: Removed -elf and duplicate -ffreestanding. 2004-02-07 14:35:33 +00:00
ru
f72b868e4b - Removed -elf which is not a valid gcc(1) option anymore.
- Removed -ffreestanding; it's enforced by ../Makefile.inc.
2004-02-07 14:32:06 +00:00
ru
cd27bb419a Generate .depend file. 2004-02-07 13:38:47 +00:00
nyan
161275f577 MFi386: Cleanups to sys/boot makefiles. 2004-02-07 12:19:44 +00:00
ru
e4e26d832b Style: use the defined() expression explicitly. 2004-02-07 11:05:10 +00:00
scottl
8eb3fffb5e Remove the hack of lowering AAC_MAX_FIB now that the root cause of the
problem was found.
2004-02-07 10:30:59 +00:00
scottl
d65645ae33 If a command has to be deferred because there are no more resources for it
on the card, unmap it first.  This allows it to be picked up properly when
the queue gets kicked again.  This was the root problem for the lost command
(i.e. stuck in getblk/vinvalb) problem.  While here, panic if commands don't
map correctly instead of just silently ignoring the problem and dropping
command.  Also slow down the dynamic allocation of new commands.

It should be safe to go back into the aac waters.  Thanks to everyone who
suffered through this and provided good feedback.
2004-02-07 10:30:22 +00:00
alc
987f7dfafa swp_pager_async_iodone() no longer requires Giant. Modify bufdone()
and swapgeom_done() to perform swp_pager_async_iodone() without Giant.

Reviewed by:	tegge
2004-02-07 08:54:50 +00:00
ru
ec3d9cf4c1 Untangle building of AMD64 boot code.
Tested on:	amd64 (sledge)
2004-02-07 08:10:07 +00:00
wpaul
5dd090e5b3 Add a whole bunch of new stuff to make the driver for the AMD Am1771/Am1772
802.11b chipset work. This chip is present on the SMC2602W version 3
NIC, which is what was used for testing. This driver creates kernel
threads (12 of them!) for various purposes, and required the following
routines:

PsCreateSystemThread()
PsTerminateSystemThread()
KeInitializeEvent()
KeSetEvent()
KeResetEvent()
KeInitializeMutex()
KeReleaseMutex()
KeWaitForSingleObject()
KeWaitForMultipleObjects()
IoGetDeviceProperty()

and several more. Also, this driver abuses the fact that NDIS events
and timers are actually Windows events and timers, and uses NDIS events
with KeWaitForSingleObject(). The NDIS event routines have been rewritten
to interface with the ntoskrnl module. Many routines with incorrect
prototypes have been cleaned up.

Also, this driver puts jobs on the NDIS taskqueue (via NdisScheduleWorkItem())
which block on events, and this interferes with the operation of
NdisMAllocateSharedMemoryAsync(), which was also being put on the
NDIS taskqueue. To avoid the deadlock, NdisMAllocateSharedMemoryAsync()
is now performed in the NDIS SWI thread instead.

There's still room for some cleanups here, and I really should implement
KeInitializeTimer() and friends.
2004-02-07 06:44:13 +00:00
mjacob
7239d0ac1a Checkpoint of work in progress in cleaning up target mode. It actually
seems to work well in RELENG_4. However, 5.X locking foo means that I'll
have to do some quick redesign.

Add ioctl handlers for ISP_GETROLE and ISP_SETROLE ioctls.
2004-02-07 03:47:33 +00:00
mjacob
d524182cf4 add a count for inotifies as well as atios.
MFC after:	1 week
2004-02-07 03:44:43 +00:00
mjacob
93f4dcb99f Reverse role defines for initiator and target mode to better match the
class 3 service parameters we'd get.

Steal 8 bits out of the portid u_int32_t for role information (port ids
are 24 bits anyway).

MFC after:	1 week
2004-02-07 03:43:27 +00:00
mjacob
3af5c7c069 Add case to handle ISPCTL_GET_PDB.
MFC after:	1 week
2004-02-07 03:42:17 +00:00
mjacob
25d862c76c If we're defined to have a default role for target mode, make it
just ISP_ROLE_TARGET- not both.

MFC after:	1 week
2004-02-07 03:39:42 +00:00
mjacob
ef2ba3c44f Change role defines so that they better match class 3 service parameters.
Add ISPCTL_GET_PDB isp_control operation.

MFC after:	1 week
2004-02-07 03:38:39 +00:00
scottl
94aab627e5 Reduce AAC_MAX_FIBS to work around some yet-unidentified bugs in the
handling of resources shortages.  The driver is now so fast that it can
completely fill all 512 slots on the card, but for some reason only 511
slots are being allocated.  Anything that tries to go into the 512th
slot gets silently lost.   Both bugs need to be fixed at a later date,
but this should fix the reports of hangs in getblk and vinvalb.
2004-02-07 03:30:32 +00:00
scottl
e4f8b18dbe - Broaden the scope of locking in aac_command_thread() again to catch some
edge cases in the loop.

- Try to grab a command before dequeueing the bio from the bioq.  The old
  behaviour of requeuing deferred bios to the end of the bioq is arguably
  wrong.  This should be fixed in the future to check the bioq head without
  automatically dequeueing the bio.
2004-02-07 03:26:38 +00:00
scottl
6fcae6e0e5 Add an #ifdef _KERNEL so that this file can be used from userland. 2004-02-07 03:20:07 +00:00
pjd
e774439963 Allow decreasing access count even if there is no disk anymore.
This will allow closing disks that were removed while opened.

Approved by:	phk, scottl (mentor)
2004-02-06 23:10:49 +00:00
le
8c6d0df188 Fix memory leak.
PR:            kern/58634
Submitted by:  le
Approved by:   phk
2004-02-06 22:51:04 +00:00
ru
3b79affac4 First round of cleanups to sys/boot/ makefiles:
- do not use PROG for what's not a real C program,
- use sys.mk transformation rules where possible,
- only create the "machine" symlink on AMD64,
- removed MAINTAINER lines in individual makefiles,
- added the LIBSTAND defitinion to <bsd.libnames.mk>,
- somewhat better contents in .depend files.

Tested on:	i386, amd64
Prodded by:	bde
2004-02-06 21:58:32 +00:00
peter
665ddefe42 Reduce the inline limit from 20000 to 8000 after the previous changes
to simplify the curthread expansion some months ago.
2004-02-06 20:40:04 +00:00
peter
5110b34273 Remove the badsw* INVARIANTS checks. The events that this attempts
to catch are already nicely caught by trapping the null pointer derefs.
Remove no-longer-used noswitch/nothrow strings.  They were referenced
by the stub cpu_switch() etc functions before they were implemented.
Try something a little different for the lock prefixes.

Prompted by:  bde (the first two items anyway)
2004-02-06 20:38:39 +00:00
jhb
2b9f87a944 Regen. 2004-02-06 20:21:18 +00:00
jhb
6fd3d785f9 Sync up MP safe flags with global syscalls.master. This includes write(),
close(), getpid(), ibcs2_setuid(), getuid(), ptrace(), ibcs2_pause(),
ibcs2_nice(), ibcs2_kill(), ibcs2_pgrpsys(), dup(), pipe(), ibcs2_setgid(),
getgid(), umask(), and sigreturn().
2004-02-06 20:20:07 +00:00
jhb
24c791526b Sync up MP safe flags with global syscalls.master. This includes read(),
write(), close(), getpid(), setuid(), getuid(), svr4_sys_pause(),
svr4_sys_nice(), svr4_sys_kill(), svr4_sys_pgrpsys(), dup(), pipe(),
setgid(), getgid(), svr4_sys_signal(), umask(), getgroups(), setgroups(),
svr4_sys_sigprocmask(), svr4_sys_sigsuspend(), svr4_sys_sigaltstack(),
svr4_sys_sigaction(), svr4_sys_sigpending(), mprotect(), munmap(),
setegid(), seteuid(), setreuid(), setregid().
2004-02-06 20:07:33 +00:00
philip
256a01c438 Make all ACPI debug layers unique again. This makes debugging a more
pleasant experience (for certain definition of 'pleasant').

Submitted by:	Mark Santcroos <marks@ripe.net>
Approved by:	njl (mentor)
2004-02-06 19:38:05 +00:00
jhb
731572e196 - Convert the plimit lock to a pool mutex lock.
- Hide struct plimit from userland.

Submitted by:	bde (2)
2004-02-06 19:35:14 +00:00
jhb
7d918623ed - Correct the translation of old rlimit values to properly handle the old
RLIM_INFINITY case for ogetrlimit().
- Use %jd and intmax_t to output negative time in usec in calcru().
- Rework getrusage() to make a copy of the rusage struct into a local
  variable while holding Giant and then do the copyout from the local
  variable to avoid having to have the original process rusage struct
  locked while doing the copyout (which would not be safe).  This also
  includes a few style fixes from Bruce to getrusage().

Submitted by:	bde (1, parts of 3)
Suggested by:	bde (2)
2004-02-06 19:30:12 +00:00
jhb
6f1d1b4b59 A few more style fixes from Bruce including a few I missed last time.
Submitted by:	bde
2004-02-06 19:25:34 +00:00
sanpei
c0c79ec499 MFNetBSD:
netbsd.org -> NetBSD.org(rev.1.109)
	fix typo in comment(rev.1.90)

add list of ``already merged''
2004-02-06 14:38:14 +00:00
ru
32ebedf6ce Inherit BINDIR from a parent Makefile.inc. 2004-02-06 12:58:32 +00:00
ru
1cb0435d20 Only include ../Makefile.inc once in loader/Makefile. 2004-02-06 12:45:27 +00:00
sos
2e6f1b1f44 Commit simple workarounf for the "LiteOn" hang on boot problem.
This allows the system to boot so I can get the world out of
my mailbox and get some work done to figure out what this mess
is all about.
2004-02-06 11:36:50 +00:00
peter
70ef80154c Turn of ath since it causes a link failure without the hal till sam's
set up with a cross compiler and has the time to port the hal.
2004-02-06 01:51:58 +00:00
peter
e7094869f3 Make LINT compile on amd64 2004-02-06 01:47:52 +00:00