Sam Leffler [Thu, 19 Feb 2009 04:24:22 +0000 (04:24 +0000)]
Cleanup ath_hal_computetxtime's handling of 1/2 and 1/4-width channels:
o mark phy type to indicate 1/2 or 1/4-rate operation
o use phy type instead of channel attributes to identify 1/2 and 1/4-rate
operation
o general cleanup of code including move phy constants to ah_internal.h
Eventually this code should go away and we should use the net0211 equivalents.
Robert Watson [Thu, 19 Feb 2009 00:06:01 +0000 (00:06 +0000)]
if_cx is currently disconnected from the build due to a dependence on
the old TTY implementation; however, take a cut at stripping its
optional Giant-protected code paths enabled using debug.cx.mpsafenet,
which will no longer work once IFF_NEEDSGIANT is removed.
Warner Losh [Wed, 18 Feb 2009 22:27:46 +0000 (22:27 +0000)]
yppasswdd assumed that a struct x_master_passwd is type punable to a
struct passwd. This is not the case when sizeof(unsigned long) !=
sizeof(time_t). Write a dinky function to do the assignment instead
of relying on the punning. This does slow things down a little (1
extra function call, 11 pointer or int assignments), but is much safer
and machines have been fast enough since the mid 1990s that nobody
will notice the difference.
time_t is a 64-bits int on arm and mips. Before this change, arm was
silently broken. I guess there aren't that many ARM machines running
master YP domain servers. :)
The client side doesn't assume this type punning, so it doesn't need
to be fixed.
Alexander Motin [Wed, 18 Feb 2009 22:17:48 +0000 (22:17 +0000)]
As soon as they called in only same one place (ata_pcichannel_attach()),
join allocate() and dmainit() atapci subdriver's channel initialization
methods into single ch_attach() method.
As opposite to ch_attach() add new ch_detach() method to deallocate/disable
channel.
Attilio Rao [Wed, 18 Feb 2009 21:52:13 +0000 (21:52 +0000)]
- Add a function (fill_kinfo_aggregate()) which aggregates relevant
members for a kinfo entry on a process-wide system.
- Use the newly introduced function in order to fix cases like
KERN_PROC_PROC where aggregating stats are broken because they just
consider the first thread in the pool for each process.
(Note, additively, that KERN_PROC_PROC is rather inaccurate on
thread-wide informations like the 'state' of the process. Such
informations should maybe be invalidated and being forceably discarded
by the consumers?).
- Simplify the logic of sysctl_out_proc() and adjust the
fill_kinfo_thread() accordingly.
- Remove checks on the FIRST_THREAD_IN_PROC() being NULL but add
assertives.
This patch should fix aggregate statistics for KERN_PROC_PROC.
This is one of the reasons why top doesn't use this option and now it
can be use it safely.
ps, when launched in order to display just processes, now should report
correct cpu utilization percentages and times (as opposed by the old
code).
Warner Losh [Wed, 18 Feb 2009 19:59:27 +0000 (19:59 +0000)]
Add an extra (void *) cast. The struct if_msghdr has an 8 byte
alignment requirement, while rt_msghdr has a 4 byte alignment
requirement. The root cause is that if_msghdr has an struct if_data
which has an 8-byte alignment requirement due to a time_t that's
embedded in it. On MIPS, time_t is a 64-bit number, so must be 64-bit
aligned.
Since we don't access ifm_data.ifi_epoch, a simple cast is all that's
necessary here. It is likely the case that ifi_epoch should *NOT* be
a time_t because it is an uptime (time delta) an not an absolute time
since 1970. u_long is likely sufficient there since that gives an
uptime of 136 years will suffice for the foreseeable future.
Alexander Motin [Tue, 17 Feb 2009 23:20:04 +0000 (23:20 +0000)]
Adaptively increase control command timeout when drive is spun down.
This should fix, for example, cache flush timeout error on shutdown, if
some drives are not mounted.
Rafal Jaworowski [Tue, 17 Feb 2009 15:47:13 +0000 (15:47 +0000)]
tsec(4): do not clear interrupt events register before use.
Prior to this fix, IEVENT register was always cleared before calling
tsec_error_intr_locked(), which prevented error recovery actions from
happening with polling enabled (and could lead to serious problems, including
controller hang).
Submitted by: Marcin Ligenza marcinl ! pacomp dot com dot pl
Marcel Moolenaar [Tue, 17 Feb 2009 04:12:10 +0000 (04:12 +0000)]
Remove gpt_offset and related code. It was introduced for use
by the BSD scheme, ended up not to be needed. Remove to avoid
abuse and to keep the bloat to a minimum.
Sean Bruno [Tue, 17 Feb 2009 04:08:08 +0000 (04:08 +0000)]
Synopsis:
If speed of link between two devices is slower than the reported max
speed of both endpoints, the current driver will fail and be unable to
negotiate.
Summary:
Test negotiated speed by reading the CSRROM into a dummy variable.
If that read fails, decrement our speed and retry. If all else fails,
go to lowest speed possible(0).
Report speed to the user.
Add display of the Bus Info Block when debug.firewire_debug > 1
Support the Bus Info Block(1394a-2000) method of speed detection.
I also should note that I am moving "hold_count" to 0 for future
releases.
This variable determines how many bus resets to "hold" a removed
firewire device before deletion. I don't feel this is useful and will
probably drop support for this sysctl in the future.
Warner Losh [Tue, 17 Feb 2009 02:14:04 +0000 (02:14 +0000)]
Hold off root mounting until we've gone through the loop of our thread
almost once. After we've configured the devices that were present the
first time through, then we know that we're done. If the device has
other devices that are deferred, then it must do a similar dance.
This catches both PC Cards and CardBus cards.
Ed Schouten [Mon, 16 Feb 2009 20:12:28 +0000 (20:12 +0000)]
The streams ptm code is pretty awful and likely incorrect. I don't know
anything about streams, so I'm not going to fix it. Just a small comment
to redirect folks to posix_openpt().
Alexander Motin [Mon, 16 Feb 2009 19:10:07 +0000 (19:10 +0000)]
Give atapci knowledge about set of implemented AHCI ports. It is possible
to not allocate them after the recent ata channels enumeration changes.
It allows to save some resources, not bother user with unexisting hardware
and not check unimplemented ports status on every interrupt.
Scott Long [Mon, 16 Feb 2009 14:57:15 +0000 (14:57 +0000)]
Fix parallel SCSI negotiation in the CAM_NEW_TRAN_CODE world order.
Overzealous sanity checks were locking the sync_rate and offset values to
zero, thanks to a twisty maze of recursive code.
Marcel Moolenaar [Mon, 16 Feb 2009 03:54:28 +0000 (03:54 +0000)]
Add support to add, delete and modify logical partitions, as well
as to create and destroy the extended partitioning scheme. In
other words: full support.
Robert Watson [Sun, 15 Feb 2009 23:29:13 +0000 (23:29 +0000)]
Remove debug.ce.mpsafenet: we no longer support running the network
stack with conditional Giant acquisition, and IFF_NEEDSGIANT will
be removed in the near future.
Robert Watson [Sun, 15 Feb 2009 23:21:52 +0000 (23:21 +0000)]
Remove debug.ctau.mpsafenet: we no longer support running the network
stack with conditional Giant acquisition, and IFF_NEEDSGIANT will
be removed in the near future.
Robert Watson [Sun, 15 Feb 2009 23:18:29 +0000 (23:18 +0000)]
Remove debug.cp.mpsafenet: we no longer support running the network
stack with conditional Giant acquisition, and IFF_NEEDSGIANT will
be removed in the near future.
Marcel Moolenaar [Sun, 15 Feb 2009 22:18:16 +0000 (22:18 +0000)]
Add method precheck to the g_part interface. The precheck
method allows schemes to reject the ctl request, pre-check
the parameters and/or modify/set parameters. There are 2
use cases that triggered the addition:
1. When implementing a R/O scheme, deletes will still
happen to the in-memory representation. The scheme is
not involved in that operation. The pre-check method
can be used to fail the delete up-front. Without this
the write to disk will typically fail, but at that
time the delete already happened.
2. The EBR scheme uses a linked list to record slices.
There's no index. The EBR scheme defines the index
as a function of the start LBA of the partition. The
add verb picks an index for the range and then invokes
the add method of the scheme to fill in the blanks. It
is too late for the add method to change the index.
The pre-check is used to set the index up-front. This
also (silently) overrides/nullifies any (pointless)
user-specified index value.
Bruce M Simpson [Sun, 15 Feb 2009 15:21:34 +0000 (15:21 +0000)]
Blow away KAME MLDv2 hooks.
This code can be gotten from change history here and it's
more than likely our implementation will differ significantly
because of VIMAGE and SMPng.
Bruce M Simpson [Sun, 15 Feb 2009 15:19:34 +0000 (15:19 +0000)]
Improve ifmcstat(8) and fix a few bugs while we're at it:
* Retire the old 'ifmcstat <kernel>' usage.
* Print AF_LINK records even if run against KVM.
This makes the KVM backend consistent with the sysctl backend.
* Suppress printing of link-layer group records by default.
* Add a -v switch to allow link-layer groups to be printed.
* If compiled without INET6 support, actually work.
* If compiled with INET6 support, print the scope ID of
all IPv6 addresses in both backends.
* Update man page.
* Update copyrights.
With this change, it is now reasonable to retire netstat -g.
Most of the SSM related gunk in this file will require later refactoring.
Ulf Lilleengen [Sun, 15 Feb 2009 13:22:21 +0000 (13:22 +0000)]
- Do not free the pattern lists immediately after use, as they might be needed
again in case the connection is interrupted and csup have to reconnect. The
lists will be freed after the collection has been completely processed.
Bruce M Simpson [Sun, 15 Feb 2009 12:10:05 +0000 (12:10 +0000)]
Fix a typo which caused ifmcstat's sysctl path
to print the network-layer endpoint address of the
group membership, rather than its link-layer mapping
as intended.
The KVM path is not affected.