Tim Kientzle [Wed, 22 Dec 2004 03:38:28 +0000 (03:38 +0000)]
Fix -W long option handling.
In particular:
-W excl=text
fails because "excl" is a prefix of both "exclude" and "exclude-from". But,
-W exclude=text
is okay because it matches "exclude" exactly.
Tim Kientzle [Wed, 22 Dec 2004 02:35:37 +0000 (02:35 +0000)]
Don't truncate major/minor numbers written to the legacy
ustar fields. Later, we're going to permit numeric extensions
for these fields, so we can support large values here. In particular,
this allows GNU tar to correctly extract such entries even
though it doesn't support the pax extended attributes.
Note: r1.18 and r1.17.2.1 of this file allowed similar treatment
of the uid/gid fields.
Tim Kientzle [Wed, 22 Dec 2004 00:49:16 +0000 (00:49 +0000)]
Tune the bidding for tar archives. This
improves the recognition of hardlink entries
with/without bodies (which is implemented through
a look-ahead that uses the bid function).
Peter Pentchev [Tue, 21 Dec 2004 20:02:50 +0000 (20:02 +0000)]
And this, kids, is what happens if you act on a patch without looking
at the mailing list to see if there isn't any more discussion just
around the corner. Here's the update to the other part of the manpage
that deals with the hw.ata.atapi_dma loader tunable and initializing
ATAPI devices in PIO or DMA mode.
Alan Cox [Tue, 21 Dec 2004 19:25:56 +0000 (19:25 +0000)]
Use vtopde() instead of pmap_pde() in pmap_kextract(); vtopde() is smaller
and faster in cases, such as pmap_kextract(), where the pde is known to
exist.
When RAID3 device is configured in "verify" mode, synchronization of the
parity component is now force on creation.
Change regression test which check "verify" mode to work properly after
this change.
This should not be permitted, but some GEOM classes held the topology lock
while doing g_(read|write)_data() (e.g. BSD). This can cause a deadlock
in MIRROR class. Not sure if this is safe to drop the topology lock in BSD
class, so change the code in MIRROR class to avoid this deadlock.
Olivier Houchard [Tue, 21 Dec 2004 11:36:09 +0000 (11:36 +0000)]
- The IQ80321 has a jumper which changes the PCI device id from 4 to 8 for the
GigE controller, so handle this.
- Use the outbound window 0 if the PCI mem requested is in its range, instead
of inconditionally use the outbound window 1.
This should be enough to get FreeBSD/arm to work on the IQ80321 board as well.
Reported and tested by: Jia-Shiun Li <jiashiun at gmail dot com>
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