Commit Graph

51530 Commits

Author SHA1 Message Date
jhb
3ec0dff7ad - Move the function prototypes for kern_setrlimit() and kern_wait() to
sys/syscallsubr.h where all the other kern_foo() prototypes live.
- Resort kern_execve() while I'm there.
2005-01-05 22:19:44 +00:00
imp
bd77e02714 Start each of the license/copyright comments with /*- 2005-01-05 22:16:58 +00:00
imp
de149e3d73 Remove obsolete note about the boot loader not being ready for stable.
It has been in stable for at least 5 years now.
2005-01-05 22:16:10 +00:00
imp
77267e277f Start all license statements with /*- 2005-01-05 21:58:49 +00:00
jhb
65d4d80800 Rework the optimization for spinlocks on UP to be slightly less drastic and
turn it back on.  Specifically, the actual changes are now less intrusive
in that the _get_spin_lock() and _rel_spin_lock() macros now have their
contents changed for UP vs SMP kernels which centralizes the changes.
Also, UP kernels do not use _mtx_lock_spin() and no longer include it.  The
UP versions of the spin lock functions do not use any atomic operations,
but simple compares and stores which allow mtx_owned() to still work for
spin locks while removing the overhead of atomic operations.

Tested on:	i386, alpha
2005-01-05 21:13:27 +00:00
imp
90af8e5e9a These appear to be unused in our tree, so remove them. 2005-01-05 20:50:31 +00:00
imp
5a2f6eb450 Begin all license/copyright comments with /*- 2005-01-05 20:17:21 +00:00
imp
c318a0bd4c PC98 will never be defined for amd64 2005-01-05 20:11:13 +00:00
keramida
9ad4cdef3b Fix KASSERT inversion that was introduced in 1.150, resulting in instant
panic curlen != 0, which is perfectly normal.

Approved by:	mux
2005-01-05 20:10:05 +00:00
wilko
867473d902 Add support for Chase/Perle PCI FAST-4 4 port serial cards which appear
to be the same as Boca Research Turbo Serial 654 (4 serial port).
While add the 8 port variants as well.

Submitted by: sten@blinkenlights.nl
PR: kern/75793
MFC after: 1 week
2005-01-05 20:06:04 +00:00
imp
412e99bb57 Begin all license/copyright comments with /*- or #- 2005-01-05 20:05:52 +00:00
imp
b095a629c1 Start all license/copyright notice comments with /*-, per tradition 2005-01-05 19:10:48 +00:00
vkashyap
b13001b64e Changes corresponding to the 9.1.5.2 release of twa on the 3ware website.
The main changes are:
1. Use of multiple bus dma tags.
2. Timing of CAM requests by the driver.
3, Firmware interface change relating to retrieving AEN's.
4. Removal of twa_intrhook.
5. Bundling of latest firmware with BBU capability.

Reviewed by:re
Approved by:re
2005-01-05 19:04:28 +00:00
phk
b5a9e27a67 Make sis_initl() take a typed argument.
Expect caller to lock before calling sis_stop()
Various style stuff.
2005-01-05 10:26:12 +00:00
phk
cb3936de7b Add locked/unlocked variants of sis_init() 2005-01-05 10:11:37 +00:00
phk
9621af4a8b Make a locked and unlocked variant of sis_start() 2005-01-05 10:04:45 +00:00
phk
8895278231 Don't declare variables "register", the compiler ought to know what to do. 2005-01-05 09:02:05 +00:00
alc
ca27c29006 Add needed synchronization to the error handling code that was introduced
in revision 1.141.

Lock assertion failures reported by: Kris Kennaway
2005-01-05 05:32:52 +00:00
kuriyama
c3f39e52f9 o Use tab instead of spaces for puc(4) line.
o Use capitalized "Ethernet" for consistency.
2005-01-05 05:25:21 +00:00
julian
b625b904ff Fix comment. One of the two "Step 4" shuold be a "step 5" 2005-01-05 01:04:35 +00:00
cognet
d7db964050 Disable checksum offloading by default. It seems to produce corrupted packets
with some revisions of the chip (particularly when using multiple TX
descriptors).

MFC after:	1 week
2005-01-05 00:06:15 +00:00
phk
f7c28f490d Instead of keeping track of the index into the receive ring use the already
implemented "sis_nextdesc" pointer to keep a pointer instead.
2005-01-04 22:39:35 +00:00
phk
718589faa8 Forget about the sis_list_data and sis_ring_data structures and embedd
their fields directly in the softc structure.

This is a no-op which shortens most of the affected source lines
by N * 10 characters.
2005-01-04 22:25:58 +00:00
phk
f39fbeb0dc Prototype busdma callback using the typedef. 2005-01-04 22:14:18 +00:00
rik
475e4489f6 Kill a half dead comment. It's first half was killed in rev 1.12.
MFC after:	3 days
2005-01-04 21:59:09 +00:00
emax
626c8fa3a1 Rename 'class' field to 'uclass' in the ng_hci_inquiry_response structure.
class is a reserved word in C++

Submitted by:	Markus Brueffer < markus AT brueffer DOT de >
MFC after:	3 days
2005-01-04 20:13:48 +00:00
mux
6f24877a9d Allow fxp(4) cards with a revision id of 0 to use the 82503 serial
interface as well.  This is not an expected revision id per the
datasheet, but unfortunately there are such cards out there with
a 82557 chipset, and they want to use the 82503.

PR:		kern/75739
Reported by:	Andre Albsmeier <andre.albsmeier@siemens.com>
2005-01-04 19:30:14 +00:00
jhb
830736d271 Regenerate. 2005-01-04 18:54:40 +00:00
jhb
adb721c906 Partial sync up to the master syscalls.master file:
- Mark mount, unmount and nmount MPSAFE.
- Add a stub for _umtx_op().
- Mark open(), link(), unlink(), and freebsd32_sigaction() MPSAFE.

Pointy hats to:	several
2005-01-04 18:53:32 +00:00
jmg
04f96285f7 return after freeing data element, instead of falling through, and using
the free'd element, and ultimate NULL deref of the failed allocation.

MFC after:	1 week
2005-01-04 18:15:27 +00:00
pjd
589a9682ce - Fix 'rebuild' command - it can no longer relay on retaste event
(we ignore it).
- Remove code used for handling spoil events, as spoiling is not possible
  anymore, because we keep consumers open for writing all the time.

MFC after:	4 days
2005-01-04 12:15:21 +00:00
pjd
c1f23c6a62 Spoiling is now not possible, because we keep consumers open for writing
all the time. Remove unused code then.

MFC after:	4 days
2005-01-04 12:11:49 +00:00
nyan
fa189c3dd0 Remove old wdc driver completely. 2005-01-04 11:04:03 +00:00
imp
47d6053d3c Minor nits in formatting continued lines 2005-01-04 10:22:11 +00:00
imp
a1d249601b cnw as a pccard device was commented out, so uncomment it so LINT will build. 2005-01-04 10:21:06 +00:00
phk
f2581a224f Since we do not support forceful unmount of DEVFS we can do away with
the partially implemented vnode-readoption code in vgonechrl().
2005-01-04 08:49:14 +00:00
phk
9799def1bc Unsupport forceful unmounts of DEVFS.
After disscussing things I have decided to take the easy and
consistent 90% solution instead of aiming for the very involved 99%
solution.

If we allow forceful unmounts of DEVFS we need to decide how to handle
the devices which are in use through this filesystem at the time.

We cannot just readopt the open devices in the main /dev instance since
that would open us to security issues.

For the majority of the devices, this is relatively straightforward
as we can just pretend they got revoke(2)'ed.

Some devices get tricky:  /dev/console and /dev/tty for instance
does a sort of recursive open of the real console device.   Other devices
may be mmap'ed (kill the processes ?).

And then there are disk devices which are mounted.

The correct thing here would be to recursively unmount the filesystems
mounte from devices from our DEVFS instance (forcefully) and if
this succeeds, complete the forcefully unmount of DEVFS.  But if
one of the forceful unmounts fail we cannot complete the forceful
unmount of DEVFS, but we are likely to already have severed a lot
of stuff in the process of trying.

Event attempting this would be a lot of code for a very far out
corner-case which most people would never see or get in touch with.

It's just not worth it.
2005-01-04 07:52:26 +00:00
imp
e39f06ee2d Catchup to wd removal 2005-01-04 07:26:51 +00:00
imp
9edfc93eac Remove last vestiges of old wd driver. ata works well on pc98 and
there was no objection on the pc98 list when I asked if it could be
removed a while ago.
2005-01-04 06:25:24 +00:00
imp
79c363eb00 move all the card entries to files.pc98
style change: regularize tabbing
2005-01-04 06:07:25 +00:00
imp
5d27c046c3 First step in removing OLDCARD from FreeBSD 6.0:
o Move card from all architectures to just pc98.  It is only needed there,
  although real issues remain with NEWCARD's support of ISA devices.
2005-01-04 05:34:28 +00:00
pjd
fcf90f45eb Fix 'rebuild' command (we ignore retaste event now, so don't relay on it). 2005-01-03 19:42:37 +00:00
rwatson
ae4b449ab4 Add PCI and device ID's to if_xl to support:
3C920B-EMB-WNM Integrated Fast Ethernet Controller

Submitter reports that the card appears to autonegotiate properly, and
operate well with high levels of NFS traffic.

PR:		75253
Submitted by:	"Oleg V. Nauman" <oleg at reis dot zp dot ua>
MFC after:	2 weeks
2005-01-03 19:22:37 +00:00
marius
064653b217 Use byteorder(9) functions to implement the [g,s]et[d,w][b,l]e macros so
only one set is needed for either endianess. This also completes them for
big endian archs and fixes the compilation of libncp, netncp, etc. there.

Reviewed by:		bp, rwatson
Compile tested on:	i386, sparc64
MFC after:		1 week
2005-01-03 18:03:00 +00:00
phk
3542218858 When allocating bio's in the swap_pager use M_WAITOK since the
alternative is much worse.
2005-01-03 13:28:56 +00:00
philip
7b194f5bb6 Reduce diffs to work in progress before checking in serious changes.
o Move the sysctls under debug.psm.* and hw.psm.* making them a bit
   clearer and more consistent with other drivers.

 o Remove the debug.psm_soft_timeout sysctl.  It was introduced many
   moons ago in r1.64 but never referenced anywhere.

 o Introduce hw.psm.tap_threshold and hw.psm.tap_timeout to control
   the behaviour of taps on touchpads.  People might like to fiddle
   with these if tapping seems to slow or too fast for them.

 o Add debug.psm.loglevel as a tunable so that verbosity can be set
   easily at boot-time (to watch probes and such) without having to
   compile a kernel with options PSM_DEBUG=N.
2005-01-03 13:19:49 +00:00
rwatson
6ea7cec670 Garbage collect unused ipx_abort().
Spell NULL right in a KASSERT() panic message.

MFC after:	1 week
2005-01-03 12:54:31 +00:00
pjd
25d6a6cbc3 Remove unused #include. 2005-01-03 12:53:10 +00:00
rwatson
f35086bd6a Exempt the superuser from mac_seeotheruids checks.
Submitted by:	bkoenig at cs dot tu-berlin dot de
PR:		72238
MFC after:	2 weeks
2005-01-03 12:08:18 +00:00
julian
4bf9384dba Remove comment that doesn't seem to be true and add comments describing
what is going on, to replace it. Slight formatting changes
Code here is alredy different to NetBSD.
MFC after:	1 week
2005-01-03 08:52:26 +00:00
julian
f19a6b0905 A much simpler way to work out if the required transfer can be done in 2
scatter gather segments.

MFC after:	1 week
2005-01-03 08:09:05 +00:00
njl
2505523773 Back out previous commits. Installing new share/mk fixes this. 2005-01-03 07:27:17 +00:00
silby
632a7b8c5a Add a sysctl (net.inet.tcp.insecure_rst) which allows one to specify
that the RFC 793 specification for accepting RST packets should be
following.  When followed, this makes one vulnerable to the attacks
described in "slipping in the window", but it may be necessary in
some odd circumstances.
2005-01-03 07:08:37 +00:00
njl
5b8f3da7ea NO_MAN is now NOMAN. 2005-01-03 05:36:55 +00:00
njl
9cde0acc6e Fix kernel modules build. For some reason, this module now bails out with
an error that there is no aicasm.1 man page.
2005-01-03 05:35:58 +00:00
marcel
1a8a332194 Regen. 2005-01-03 00:47:23 +00:00
marcel
413099920e uuidgen(2) is MP safe. 2005-01-03 00:45:57 +00:00
rwatson
c146b8722a If MALLOC() fails in at_pcballoc(), return ENOBUFS rather than
potentially panicking.

MFC after:	1 week
2005-01-03 00:16:07 +00:00
rwatson
032f856b7e Acquire the socket buffer receive lock in spx_rcvoob() to permit
multiple reads of receive buffer state to be performed atomically.
2005-01-02 15:38:47 +00:00
rwatson
07800ca5f1 Increase the coverage scope of the receive socket buffer lock in
spx_reass() to increase atomicity across multiple operations on the
socket buffer when iterating over the SPX fragment reassembly list
for the ipxpcb, as well a to reduce the number of locking operations.
2005-01-02 15:36:16 +00:00
rwatson
56df19b4b3 Explicitly lock the send socket buffer in spx_reass() to cover the drop
record loop for ACK'd data, rather than relying on lokcing in
sbdroprecord() and sowwakeup(), reducing the number of lock operations
as well as eliminating a possible race against the head of the send
buffer mbuf chain.  Use the _locked variants of sbdroprecord() and
sowwakeup().
2005-01-02 15:33:13 +00:00
rwatson
b45de8ac1b Restructure ipx_input() return code to match similar code in netinet,
avoiding a goto.
2005-01-02 15:29:29 +00:00
rwatson
232fe9e06d Eliminate XXX comments regarding allocation failures when retrieving
the peer address by using M_WAITOK in ipx_setpeeraddr() to prevent
allocation failure.  The socket reference used to reach these calls
will prevent the ipxpcb from being released prematurely.
2005-01-02 15:25:59 +00:00
rwatson
1a1b431cbf Use KASSERT() in preference to if()panic(). 2005-01-02 15:19:24 +00:00
rwatson
3d41eea355 Extern declaration of old 'ipxpcb' list head no longer required. 2005-01-02 15:16:35 +00:00
rwatson
f178a5be31 Trim trailing whitespace. 2005-01-02 15:13:59 +00:00
rwatson
bb9b0831cb Document copyright updates in netipx README as other prior updates have
been documented.
2005-01-02 15:10:02 +00:00
rwatson
2f7b65ed9a Mark 'struct spx' and 'struct spxhdr' as __packed to prevent possible
alignment problems.

MFC after:	3 days
2005-01-02 15:06:47 +00:00
rwatson
979b67f320 Improve handling of SPX session timeout, specifically, make sure to
properly handle the case where a connection is disconnected.  The
queue(9)-enabled version of this code broke from the inner but not
outer loop, and so potentially frobbed an ipxpcb flag after the ipxpcb
was free'd, which might be picked up later by the malloc debugging
code.  Properly break from the loop context and avoid touching the
cb/ipxpcb after free.
2005-01-02 14:46:18 +00:00
rwatson
440a81bafb Compare and assign pointers with NULL in preference to 0. 2005-01-02 14:07:05 +00:00
rwatson
9262f8ab03 Don't cast NULL on return or when passing to another function.
Extend the annotation as to why spx_close() isn't called in spx_reass(),
and mark this code more clearly as broken.
2005-01-02 14:03:47 +00:00
nyan
484e0d2c37 MFi386: revision 1.421. 2005-01-02 09:51:07 +00:00
julian
21f5530a3e Add support for the Pixelview PlayTV
PR:		68362
Submitted by:	Carl Makin <carl@stagecraft.cx>
MFC after:	1 week
2005-01-02 04:47:36 +00:00
rwatson
64c1f79d50 Mark 'struct ipx', the IPX packet header, as __packed. Otherwise,
recent versions of gcc will insert an extra 16 bits of padding in
the structure, corrupting all IPX packet output.

MFC after:	3 days
2005-01-02 02:30:27 +00:00
rwatson
c52cecbfbd Use 'NULL' in preference to '0' for pointer comparisons.
MFC after:	2 weeks
2005-01-02 01:51:18 +00:00
silby
c79cd91efc Port randomization leads to extremely fast port reuse at high
connection rates, which is causing problems for some users.

To retain the security advantage of random ports and ensure
correct operation for high connection rate users, disable
port randomization during periods of high connection rates.

Whenever the connection rate exceeds randomcps (10 by default),
randomization will be disabled for randomtime (45 by default)
seconds.  These thresholds may be tuned via sysctl.

Many thanks to Igor Sysoev, who proved the necessity of this
change and tested many preliminary versions of the patch.

MFC After:	20 seconds
2005-01-02 01:50:57 +00:00
rwatson
6bfe519bf0 Use RTFREE() to free route references rather than rtfree(), as rtfree()
expects a locked route reference.  This removes a panic that occurs
when connected ipxpcb is closed and its route free'd, and may have been
present since the route locking took place.

MFC after:	2 weeks
2005-01-02 01:47:56 +00:00
rwatson
0eefe3ee3f Prefer rtalloc_ign() API to rtalloc() API. 2005-01-02 01:39:38 +00:00
cognet
115511c70a In re_detach(), remove an extra call to ether_ifdetach().
This fixes a panic that occurs when unloading the kernel module.

MFC after:	3 days
2005-01-02 01:37:21 +00:00
marcel
35d2e4e388 Further enhance the handling of misaligned loads and stores:
o  implement double-extended and single precision loads and stores,
o  implement double precision stores,
o  replace the machdep.unaligned_print sysctl with debug.unaligned_print
   and change the default value to 0,
o  replace the machdep.unaligned_sigbus sysctl with debug.unaligned_test,
o  Remmove the fillfd() function. The function is trvial enough for
   inline assembly.

The debug.unaligned_test sysctl is used to test the emulation of
misaligned loads and stores. When PSR.ac is 0, the CPU will handle
misaligned memory accesses itselfi and we don't get an exception
for it. When PSR.ac is 1, the process needs to be signalled and we
should not emulate. The sysctl takes effect when PSR.ac is 1 and
tells us that we should emulate and not send a signal.

PR: 72268
MFC after: 1 week
2005-01-02 00:20:54 +00:00
rwatson
57f9b8bd31 Move the definition of ipxpcb_lport_cache from ipx_input.c to ipx_pcb.c,
the only source file where it is actually used.
2005-01-01 22:04:03 +00:00
obrien
b4ead83242 Increase the message buffer size on AMD64. Such machines can have a lot
of devices in them, and aren't run with only 64MB of RAM.
2005-01-01 21:49:20 +00:00
tackerman
e6938cd35d Corrected a workaround that should only be applied to one adapter. Workaround
was causing device hangs when incorrectly applied to other adapters.

PR:		kern/66634
2005-01-01 19:57:23 +00:00
tackerman
e01f208ae1 Added device id support for Intel 82541ER and 82546GB dual port PCIE adapter.
PR:		 None
2005-01-01 19:54:39 +00:00
sos
f2c733ccbe Further update to the Promise code.
Support should now cover all old and current products.
2005-01-01 19:24:25 +00:00
se
7fcc15c5a8 Attempt to fix Symbios driver on amd64. The private memory allocation
function provided by the driver limits allocations to the page size,
i.e. 4KB on i385 and 8KB on typical 64 bit processors. Since amd64
has 64 bit pointers, but only 4KB pages, an array of pointers that
just fits into one page on all the other processors, does require
2 pages on amd64.

In order to make this driver useful on amd64, the allocation unit
has been increased to 2 pages on amd64 and contigmalloc() is used
instead of malloc(). All other processor types are unaffected by
this change. This modification has only been compile-tested on
amd64, yet, but should just work (FLW).
2005-01-01 19:05:46 +00:00
sam
8af7e8df05 Correct scan candidate selection logic for dual-band devices: prefer
candidate on 5Ghz channel to candidate on 2Ghz channel only when the
rssi are comparable (wasn't considering rssi).
2005-01-01 17:48:27 +00:00
sam
b89a9aca30 Eliminate some of the egregious bypass of the 802.11 state
machine; instead use the intended entry points.  There's still
too much incestuous knowledge about the internals of the
802.11 layer but this at least fixes adhoc mode.
2005-01-01 17:45:11 +00:00
wilko
2356f43f20 - make machine model list more comprehensive, the whole Alpha family tree
should now be present
- clean up comment a bit

MFC after: 1 week
2005-01-01 16:11:53 +00:00
imp
4272399838 Fix last second typos that crept in :-(. 2004-12-31 23:59:24 +00:00
sam
c5bfbdb959 remove netbsd rcsid lines; they are way out of date and we appear to be
diverging too much to make tracking these files worthwhile
2004-12-31 22:44:26 +00:00
sam
14fee97914 bump copyright for 2005 2004-12-31 22:42:38 +00:00
sam
141330c912 fixup inactivity timers:
o ic_inact_auth is a bad name, it's the inactivity threshold
  for being associated but not authorized; use it that way
o reset ni_inact when switching inactivity thresholds to
  minimize the race against the timer (don't want to lock
  for this stuff)
o change the inactivity probe threshold from a one-shot to
  cover a range: when below this threshold but not expired
  send a probe each inactivity interval; should probably
  guard against the interval being turned way down as this
  could cause us to spam the net with probes
2004-12-31 22:05:13 +00:00
sam
7c448457f6 Relearn how WPA keying is supposed to work and fix WPA+WME while
we're at it:
o WPA/802.11i has a unicast key and a group key; in station mode
  everything is sent with the unicast key--we were consulting the
  destination mac address and incorrectly using the group key
o (perpetuate fallback use of the default tx key to maintain
  compatibility with the way wpa_supplicant works)
o correct EAPOL encryption logic to check unicast key instead
  of assuming other state implies this
o move QoS encapsulation up to before enmic work so TKIP has the
  information required to calculate the pseudo-header
o do not do QoS-encapsulation of EAPOL frames as some ap's do the
  wrong thing with such frames (may need to revisit this if ap's
  start dropping non-QoS frames from stations assoc'd with QoS)
o move ieee80211_mbuf_adjust closer to its caller
2004-12-31 21:54:53 +00:00
sam
5a21ccb974 disable default use of wme until we can sort out interoperability issues;
users that want it can explicitly enable it
2004-12-31 21:48:15 +00:00
sam
fe8d9eb613 s/inline/__inline/ 2004-12-31 21:30:42 +00:00
sam
fe545f4516 compare pointers against NULL 2004-12-31 21:28:41 +00:00
sam
bb13d71061 make ap mode sta association debug msg as informative as sta mode 2004-12-31 21:27:53 +00:00
sam
95f27e450d do 11g erp station management in turboG mode too 2004-12-31 21:25:28 +00:00
sam
2cf886f5dc check if the node/station table is already present before creating one; this
can happen on an ibss merge
2004-12-31 21:22:12 +00:00
sam
886afd7287 include phy mode in scan debug msg 2004-12-31 21:19:59 +00:00
sam
e1832f531b accept IEEE80211_KEYIX_NONE for a default tx key 2004-12-31 21:13:35 +00:00
imp
0ccfc318ae dheader and hheader were the same function, really, so rename one of
them to header, kill the other and use both with a different arg...
2004-12-31 21:12:17 +00:00
sam
d54bd57731 don't return prematurely from processing a beacon or probe response frame
when associated; this corrects a problem where doing a scan while associated
caused the associated ap to sometimes not be included in the scan set
2004-12-31 21:11:59 +00:00
sam
f249744499 change ieee80211_parse_wmeparams to return a unique value when the ie
is invalid so we can distinguish this from needing a parameter update;
fixes dynamic update of wme parameters
2004-12-31 21:09:43 +00:00
sam
59c07f15bb remove stray \n from debug msg 2004-12-31 21:05:05 +00:00
sam
d5e5ef7858 clear wep bit in 802.11 header after crypto decap so packet
capture doesn't see it
2004-12-31 21:04:05 +00:00
imp
a4077d797e Use functions to make the program clearer. 2004-12-31 21:02:43 +00:00
sam
8c3a1cf5aa o add net.wlan.X.driver_caps mib variable for setting the driver capabilities
flags for testing
o debug msg consistency fixups
2004-12-31 21:01:41 +00:00
sam
e508073ee6 correct pseudo-mic header calculation for QoS frames 2004-12-31 20:59:03 +00:00
sam
4327f1ee6e whitespace/debug msg fixups 2004-12-31 20:58:06 +00:00
sam
83e6bc9990 add ieee80211_hdrspace and ieee80211_anyhdrspace to calculate the space
for an ieee80211 header taking into account padding requirements
2004-12-31 20:56:32 +00:00
sam
886a744d99 correct header length calculations on tx path for QoS-encapsulated frames
when IEEE80211_F_DATAPAD is set (e.g. ath); must use ieee80211_hdrspace
instead of ieee80211_hdrsize
2004-12-31 20:51:41 +00:00
imp
58871563b4 Implement device_quiesce. This method means 'you are about to be
unloaded, cleanup, or return ebusy of that's inconvenient.'  The
default module hanlder for newbus will now call this when we get a
MOD_QUIESCE event, but in the future may call this at other times.

This shouldn't change any actual behavior until drivers start to use it.
2004-12-31 20:47:51 +00:00
sam
0b07314057 const'ify ivp reference 2004-12-31 20:44:15 +00:00
imp
941b82eb40 Implement mimimum system software delays, per PCI PM 1.1 spec, as
suggested by Peter Edwards.  This seems to fix my fxp problems and
likely will fix his as well.  Use DELAY rather than *sleep because we
can be called from any context.
2004-12-31 20:43:46 +00:00
sam
ae02e9bff7 add/fixup debug msgs 2004-12-31 20:42:51 +00:00
sam
dfe3a547e6 s/inline/__inline/ 2004-12-31 20:39:41 +00:00
sam
11042819f1 expose ieee80211_phymode_name for use in debug msgs 2004-12-31 20:38:48 +00:00
sam
96c2d6273d correct some typos
Submitted by:	Tai-hwa Liang
2004-12-31 20:35:05 +00:00
sam
341ffa612f Radiotap fixups:
o catch one place where we were not using ath_chan_change to
  switch channels; this fixes a problem where the channel
  settings were not being correctly reported in captured packets
o return unique channel identification in the channel flags;
  ethereal gets confused if you return merged flags (e.g. ofdm,
  cck, and 2Ghz) (this is workaround and should be removed if
  we can ever cleanup radiotap consumers)
o correct short/long preamble flag state for rx and treat tx
  the same--use a new hwflags array that gives us the data
  based on the h/w rate index/cookie
o add gross hack to handle radiotap capture of frames that
  come in with hardware padding; should be replaced by a
  flag in the radiotap header and more smarts in the apps
  that decode radiotap data
2004-12-31 20:32:40 +00:00
sam
186275ec87 for parts that require split keycache entries report the
the index of the first entry on a mic error so we're
consistent with parts that don't have split keycache
2004-12-31 20:21:31 +00:00
sam
498543a7bd Correct beacon timer setup logic:
o lintval is in ms; must convert to TU's for passing to the hal
o roundup to calculate nexttbtt (should look at current tsf and pull the
  calculated nextbtt forward but this'll do for now)
o don't or- in HAL_BEACON_RESET_TSF when doing station timer setup; this
  is not needed and messes up the sleep timer calcs, though it's unclear
  if it mattered as the hal masks these values before use

Submitted by:	Thorsten von Eicken
2004-12-31 20:20:02 +00:00
sam
4f85af0286 no need to sweep the tx q's for node references in ath_node_free; we know
there are none since we're only called when the ref count goes to zero
2004-12-31 20:13:58 +00:00
sam
206e5f6044 cleanup some assertions 2004-12-31 20:11:23 +00:00
alc
db7aa8b882 Assert that page allocations during an interrupt specify
VM_ALLOC_INTERRUPT.

Assert that pages removed from the cache queue are not busy.
2004-12-31 19:50:45 +00:00
imp
702123653d First pass at shortening names. Likely more can be done. Generally
prefer ethernet and serial to \1 adapter.
2004-12-31 19:10:33 +00:00
imp
6c6ac1163b Eliminate the redundant/verbose portion of the company names.
Generally omit semiconductor, electronics, inc, corp, pny, ltd and the
like.

This saves almost 3k for the usb module.
2004-12-31 18:59:38 +00:00
imp
0a39eafc47 Finish merging usb vendors from NetBSD. 2004-12-31 18:37:49 +00:00
imp
09c78b5b33 Bump to 2005 for the new year. 2004-12-31 18:06:45 +00:00
rwatson
a2b4c64d17 Marginally reformat copyright statements to remove an excess ','. 2004-12-31 17:05:37 +00:00
jhb
33a905889d Add usbdevs_data.h to the SRCS list since usb_subr.c needs it. This forces
old usbdevs_data.h files to be updated as well as fixing the standalone
usb module build.
2004-12-31 16:05:07 +00:00
pjd
09d675e003 Be consistent and always use form 'return (value);' instead of 'return value;'.
We had (before this change) 84 lines where it was style(9)-clean and 15 lines
where it was not.
2004-12-31 14:52:53 +00:00
rwatson
942a2a4682 Add 'struct ipxpcb' forward declaration to ipx_var.h. I had this in
the netperf branch but for some reason didn't trigger a build failure
locally when I merged to CVS and omitted it.  Presumably driver error.

Pointed out by:	cperciva, tinderbox
2004-12-31 11:54:39 +00:00
julian
d00c78c192 Roger is away, note that his maintainership is
on vacation until he gets back. (hopefully next year)

Submitted by:	linimon
2004-12-31 09:18:29 +00:00
imp
f9d4c165ab Remove special case from *devs2h loop for usb
Move usb out of the loop since the other devs2h programs don't grok -h
Add new rule for usbdevs_data.h
2004-12-30 23:22:08 +00:00
imp
df030c4bd4 Call usbdevs2h with -h for .h file
Explicitly generate usbdevs_data.h for usb kernels with new -d switch
2004-12-30 23:19:40 +00:00
imp
ed702d58de Allow -d and -h as command line flags. These are used to generate
only the .h or _data.h files respectively.  Restructure code to allow
for this.
2004-12-30 23:18:34 +00:00
jhb
ad4d00347b Fix a typo and two whitespace nits. 2004-12-30 22:17:00 +00:00
jhb
3f307e93e3 Rework the interface between priority propagation (lending) and the
schedulers a bit to ensure more correct handling of priorities and fewer
priority inversions:
- Add two functions to the sched(9) API to handle priority lending:
  sched_lend_prio() and sched_unlend_prio().  The turnstile code uses these
  functions to ask the scheduler to lend a thread a set priority and to
  tell the scheduler when it thinks it is ok for a thread to stop borrowing
  priority.  The unlend case is slightly complex in that the turnstile code
  tells the scheduler what the minimum priority of the thread needs to be
  to satisfy the requirements of any other threads blocked on locks owned
  by the thread in question.  The scheduler then decides where the thread
  can go back to normal mode (if it's normal priority is high enough to
  satisfy the pending lock requests) or it it should continue to use the
  priority specified to the sched_unlend_prio() call.  This involves adding
  a new per-thread flag TDF_BORROWING that replaces the ULE-only kse flag
  for priority elevation.
- Schedulers now refuse to lower the priority of a thread that is currently
  borrowing another therad's priority.
- If a scheduler changes the priority of a thread that is currently sitting
  on a turnstile, it will call a new function turnstile_adjust() to inform
  the turnstile code of the change.  This function resorts the thread on
  the priority list of the turnstile if needed, and if the thread ends up
  at the head of the list (due to having the highest priority) and its
  priority was raised, then it will propagate that new priority to the
  owner of the lock it is blocked on.

Some additional fixes specific to the 4BSD scheduler include:
- Common code for updating the priority of a thread when the user priority
  of its associated kse group has been consolidated in a new static
  function resetpriority_thread().  One change to this function is that
  it will now only adjust the priority of a thread if it already has a
  time sharing priority, thus preserving any boosts from a tsleep() until
  the thread returns to userland.  Also, resetpriority() no longer calls
  maybe_resched() on each thread in the group. Instead, the code calling
  resetpriority() is responsible for calling resetpriority_thread() on
  any threads that need to be updated.
- schedcpu() now uses resetpriority_thread() instead of just calling
  sched_prio() directly after it updates a kse group's user priority.
- sched_clock() now uses resetpriority_thread() rather than writing
  directly to td_priority.
- sched_nice() now updates all the priorities of the threads after the
  group priority has been adjusted.

Discussed with:	bde
Reviewed by:	ups, jeffr
Tested on:	4bsd, ule
Tested on:	i386, alpha, sparc64
2004-12-30 20:52:44 +00:00
jhb
e3adf38617 Whitespace fix. 2004-12-30 20:30:58 +00:00
jhb
7b611b0cb2 Stop explicitly touching td_base_pri outside of the scheduler and simply
set a thread's priority via sched_prio() when that is the desired action.
The schedulers will start managing td_base_pri internally shortly.
2004-12-30 20:29:58 +00:00
jhb
5624553de4 Use NULL instead of 0 in a few places as well as various whitespace fixes. 2004-12-30 19:26:23 +00:00
jhb
a610dc93b7 Call tty_close() at the very end of ttyclose() since otherwise NULL
deferences can occur since tty_close() may end up freeing the tty structure
if it drops the last reference to it.

Glanced at by:	phk
2004-12-30 19:24:49 +00:00
jhb
e11d37605f Small whitespace fixes. 2004-12-30 19:14:48 +00:00
jhb
908aa564cb Minor sync to i386 GENERIC in the form of comments and whitespace. 2004-12-30 18:51:23 +00:00
jhb
4371c82dde Minor sync to alpha and i386:
- Add ADAPTIVE_GIANT and AHC_REG_PRETTY_PRINT.
- Indent SMP to match other options.
2004-12-30 18:31:53 +00:00
rwatson
a163a92e00 Use a global variable, ipxpcb_lport_cache, to cache the most recently
used IPX port number, rather than using the global ipxpcb list head.
2004-12-30 17:54:53 +00:00
rwatson
767b9c0b3e Convert netipx to use queue(9) doubly-linked lists instead of home-brew
linked lists for ipxpcb's.
2004-12-30 17:49:40 +00:00
rwatson
547414a25a Garbage collect unused (and incompletely implemented) functions:
- ipx_pcbnotify(), which is never called.
- ipx_rtchange(), which is never called, is incomplete inplemented, and
  also #ifdef notdef.
- spx_fixmtu(), which is never called, is incompletely implemented, and
  also #ifdef notdef.
2004-12-30 17:21:07 +00:00