njl [Mon, 20 Dec 2004 10:46:56 +0000 (10:46 +0000)]
Only use the current value if there's one IRQ. Some systems return
multiple IRQs (which is nonsense for _CRS) when the link hasn't been
programmed. Before, this was a KASSERT. A ServerWorks system was
seen returning IRQs of 0, 2 in response to _CRS before link setup.
Thanks to sam@ for quick testing and turnaround on this.
mux [Mon, 20 Dec 2004 10:18:21 +0000 (10:18 +0000)]
Only try to use the 82503 serial interface for the 82557 chipsets. The
datasheet says it is only valid for such chipsets and shouldn't be used
with others. This fixes some 82559 based cards which otherwise only
work at 10Mbit.
njl [Mon, 20 Dec 2004 05:03:41 +0000 (05:03 +0000)]
Only report a critical battery level once until it's gone non-critical.
An improvement would be to check all batteries for critical state before
printing a message.
pjd [Sun, 19 Dec 2004 23:33:59 +0000 (23:33 +0000)]
- Argument 'flags' in g_mirror_destroy_consumer() function is unsed -
mark it as such.
- Before closing consumer check if it is open. It can be closed here
when g_mirror_connect_disk() fails on g_access().
pjd [Sun, 19 Dec 2004 23:12:00 +0000 (23:12 +0000)]
Some major cleanups.
Keeping consumers open when device is closed is very hard. We need to
open consumers sometimes to update metadata, etc.
Many hacks was introduced in the past to made it possible. You cannot
be sure that you can open consumer for writing always, even if you think
it should be allowed. If one of the mirror components is for example da0
and you try to open it, you can get EPERM when da0s1 is opened for reading
(because BSD class opens consumers (da0) with an extra 'e' bit set).
Waiting for the events queue to be empty may do the trick, but it makes
code much uglier (as you cannot always call g_waitidle()), it doesn't
solve all edge cases and it can introduce deadlocks if there are events
in the queue that wait for gmirror.
I removed those hacks. Now all consumers are open r1w1e1 always, even if
device is closed. Maybe it is less clean from GEOM perspective, but simpify
code a lot and make it much more reliable.
The only issue was retaste event which is sent when we close consumers
opened for writing. I ignore retaste event by not detaching consumer
immediately (so retaste event is not send to my class) and sending event
right after it to detach and destroy consumer.
dhartmei [Sun, 19 Dec 2004 19:43:04 +0000 (19:43 +0000)]
Initialise init_addr in pf_map_addr() in the PF_POOL_ROUNDROBIN,
prevents a possible endless loop in pf_get_sport() with 'static-port'
ICMP state entries use the ICMP ID as port for the unique state key. When
checking for a usable key, construct the key in the same way. Otherwise,
a colliding key might be missed or a state insertion might be refused even
though it could be inserted. The second case triggers the endless loop,
possibly allowing a NATed LAN client to lock up the kernel.
PR: kern/74930
Reported and tested by: Hugo Silva, Srebrenko Sehic
MFC after: 3 days
njl [Sun, 19 Dec 2004 19:42:54 +0000 (19:42 +0000)]
Move launching the worker thread from a SYSINIT to the first device's
attach. This fixes the previous behavior where systems without hptmv
hardware always had a worker thread running.
gad [Sun, 19 Dec 2004 05:14:29 +0000 (05:14 +0000)]
Call umask() before opening the lock-file for a queue, to make sure
the file will be created with the right access, if the call to open()
does create it. Also fix the other call to umask() to turn off
"write others", just as a matter of general safety.
deischen [Sat, 18 Dec 2004 18:07:37 +0000 (18:07 +0000)]
Use a generic way to back threads out of wait queues when handling
signals instead of having more intricate knowledge of thread state
within signal handling.
Simplify signal code because of above (by David Xu).
Use macros for libpthread usage of pthread_cleanup_push() and
pthread_cleanup_pop(). This removes some instances of malloc()
and free() from the semaphore and pthread_once() implementations.
When single threaded and forking(), make sure that the current
thread's signal mask is inherited by the forked thread.
Use private mutexes for libc and libpthread. Signals are
deferred while threads hold private mutexes. This fix also
breaks www/linuxpluginwrapper; a patch that fixes it is at
http://people.freebsd.org/~deischen/kse/linuxpluginwrapper.diff
Fix race condition in condition variables where handling a
signal (pthread_kill() or kill()) may not see a wakeup
(pthread_cond_signal() or pthread_cond_broadcast()).
cognet [Sat, 18 Dec 2004 17:58:49 +0000 (17:58 +0000)]
Update the StrongArm port to match the current code.
- Implement arm_mask_irqs and arm_unmask_irqs
- Provide the available physical address range after pmap_bootstrap allocated
things, instead or before, or bad things happen.
rse [Sat, 18 Dec 2004 15:27:17 +0000 (15:27 +0000)]
Synchronize reference list to the ng_xxx(4) manpages of netgraph nodes
with the actually installed manpages by adding the missing ones. This
way they can be found more easily.
davidxu [Sat, 18 Dec 2004 12:52:44 +0000 (12:52 +0000)]
1. make umtx sharable between processes, the way is two or more processes
call mmap() to create a shared space, and then initialize umtx on it,
after that, each thread in different processes can use the umtx same
as threads in same process.
2. introduce a new syscall _umtx_op to support timed lock and condition
variable semantics. also, orignal umtx_lock and umtx_unlock inline
functions now are reimplemented by using _umtx_op, the _umtx_op can
use arbitrary id not just a thread id.
julian [Sat, 18 Dec 2004 01:20:18 +0000 (01:20 +0000)]
Slight change to formatting so that 'ctags' doesn't
give up on teh file half way through.. Might have been my
mistake earlier anyhow. No actual code change
brueffer [Fri, 17 Dec 2004 18:35:38 +0000 (18:35 +0000)]
- add a HARDWARE section based on the hardware notes and the devices
already listed in the manpage
- reword some DESCRIPTION sentences
- Xref ehci(4)
- bump .Dd
peter [Fri, 17 Dec 2004 17:45:29 +0000 (17:45 +0000)]
Recognize the 32-bit form of the twe binary passthrough ioctl()s so that
there is some hope for the 32-bit management utilities to run. I've used
the cli successfully, but 3dm2 doesn't work for other reasons. Of course,
a native binary of the 3dm2 and cli would be much better, but that doesn't
exist.
harti [Fri, 17 Dec 2004 13:20:19 +0000 (13:20 +0000)]
Remove all the cleanup functions. There is no reason to free memory
just before exiting (especially given the number of memory leaks) -
it just costs time.
sam [Fri, 17 Dec 2004 03:57:16 +0000 (03:57 +0000)]
Fix wep operation for station mode:
o don't encapsulate on tx; the chip expect a raw frame w/o the crypto header
o clear the WEP bit in the 802.11 header on rx so the 802.11 layer doesn't
try to strip the crypto header
o clobber the "drop unencoded frames" state bit when privacy is enabled so
rx'd frames we pass up to the 802.11 layer are not discarded as unencrypted
This stuff will need to be redone if anyone decides to add WPA support.
gad [Fri, 17 Dec 2004 01:54:50 +0000 (01:54 +0000)]
When printing a data file received from some other host, check to make
sure the data file has been completely transfered before starting to
print it. This is needed because some implementations of lpr will send
the control-file for a print job before sending the matching data-files,
and that can cause problems if the receiving host is a busy print-server.
darrenr [Thu, 16 Dec 2004 21:02:16 +0000 (21:02 +0000)]
Using just m_pullup to get all of the interesting bits in packet into one
buffer doesn't work for ipv6 packets, so use m_defrag() here instead as an
easy drop-in replacement.
ru [Thu, 16 Dec 2004 19:55:57 +0000 (19:55 +0000)]
Previous revision didn't fix all cases. For example,
testing for variables that are always defined (e.g.,
"make -V CC") would still print a false warning. Fix
this by only passing a submake the MAKEOBJDIRPREFIX=*
argument if it was present. As a result, we loose
the check for -DMAKEOBJDIRPREFIX, or an esoteric
"MAKEOBJDIRPREFIX = foo" (with embedded spaces), but
these are unorthodox enough to not care about them.
The make(1) bug mentioned in the previous revision
was just fixed in make/main.c,v 1.109.
ru [Thu, 16 Dec 2004 19:46:50 +0000 (19:46 +0000)]
Fix a long-standing bug when make(1) is passed the -V and
-f options in MAKEFLAGS environment variable, and some of
these options are also specified on the command line.
ps [Thu, 16 Dec 2004 19:28:37 +0000 (19:28 +0000)]
Change the NFS sillyrename convention so that we won't run out
of sillyrenames (which were limited to 58 per pid per directory,
for no good reason). The new format of sillyrenames looks like
harti [Thu, 16 Dec 2004 16:14:16 +0000 (16:14 +0000)]
Instead of dynamically allocating list heads allocated them statically
now that their size is only two pointers. This eliminates a lot of calls
to Lst_Init and from there to malloc together with many calls to
Lst_Destroy (in places where the list is obviously empty). This also
reduces the chance to leave a list uninitilized so we can remove more
NULL pointer checks and probably eliminates a couple of memory leaks.
obrien [Thu, 16 Dec 2004 16:03:53 +0000 (16:03 +0000)]
Remove the helpers for moving to a 64-bit time_t on Sparc64. If someone
isn't running with a 64-bit time_t by now, they don't really track -CURRENT
and would probably go to RELENG_5 vs. 6-CURRENT.