]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
11 years agoRework the handling of the children for the pthread_vfork_test. The
kib [Wed, 30 Jan 2013 13:14:34 +0000 (13:14 +0000)]
Rework the handling of the children for the pthread_vfork_test.  The
trivial handler for SIGCHLD is installed, and SIGCHLD is blocked, to
not abandon our zombies to init(8). This way, the zombies are around
slightly longer, allowing to actually exercise the logic for p_pwait
use by the test.

MFC after: 1 week

11 years agoThe case of pid == WAIT_MYPGRP for the kern_wait() is already handled
kib [Wed, 30 Jan 2013 13:14:15 +0000 (13:14 +0000)]
The case of pid == WAIT_MYPGRP for the kern_wait() is already handled
in kern_wait6(), which is called by kern_wait().  Remove the redundand
check, introduced in r243136, and add a comment noting this, to make
the code less confusing.

The blank lines are added to properly delineate the scope of the
preceeding comments.

Noted by: "Jukka A. Ukkonen" <jau@iki.fi>
MFC after: 1 week

11 years agoRework the __vdso_* symbols attributes to only make the symbols weak,
kib [Wed, 30 Jan 2013 12:48:16 +0000 (12:48 +0000)]
Rework the __vdso_* symbols attributes to only make the symbols weak,
but use normal references instead of weak.  This makes the statically
linked binaries to use fast gettimeofday(2) by forcing the linker to
resolve references and providing the neccessary functions.

Reported by: bde
Tested by: marius (sparc64)
MFC after: 2 weeks

11 years agoReduce default shift used to calculate the max frequency for the TSC
kib [Wed, 30 Jan 2013 12:43:10 +0000 (12:43 +0000)]
Reduce default shift used to calculate the max frequency for the TSC
timecounter to 1, and correspondingly increase the precision of the
gettimeofday(2) and related functions in the default configuration.

The motivation for the TSC-low timecounter, as described in the
r222866, seems to provide a workaround for the non-serializing
behaviour of the RDTSC on some Intel hardware.  Tests demonstrate that
even with the pre-shift of 8, the cross-core non-monotonicity of the
RDTSC is still observed reliably, e.g. on the Nehalems.  The r238755
and r238973 implemented the proper fix for the issue.

The pre-shift of 1 is applied to keep TSC not overflowing for the
frequency of hardclock down to 2 sec/intr.  The pre-shift is made a
tunable to allow the easy debugging of the issues users could see with
the shift being too low.

Reviewed by: bde
MFC after: 2 weeks

11 years agoAdd missing header file inclusion guard.
hselasky [Wed, 30 Jan 2013 10:59:42 +0000 (10:59 +0000)]
Add missing header file inclusion guard.

11 years ago- Fix typo
gabor [Wed, 30 Jan 2013 10:23:38 +0000 (10:23 +0000)]
- Fix typo

Submitted by: jkim

11 years agoAdd missing NULL pointer check.
hselasky [Wed, 30 Jan 2013 07:48:43 +0000 (07:48 +0000)]
Add missing NULL pointer check.

Reported by: Lars Engels
MFC after: 1 week

11 years agoAdd support for MSI-X interrupts in the virtio network device and make that
neel [Wed, 30 Jan 2013 04:30:36 +0000 (04:30 +0000)]
Add support for MSI-X interrupts in the virtio network device and make that
the default.

The current behavior of advertising a single MSI vector can be requested by
setting the environment variable "BHYVE_USE_MSI" to "true". The use of MSI
is not compliant with the virtio specification and will be eventually phased
out.

Submitted by: Gopakumar T
Obtained from: NetApp

11 years agoAdd emulation support for instruction "88/r: mov r/m8, r8".
neel [Wed, 30 Jan 2013 04:09:09 +0000 (04:09 +0000)]
Add emulation support for instruction "88/r: mov r/m8, r8".

This instruction moves a byte from a register to a memory location.

Tested by: tycho nightingale at pluribusnetworks com

11 years agoRemove extra %s from debug statement that ends up crashing tftpd if
sbruno [Wed, 30 Jan 2013 01:36:04 +0000 (01:36 +0000)]
Remove extra %s from debug statement that ends up crashing tftpd if
debug is set very high (like -d15 in my case).

Obtained from: Yahoo! Inc
MFC after:      2 weeks

11 years agoLog the addition of login.conf.db, passwd, pwd.db, and spwd.db via cat -l.
brooks [Tue, 29 Jan 2013 22:17:58 +0000 (22:17 +0000)]
Log the addition of login.conf.db, passwd, pwd.db, and spwd.db via cat -l.

Make cat a bootstrap tool to facilitate this.

11 years agoFix installworld when nmtree is not on the host by only adding it to
brooks [Tue, 29 Jan 2013 21:48:10 +0000 (21:48 +0000)]
Fix installworld when nmtree is not on the host by only adding it to
ITOOLS when we will be using the host copy.

Fix installkernel when -DNO_ROOT is set.

11 years agoroute_output() always supplies info with RTAX_GATEWAY member that
glebius [Tue, 29 Jan 2013 21:44:22 +0000 (21:44 +0000)]
route_output() always supplies info with RTAX_GATEWAY member that
points to a sockaddr of AF_LINK family. Assert this instead of
checking.

11 years agoRemove unused file.
glebius [Tue, 29 Jan 2013 21:37:56 +0000 (21:37 +0000)]
Remove unused file.

11 years agoProvide a statistic to track the number of drops in each of the port's
np [Tue, 29 Jan 2013 20:59:22 +0000 (20:59 +0000)]
Provide a statistic to track the number of drops in each of the port's
txq's buf_ring.  The aggregate for all the queues of a port is already
provided in ifnet->if_snd.ifq_drops.

MFC after: 3 days.

11 years agoFix installworld when the host does not need to bootstrap nmtree.
brooks [Tue, 29 Jan 2013 20:28:11 +0000 (20:28 +0000)]
Fix installworld when the host does not need to bootstrap nmtree.

Reported by: lev, jmg

11 years ago - Refresh code with latest OpenBSD revisions.
delphij [Tue, 29 Jan 2013 20:05:16 +0000 (20:05 +0000)]
 - Refresh code with latest OpenBSD revisions.
 - Remove $DragonFly$ tags as they are using git nowadays and VCS tags will
   not help merging.
 - Other changes to Copyright headers to make them consistent with other
   source code, we intend to fork from this point.

Reviewed by: pfg

11 years agoFix date.
joel [Tue, 29 Jan 2013 20:01:47 +0000 (20:01 +0000)]
Fix date.

11 years agoFix typo in debug printf.
glebius [Tue, 29 Jan 2013 19:06:16 +0000 (19:06 +0000)]
Fix typo in debug printf.

11 years agoReduce duplication between i386/linux/linux.h and amd64/linux32/linux.h
jhb [Tue, 29 Jan 2013 18:41:30 +0000 (18:41 +0000)]
Reduce duplication between i386/linux/linux.h and amd64/linux32/linux.h
by moving bits that are MI out into headers in compat/linux.

Reviewed by: Chagin Dmitry  dmitry | gmail
MFC after: 2 weeks

11 years agoBump __FreeBSD_version for cat -l (soon to be a bootstrap tool).
brooks [Tue, 29 Jan 2013 18:22:38 +0000 (18:22 +0000)]
Bump __FreeBSD_version for cat -l (soon to be a bootstrap tool).

11 years agoAdd -l option to cat(1). This option causes cat(1) to use fcntl(2) to
brooks [Tue, 29 Jan 2013 18:19:40 +0000 (18:19 +0000)]
Add -l option to cat(1). This option causes cat(1) to use fcntl(2) to
set an exclusive advisory lock on stdout.  This will be used to guarantee
orderly writing to METALOG.

Sponsored by: DARPA, AFRL
Obtained from: NetBSD (mason)

11 years ago- Regen
gabor [Tue, 29 Jan 2013 17:05:21 +0000 (17:05 +0000)]
- Regen

11 years ago- Add a BSD-licensed patch, ported by Pedro F. Giffuni (pfg) from
gabor [Tue, 29 Jan 2013 17:03:18 +0000 (17:03 +0000)]
- Add a BSD-licensed patch, ported by Pedro F. Giffuni (pfg) from
  DragonflyBSD and install it as bsdpatch.  WITH_BSD_PATCH makes it
  default and installs GNU patch as gnupatch.

Submitted by: pfg
Obtained from: The DragonflyBSD Project

11 years agoAdd simple clock driver and ehci glue code for a10
ganbold [Tue, 29 Jan 2013 07:21:50 +0000 (07:21 +0000)]
Add simple clock driver and ehci glue code for a10
Update dts and kernel config

Approved by: gonzo@

11 years agoFix two misusages of return_*() macros for ACPICA.
jkim [Mon, 28 Jan 2013 21:10:35 +0000 (21:10 +0000)]
Fix two misusages of return_*() macros for ACPICA.

Noticed by: avg

11 years agoFix white spaces for style consistency.
jkim [Mon, 28 Jan 2013 21:06:20 +0000 (21:06 +0000)]
Fix white spaces for style consistency.

11 years agoMerge two bug fixes from the vendor branch.
jkim [Mon, 28 Jan 2013 20:37:32 +0000 (20:37 +0000)]
Merge two bug fixes from the vendor branch.

Reported by: pjd

11 years agoMark 'ticks', 'time_second', and 'time_uptime' as volatile to prevent the
jhb [Mon, 28 Jan 2013 19:38:13 +0000 (19:38 +0000)]
Mark 'ticks', 'time_second', and 'time_uptime' as volatile to prevent the
compiler from caching their values in tight loops.

Reviewed by: bde
MFC after: 1 week

11 years ago- Compute the correct size to reallocate when doubling the size of the
jhb [Mon, 28 Jan 2013 15:48:31 +0000 (15:48 +0000)]
- Compute the correct size to reallocate when doubling the size of the
  array of loaded objects to avoid a buffer overrun.
- Use reallocf() to avoid leaking memory if the realloc() fails.

PR: kern/175648
Submitted by: yuri@rawbw.com (1)
MFC after: 1 week

11 years ago- Show page faults requiring I/O when -s invoked.
zont [Mon, 28 Jan 2013 12:58:37 +0000 (12:58 +0000)]
- Show page faults requiring I/O when -s invoked.

Reviewed by: alc
MFC after: 2 weeks

11 years ago- Show page faults requiring I/O on vmstat display.
zont [Mon, 28 Jan 2013 12:57:42 +0000 (12:57 +0000)]
- Show page faults requiring I/O on vmstat display.

Reviewed by: alc
MFC after: 2 weeks

11 years ago- Add system wide page faults requiring I/O counter.
zont [Mon, 28 Jan 2013 12:54:53 +0000 (12:54 +0000)]
- Add system wide page faults requiring I/O counter.

Reviewed by: alc
MFC after: 2 weeks

11 years ago- Add sysctls to show number of stats scans.
zont [Mon, 28 Jan 2013 12:20:20 +0000 (12:20 +0000)]
- Add sysctls to show number of stats scans.

MFC after: 2 weeks

11 years ago- Style.
zont [Mon, 28 Jan 2013 12:08:29 +0000 (12:08 +0000)]
- Style.

MFC after: 2 weeks

11 years agoFix some symbol version mismatches between libstdc++ and libsupc++/libcxxrt
theraven [Mon, 28 Jan 2013 11:12:49 +0000 (11:12 +0000)]
Fix some symbol version mismatches between libstdc++ and libsupc++/libcxxrt
that were causing the runtime and STL libraries to see different versions of
various classes and functions when libstdc++ is used as a filter.

Note: This changes the ABI for libcxxrt, but libcxxrt is currently only in
-STABLE for testing and is not used by anything unless explicitly enabled by
the end user.  No default compiler configurations use it.

libc++ will need to be recompiled after this change.  make buildworld will do
this automatically, but make in lib/libc++ will not necessarily work unless the
new libcxxrt is installed first.

PR: kern/171610, stand/175453
Reviewed by: kib
MFC after: 1 week

11 years agoRemove some extra and not needed space characters.
hselasky [Mon, 28 Jan 2013 10:52:24 +0000 (10:52 +0000)]
Remove some extra and not needed space characters.

MFC after: 1 week

11 years agoConfigure all GPIO pins as described in Beaglebone SRM.
dmarion [Mon, 28 Jan 2013 09:47:00 +0000 (09:47 +0000)]
Configure all GPIO pins as described in Beaglebone SRM.

Submitted by:   Emmanuel Vadot <elbarto@megadrive.org>

11 years agoFix case for some signal names.
dmarion [Mon, 28 Jan 2013 09:23:38 +0000 (09:23 +0000)]
Fix case for some signal names.

Submitted by:   Emmanuel Vadot <elbarto@megadrive.org>

11 years agoFilled in missing pads for AM335x / Beaglebone.
dmarion [Mon, 28 Jan 2013 09:11:04 +0000 (09:11 +0000)]
Filled in missing pads for AM335x / Beaglebone.

Submitted by:   Emmanuel Vadot <elbarto@megadrive.org>

11 years agoAdd new USB ID.
hselasky [Mon, 28 Jan 2013 07:22:44 +0000 (07:22 +0000)]
Add new USB ID.

Submitted by: Ramil
PR: usb/175639
MFC after: 1 week

11 years agoTechnical corrections and improvements for the previous change.
pluknet [Mon, 28 Jan 2013 07:04:52 +0000 (07:04 +0000)]
Technical corrections and improvements for the previous change.

Submitted by: bde

11 years agoAdd a loader tunable "hw.broken_txfifo" which enables a workaround for a
cperciva [Sun, 27 Jan 2013 23:33:42 +0000 (23:33 +0000)]
Add a loader tunable "hw.broken_txfifo" which enables a workaround for a
bug in old versions of QEMU (and Xen, and other places using QEMU code).
On those buggy emulated UARTs, the "TX idle" interrupt gets lost; with
this workaround, we spinwait for the TX to happen and then send ourselves
the interrupt.  It's ugly but it works, while minimizing the impact on
the code for the !broken_txfifo case.

MFC after: 2 weeks

11 years agoIf no resolv.conf has been made for the new system already and the install
nwhitehorn [Sun, 27 Jan 2013 23:12:37 +0000 (23:12 +0000)]
If no resolv.conf has been made for the new system already and the install
media has one already, copy it in lieu of leaving things blank. This
reduces the foot-shooting potential for PXE installs that immediately
add packages.

11 years agoIncrease the "memorylocked" limit for the "daemon" class.
neel [Sun, 27 Jan 2013 21:55:01 +0000 (21:55 +0000)]
Increase the "memorylocked" limit for the "daemon" class.

amd(8) requires more than the 64MB that is currently available to it so bump
it up to 128MB.

Reviewed by: kib
Discussed with: avg, kib, zont

11 years agoFix off-by-one errors in low-level arm9 and arm10 cache maintenance routines.
ian [Sun, 27 Jan 2013 20:28:14 +0000 (20:28 +0000)]
Fix off-by-one errors in low-level arm9 and arm10 cache maintenance routines.

In all the routines that loop through a range of virtual addresses, the loop
is controlled by subtracting the cache line size from the total length of the
request.  After the subtract, a 'bpl' instruction was used, which branches if
the result of the subtraction is zero or greater, but we need to exit the
loop when the count hits zero.  Thus, all the bpl instructions in those loops
have been changed to 'bhi' (branch if greater than zero).

In addition, the two routines that walk through the cache using set-and-index
were correct, but confusing.  The loop control for those has been simplified,
just so that it's easier to see by examination that the code is correct.

Routines for other arm architectures and generations still have the bpl
instruction, but compensate for the off-by-one situation by decrementing
the count register by one before entering the loop.

PR: arm/174461
Approved by: cognet (mentor)

11 years agoRestore the irq number to the display string; I fumbled this in the previous
ian [Sun, 27 Jan 2013 20:16:50 +0000 (20:16 +0000)]
Restore the irq number to the display string; I fumbled this in the previous
commit while trying to make the code internally self-consistant.

Approved by: cognet (mentor)
Obtained from: Christoph Mallon

11 years agoRemove the remaining references to the now-obsolete sheevaplug config files,
ian [Sun, 27 Jan 2013 20:10:29 +0000 (20:10 +0000)]
Remove the remaining references to the now-obsolete sheevaplug config files,
which have been replaced by the generic db88f6xxx config which works for all
kirkwood-series chips.

Approved by: cognet (mentor)

11 years ago- Remove forgotten commented out debug code
gabor [Sun, 27 Jan 2013 19:50:24 +0000 (19:50 +0000)]
- Remove forgotten commented out debug code

Submitted by: Christoph Mallon <christoph.mallon@gmx.de>
Reviewed by: Oleg Moskalenko <oleg.moskalenko@citrix.com>

11 years ago- Simplify and unify diagnostic and error message handling
gabor [Sun, 27 Jan 2013 19:49:10 +0000 (19:49 +0000)]
- Simplify and unify diagnostic and error message handling

Submitted by: Christoph Mallon <christoph.mallon@gmx.de>
Reviewed by: Oleg Moskalenko <oleg.moskalenko@citrix.com>

11 years agoFix regression issue after r244500 and r244503:
hselasky [Sun, 27 Jan 2013 18:01:03 +0000 (18:01 +0000)]
Fix regression issue after r244500 and r244503:

If a BUSDMA load operation results in a single segment which
is greater than the PAGE_SIZE, the USB computed physical
addresses will not be correct. Make sure that the first
segment is unfolded like the sub-sequent segments are into
USB_PAGE_SIZE big ranges.

Found by: Alexander Nedotsukov
MFC after: 1 week

11 years agoProperly quote argument.
nwhitehorn [Sun, 27 Jan 2013 14:49:54 +0000 (14:49 +0000)]
Properly quote argument.

MFC after: 3 days

11 years agoBe conservative and do not try to consume more bytes than was
kib [Sun, 27 Jan 2013 09:34:25 +0000 (09:34 +0000)]
Be conservative and do not try to consume more bytes than was
requested from the server for the read operation.  Server shall not
reply with too large size, but client should be resilent too.

Reviewed by: rmacklem
MFC after: 1 week

11 years agoFix reversed condition in the logic to wait for the chipset buffers
kib [Sun, 27 Jan 2013 09:31:11 +0000 (09:31 +0000)]
Fix reversed condition in the logic to wait for the chipset buffers
flush wait on the Gen2 chipsets.  Confirmed by the inspection of the
Linux agp code.

Submitted by: Taku YAMAMOTO <taku@tackymt.homeip.net>
MFC after: 2 weeks

11 years agoRename the run_cmd field to sw_runcmd to make it consistent with the
markj [Sun, 27 Jan 2013 06:03:57 +0000 (06:03 +0000)]
Rename the run_cmd field to sw_runcmd to make it consistent with the
other fields in struct sigwork_entry.

Approved by: rstone (co-mentor)
MFC after: 1 week

11 years agoEnsure that newsyslog -n prints the correct message for a rotation rule
markj [Sun, 27 Jan 2013 06:02:38 +0000 (06:02 +0000)]
Ensure that newsyslog -n prints the correct message for a rotation rule
that uses the 'R' flag.

Reviewed by: gad
Approved by: rstone (co-mentor)
MFC after: 1 week

11 years agoWhen the 'R' flag is used with a newsyslog.conf entry, some fields of
markj [Sun, 27 Jan 2013 06:01:35 +0000 (06:01 +0000)]
When the 'R' flag is used with a newsyslog.conf entry, some fields of
the corresponding struct sigwork_entry were left uninitialized,
potentially causing an early return from do_sigwork(). Ensure that these
fields are initialized, and handle the 'R' flag properly in
do_sigwork().

PR: bin/175330
Reviewed by: gad
Approved by: rstone (co-mentor)
MFC after: 1 week

11 years agoReturn with an error from copy_link(), copy_fifo() and copy_special() if
markj [Sun, 27 Jan 2013 05:59:28 +0000 (05:59 +0000)]
Return with an error from copy_link(), copy_fifo() and copy_special() if
the -n option is specified and the destination file exists.

PR: bin/174489
Approved by: rstone (co-mentor)
MFC after: 2 weeks

11 years agotruss: use 'e' flag for fopen instead of fcntl(.., FD_CLOEXEC)
mjg [Sun, 27 Jan 2013 03:17:35 +0000 (03:17 +0000)]
truss: use 'e' flag for fopen instead of fcntl(.., FD_CLOEXEC)

11 years agotruss: if file requested with -o flag could not be opened print the reason
mjg [Sun, 27 Jan 2013 03:14:54 +0000 (03:14 +0000)]
truss: if file requested with -o flag could not be opened print the reason

MFC after: 3 days

11 years agoAdd support for the GlobalScale Technologies DreamPlug computer.
ian [Sun, 27 Jan 2013 01:17:37 +0000 (01:17 +0000)]
Add support for the GlobalScale Technologies DreamPlug computer.

This adds support for version 10, revision 01, but it should also work
without changes for the 0901 model, at least until we get drivers for the
two different wifi chips involved.

Many users contributed to and tested the various patchsets floating around
for the past year that have eventually evolved into this checkin, most notably
Richard Neese who provided the bulk of the kernel config file.

Approved by: cognet (mentor)

11 years agoAdd a default do-nothing implementation of fdt_pci_devmap() using a weak alias,
ian [Sun, 27 Jan 2013 00:39:02 +0000 (00:39 +0000)]
Add a default do-nothing implementation of fdt_pci_devmap() using a weak alias,
so that we don't need an empty implementation of it for every Marvell platform
that has no PCI.  This allows the removal of the SheevaPlug-specific stub and
config files, and eliminates the need to add similar stubs for future models.

Marvell platforms that do expose PCI are compiled with 'device pci' which
causes the real (non-weak) implementation in dev/fdt/fdt_pci.c to be used.

Approved by: cognet (mentor)

11 years agoAdd the chip used in recent GlobalScale Technologies *Plug computers
ian [Sun, 27 Jan 2013 00:16:36 +0000 (00:16 +0000)]
Add the chip used in recent GlobalScale Technologies *Plug computers

Approved by: cognet (mentor)

11 years agoClean some 'svn:executable' properties in the tree.
pfg [Sat, 26 Jan 2013 22:08:21 +0000 (22:08 +0000)]
Clean some 'svn:executable' properties in the tree.

Submitted by: Christoph Mallon
MFC after: 3 days

11 years agoRevert accidental regression to previous misspelling.
ian [Sat, 26 Jan 2013 22:02:40 +0000 (22:02 +0000)]
Revert accidental regression to previous misspelling.

Approved by: cognet (mentor)

11 years agoCosmetical off-by-one
pfg [Sat, 26 Jan 2013 21:50:52 +0000 (21:50 +0000)]
Cosmetical off-by-one

Technically, the case when all the blocks are released
is not a sanity check.
Move further the comment while here.

Suggested by: bde
MFC after: 3 days

11 years agoReduce watchdogd's memory footprint when running daemonized.
ian [Sat, 26 Jan 2013 21:29:45 +0000 (21:29 +0000)]
Reduce watchdogd's memory footprint when running daemonized.

This uses the recently-added jemalloc(3) feature of setting the lg_chunk
tuning option to zero to request that memory be allocated in the smallest
chunks possible.  Without this option, the default is to initally map 8MB,
and then the mlockall() call wires that entire allocation even though the
program only uses a few Kbytes of it at runtime.

PR: bin/173332
Approved by: cognet (mentor)

11 years agoFix a buffer overrun while pre-formatting the names array, perpetrated in
ian [Sat, 26 Jan 2013 20:16:58 +0000 (20:16 +0000)]
Fix a buffer overrun while pre-formatting the names array, perpetrated in
the prior commit.  Use essentially the same sprintf() statement for both
formatting and pre-formatting, and use a format string which eliminates the
need for an extra temporary buffer when formatting the name.

Noted by:      Christoph Mallon
Pointy hat to:   ian
Approved by:   cognet (mentor)

11 years agoAdd new USB quirk.
hselasky [Sat, 26 Jan 2013 13:44:24 +0000 (13:44 +0000)]
Add new USB quirk.

PR: usb/175599
Submitted by: Juan J Lopez
MFC after: 1 week

11 years agog_mirror: g_getattr() failure should not be fatal
avg [Sat, 26 Jan 2013 10:50:04 +0000 (10:50 +0000)]
g_mirror: g_getattr() failure should not be fatal

This allows to use gmirror e.g. on top of ZVOLs.

PR: kern/175323
Submitted by: Alexei.Volkov@softlynx.ru, mav
Reported by: Alexei.Volkov@softlynx.ru
Tested by: Alexei.Volkov@softlynx.ru
Reviewed by: ae, mav, pjd
MFC after: 1 week

11 years agospa_generate_rootconf: add support for old vdev labels
avg [Sat, 26 Jan 2013 10:34:17 +0000 (10:34 +0000)]
spa_generate_rootconf: add support for old vdev labels

It seems that old ZFS versions (v15) completely omit "vdev_children"
property when there is a single child.

Reported by: jase
Tested by: jase
MFC after: 1 week

11 years agoAlign td_frame as it will be placed into the sp register which must be
andrew [Sat, 26 Jan 2013 08:55:04 +0000 (08:55 +0000)]
Align td_frame as it will be placed into the sp register which must be
8 byte aligned on ARM EABI.

11 years agoInstall an extra hold on the newly allocated synq entry so that it
np [Sat, 26 Jan 2013 03:23:28 +0000 (03:23 +0000)]
Install an extra hold on the newly allocated synq entry so that it
cannot be freed while do_pass_accept_req is running.  This closes a race
where do_pass_establish on another CPU (the driver chose a different
queue for the new tid) expands the synq entry into a full PCB and then
releases the only hold on it, all while do_pass_accept_req is still
running.

MFC after: 3 days

11 years agoForce the 404-BT card (4 x 1G) to use the "uwire" configuration file.
np [Sat, 26 Jan 2013 03:10:28 +0000 (03:10 +0000)]
Force the 404-BT card (4 x 1G) to use the "uwire" configuration file.

MFC after: 3 days

11 years agoAdd a couple of missing error codes. Treat CPL_ERR_KEEPALV_NEG_ADVICE as
np [Sat, 26 Jan 2013 03:01:51 +0000 (03:01 +0000)]
Add a couple of missing error codes.  Treat CPL_ERR_KEEPALV_NEG_ADVICE as
negative advice and not a fatal error.

MFC after: 3 days

11 years agoAdd checks for SO_NO_OFFLOAD in a couple of places that I missed earlier
np [Sat, 26 Jan 2013 01:41:42 +0000 (01:41 +0000)]
Add checks for SO_NO_OFFLOAD in a couple of places that I missed earlier
in r245915.

11 years agocxgbe/tom: List IFCAP_TOE6 as supported now that all the required pieces
np [Sat, 26 Jan 2013 01:06:27 +0000 (01:06 +0000)]
cxgbe/tom: List IFCAP_TOE6 as supported now that all the required pieces
are in place.  You still have to enable it explicitly, after loading the
t4_tom KLD.

11 years agoTeach toe_l2_resolve to resolve IPv6 destinations too.
np [Sat, 26 Jan 2013 00:57:29 +0000 (00:57 +0000)]
Teach toe_l2_resolve to resolve IPv6 destinations too.

Reviewed by: bz@

11 years agoMention NetLink controllers in the fallback description, too.
marius [Sat, 26 Jan 2013 00:41:54 +0000 (00:41 +0000)]
Mention NetLink controllers in the fallback description, too.

11 years agoInitial cut at making IBSS support 802.11n aware.
adrian [Sat, 26 Jan 2013 00:37:54 +0000 (00:37 +0000)]
Initial cut at making IBSS support 802.11n aware.

* Add HTINFO field decoding to ieee80211_ies_expand() - it's likely not
  100% correct as it's not looking at the draft 11n HTINFO location,
  but I don't think anyone will care.

* When doing an IBSS join make sure the 11n channel configuration
  is used - otherwise the 11a/11bg channel will be used
  and there won't be any chance for an upgrade to 11n.

* When creating an IBSS network, ensure the channel is updated to an
  11n channel so other 11n nodes can see it and speak to it with MCS
  rates.

* Add a bit of code that's disabled for now which handles the HT
  field updating.  This won't work out very well with lots of adhoc
  nodes as we'd end up ping-ponging between the HT configuration for
  each node.  Instead, we should likely only pay attention to the
  "master" node we initially associated against and then ensure we
  propagate that information forward in our subsequent beacons.  However,
  due to the nature of IBSS (ie, there's no specific "master" node in
  the specification) it's unclear which node we should lift the HT
  parameters from.

  So for now this assumes the HT parameters are squirreled away in the
  initial beacon/probe response.

So there's some trickiness here.

With ap/sta pairing, the probe response just populates a legacy node
and the association request/response is what is used for negotiation
11n-ness (and upgrading things as needed.)

With ibss networks, the pairing is done with probe request/response,
with discovery being done by creating nodes when new beacons in the
IBSS / BSSID are heard.  There's no assoc request/response frames going on.

So the trick here has been to figure out where to upgrade things.
I don't like how I just taught ieee80211_sta_join() to "speak" HT -
I'd rather there be an upgrade path when an IBSS node joins and there
are HT parameters present.  Once I've done that, I'll kill this
HT special casing that's going on in ieee80211_sta_join().

Tested:

* AR9280, AR5416, AR5212 - basic iperf and ping interoperability tests
  whilst in a non-encrypted adhoc network.

TODO:

* Fix up the HT upgrade path for IBSS nodes rather than adding code
  in ieee80211_sta_join(), then remove my code from there.

* When associating, there's a concept of a "master" node in the IBSS
  which is the node you first joined the network through.  It's possible
  the correct thing to do is to listen to HT updates and configure WME
  parameters from that node.  However, once that node goes away, which
  node(s) should be listened to for configuration changes?

  For things like HT channel width, it's likely going to be ok to
  just associate as HT40 and then use the per-neighbor rate control
  and HTINFO/HTCAP fields to figure out which rates and configuration
  to speak.  Ie, for a 20MHz 11n node, just speak 20MHz rates to
  it.  It shouldn't "change", like what goes on in AP/STA configurations.

11 years agoMigrate the TX sending code out from under the ath0 taskq and into
adrian [Sat, 26 Jan 2013 00:14:34 +0000 (00:14 +0000)]
Migrate the TX sending code out from under the ath0 taskq and into
the separate ath0 TX taskq.

Whilst here, make sure that the TX software scheduler is also
running out of the TX task, rather than the ath0 taskqueue.

Make sure that the tx taskqueue is blocked/unblocked as necessary.

This allows for a little more parallelism on multi-core machines,
as well as (eventually) supporting a higher task priority for TX
tasks, allowing said TX task to preempt an already running RX or
TX completion task.

Tested:

* AR5416, AR9280 hostap and STA modes

11 years ago- Improve some comments.
marius [Sat, 26 Jan 2013 00:11:39 +0000 (00:11 +0000)]
- Improve some comments.
- Make bge_lookup_{rev,vendor}() static.
- Factor out chip identification rather than duplicating the code.
- Sanitize bge_probe() a bit (don't hardcode buffer sizes, allow
  bge_lookup_vendor() to return NULL so the excessive panic() three
  can be removed there, etc.) and return BUS_PROBE_DEFAULT rather than
  hardcoding 0.
- According to the Linux tg3 driver, BCM57791 and BCM57795 aren't
  capable of Gigabit Ethernet.
- Check the return value of taskqueue_start_threads().

11 years agoGenerate lle_event in the IPv6 neighbor discovery code too.
np [Sat, 26 Jan 2013 00:05:22 +0000 (00:05 +0000)]
Generate lle_event in the IPv6 neighbor discovery code too.

Reviewed by: bz@

11 years agoMove lle_event to if_llatbl.h
np [Fri, 25 Jan 2013 23:58:21 +0000 (23:58 +0000)]
Move lle_event to if_llatbl.h

lle_event replaced arp_update_event after the ARP rewrite and ended up
in if_ether.h simply because arp_update_event used to be there too.
IPv6 neighbor discovery is going to grow lle_event support and this is a
good time to move it to if_llatbl.h.

The two in-tree consumers of this event - OFED and toecore - are not
affected.

Reviewed by: bz@

11 years ago- Check the return value of taskqueue_start_threads().
marius [Fri, 25 Jan 2013 23:44:02 +0000 (23:44 +0000)]
- Check the return value of taskqueue_start_threads().
- At least the Saturn chips of 501-6738 cards need a delay after freezing
  the external GMII pins before the internal PHY is accessible again. So
  wait a bit after (un)freezing these. Also don't touch the other bits of
  that configuration register. [1]
- Take advantage of nitems().

Reported and tested by: Paul Keusemann [1]

MFC after: 3 days

11 years agoAvoid NULL dereference in nd6_storelladdr when no mbuf is provided. It
np [Fri, 25 Jan 2013 23:11:13 +0000 (23:11 +0000)]
Avoid NULL dereference in nd6_storelladdr when no mbuf is provided.  It
is called this way from a couple of places in the OFED code.  (toecore
calls it too but that's going to change shortly).

Reviewed by: bz@

11 years agoThere is no need to call into the TOE driver twice in pru_rcvd (tod_rcvd
np [Fri, 25 Jan 2013 22:50:52 +0000 (22:50 +0000)]
There is no need to call into the TOE driver twice in pru_rcvd (tod_rcvd
and then tod_output right after that).

Reviewed by: bz@

11 years agoImprove correctness of rtc register implementation.
grehan [Fri, 25 Jan 2013 22:43:20 +0000 (22:43 +0000)]
Improve correctness of rtc register implementation.

Submitted by: tycho nightingale at pluribusnetworks com

11 years agoAdd TCP_OFFLOAD hook in syncache_respond for IPv6 too, just like the one
np [Fri, 25 Jan 2013 22:16:35 +0000 (22:16 +0000)]
Add TCP_OFFLOAD hook in syncache_respond for IPv6 too, just like the one
that exists for IPv4.

Reviewed by: bz@

11 years agoFix update method (s/SUP/CVS) warning.
gjb [Fri, 25 Jan 2013 21:44:45 +0000 (21:44 +0000)]
Fix update method (s/SUP/CVS) warning.

Submitted by: Ryan Stone
MFC after: 1 day

11 years agoAlways allow access to the sysenter cs/esp/eip MSRs since they
grehan [Fri, 25 Jan 2013 21:38:31 +0000 (21:38 +0000)]
Always allow access to the sysenter cs/esp/eip MSRs since they
are automatically saved and restored in the VMCS.

Reviewed by: neel
Obtained from: NetApp

11 years agoTeach toe_4tuple_check() to deal with IPv6 4-tuples too.
np [Fri, 25 Jan 2013 20:45:24 +0000 (20:45 +0000)]
Teach toe_4tuple_check() to deal with IPv6 4-tuples too.

Reviewed by: bz@

11 years agoHeed SO_NO_OFFLOAD.
np [Fri, 25 Jan 2013 20:23:33 +0000 (20:23 +0000)]
Heed SO_NO_OFFLOAD.

MFC after: 1 week

11 years agoRemove redundant test, we know inp_lport is 0.
np [Fri, 25 Jan 2013 20:14:27 +0000 (20:14 +0000)]
Remove redundant test, we know inp_lport is 0.

MFC after: 1 week

11 years agoDon't time travel back and use a present date.
delphij [Fri, 25 Jan 2013 18:47:16 +0000 (18:47 +0000)]
Don't time travel back and use a present date.

Noticed by: mckusick

11 years agoMK_* variable should be compared to "no" not "NO".
brooks [Fri, 25 Jan 2013 17:40:10 +0000 (17:40 +0000)]
MK_* variable should be compared to "no" not "NO".

Submitted by: "b.f." <bf1783@googlemail.com>

11 years agoExpand description of how gptboot and gptzfsboot choose a partition for
wblock [Fri, 25 Jan 2013 16:33:00 +0000 (16:33 +0000)]
Expand description of how gptboot and gptzfsboot choose a partition for
booting.

Reviewed by: ae
MFC after: 1 week

11 years agoFurther cleanups to use of timestamps in NFS:
jhb [Fri, 25 Jan 2013 15:25:24 +0000 (15:25 +0000)]
Further cleanups to use of timestamps in NFS:
- Use NFSD_MONOSEC (which maps to time_uptime) instead of the seconds
  portion of wall-time stamps to manage timeouts on events.
- Remove unused nd_starttime from the per-request structure in the new
  NFS server.
- Use nanotime() for the modification time on a delegation to get as
  precise a time as possible.
- Use time_second instead of extracting the second from a call to
  getmicrotime().

Submitted by: bde (3)
Reviewed by: bde, rmacklem
MFC after: 2 weeks

11 years agoArithmetic on pointers takes into account the size of the type. Properly cast the...
dchagin [Fri, 25 Jan 2013 14:40:54 +0000 (14:40 +0000)]
Arithmetic on pointers takes into account the size of the type. Properly cast the pointer to avoid incorrect pointer scaling.

MFC after: 1 Week

11 years agoIn mbuf(9) API length is always integer. Thus, cast mbuf length
glebius [Fri, 25 Jan 2013 11:52:56 +0000 (11:52 +0000)]
In mbuf(9) API length is always integer. Thus, cast mbuf length
constants to be integers.

Reviewed by: bde