rwatson [Sat, 27 Dec 2008 11:12:23 +0000 (11:12 +0000)]
Include param.h instead of types.h when using user.h. Otherwise there is
a dependence on ucred.h including audit.h including param.h, which we
would like to eliminate.
All of them succeeded to attach and worked though there are still some
problems that it's expected to be solved.
To use NDIS USB support, you should rebuild and install ndiscvt(8) and
if you encounter a problem to attach please set `hw.ndisusb.halt' to
0 then retry.
I expect no changes of the NDIS code for PCI, PCMCIA devices.
Disable some unneeded pathes in overcomplicated input mixer to help parser
to handle the rest better. This gives mic input boost control in some
configurations and just more predictable operation in others.
luigi [Fri, 26 Dec 2008 22:31:45 +0000 (22:31 +0000)]
Clarify the behaviour of conditionals when dealing with comparisons.
In particular, point out that string comparison can only use != and ==
(how weird, given that the underlying call to strcmp returns more
information), that floating point values are correctly interpreted
as numbers, and that the left-hand side must be a variable expansion.
qingli [Fri, 26 Dec 2008 19:45:24 +0000 (19:45 +0000)]
This checkin addresses a couple of issues:
1. The "route" command allows route insertion through the interface-direct
option "-iface". During if_attach(), an sockaddr_dl{} entry is created
for the interface and is part of the interface address list. This
sockaddr_dl{} entry describes the interface in detail. The "route"
command selects this entry as the "gateway" object when the "-iface"
option is present. The "arp" and "ndp" commands also interact with the
kernel through the routing socket when adding and removing static L2
entries. The static L2 information is also provided through the
"gateway" object with an AF_LINK family type, similar to what is
provided by the "route" command. In order to differentiate between
these two types of operations, a RTF_LLDATA flag is introduced. This
flag is set by the "arp" and "ndp" commands when issuing the add and
delete commands. This flag is also set in each L2 entry returned by the
kernel. The "arp" and "ndp" command follows a convention where a RTM_GET
is issued first followed by a RTM_ADD/DELETE. This RTM_GET request fills
in the fields for a "rtm" object, which is reinjected into the kernel by
a subsequent RTM_ADD/DELETE command. The entry returend from RTM_GET
is a prefix route, so the RTF_LLDATA flag must be specified when issuing
the RTM_ADD/DELETE messages.
2. Enforce the convention that NET_RT_FLAGS with a 0 w_arg is the
specification for retrieving L2 information. Also optimized the
code logic.
qingli [Thu, 25 Dec 2008 22:32:32 +0000 (22:32 +0000)]
The "tun?" dev need not be opened at all. One is allowed to perform
the following operations, e.g.:
1) ifconfig tun0 create
2) ifconfig tun0 10.1.1.1 10.1.1.2
3) route add -net 192.103.54.0/24 -iface tun0
4) ifconfig tun0 destroy
If cv wait on the TUN_CLOSED flag, then the last operation (4) will
block forever.
Revert the previous changes and fix the mtx_unlock() leak.
rwatson [Thu, 25 Dec 2008 11:32:38 +0000 (11:32 +0000)]
Following the recent security advisory, add a comment describing our
invariants and approach for protocol switch methods in protsw_init(),
and also some KASSERT's for non-domain init entries in protocol
switch tables: pru_abort and pru_send must both be implemented.
For now, leave those assertions #if 0'd, since there are a few
protocols that violate them in non-harmful ways. Whether or not we
should enforce pru_abort being implemented for non-stream protocols
is an interesting question: currently abort is only invoked on stream
sockets in situations where un-accepted sockets must be abruptly
closed (i.e., close() on a listen socket with pending connections),
but in principle it is useful for datagram sockets and most datagram
socket types implement it.
kmacy [Thu, 25 Dec 2008 02:14:25 +0000 (02:14 +0000)]
- Close a race during which the open flag could be cleared but the tun_softc would still be referenced
by adding a separate TUN_CLOSED flag that is set after tunclose is done referencing it.
- drop the tun_mtx after the flag check to avoid holding it across if_detach which can recurse in to
if_tun.c
rwatson [Wed, 24 Dec 2008 22:40:13 +0000 (22:40 +0000)]
In ugidfw(8), print the rule number and rule contents (as parsed and then
regenerated in libugidfw) rather than simply printing that the rule was
added with only the number. This makes ugidfw(8) behave a bit more like
ipfw(8), and also means that the administrator sees how the rule was
interpreted once uids/gids/etc were processed.
bms [Wed, 24 Dec 2008 19:57:22 +0000 (19:57 +0000)]
Add macro RB_FOREACH_SAFE(), which accepts an additional argument
specifying a temporary tree node pointer. It may be used in a
similar way to the *_SAFE() macros in <sys/queue.h>.
marcel [Tue, 23 Dec 2008 22:20:59 +0000 (22:20 +0000)]
Add support for the FPA floating-point format on ARM. The
FPA floating-point format is identical to the VFP format,
but is always stored in big-endian.
Introduce _IEEE_WORD_ORDER to describe the byte-order of
the FP representation.
marcus [Tue, 23 Dec 2008 20:43:42 +0000 (20:43 +0000)]
Do not KASSERT when vp->v_dd is NULL. Only directories which have had ".."
looked up would have v_dd set to a non-NULL value. This fixes a panic
seen when running installworld on a diskless system with a separate /usr
file system.
gnn [Tue, 23 Dec 2008 20:07:51 +0000 (20:07 +0000)]
Fix a bug in the man page where we were not showing the correct flags
in the explanation. Several of the flags were -i, since it was a copy/paste
operation.
dougb [Tue, 23 Dec 2008 18:30:32 +0000 (18:30 +0000)]
This directory was added to src/contrib/bind9 prior to the svn move so
that BIND 9.4.1 could compile and run on the ARM platform, but is not
part of the vendor source. It will remain in src/contrib/bind9 since
it is a local modification.
rnoland [Tue, 23 Dec 2008 16:16:30 +0000 (16:16 +0000)]
Fix up handling of Intel G4X chips some more.
Note that you need at least xf86-video-intel 2.4.3 for this to work.
The G4X doesn't put the GATT into the same area of stolen memory
as all the other chips and older versions of the driver didn't
handle that properly.
sam [Tue, 23 Dec 2008 04:51:46 +0000 (04:51 +0000)]
NPE cleanups needed for ancillary drivers (e.g. crypto acceleration):
o check feature bits when probing NPE ethernet support
o move firmware loading logic from if_npe to core npe support
o allow multiple refs to core NPE driver
o while here fix hw.npe.debug tunable path
sam [Tue, 23 Dec 2008 04:48:27 +0000 (04:48 +0000)]
Fill in feature control support:
o add definitions for more bits, for masking out IXP465-specific bits,
and %b format string
o add ixp4xx_read_feature_bits to retrieve the mask of valid features
(aka fuse bits)
o add cpu_is_ixp42x() macro
o print feature bits at boot
sam [Tue, 23 Dec 2008 04:42:10 +0000 (04:42 +0000)]
o add Transaction Translator support (still missing ISOC xfers)
o add EHCI_SCFLG_BIGEMMIO flag to force big-endian byte-select to be
set in USBMODE
o split reset work into new public routine ehci_reset so bus shim drivers
can force big-endian byte-select before ehci_init
wollman [Mon, 22 Dec 2008 21:22:42 +0000 (21:22 +0000)]
Implement a new feature for the "-m" option: if the month number is
followed by 'f' or 'p', use the following or preceding month of that
number, respectively. Document this. Also includes other minor
grammatical and punctuation fixes to the manual page (capitalize
Easter, etc.).
alc [Mon, 22 Dec 2008 17:32:52 +0000 (17:32 +0000)]
Make preparations for resurrecting shared/read locks on vm maps:
mac_proc_vm_revoke_recurse() requests a read lock on the vm map at the start
but does not handle failure by vm_map_lock_upgrade() when it seeks to modify
the vm map. At present, this works because all lock request on a vm map are
implemented as exclusive locks. Thus, vm_map_lock_upgrade() is a no-op that
always reports success. However, that is about to change, and
proc_vm_revoke_recurse() will require substantial modifications to handle
vm_map_lock_upgrade() failures. For the time being, I am changing
mac_proc_vm_revoke_recurse() to request a write lock on the vm map at the
start.
marius [Mon, 22 Dec 2008 15:34:06 +0000 (15:34 +0000)]
- According to comments in OpenBSD, E{2,4}50 tend to have fragile
firmware versions which wedge when using the OFW test service,
so given that we don't really depend on SUNW,stop-self just nuke
it altogether instead of risking problems.
- At least Fire V880 have a small hardware glitch which causes the
reception of IDR_NACKs for CPUs we actually haven't tried to send
an IPI to, even not as part of the initial try. According to tests
this apparently can be safely ignored though, so just return if
checking for the individual IDR_NACKs indicates no outstanding
dispatch. Serializing the sending of IPIs between MD and MI code
by the combined usage of smp_ipi_mtx makes no difference to this
phenomenon. [1]
- Provide relevant debugging bits already with the initial panic
in case of problems with the IPI dispatch, which would have
allowed to diagnose the above problem without a specially built
kernel.
- In case of cheetah_ipi_selected() base the delay we wait for
other CPUs which also might want to dispatch IPIs on the total
amount of CPUs instead of just the number of CPUs we let this
CPU send IPIs to because in the worst case all CPUs also want
to IPI us at the same time.
Reported and access for extensive tests provided by: Beat Gaetzi [1]
qingli [Mon, 22 Dec 2008 07:11:15 +0000 (07:11 +0000)]
Similar to the INET case, do not destroy the nd6 entries for
interface addresses until those addresses are removed. I already
made the patch in INET but forgot to bring the code over for
INET6.
qingli [Mon, 22 Dec 2008 01:56:56 +0000 (01:56 +0000)]
Provide a condition variable to delay the cloned interface
destroy operation until the referenced clone device has
been closed by the process properly. The behavior is now
consistently with the previous release.
yongari [Mon, 22 Dec 2008 00:53:47 +0000 (00:53 +0000)]
Since we don't request reset for rlphy(4), the link state 'UP'
event from mii(4) may not be delivered if valid link was already
established. To address the issue, check current link state after
driving MII_TICK. This should fix a regression introduced in
r184245.
yongari [Mon, 22 Dec 2008 00:46:22 +0000 (00:46 +0000)]
Since we don't request reset for rlphy(4), the link state 'UP'
event from mii(4) may not be delivered if valid link was already
established. To address the issue, check current link state after
driving MII_TICK. This should fix a regression introduced in
r185753 on fast ethernet controllers.
Reported by: csjp, Bruce Cran < bruce <> cran DOT org DOT uk >
Tested by: csjp, Bruce Cran (initial version)