jfv [Tue, 26 Oct 2010 00:07:58 +0000 (00:07 +0000)]
Bug fix delta to the em driver:
- Chasin down bogus watchdogs has led to an improved
design to this handling, the hang decision takes
place in the tx cleanup, with only a simple report
check in local_timer. Our tests have shown no false
watchdogs with this code.
- VLAN fixes from jhb, the shadow vfta should be per
interface, but as global it was not. Thanks John.
- Bug fixes in the support for new PCH2 hardware.
- Thanks for all the help and feedback on the driver,
changes to lem with be coming shortly as well.
ivoras [Mon, 25 Oct 2010 21:46:23 +0000 (21:46 +0000)]
Bring vfs.ufs.dirhash_maxmem into the age of the fruitbat and make it
autotuned. It is only an upper bound (the memory is not always allocated)
and the system contains a vm_lowmem handler so nothing will crash and burn
if it's tuned too high.
marius [Mon, 25 Oct 2010 20:52:33 +0000 (20:52 +0000)]
- Given that in one-shot mode tick_et_start() also is called frequently
introduce function pointers once set up to the respective implementation
for reading the (S)TICK and writing the (S)STICK_COMPARE registers as a
compromise between duplicating code and selecting between different
implementations during execution over and over again, similar to what is
done elsewhere in the MD in order to support different CPU models that
won't ever change at runtime.
- In the remaining tick interrupt handler further push down disabling of
interrupts to the periodic case as it isn't necessary here in one-shot
mode at all.
ae [Mon, 25 Oct 2010 16:23:35 +0000 (16:23 +0000)]
Reimplemented "gpart destroy -F". Now it does all work in kernel.
This was needed for recover implementation.
Implement the recover command for GPT. Now GPT will marked as
corrupt when any of three types of corruption will be detected:
1. Damaged primary GPT header or table
2. Damaged secondary GPT header or table
3. Secondary header is not located in the last LBA
Marked GPT becomes read-only. Any changes with corrupt table
are prohibited. Only "destroy" and "recover" commands are allowed.
nwhitehorn [Mon, 25 Oct 2010 15:51:43 +0000 (15:51 +0000)]
The EHCI_CAPLENGTH and EHCI_HCIVERSION registers are actually sub-registers
within the first 4 bytes of the EHCI memory space. For controllers that
use big-endian MMIO, reading them with 1- and 2-byte reads would then
return the wrong values. Instead, read the combined register with a 4-byte
read and mask out the interesting quantities.
jilles [Sun, 24 Oct 2010 22:03:21 +0000 (22:03 +0000)]
sh: Do not allow overriding a special builtin with a function.
This is a syntax error.
POSIX does not say explicitly whether defining a function with the same name
as a special builtin is allowed, but it does say that it is impossible to
call such a function.
A special builtin can still be overridden with an alias.
This commit is part of a set of changes that will ensure that when
something looks like a special builtin to the parser, it is one. (Not the
other way around, as it remains possible to call a special builtin named
by a variable or other substitution.)
Exp-run done by: pav (with some other sh(1) changes)
yongari [Sun, 24 Oct 2010 21:59:51 +0000 (21:59 +0000)]
Add TSO support over VLAN for i82550/i82551. Controller requires
VLAN hardware tagging to make TSO work over VLAN. So if VLAN
hardware tagging is disabled explicitly clear TSO over VLAN. While
I'm here allow disabling VLAN TX checksum offloading.
Tested by: Liudas < liudasb <> centras dot lt >
MFC after: 10 days
jilles [Sun, 24 Oct 2010 20:45:13 +0000 (20:45 +0000)]
sh: Make sure defined functions can actually be called.
Add some conservative checks on function names:
- Disallow expansions or quoting characters; these can only be called via
strange control characters
- Disallow '/'; these functions cannot be called anyway, as exec.c assumes
they are pathnames
- Make the CTL* bytes work properly in function names.
These are syntax errors.
POSIX does not require us to support more than names (letters, digits and
underscores, not starting with a digit), but I do not want to restrict it
that much at this time.
Exp-run done by: pav (with some other sh(1) changes)
mav [Sun, 24 Oct 2010 18:53:16 +0000 (18:53 +0000)]
Make da driver to handle some probably broken Android devices, returning
zero media and sector size instead of "Medium not present" error,
until some confirmation button is tapped on device.
pjd [Sun, 24 Oct 2010 17:28:25 +0000 (17:28 +0000)]
Before this change on first connect between primary and secondary we
initialize all the data. This is huge waste of time and resources if
there were no writes yet, as there is no real data to synchronize.
Optimize this by sending "virgin" argument to secondary, which gives it a hint
that synchronization is not needed.
In the common case (where noth nodes are configured at the same time) instead
of synchronizing everything, we don't synchronize at all.
brucec [Sun, 24 Oct 2010 16:31:57 +0000 (16:31 +0000)]
Mostly revert r203420, and add similar functionality into ada(4) since the
existing code caused problems with some SCSI controllers.
A new sysctl kern.cam.ada.spindown_shutdown has been added that controls
whether or not to spin-down disks when shutting down.
Spinning down the disks unloads/parks the heads - this is
much better than removing power when the disk is still
spinning because otherwise an Emergency Unload occurs which may cause damage
to the actuator.
marius [Sun, 24 Oct 2010 12:59:43 +0000 (12:59 +0000)]
- Given that as of r214264 all PHY drivers using mii(4) finally have been
converted to use the mii_phy_add_media()/mii_phy_setmedia() pair instead
of mii_add_media()/mii_anar() remove the latter.
- Declare mii_media mii_media_table static as it shouldn't be used outside
of mii_physubr.c.
marius [Sun, 24 Oct 2010 12:51:02 +0000 (12:51 +0000)]
- Add IFM_10_2 and IFM_10_5 media via tlphy(4) only in case the respective
interface also has such connectors.
- In tl_attach() unify three different ways of obtaining the device and
vendor IDs and remove the now obsolete tl_dinfo from tl_softc.
- Given that tlphy(4) only handles the integrated PHYs of NICs driven by
tl(4) make it only probe on the latter.
- Switch mlphy(4) and tlphy(4) to use mii_phy_add_media()/mii_phy_setmedia().
- Simplify looking for the respective companion PHY in mlphy(4) and tlphy(4)
by ignoring the native one by just comparing the device_t's directly rather
than the device name.
marius [Sun, 24 Oct 2010 11:37:01 +0000 (11:37 +0000)]
- Take advantage of mii_phy_dev_probe().
- Use mii_phy_add_media() instead of mii_add_media(). I'm not sure how
this driver actually managed to work before as mii_add_media() is
intended to be used to gether with mii_anar() while mii_phy_add_media()
is intended to be used with mii_phy_setmedia(), however this driver
mii_add_media() along with mii_phy_setmedia().
rmacklem [Sat, 23 Oct 2010 22:28:29 +0000 (22:28 +0000)]
Modify the experimental NFSv4 server's file handle hash function
to use the generic hash32_buf() function. Although adding the
bytes seemed sufficient for UFS and ZFS, since most of the bytes
are the same for file handles on the same volume, this might not
be sufficient for other file systems. Use of a generic function
also seems preferable to one specific to NFSv4.
Suggested by: gleb.kurtsou at gmail.com
MFC after: 10 days
yongari [Sat, 23 Oct 2010 21:25:50 +0000 (21:25 +0000)]
Apply the same workaround for SDI flow control used on BCM5906 A1
to BCM6906 A0/A2. This should fix a long standing BCM5906 A2 lockup
issues. Data sheet explicitly mentions BCM5906 A0, A1 and A2 use
de-pipelined mode on these revisions.
Special thanks to Buganini who tried all combinations of
experimental patches for more than 10 days.
bz [Sat, 23 Oct 2010 20:35:40 +0000 (20:35 +0000)]
Make the IPsec SADB embedded route cache a union to be able to hold both the
legacy and IPv6 route destination address.
Previously in case of IPv6, there was a memory overwrite due to not enough
space for the IPv6 address.
davidxu [Sat, 23 Oct 2010 13:16:39 +0000 (13:16 +0000)]
In thr_exit() and kthread_exit(), only remove thread from
hash if it can directly exit, otherwise let exit1() do it.
The change should be in r213950, but for unknown reason,
it was lost.
bschmidt [Sat, 23 Oct 2010 11:26:22 +0000 (11:26 +0000)]
The firmware does pad notifications to an even number of bytes (at least
the association notification), the included information though always
contains an elem block with an odd number of bytes. We handle the last
byte as if it might contain a whole elem block, this of course is not
true as one byte is not enough to hold a block, we therefore discard the
complete frame. The solution here is to subtract one from the actual
notification length, this is also what the Linux driver does. With this
change the frames ends exactly where the last elem block ends.
This commit also reverts r214160 which is no longer required and now even
wrong.
pjd [Fri, 22 Oct 2010 22:58:00 +0000 (22:58 +0000)]
- Improve error messages, so instead of 'Not fully done', the user will get
information that device is already suspended or that device is using
one-time key and suspend is not supported.
- 'geli suspend -a' silently skips devices that use one-time key, this is fine,
but because we log which device were suspended on the console, log also which
devices were skipped.
pjd [Fri, 22 Oct 2010 22:13:11 +0000 (22:13 +0000)]
Move sc_akeyctx and sc_ivctx initialization to the g_eli_mkey_propagate()
function which eliminates code duplication and will ensure proper order
of operation.
rmacklem [Fri, 22 Oct 2010 21:38:56 +0000 (21:38 +0000)]
Modify the file handle hash function in the experimental NFS
server so that it will work better for non-UFS file systems.
The new function simply sums the bytes of the fh_fid field
of fhandle_t.
yongari [Fri, 22 Oct 2010 19:30:56 +0000 (19:30 +0000)]
Add workaround for BCM5906 A1 controller silicon bug. When
auto-negotiation results in half-duplex operation, excess collision
on the ethernet link may cause internal chip delays that may result
in subsequent valid frames being dropped due to insufficient
receive buffer resources. The workaround is to choose de-pipeline
method as a flow control decision for SDI. De-pipeline method
allows only 1 data in TxMbuf at a time such that a request to RDMA
from SDI is made only when TxMbuf is empty. Thanks for david for
providing detailed errata information.
yongari [Fri, 22 Oct 2010 18:31:44 +0000 (18:31 +0000)]
Enable TX MAC state machine lockup fix for both BCM5755 or higher
and BCM5906. Publicly available data sheet just says it may happen
due to corrupted TxMbuf.
jhb [Fri, 22 Oct 2010 11:42:02 +0000 (11:42 +0000)]
- Add a new PCI quirk to whitelist an old chipset that doesn't support
PCI-express or PCI-X capabilities if we are running in a virtual machine.
- Whitelist the Intel 82440 chipset used by QEMU.
marcel [Fri, 22 Oct 2010 04:43:04 +0000 (04:43 +0000)]
Unbreak ia64.
With r169630 I disabled symbol versioning because it broke rtld. With
r211706 rtld got broken for ia64 & powerpc64. It was fixed for powerpc64
with r212497. In between, r211749 removed the exports table because the
version script handled the exports. But wait, symbol versioning was
disabled on ia64.
With exports controlled by the version script and symbol versioning
disabled, all symbols are exported and too many symbols bind to the
definition in rtld. Let's just say that waird things happen.
So, enable symbol versioning on ia64 and apply a work-around for the
SIGSEGV that triggered r169630 to begin with: when rtld relocates
itself, it comes across r_debug_state and for some reason can't find the
definition. This causes a failure, relocation aborts and null pointers
galore. The work-around is to ignore the missing definition when rtld
is relocating itself and keep going.
Maybe with the next binutils this will all go away. Maybe not, in
which case I still need to figure out why r_debug_state cannot be found.
BTW: r_debug_state is in the symbol map -- I don't think any other rtld
symbols that rtld references are in the symbol map...
imp [Thu, 21 Oct 2010 22:33:50 +0000 (22:33 +0000)]
Minor tweaks in compression support:
o We need an eval here to get the right expansion of the command
o bs=128k doesn't work in some cases, so eliminate it and cope with the
minor performance hit.
rwatson [Thu, 21 Oct 2010 21:08:12 +0000 (21:08 +0000)]
Universally use uintmax_t in syscall_timing; rearrange arithmetic to
suffer fewer rounding errors with smaller numbers; fix argc validation
so multiple tests run on a single command line.
bschmidt [Thu, 21 Oct 2010 19:28:52 +0000 (19:28 +0000)]
Instead of calling return when reaching the end of the assoc notification
break the loop instead. We want to run the code after the while loop
to set an associd and capinfo. If we don't do this net80211 will drop
frames because it assumes the node has not yet been associated.
jhb [Thu, 21 Oct 2010 19:17:40 +0000 (19:17 +0000)]
- When disabling ktracing on a process, free any pending requests that
may be left. This fixes a memory leak that can occur when tracing is
disabled on a process via disabling tracing of a specific file (or if
an I/O error occurs with the tracefile) if the process's next system
call is exit(). The trace disabling code clears p_traceflag, so exit1()
doesn't do any KTRACE-related cleanup leading to the leak. I chose to
make the free'ing of pending records synchronous rather than patching
exit1().
- Move KTRACE-specific logic out of kern_(exec|exit|fork).c and into
kern_ktrace.c instead. Make ktrace_mtx private to kern_ktrace.c as a
result.
rwatson [Thu, 21 Oct 2010 19:01:59 +0000 (19:01 +0000)]
Further syscall_timing improvements: allow an arbitrary "path" string
argument to be passed on the command line, allowing file-related tests
to be pointed at wherever desired.
rmacklem [Thu, 21 Oct 2010 18:49:12 +0000 (18:49 +0000)]
Modify the experimental NFS server in a manner analagous to
r214049 for the regular NFS server, so that it will not do
a VOP_LOOKUP() of ".." when at the root of a file system
when performing a ReaddirPlus RPC.
jhb [Thu, 21 Oct 2010 17:46:23 +0000 (17:46 +0000)]
Clarify a misleading comment. The test in pci_reserve_map() was meant to
ignore BARs that are invalid due to having a size of zero, not to ignore
BARs with an existing base of zero. While here, reorganize the code
slightly to make the intent clearer.
rwatson [Thu, 21 Oct 2010 17:35:08 +0000 (17:35 +0000)]
Fix bug in recent syscall_timing change: measure the number of iterations
each loop, rather than once up front. The distinction is unimportant
when doing a fix iteration count, but when using a timer, it should vary.
jhb [Thu, 21 Oct 2010 17:29:32 +0000 (17:29 +0000)]
- Make 'vm_refcnt' volatile so that compilers won't be tempted to treat
its value as a loop invariant. Currently this is a no-op because
'atomic_cmpset_int()' clobbers all memory on current architectures.
- Use atomic_fetchadd_int() instead of an atomic_cmpset_int() loop to drop
a reference in vmspace_free().
rwatson [Thu, 21 Oct 2010 17:27:39 +0000 (17:27 +0000)]
Further enhancements to syscall_timing:
- Use getopt rather than hand-parsed arguments
- Allow iterations to be specified and/or a new number of seconds bound
on the number of iterations
- Fix printout of timer resolution
- Add new tests, such as TCP and UDP socket creation, and open/read/close
of /dev/zero and /dev/null.