Commit Graph

46157 Commits

Author SHA1 Message Date
Ruslan Ermilov
390cdc6a76 Fixed a bug in previous revision: compute the payload checksum before
we convert ip_len into a network byte order; in_delayed_cksum() still
expects it in host byte order.

The symtom was the ``in_cksum_skip: out of data by %d'' complaints
from the kernel.

To add to the previous commit log.  These fixes make tcpdump(1) happy
by not complaining about UDP/TCP checksum being bad for looped back
IP multicast when multicast router is deactivated.

Reported by:	Vsevolod Lobko
2004-04-07 10:01:39 +00:00
Colin Percival
ec513ff759 Fix filt_timer* races: Finish initializing a knote before we pass it to
a callout, and use the new callout_drain API to make sure that a callout
has finished before we deallocate memory it is using.

PR:		kern/64121
Discussed with:	gallatin
2004-04-07 05:59:57 +00:00
Warner Losh
c3959ad01c The bs driver was replaced with the ct(pc98) driver. takahashi-san
(nyan) says this driver is now obsolete and can be removed.
2004-04-07 05:44:51 +00:00
Warner Losh
9394a7383e Last change was a bogus 2004-04-07 05:30:54 +00:00
Warner Losh
2fcbca0d85 Remove advertising clause from University of California Regent's
license, per letter dated July 22, 1999 and email from Peter Wemm,
Alan Cox and Robert Watson.

Approved by: core, peter, alc, rwatson
2004-04-07 05:00:01 +00:00
Warner Losh
82c6e87991 Remove advertising clause from University of California Regent's license,
per letter dated July 22, 1999.

Approved by: core
2004-04-07 04:19:52 +00:00
Warner Losh
012d41340a Remove advertising clause from University of California Regent's
license, per letter dated July 22, 1999 and irc message from Robert
Watson saying that clause 3 can be removed from those files with an
NAI copyright that also have only a University of California
copyrights.

Approved by: core, rwatson
2004-04-07 03:47:21 +00:00
Peter Wemm
b4e820428a Update to include both the L1 and L2 TLB stats, as well as the seperate
2M/4M page TLB vs 4K page TLB stats.  This also applies to the i386
platform, as does the cpu features fixes.
2004-04-07 00:44:15 +00:00
Peter Wemm
cd0149e39b MFi386: move rss() from db_interface.c to cpufunc.h 2004-04-07 00:41:05 +00:00
Pawel Jakub Dawidek
2bf11a9911 Unbreak FAST_IPSEC build on 64 bit archs with INVARIANTS.
Approved by:	sam
2004-04-07 00:19:02 +00:00
Colin Percival
2c1bb20746 Introduce a callout_drain() function. This acts in the same manner as
callout_stop(), except that if the callout being stopped is currently
in progress, it blocks attempts to reset the callout and waits until the
callout is completed before it returns.

This makes it possible to clean up callout-using code safely, e.g.,
without potentially freeing memory which is still being used by a callout.

Reviewed by:	mux, gallatin, rwatson, jhb
2004-04-06 23:08:49 +00:00
Warner Losh
0a6c6a6dd2 Better checks to make sure that we get good alignment. This code is a
bit of a bandaide until I get better pci bus code committed to head
from my p4 tree.
2004-04-06 22:50:50 +00:00
Warner Losh
70fc36e89c Fix mis-merge from p4 by adding line getting sc.
Attempt to deal with larger memory allocation better.
2004-04-06 22:41:14 +00:00
Warner Losh
05eb3785e7 Remove advertising clause from University of California Regent's license,
per letter dated July 22, 1999.

Approved by: core
2004-04-06 20:15:37 +00:00
Warner Losh
1ca203ae4b MFP4: Power up with OE disabled. Similar patches went into NetBSD a
while ago, and it does seem to help at least one card I have and has
been in my p4 tree for many months.
2004-04-06 20:13:29 +00:00
Ian Dowse
a76d86b892 Use the correct flag for mbuf allocations (M_DONTWAIT, not M_NOWAIT). 2004-04-06 19:32:00 +00:00
John Baldwin
255ec151e6 Fix a paste-o from the buf_prewrite() cleanup commit and check for the
MNTK_SUSPEND flag on the correct vnode pointer in softdep_disk_prewrite().

Reviewed by:	phk
Tested by:	kensmith
2004-04-06 19:20:24 +00:00
John Baldwin
9000d57d57 Associate a simple count of waiters with each condition variable. The
count is protected by the mutex that protects the condition, so the count
does not require any extra locking or atomic operations.  It serves as an
optimization to avoid calling into the sleepqueue code at all if there are
no waiters.

Note that the count can get temporarily out of sync when threads sleeping
on a condition variable time out or are aborted.  However, it doesn't hurt
to call the sleepqueue code for either a signal or a broadcast when there
are no waiters, and the count is never out of sync in the opposite
direction unless we have more than INT_MAX sleeping threads.
2004-04-06 19:17:46 +00:00
John Baldwin
535eb30962 Add a new kernel option MUTEX_WAKE_ALL that changes the mutex unlock code
to awaken all waiters when a contested mutex is released instead of just
the highest priority waiter.  If the various threads are awakened in
sequence then each thread may acquire and release the lock in question
without contention resulting in fewer expensive unlock and lock
operations.  This old behavior of waking just the highest priority is
still used if this option is specified.  Making the algorithm conditional
on a kernel option will allows us to benchmark both cases later and
determine which one should be used by default.

Requested by:	tanimura-san
2004-04-06 19:12:24 +00:00
John Baldwin
94008858f8 Sort function prototypes. 2004-04-06 19:08:40 +00:00
John Baldwin
ef2c0ba7e4 Rename turnstile_wakeup() to turnstile_broadcast() to make the naming
more consistent with other APIs. sleepq and cv's use signal/broadcast, and
msleep uses wakeup_one/wakeup.  Prior to this turnstiles were using a
signal/wakeup mixture.
2004-04-06 19:07:21 +00:00
Paul Saab
a7b0c31480 Enable the memory arbiter before turning off the PXE restart. This
prevents NMI's from happening when resetting the chip on some
hardware I have seen.

Mis-behaving box made available by:	John Cagle <john.cagle@hp.com>
2004-04-06 18:28:15 +00:00
Max Laier
1ffe5d762b Make pf* modules respect NOINET6 from make.conf(5) in order to build them
for INET6-less kernel.

Requested by:	many
Approved by:	bms(mentor)
2004-04-06 15:12:50 +00:00
Yoshihiro Takahashi
e1ece6d1eb MFi386: Enable the cy driver. 2004-04-06 14:19:45 +00:00
Ruslan Ermilov
e2c039a234 Actually fix the TX performance with polling(4) enabled
by increasing the TX list size from 64 to 128, which is
adequate for HZ=1000.

Submitted by:	Vsevolod Lobko
2004-04-06 11:04:54 +00:00
Bruce Evans
30a4ab088a Fixed misspelling of IPPORT_MAX as USHRT_MAX. Don't include <sys/limits.h>
to implement this mistake.

Fixed some nearby style bugs (initialization in declaration, misformatting
of this initialization, missing blank line after the declaration, and
comparision of the non-boolean result of the initialization with 0 using
"!".  In KNF, "!" is not even used to compare booleans with 0).
2004-04-06 10:59:11 +00:00
Bruce Evans
295ed75297 Removed some less than useful comments:
- don't say what a small subset of the options includes are for.
- don't mark up functions which use all their args with /* ARGSUSED */.
  The markup should have been removed when the unused retval parameter
  was removed.
- don't comment on what routine suser() checks do.  Removed nearby
  excessive vertical whitespace.
2004-04-06 10:05:02 +00:00
Bruce Evans
71529a899b Oops, fixed insertion sort error in the fix for an insertion sort error.
While here, begin fixing dependencies of <sys/mount.h> on normal namespace
pollution (__BSD_VISIBLE) by not using u_int in the prototype for nmount(2),
although it is used in the man page.

While there, begin cleaning up another set of prototypes:
- use u_int in the prototype for the kernel part of nmount().
- consistently don't use parameter names in prototypes in the
  "exported vnode operations" set of prototypes, although style(9) says to
  use names in the kernel.
2004-04-06 09:14:33 +00:00
Bruce Evans
f468f075f7 Fixed unsorting of prototypes in previous commit and 1.134. 2004-04-06 08:30:21 +00:00
Ruslan Ermilov
e0098a5113 - Improved the TX performance with polling(4) by only checking the
status registers for error conditions and updating statistics
  when there are cycles left (inspired by the nge(4) driver).

- Removed the TX list counter and the producer/consumer gap; it's
  enough to just ensure we don't reuse the last (free) descriptor,
  as the chip may not have read its next pointer yet.  If we reuse
  it, the TX may stall under a heavy TX load with polling enabled.

- Dropped code to recharge the watchdog timer, it's pointless; the
  watchdog routine will re-init the chip and both RX and TX lists.
2004-04-06 07:58:32 +00:00
Alan Cox
9e0ddbd00a Eliminate vm_pager_map_page() and vm_pager_unmap_page() and their uses.
Use sf_buf_alloc() and sf_buf_free() instead.
2004-04-06 07:12:32 +00:00
Robert Watson
c1aec06a7c Add imperfect comments identifying the function of various nfs socket
condition flags.  Corrections, if appropriate, welcome.
2004-04-06 01:58:58 +00:00
Alan Cox
a3b706071c Remove avail_end. As of yesterday, it is unused. 2004-04-06 01:38:28 +00:00
Warner Losh
9a80fddc71 Remove advertising clause from University of California Regent's license,
per letter dated July 22, 1999 and email from Peter Wemm.

Approved by: core, peter
2004-04-05 23:55:14 +00:00
Warner Losh
9e127f523c Remove advertising clause from University of California Regent's license,
per letter dated July 22, 1999.

Approved by: core
2004-04-05 23:41:29 +00:00
Sam Leffler
fb8e945823 Resolve the issue of whether frames have FCS or not. Frame data does not
include FCS; if you want to provide it you can put it in the header.

Submitted by:	David Young
2004-04-05 22:13:21 +00:00
Sam Leffler
3055cc14c4 eliminate nested include by making MALLOC_DECLARE conditional on the
inclusion of <sys/malloc.h>

Submitted by:	bde
2004-04-05 22:10:26 +00:00
Warner Losh
29ae923f44 Remove advertising clause from University of California Regent's license,
per letter dated July 22, 1999.

Approved by: core
2004-04-05 21:29:41 +00:00
Warner Losh
4db882feb0 Remove advertising clause from University of California Regent's license,
per letter dated July 22, 1999 and permission from Alan Cox.

Approved by: core, alc@
2004-04-05 21:15:52 +00:00
Warner Losh
7f8a436ff2 Remove advertising clause from University of California Regent's license,
per letter dated July 22, 1999.

Approved by: core
2004-04-05 21:03:37 +00:00
Warner Losh
3501fd399e Remove the advertsing clause, per the Regent's letter dated July 22, 1999.
Approved by: core
2004-04-05 21:00:51 +00:00
Bruce Evans
cf497adabf Uncomment the cy driver since it works again. 2004-04-05 19:31:18 +00:00
Sam Leffler
f3fc4ae54b add definitions for WME, WPA (and WPA2), and miscellaneous other stuff
that's coming soon

Obtained from:	madwifi
2004-04-05 17:47:40 +00:00
Ruslan Ermilov
629498c421 - Rewritten TX to use only two pointers to track producer/consumer.
- Added polling(4) support!
- Bugfix: don't forget to set IFF_OACTIVE when TX list is full.
- Minor: tidy up vr_encap().
2004-04-05 17:39:57 +00:00
Nate Lawson
b3d0ea94b1 Unbreak the bootloader build by excluding ctype.h.
Submitted by:	Stefan Farfeleder <stefan@fafoe.narf.at>
2004-04-05 17:30:15 +00:00
Ruslan Ermilov
8c7e194708 Properly detect loops by recording the interface pointer in an mtag.
For now, preserve the gif_called functionality to limit the nesting
level because uncontrolled nesting can easily cause the kernel stack
exhaustion.  Rumors are it should be shot to allow people to easily
shoot themselves in the foot, but I have ran out of cartridges.  ;)
2004-04-05 16:55:15 +00:00
Doug Rabson
7d5ea13fcd Try not to crash instantly when signalling a libthr program to death. 2004-04-05 15:06:01 +00:00
Doug Rabson
e2c8a799c1 Regen. 2004-04-05 10:17:23 +00:00
Doug Rabson
0b0a60fb43 Add lgetfh(2) which is like getfh(2) but doesn't follow symlinks. 2004-04-05 10:15:53 +00:00
Doug Rabson
e776f0f9f8 Print cpu features for crusoe processors. 2004-04-05 10:12:19 +00:00
Bill Paul
6a50285516 - The MiniportReset() function can return NDIS_STATUS_PENDING, in which
case we should wait for the resetdone handler to be called before
  returning.

- When providing resources via ndis_query_resources(), uses the
  computed rsclen when using bcopy() to copy out the resource data
  rather than the caller-supplied buffer length.

- Avoid using ndis_reset_nic() in if_ndis.c unless we really need
  to reset the NIC because of a problem.

- Allow interrupts to be fielded during ndis_attach(), at least
  as far as allowing ndis_isr() and ndis_intrhand() to run.

- Use ndis_80211_rates_ex when probing for supported rates. Technically,
  this isn't supposed to work since, although Microsoft added the extended
  rate structure with the NDIS 5.1 update, the spec still says that
  the OID_802_11_SUPPORTED_RATES OID uses ndis_80211_rates. In spite of
  this, it appears some drivers use it anyway.

- When adding in our guessed rates, check to see if they already exist
  so that we avoid any duplicates.

- Add a printf() to ndis_open_file() that alerts the user when a
  driver attempts to open a file under /compat/ndis.

With these changes, I can get the driver for the SMC 2802W 54g PCI
card to load and run. This board uses a Prism54G chip. Note that in
order for this driver to work, you must place the supplied smc2802w.arm
firmware image under /compat/ndis. (The firmware is not resident on
the device.)

Note that this should also allow the 3Com 3CRWE154G72 card to work
as well; as far as I can tell, these cards also use a Prism54G chip.
2004-04-05 08:26:52 +00:00
Bruce Evans
42d122e125 Converted the isa probe and attach to new-bus so that this driver works
without the (defunct) isa compatibility shims.  The new-bus-specific
parts are very similar to the ones for the pci probe and attach.

This was held up too long waiting for a repo copy to src/sys/dev/cy,
so I decided to fix the files in their old place.  This gives easier
to read and merge diffs anyway.

The "count" line in src/sys/conf/files won't be changed until after
the repo copy, so old kernel configs that specify a count need not be
(and must not be) changed until then.  The count is just ignored in
the driver.  One unfinished detail is dynamic allocation of arrays
with <count> and (<count> * 32) entries, and iteration over the arrays.
This is now kludged with a fixed count of 10 (up to 10 cards with up
to 32 ports each).

Prodded by:	imp
Submitted by:	mostly by imp
Approved by:	imp
2004-04-05 08:16:23 +00:00
Bruce Evans
740a734c33 Moved initialization of the lock from the (isa) probe function to the
common attach function so that the lock gets initialized in all cases.
This fixes breakage of the initialization of the lock in the pci case
in rev.1.135 (between the releases of 5.1 and 5.2).  The lock is only
used in the SMP case, so this bug was not always fatal.
2004-04-05 07:43:18 +00:00
Alexander Kabaev
ce7a036d02 Delay permission checks for VCHR vnodes until after vnode is locked in
vm_mmap_vnode function, where we can safely check for a special /dev/zero
case. Rev. 1.180 has reordered checks and introduced a regression.

Submitted by:	alc
Was broken by:	kan
2004-04-05 04:54:22 +00:00
Sam Leffler
710da3ec44 use correct malloc type to allocate struct ieee80211_node's
Noticed by:	phk
2004-04-05 04:42:42 +00:00
Sam Leffler
566a65385f export the malloc type M_80211_NODE for drivers that override the node
allocation routines
2004-04-05 04:17:03 +00:00
Sam Leffler
32346d607a make malloc tag for ieee80211_node more recognizable 2004-04-05 04:15:55 +00:00
Alan Cox
c8607538c8 Remove avail_start on those platforms that no longer use it. (Only amd64
does anything with it beyond simple initialization.)
2004-04-05 04:08:00 +00:00
Nate Lawson
66f8ce8f20 Add #include for ctype.h to cover strupr() in the !_KERNEL case.
Submitted by:	Stefan Farfeleder <stefan@fafoe.narf.at>
2004-04-05 04:03:09 +00:00
Warner Losh
071138c5fd Add register definitions for the status and command registers for AGP.
PR: 64846
Submitted by: Samy Al Bahra
2004-04-05 02:32:07 +00:00
Marcel Moolenaar
cc81fed63c Ever since rev 1.27 of puc.c, the port number that was exposed by puc(4)
and used by uart(4) for the channel conflicted with the port offset for
the Z8530. The Z8530 has the channels reversed (i.e. channel B is at
offset 0 and channel A is at offset 4). Assign the port offsets in the
right order so that uart(4) will properly attach to the channels.

Submitted by: Marius Strobl <marius@alchemy.franken.de>
2004-04-05 01:58:02 +00:00
Robert Watson
47f32f6fa6 Two missed in previous commit -- compare pointer with NULL rather than
using it as a boolean.
2004-04-05 00:52:05 +00:00
Robert Watson
24459934e9 Prefer NULL to 0 when checking pointer values as integers or booleans. 2004-04-05 00:49:07 +00:00
Alan Cox
bdb93eb248 Remove unused arguments from pmap_init(). 2004-04-05 00:37:50 +00:00
Alan Cox
889eb0fc62 Eliminate unused arguments from vm_page_startup(). 2004-04-04 23:33:36 +00:00
Archie Cobbs
2c9027fcba Rename internal structure to fix cut & paste error.
Submitted by:	Bjoern A. Zeeb <bzeeb+freebsd@zabbadoz.net>
MFC After:	3 days
2004-04-04 21:33:09 +00:00
Pawel Jakub Dawidek
46aeebec57 Calculate bio_completed properly or die!
Approved by:	phk
2004-04-04 20:37:28 +00:00
Pawel Jakub Dawidek
52710de1cb Fix a panic possibility caused by returning without releasing locks.
It was fixed by moving problemetic checks, as well as checks that
doesn't need locking before locks are acquired.

Submitted by:		Ryan Sommers <ryans@gamersimpact.com>
In co-operation with:	cperciva, maxim, mlaier, sam
Tested by:		submitter (previous patch), me (current patch)
Reviewed by:		cperciva, mlaier (previous patch), sam (current patch)
Approved by:		sam
Dedicated to:		enough!
2004-04-04 20:14:55 +00:00
Robert Watson
ecd189d420 Spell 2 as SHUT_RDWR when used as an argument to soshutdown(). 2004-04-04 19:24:08 +00:00
Robert Watson
051bbf603a Detatch incorrect spellings of detach. 2004-04-04 19:15:45 +00:00
Robert Watson
2a8021f14b Explicitly compare pointers with NULL rather than treating a pointer as
a boolean directly, use NULL instead of 0.
2004-04-04 19:13:35 +00:00
Jeff Roberson
37a35e4a60 - Use the proper constant in sched_interact_update(). Previously,
SCHED_INTERACT_MAX was used where SCHED_SLP_RUN_MAX was needed.  This was
   causing the interactivity scaler to lose history at a more dramatic rate
   than intended.
2004-04-04 19:12:56 +00:00
Mark Murray
44e421c906 Put a bunch of output that us really only useful in a debug
scenario into #ifdef DEBUG. This makes my cluster with Belkin
KVM switch completely usable, even if the KVM switch and mouse
get a bit confused sometimes.

Without this, when the mouse gets confused, all sorts of crud
gets spammed all over the screen. With this, the mouse may appear
dead for a second or three, but it recovers silently.
2004-04-04 16:36:21 +00:00
Thomas Moestl
6e7272f69d - Use an ihandle_t to store the stdout instance handle instead of a
phandle_t. Since both are typedefed to unsigned int, this is more
  or less cosmetic.
- Fix the code that determines whether a creator instance was used
  for firmware output (and should not be blanked on initialization).
  Since r1.2 of dev/fb/creator.c, this consisted comparing a handle of
  an instance of a package with a handle of the package itself.
  Use the test from r1.1, which utilizes OF_instance_to_package().

Submitted by:	Marius Strobl <marius@alchemy.franken.de>
2004-04-04 12:52:22 +00:00
Luigi Rizzo
7395ff5cff whoops, forgot to fix these places where arpresolve() was used
Detected by: tinderbox
2004-04-04 11:52:09 +00:00
Luigi Rizzo
f7c5baa1c6 + arpresolve(): remove an unused argument
+ struct ifnet: remove unused fields, move ipv6-related field close
  to each other, add a pointer to l3<->l2 translation tables (arp,nd6,
  etc.) for future use.

+ struct route: remove an unused field, move close to each
  other some fields that might likely go away in the future
2004-04-04 06:14:55 +00:00
Wes Peters
be3d6f1dc5 Added BSD license, as requested by author.
Requested-by:	Stuart Walsh <stu@ipng.org.uk>
Message-ID:	<20040331190716.GB32835@deepfreeze.stu>
2004-04-04 06:13:56 +00:00
Marcel Moolenaar
fa662cc9b2 To quote the submitter:
"...If "keyboard" is the selected input-device and "screen" the
output-device (both via /options) but the keyboard is unplugged,
OF automatically switches to ttya for the console, it even prints
a line telling so on "screen". Solaris respects this behaviour and
uses ttya as the console in this case and people probably expect
FreeBSD to do the same (it's also very handy to temporarily switch
consoles)..."
"...I changed the comparison of the console device with "ttya" ||
"ttyb" to "tty" because on AXe boards all 4 onboard UARTs end in
SUB-D connectors (ttya and ttyb being 16550 and ttyc and ttyd a
SAB82532) and there's no Sun keyboard connector (but PS/2). If one
plugs a serial card in a box there also can be more than just ttya
and ttyb available for a console..."

Submitted by: Marius Strobl <marius@alchemy.franken.de>
Has no doubt that the change is correct: marcel
2004-04-04 05:24:13 +00:00
Marcel Moolenaar
f987d8d1d6 To quote submitter:
"... uart_cpu_sparc64.c currently only looks at /options if ttyX is
the selected console. However, there's one case where it should
additionally look at /chosen. If "keyboard" is the selected input-
device and "screen" the output-device (both via /options) but the
keyboard is unplugged, OF automatically switches to ttya for the
console. It even prints a line telling so on "screen". Solaris
respects this behaviour and uses ttya as the console in this case
and people probably expect FreeBSD to do the same (it's also very
handy to temporarily switch consoles)..."

Submitted by: Marius Strobl <marius@alchemy.franken.de>
Has no doubt the change is correct: marcel
2004-04-04 05:06:26 +00:00
Yoshihiro Takahashi
708fa777c3 Backout revision 1.31. The twa entries were moved to i386/conf/NOTES. 2004-04-04 04:41:52 +00:00
Maxime Henrion
b1fddb236f Fix the remaining warnings of growfs(8) on my sparc64 box with
WARNS=6.  I don't change the WARNS level in the Makefile because I
didn't tested this on other archs.

The fs.h fix was suggested by:	marcel
Reviewed by:	md5(1)
2004-04-03 23:30:59 +00:00
Marcel Moolenaar
e5a88925de In uart_ebus_probe(), match "su_pnp" besides "su" for ns8250 family
of UARTs. We already did this in uart_cpu_getdev().
While here, also check the compat name for "su" or "su16550".

Both changes submitted by: Marius Strobl <marius@alchemy.franken.de>
Does not doubt the correctness of the second change: marcel
2004-04-03 23:02:02 +00:00
Nate Lawson
25128fcc8a Add the ability to disable agp devices at the loader prompt. Usage is
hint.agp.0.disabled="1"

Submitted by:	jhb
2004-04-03 22:55:12 +00:00
Marcel Moolenaar
60aa1737df Move the definition of rss() from db_interface.c to cpufunc.h where
it belongs. Change the implementation to match those of rfs() and
rgs() for consistency and irrespective of whether the original was
more correct or not (technically speaking).
2004-04-03 22:23:36 +00:00
Alan Cox
9132f23442 Remove CADDR1 and CMAP1. They are unused. 2004-04-03 21:38:20 +00:00
Alan Cox
803e5b9ccc Remove ptmmap and ptvmmap. They are unused on amd64. 2004-04-03 20:53:50 +00:00
Marcel Moolenaar
8c9b7b2c84 Create NT_PRSTATUS and NT_FPREGSET notes for each and every thread
in the process. This is required for proper debugging of corefiles
created by 1:1 or M:N threaded processes. Add an XXX comment where
we should actually call a function that dumps MD specific notes.
An example of a MD specific note is the NT_PRXFPREG note for SSE
registers.

Since BFD creates non-annotated pseudo-sections for the first PRSTATUS
and FPREGSET notes (non-annotated in the sense that the name of the
section does not contain the pid/tid), make sure those sections describe
the initial thread of the process (i.e. the thread which tid equals the
pid). This is not strictly necessary, but makes sure that tools that use
the non-annotated section names will not change behaviour due to this
change.

The practical upshot of this all is that one can see the threads in
the debugger when looking at a corefile. For 1:1 threading this means
that *all* threads are visible.
2004-04-03 20:25:41 +00:00
Poul-Henning Kamp
93c98d4d1d Unbreak LED support on Elan cpus. 2004-04-03 18:42:52 +00:00
Poul-Henning Kamp
18a810fa8d Make led.c/led(4) standard so acpi_asus can use it too. 2004-04-03 18:42:05 +00:00
Peter Edwards
5182703cc8 Flush cached access mode after modifying a files attributes for
NFSv3. It's likely that modifying the attributes will affect the
file's accessibility. This version of the patch is one suggested
by Ian Dowse after reviewing my original attempt in the PR

Reviewed By: iedowse
PR: kern/44336
MFC after: 3 days
2004-04-03 17:23:46 +00:00
Marcel Moolenaar
fdcac92868 Assign thread IDs to kernel threads. The purpose of the thread ID (tid)
is twofold:
1. When a 1:1 or M:N threaded process dumps core, we need to put the
   register state of each of its kernel threads in the core file.
   This can only be done by differentiating the pid field in the
   respective note. For this we need the tid.
2. When thread support is present for remote debugging the kernel
   with gdb(1), threads need to be identified by an integer due to
   limitations in the remote protocol. This requires having a tid.

To minimize the impact of having thread IDs, threads that are created
as part of a fork (i.e. the initial thread in a process) will inherit
the process ID (i.e. tid=pid). Subsequent threads will have IDs larger
than PID_MAX to avoid interference with the pid allocation algorithm.
The assignment of tids is handled by thread_new_tid().

The thread ID allocation algorithm has been written with 3 assumptions
in mind:
1. IDs need to be created as fast a possible,
2. Reuse of IDs may happen instantaneously,
3. Someone else will write a better algorithm.
2004-04-03 15:59:13 +00:00
Ruslan Ermilov
2593748c60 Recharge the watchdog timer if there's still some TX work left. 2004-04-03 15:55:21 +00:00
Jacques Vidrine
4f2eff8c32 Correct a potential panic condition that could be caused when getting or
setting the VGA palette.

Reported by:	Christer Öberg <christer.oberg@texonet.com>
Reviewed by:	bde
2004-04-03 15:28:25 +00:00
Peter Edwards
e9c2ca4e26 Before MFC'ing the previous commit, I noticed I'd left out a case.
Add in missing case for i845G in the attach routine. I'll MFC this
with the rest of the change after the 4.10 codefreeze lifts.

Reviewed By: Doug Rabson
2004-04-03 13:24:37 +00:00
Lukas Ertl
84ff42d8ff mdoc fix: put the end-of-list macro after the last list element.
Approved by:   grog (mentor)
2004-04-03 12:14:30 +00:00
Alan Cox
121230a40d In some cases, sf_buf_alloc() should sleep with pri PCATCH; in others, it
should not.  Add a new parameter so that the caller can specify which is
the case.

Reported by:	dillon
2004-04-03 09:16:27 +00:00
Alan Cox
2cdafcbbe0 Microoptimize pagezero() based upon something that I learned writing the
optimized pagecopy().  This also has the virtual of making these two
functions more similar in style.
2004-04-03 05:33:10 +00:00
Bruce M Simpson
55d2c71b88 This file was erroneously removed from HEAD when TCP-MD5 support was MFC'd;
correct this lameness.
2004-04-03 05:31:38 +00:00
Sam Leffler
f61dd564dd do proper subclassing of node free+copy; the previous hack falls apart when
the 802.11 layer does useful work

Obtained from:	madwifi
2004-04-03 03:33:02 +00:00
Ruslan Ermilov
b08f499b32 Fixed a few bugs in the rl(4) driver:
Under polling(4), we counted non-existent output packets and wasted
CPU cycles, corrected.  (PR kern/64975.)

The fix in revision 1.71 to correct resetting of the watchdog timer
was wrong.

In rl(4), the TX list does not have a gap between the consumer and
producer, so the "empty TX list" test was wrong, corrected.

Also, resetting the timer to five each time we know there is still
some TX work to do was a bad idea -- under polling(4), if the chip
goes out to lunch, this results in the watchdog routine to _never_
be called.  Instead, let the timer downgrade to zero and fire the
watchdog, then reset it to five when it is zero AND there is some
TX work left.  (Most other network drivers need this fix too.)

MFC after:	3 days
2004-04-03 00:42:33 +00:00
Sam Leffler
1e77407972 do proper subclassing of node free+copy; the previous hack falls apart when
the 802.11 layer does useful work

Obtained from:	madwifi
2004-04-03 00:06:23 +00:00
Sam Leffler
babe2453bd transmit beacon frames directly instead of defering them to a swi; there
was too much delay

Obtained from:	madwifi
2004-04-03 00:02:17 +00:00
Sam Leffler
cb344d958a update copyright notice for 2004 2004-04-02 23:57:10 +00:00
Sam Leffler
59f32d6b38 add new statistics
Obtained from:	madwifi
2004-04-02 23:55:45 +00:00
Sam Leffler
fdd758d4d1 check more quickly (and directly) if an interrupt is pending; this reduces
work done in ath_intr when the irq is shared

Obtained from:	madwifi
2004-04-02 23:49:15 +00:00
Sam Leffler
b28b465391 cleanup descriptor allocation if attach fails
Obtained from:	madwifi
2004-04-02 23:47:39 +00:00
Sam Leffler
01e7e035e0 remove use IEEE80211_C_RCVMGT 2004-04-02 23:37:00 +00:00
Ruslan Ermilov
6ec31f009a Performance tuning.
Moved the RX ring resyncing code to ste_rxeoc(), and only run it
if we were asked to POLL_AND_CHECK_STATUS, under DEVICE_POLLING.
(This significantly reduces the CPU load.)

Improved the RX ring resyncing code by re-checking if the head
is still empty before doing resyncing.  This mostly affects the
DEVICE_POLLING mode, where we run this code periodically.  We
could start checking with an empty head (well, an empty ring
even), and after doing a few iterations, the chip might write
a few entries, including the head, and we would bogusly consider
this case as requiring resyncing.  On a test box, this reduced
the number of resyncs done by a factor of 10.

In ste_txeof(sc), only reset the watchdog timer to zero when
the TX list is completely empty.

Converted ste_tx_prev_idx to a pointer -- faster.

Removed some bitrot.
2004-04-02 23:36:49 +00:00
Sam Leffler
36c6538b7f Change handling of probe response frames. Previously we always dropped the
refcnt on the node but left it in the node table.  This allows the node table
to hold the results of scanned ap's but for ibss scans left nodes w/o any
driver-private state setup and/or a bad refcnt (when the nodes were timed
out they were prematurely discarded).  Now we treat nodes identified for ap
scanning as before but force nodes discovered when scanning for ibss neighbors
to have complete/proper state and hold the refcnt on the node.  Any other
nodes created because of these frames are discarded directly (need to optimize
this case to eliminate various work that's immediately discarded).
2004-04-02 23:35:24 +00:00
Sam Leffler
750d6d0c60 fix adhoc/ibss operation for drivers that require host support (e.g. ath):
o remove IEEE80211_C_RCVMGT capability
o on transmit craft new nodes as needed using new ieee80211_find_txnode routine
o add ieee80211_find_txnode routine to lookup a node by mac address and
  if not present create one when operating in ibss/ahdemo mode; new nodes
  are dup'd from bss and the driver is told to treat the node as if a new
  association has been created so driver-private state (e.g. rate control
  handling) is setup

Obtained from:	netbsd (basic idea)
2004-04-02 23:25:39 +00:00
Sam Leffler
6f3f5a1170 always free node reference when processing a probe request frame; was
conditionally doing an unref if operating in adhoc mode which turns
out to be wrong
2004-04-02 23:12:45 +00:00
Sam Leffler
694dca643b o change ieee80211_dup_bss to inherit explicit data from ic_bss instead of
blindy copying the node contents; this turns out to be a bad idea as we
  add more state in the node for things like WPA
o track node allocation failures in ieee80211_dup_bss instead of the callers

Obtained from:	madwifi
2004-04-02 23:09:24 +00:00
Sam Leffler
c64bfa0f8f track node allocation failure stats in ieee80211_alloc_node instead
of each caller

Obtained from:	madwifi
2004-04-02 23:06:41 +00:00
Sam Leffler
410ca74bb8 replace explicit malloc/free with MALLOC/FREE for portability
Obtained from:	madwifi
2004-04-02 23:02:24 +00:00
Sam Leffler
b4c5a90fee extract node matching logic into new ieee80211_match_bss routine for use
in background/incremental scanning

Obtained from:	madwifi
2004-04-02 23:00:30 +00:00
Sam Leffler
849b898054 diff reduction against madwifi 2004-04-02 22:56:09 +00:00
Sam Leffler
a6381c54bb when processing beacon/probe response frames capture "is probe" in a
variable to improve code legibility since we're going to use it more
in forthcoming mods

Obtained from:	madwifi
2004-04-02 22:54:07 +00:00
Sam Leffler
4bd067c5a1 add a case of IEEE80211_ELEMID_IBSSPARMS so the statistic on unknown
elements is more meaningful (will add more with WPA merge)

Obtained from:	madwifi
2004-04-02 22:50:31 +00:00
Sam Leffler
7aa402898f when doing internal bridging free the node instead of just dropping the
reference for consistency (explicit refcounting is discouraged)

Obtained from:	madwifi
2004-04-02 22:48:52 +00:00
Sam Leffler
9089c48c13 when receiving a frame w/ a bad version number don't unref the node; the
driver is responsible for that

Obtained from:	madwifi
2004-04-02 22:47:11 +00:00
Sam Leffler
fce2da8b66 insure basic rate bit is set in derived rate set; this
works around a protocol/firmware problem with some versions found
in hermes/prism cards
2004-04-02 20:22:25 +00:00
Sam Leffler
63beab8306 diff reduction against madwifi/p4 2004-04-02 20:19:20 +00:00
Vinod Kashyap
87b320bb72 Moved 3ware 9000 driver (twa) stuff from sys/conf/NOTES to /sys/i386/conf/NOTES. 2004-04-02 18:50:56 +00:00
Daniel Eischen
ab39bc9a92 Unbreak natd.
Reported and submitted by:	Sean McNeil (sean at mcneil.com)
2004-04-02 17:57:57 +00:00
Dag-Erling Smørgrav
c959700c77 style(9): return foo -> return (foo)
also fix a continuation indent I missed in the previous commit.
2004-04-02 16:41:16 +00:00
Dag-Erling Smørgrav
81f58729a1 Clean up whitespace, fix continuation indents, wrap some long lines. 2004-04-02 16:39:12 +00:00
Dag-Erling Smørgrav
4cdc9a643e Unbreak LINT on 64-bit platforms. Note that this code is not style(9)-
compliant, but I'll leave that for someone else.

Noticed by:	tinderbox
Pointy hat to:	the usual suspects
2004-04-02 15:09:57 +00:00
Ken Smith
34b678a695 Rearrangements needed for syscons(4) to be used as a console device
on architectures that need to call cninit() before the machine is
ready to support mutexes (required by make_dev()).

	- Remove make_dev() call from scinit() when flags indicate
	  unit is the system console, rely on sc_attach_unit() to
	  handle it.
	- When trying to access current screen's status (scr_stat
	  structure) use the static one provided for the initial
	  system console if no dev_t is available.
	- When calling make_dev() in sc_attach_unit() catch special
	  case of system's initial console and set up dev_t structure
	  to include pointer to console's scr_stat struct.

Reviewed by:	marcel
Tested by:	marcel, grehan (ppc), others on current@
Approved by:	rwatson (mentor)
2004-04-02 15:02:44 +00:00
Marcel Moolenaar
4e55f7230a In ns8250_putc() insert a barrier between writing the character and
checking for transmitter empty.
2004-04-02 07:37:28 +00:00
Marcel Moolenaar
16283d130f Allow the selection of a debug port with hw.uart.dbgport. Unlike
other architectures (like ia64), the variable has to be set to
an OpenFirmware device name.
2004-04-02 07:33:35 +00:00
Marcel Moolenaar
af81ff3f49 Call kbd_attach() only when KBD_INSTALL_CDEV is enabled as the function
is only defined in that case.
2004-04-02 05:59:06 +00:00
Kris Kennaway
c5af600675 Add missing comment terminator. 2004-04-02 04:57:40 +00:00
Julian Elischer
4f73277a35 The comment complained about not having a thread_unlink()
and did the work itself, but thread_unink() has existed for a while... use it.
2004-04-02 01:01:34 +00:00
Robert Watson
445a8f0348 For now, restore an splx(s) I removed when introducing slisunitfree(). 2004-04-01 23:54:49 +00:00
Alfred Perlstein
e5ff40f0ca Fix booting with ps2 keyboards. 2004-04-01 21:48:31 +00:00
John Baldwin
e43257aa7d Finish fixing up Alpha to work with an MP safe ptrace():
- ptrace_single_step() is no longer called with the proc lock held, so
  don't try to unlock it and then relock it.
- Push Giant down into proc_rwmem() instead of forcing all the consumers
  (including Alpha breakpoint support) to explicitly wrap calls to
  proc_rwmem() with Giant.

Tested by:	kensmith
2004-04-01 20:56:44 +00:00
Julian Elischer
10030054ac Do the looping retry trick in the first operation to try to talk
with the device, not the second..

Submitted by: ticso@cicely12.cicely.de
2004-04-01 18:55:28 +00:00
Dag-Erling Smørgrav
9a02a2f5ed Fix style issues in twa lines added in rev 1.878. 2004-04-01 17:55:50 +00:00
Dag-Erling Smørgrav
7cfcb873b5 Comment out the au88x0 line which was inadvertantly included in the
previous commit.
2004-04-01 17:53:04 +00:00
Yoshihiro Takahashi
a8c6f0ac9c The twa device and related options are not needed. 2004-04-01 14:23:41 +00:00
SUZUKI Shinsuke
b5676acff4 UDP checksum is mandatory in IPv6 (RFC2460 p.28)
Obtained from: KAME
2004-04-01 13:48:23 +00:00
Ruslan Ermilov
ba7bc837d0 Moved the statistical counter under hw.ste.rxsyncs.
Suggested by:	njl
2004-04-01 12:55:38 +00:00
Dag-Erling Smørgrav
7eb17244fa Move twa from files.i386 to files. This unbreaks LINT on !i386.
Pointy hat to:	vkashyap, ps
2004-04-01 10:02:50 +00:00
Dag-Erling Smørgrav
387a06e15b Back out 1.188 (major number for twa). The twa driver does not need it.
Pointy hat to:	ps
2004-04-01 10:00:04 +00:00
Peter Grehan
6611d6692f Match the specific MPC106 host bridge PCI ID rather than all
generic host bridges: this avoids a race with the UniNorth
generic match.
2004-04-01 07:34:36 +00:00
Scott Long
cd587b1397 Don't print out 'GIANT-LOCKED' for INTR_FAST drivers. 2004-04-01 07:18:42 +00:00
Nate Lawson
5eb09c7066 Move the ivar accessing routines back to inlines (reverting acpivar.h
rev 1.44 and acpi.c rev 1.96).  Now gcc can handle larger inlines and we
really need external drivers to be able to read their acpi ivars.
2004-04-01 04:21:33 +00:00
Peter Grehan
ae33b79b67 Move the name attribute to the end of the conftxt line to simplify
libdisk parsing (the name may be empty, or contain spaces).

Submitted by:  Suleiman Souhlal <refugee@segfaulted.com>
2004-04-01 01:33:37 +00:00
Sam Leffler
2f1ad18b34 radiotap updates:
o force little-endian byte order for header
o pad header to 32-bit boundary to guard against applications that assume
  packet data alignment
2004-04-01 00:38:45 +00:00
Sam Leffler
8d798b52fd correct xmit-side radiotap collection by tap'ing the frame before
prepending the h/w header
2004-04-01 00:33:33 +00:00
Pawel Jakub Dawidek
2fc0588da2 Remove sysctl kern.ps_argsopen, it is not very useful, one should use
security.bsd.see_other_uids instead.

Discussed with:	phk, rwatson
2004-04-01 00:10:45 +00:00
Pawel Jakub Dawidek
5e2c0c0b0e Remove ps_argsopen check. It is was bogus in the past and was corrected
not quite well by me - if kern.ps_argsopen was set to 0, users weren't
permitted to see arguments of even own processes.
But kern.ps_argsopen is going away, so just remove this check and leave
security checks for p_cansee() function.
2004-04-01 00:08:20 +00:00
Pawel Jakub Dawidek
c5b7c33bc8 Remove ps_argsopen from this check, because of two reasons:
1. This check if wrong, because it is true by default
   (kern.ps_argsopen is 1 by default) (p_cansee() is not even checked).
2. Sysctl kern.ps_argsopen is going away.
2004-04-01 00:04:23 +00:00
Robert Watson
2168debca9 Abstract "is a particular SLIP unit free" check behind slisunitfree(),
and use that instead of manual list searches in a couple of places.
2004-03-31 22:59:56 +00:00
Luigi Rizzo
5d4ca75e56 Fix a bug with preloaded image -- for some reason [that i don't
completely understand], md_takeroot() runs before md_preloaded(),
rendering both useless.
As a fix, move the body (effectively one line!) of md_takeroot()
into md_preloaded(), and get rid of the stuff that has become useless.

Bug and fix reported 10 days ago on -current, no reply.
2004-03-31 21:48:02 +00:00
Dag-Erling Smørgrav
e271f829b8 Raise WARNS level to 2. 2004-03-31 21:33:55 +00:00
Dag-Erling Smørgrav
2871c50186 Deal with aliasing warnings.
Reviewed by:	ru
Approved by:	silence on the lists
2004-03-31 21:32:58 +00:00
Ruslan Ermilov
065566e6a3 Under a heavy RX load, at least with D-Link DFE-550TX adapters,
the driver's RX ring head may fall behind the chip, causing the
stuck traffic, disordered packets, etc.  Work around this by
adopting the technique of resyncing RX head used in dc(4) and
xl(4) drivers, but do it in a slightly different place to reduce
the number of resyncs needed.

Also, set the NIC's RX polling period to a more meaningful value,
to stop overloading the PCI bus (this also reduces the number of
resyncs by a factor of 3 or more in a long run; the actual number
is very dependent on a nature of the traffic).

Maintain the statistics counter as the hw.ste_rxsyncs sysctl.

In cooperation with:	Vsevolod Lobko
OK'ed by:		ambrisko
MFC after:		5 days
2004-03-31 21:10:01 +00:00
Ruslan Ermilov
001407b9c2 Added polling(4) support for ste(4).
MFC after:	5 days
2004-03-31 20:39:20 +00:00
Vinod Kashyap
9e429d3871 Moved comments on 3ware 9000 series RAID controller driver options from
options to NOTES.
2004-03-31 18:46:13 +00:00
Nate Lawson
63600cc345 Staticize pnp methods, style fixes. Remove unused variable to unbreak
kernel build.
2004-03-31 17:35:28 +00:00
Takanori Watanabe
cd284d7a6a Add ACPI path in location string for ACPI namespace aware PCI device. 2004-03-31 17:27:19 +00:00
Nate Lawson
72ad60ada4 Add an interface to pass an argument to the resource parsing functions.
This is just groundwork for changing sysresource behavior.

PR:
Submitted by:
Reviewed by:
Approved by:
Obtained from:
MFC after:
2004-03-31 17:23:46 +00:00
Takanori Watanabe
247648affb Style fix.
Pointed out by: njl
2004-03-31 17:21:14 +00:00
Bruce M Simpson
1acc2f81b1 Add more DLT types required by libpcap 0.8.3.
Maintain numeric sort order.
2004-03-31 14:22:13 +00:00
Bruce M Simpson
a7135a6201 Update system bpf headers for libpcap 0.8.3.
Maintain listing of DLT link types in numeric order.
2004-03-31 14:09:26 +00:00
Stephen McKay
39faff5a4f Support the D-Link DGE-530T. Mine appears to have a blank eeprom, so assume
they all do and handle that without alarming the user.  Also pull in a bit
of defensive code from OpenBSD that triggers when a card is recognised but
not properly classified as either Genesis or Yukon.  Not that I could ever
have needed this. :-)

Obtained from: OpenBSD/NetBSD (partially)
MFC after: 2 weeks
2004-03-31 12:35:51 +00:00
Scott Long
662d381879 Give in to the oblique nagging and move AAC and AHC/AHD comments out of
/sys/conf/options and into /sys/conf/NOTES
2004-03-31 08:22:09 +00:00
Julian Elischer
4ccbe07e84 Remove unused variable. 2004-03-31 08:20:44 +00:00
Peter Grehan
2e428c5487 The end argument to bus_alloc_resource() should have been ~0 and
not ~1, but the call has been switched over to bus_alloc_resource_any()
which has the same effect.

Submitted by: Suleiman Souhlal <refugee@segfaulted.com>
2004-03-31 07:40:46 +00:00
Robert Watson
8e44a7ec13 In sofree(), avoid nested declaration and initialization in
declaration.  Observe that initialization in declaration is
frequently incompatible with locking, not just a bad idea
due to style(9).

Submitted by:	bde
2004-03-31 03:48:35 +00:00
Alan Cox
c64b70130e - Add an optimized page copy function for use by pmap_copy_page(). It is
roughly four times faster than bcopy() for uncached pages.
 - Sort the function prototypes in md_var.h.
2004-03-31 02:03:49 +00:00
Robert Watson
db48c0d254 Export uipc_connect2() from uipc_usrreq.c instead of unp_connect2(),
and consume that interface in portalfs and fifofs instead.  In the
new world order, unp_connect2() assumes that the unpcb mutex is
held, whereas uipc_connect2() validates that the passed sockets are
UNIX domain sockets, then grabs the mutex.

NB: the portalfs and fifofs code gets down and dirty with UNIX domain
sockets.  Maybe this is a bad thing.
2004-03-31 01:41:30 +00:00
Mathew Kanner
236efae6a9 By default, ich4 has NAMBAR and NABMBAR i/o spaces as
read-only.  Need to enable "legacy support", by poking
into pci config space.  (comment from the patch)

Submited by:	Autrijus Tang <autrijus@autrijus.org>
Approved by:	tanimura (mentor)
2004-03-31 00:11:24 +00:00
Sam Leffler
2e79ca9762 o add support for controlling the power of transmitted frames
o add support for controlling the 11g protection mechanism used
  to protect OFDM frames in a mixed 11b/g network

Reviewed by:	imp
2004-03-30 22:57:57 +00:00
Sam Leffler
b2e9569143 Only call if_init when doing SIOCSIFADDR if the interface is not marked
up (IFF_UP).  This eliminates extraneous AP scanning.

Reviewed by:	imp
2004-03-30 22:53:52 +00:00
Ruslan Ermilov
3b6b14d465 Switch ste_encap() over to using m_defrag().
No functional change, the previous ste_encap() was correct WRT
long mbuf chains; this just reduces code duplication.

MFC after:	3 days
Prodded by:	ambrisko
2004-03-30 19:23:38 +00:00
Vinod Kashyap
f646fe1a8d Added options for 3ware 9000 series RAID controller driver (twa). 2004-03-30 18:53:18 +00:00
Max Laier
eaa7035b13 Shut up a couple of annoying gcc warnings. Do not enclose the fixes with
#ifdefs in order to loop it back to OpenBSD after the next import. There are
a some implicit asserts involved which might be better spelled out
explicitly (af == AF_INET ...)

Approved by:	bms(mentor)
2004-03-30 18:28:30 +00:00
Benno Rice
0c7e9074e6 Replace td2 with td on the assumption that this was a typo. This should at
least unbreak the build.

Pointy hat to: peter
Not tested either by: benno
2004-03-30 13:57:34 +00:00
Ruslan Ermilov
53090724b0 The VLAN TCI field should be operated in network byte order.
This fixes the VLAN support for nge(4).

Reported by:	Jacob S. Barrett
MFC after:	3 days
2004-03-30 10:24:52 +00:00
Alan Cox
1dc10fceaa White space and wording changes to init_param3().
Mostly submitted by:	bde
2004-03-30 08:00:11 +00:00
Nate Lawson
c9b8d77d80 Disable serialize_methods and enable _OSI support by default. The former
is necessary because some IBMs use recursive methods (pointed out by
Robert Moore from Intel).  The latter was a typo on my part.  It was disabled
by default when it should have been enabled.
2004-03-30 07:35:18 +00:00
Bruce Evans
dd1c7d1373 Fixed a style bug in previous commit (misformatted comment). Fixed
some nearby bugs (rotted and missing comments).  Use similar wording
for describing broken options.
2004-03-30 07:01:56 +00:00
Scott Long
744bb56d95 Catch all cases where bread() returns an error and a valid *bp, and release
the *bp.

Obtained from:	DragonFlyBSD
2004-03-30 05:01:48 +00:00
Vinod Kashyap
99635d6cdd Initial check-in of the device driver for 3ware's 9000 series
PATA/SATA RAID controllers.  This driver is a SIM under CAM, and
so, behaves like a driver for a SCSI controller.
2004-03-30 03:46:00 +00:00
Robert Watson
fc3fcacf52 Prefer NULL to 0 when testing and assigning pointer values. 2004-03-30 02:16:25 +00:00
Peter Wemm
9a6a4cb50d Shorten some XXXKSE commentry 2004-03-29 22:46:54 +00:00
Peter Wemm
39d3505a30 Kill some XXXKSE's. vnlru/syncer are single threaded. 2004-03-29 22:45:33 +00:00
Peter Wemm
b21126c6b3 Clean up the stub fake vnode locking implemenations. The main reason this
stuff was here (NFS) was fixed by Alfred in November.  The only remaining
consumer of the stub functions was umapfs, which is horribly horribly
broken.  It has missed out on about the last 5 years worth of maintenence
that was done on nullfs (from which umapfs is derived).  It needs major
work to bring it up to date with the vnode locking protocol.  umapfs really
needs to find a caretaker to bring it into the 21st century.

Functions GC'ed:
vop_noislocked, vop_nolock, vop_nounlock, vop_sharedlock.
2004-03-29 22:41:21 +00:00
Robert Watson
24b316d5eb Add per-softc locking to if_tun:
- Add tun_mtx to tun_softc.  Annotate what is (and isn't) locked by it.
- Lock down tun_flags, tun_pid.
- In the output path, cache the value of tun_flags so it's consistent
  when processing a particular packet rather than re-reading the field.
- In general, use unlocked reads for debugging.
- Annotate a couple of places where additional unlocked reads may be
  possible.
- Annotate that tun_pid is used as a bug in tunopen().

if_tun is now largely MPSAFE, although questions remain about some of
the cdevsw fields and how they are synchronized.
2004-03-29 22:16:39 +00:00
Robert Drehmel
9fbb80baff Bring these files closer to style(9) conformance by comparing a
dereferenced character pointer to '\0' instead of using the ! operator.
2004-03-29 21:15:41 +00:00
Warner Losh
3666cedd6b Eliminate support for FreeBSD 3.x and earlier now that we're in the
glide path for the 5.x branch.
2004-03-29 21:10:05 +00:00
Peter Wemm
5c89deaefc Finish tidying up a couple of leftovers from the KSTACK_PAGES stuff. Some
files still #included the opt_ file.  powerpc hadn't been updated yet.
2004-03-29 19:38:05 +00:00
Robert Watson
7a5fa7f1e7 Lock down if_tun global variables using a new mutex, tunmtx. As with
other pseudo-interfaces, break out tear-down of a softc into a
separate tun_destroy() function, and invoke that from the module
unloader.  Hold tunmtx across manipulations of the global softc list.
2004-03-29 18:42:51 +00:00
Robert Watson
181e65db5b Use a common return path for filt_soread() and filt_sowrite() to
simplify the impact of locking on these functions.

Submitted by:	sam
Sponsored by:	FreeBSD Foundation
2004-03-29 18:06:15 +00:00
Robert Watson
71c90a2944 In sofree(), moving caching of 'head' from 'so->so_head' to later in
the function once it has been determined to be non-NULL to simplify
locking on an earlier return.
2004-03-29 17:57:43 +00:00
Robert Watson
5a35e5f9af If debug.mpsafenet, initialize UNIX domain socket timeouts as MPSAFE;
otherwise, assert Giant in the callouts.
2004-03-29 17:00:05 +00:00
Yoshihiro Takahashi
2c08d6bea1 Add a comment about time stamper.
Submitted by:	chi@bd.mbn.or.jp (Chiharu Shibata)
2004-03-29 12:51:46 +00:00
Dag-Erling Smørgrav
9b9a184d22 This commit was generated by cvs2svn to compensate for changes in r127563,
which included commits to RCS files with non-trunk default branches.
2004-03-29 11:18:25 +00:00