We can only ever get to vgonechrl() from a devfs vnode, so we do not
need to reassign the vp->v_op to devfs_specops, we know that is the
value already.
Julian Elischer [Mon, 20 Dec 2004 20:41:55 +0000 (20:41 +0000)]
Add a bunch of USB definitions from NetBSD.
This is part of an ongoing cycle of commits on all the BSDs to
merge the USB vendor and device defintions..
Paul Richards [Mon, 20 Dec 2004 15:46:56 +0000 (15:46 +0000)]
If PORTNAME is set in a system Makefile then hook into the ports
mechanisms to allow a package to be created. This paves the way
for packaging the main tree.
Nate Lawson [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.
Maxime Henrion [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.
Nate Lawson [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.
- 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().
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.
Daniel Hartmeier [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
Nate Lawson [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.
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.
Daniel Eischen [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()).
Olivier Houchard [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.
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.
David Xu [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 Elischer [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
- 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 Wemm [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.
Hartmut Brandt [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 Leffler [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.
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.
Darren Reed [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.