]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
10 years agoBring copyright notice to standard style.
glebius [Mon, 17 Feb 2014 12:01:50 +0000 (12:01 +0000)]
Bring copyright notice to standard style.

10 years agoo Remove at compile time the HASH_ALL code, that was never
glebius [Mon, 17 Feb 2014 11:50:56 +0000 (11:50 +0000)]
o Remove at compile time the HASH_ALL code, that was never
  tested and is unfinished. However, I've tested my version,
  it works okay. As before it is unfinished: timeout aren't
  driven by TCP session state. To enable the HASH_ALL mode,
  one needs in kernel config:

options FLOWTABLE_HASH_ALL

o Reduce the alignment on flentry to 64 bytes. Without
  the FLOWTABLE_HASH_ALL option, twice less memory would
  be consumed by flows.
o API to ip_output()/ip6_output() got even more thin: 1 liner.
o Remove unused unions. Simply use fle->f_key[].
o Merge all IPv4 code into flowtable_lookup_ipv4(), and do same
  flowtable_lookup_ipv6(). Stop copying data to on stack
  sockaddr structures, simply use key[] on stack.
o Move code from flowtable_lookup_common() that actually works
  on insertion into flowtable_insert().

Sponsored by: Netflix
Sponsored by: Nginx, Inc.

10 years agoMake it possible to use the env kernel config file option for AVILA
jhay [Mon, 17 Feb 2014 11:05:57 +0000 (11:05 +0000)]
Make it possible to use the env kernel config file option for AVILA
and CAMBRIA boards that does not use loader to load the kernel. This
is basically how it was done for i386. This way tunables can also be
set. For example in config file:

env "/conf/AVILA.env"

And in AVILA.env:

vfs.unmapped_buf_allowed=0

MFC after: 2 weeks

10 years agoThe MDIO control register for the AR8327 has a different address to
adrian [Mon, 17 Feb 2014 05:54:24 +0000 (05:54 +0000)]
The MDIO control register for the AR8327 has a different address to
previous chipsets.

Obtained from: AR8327 datasheet

10 years agoAdd mmd declaration.
adrian [Mon, 17 Feb 2014 05:51:37 +0000 (05:51 +0000)]
Add mmd declaration.

10 years agocalendar(1): don't segfault in invalid input
eadler [Mon, 17 Feb 2014 03:24:00 +0000 (03:24 +0000)]
calendar(1): don't segfault in invalid input

When the user supplies an invalid number of days provide a useful error message
instead of segfaulting.

PR: bin/186697
Reported by: kaltheat <kaltheat@gmail.com>
Submitted by: oliver <oliver@beefrankly.org> (older version)

10 years agoImplement PHY bus MMD writes for arswitch.
adrian [Mon, 17 Feb 2014 02:24:58 +0000 (02:24 +0000)]
Implement PHY bus MMD writes for arswitch.

This is used by the AR8327 PHY setup path.

Obtained from: OpenWRT

10 years agoFix M_FILEDESC leak in fdgrowtable() introduced in r244510.
bdrewery [Mon, 17 Feb 2014 00:00:39 +0000 (00:00 +0000)]
Fix M_FILEDESC leak in fdgrowtable() introduced in r244510.

fdgrowtable() now only reallocates fd_map when necessary.

This fixes fdgrowtable() to use the same logic as fdescfree() for
when to free the fd_map. The logic in fdescfree() is intended to
not free the initial static allocation, however the fd_map grows
at a slower rate than the table does. The table is intended to hold
20 fd, but its initial map has many more slots than 20.  The slot
sizing causes NDSLOTS(20) through NDSLOTS(63) to be 1 which matches
NDSLOTS(20), so fdescfree() was assuming that the fd_map was still
the initial allocation and not freeing it.

This partially reverts r244510 by reintroducing some of the logic
it removed in fdgrowtable().

Reviewed by: mjg
Approved by: bapt (mentor)
MFC after: 2 weeks

10 years agoRemove redundant memcpy of fd_ofiles in fdgrowtable() added in r247602
bdrewery [Sun, 16 Feb 2014 23:10:46 +0000 (23:10 +0000)]
Remove redundant memcpy of fd_ofiles in fdgrowtable() added in r247602

Discussed with: mjg
Approved by: bapt (mentor)
MFC after: 2 weeks

10 years agoAfter r261980, the local ptr variable in xbox_init() is no longer used,
dim [Sun, 16 Feb 2014 22:48:36 +0000 (22:48 +0000)]
After r261980, the local ptr variable in xbox_init() is no longer used,
breaking the LINT build.

Pointy hat to: brueffer

10 years agoUndefine HAVE_VSNPRINTF_IN_STD.
jmmv [Sun, 16 Feb 2014 21:53:33 +0000 (21:53 +0000)]
Undefine HAVE_VSNPRINTF_IN_STD.

Should fix the build with g++/libstdc++.

This is what we used to do prior the import of atf 0.20 and the build worked
just fine with both libstdc++ and libc++.  Still investigating how to properly
fix this upstream so that we do not hit the same issue on the next import.

10 years agoUpgrade our copy of llvm/clang to 3.4 release. This version supports
dim [Sun, 16 Feb 2014 19:44:07 +0000 (19:44 +0000)]
Upgrade our copy of llvm/clang to 3.4 release.  This version supports
all of the features in the current working draft of the upcoming C++
standard, provisionally named C++1y.

The code generator's performance is greatly increased, and the loop
auto-vectorizer is now enabled at -Os and -O2 in addition to -O3.  The
PowerPC backend has made several major improvements to code generation
quality and compile time, and the X86, SPARC, ARM32, Aarch64 and SystemZ
backends have all seen major feature work.

Release notes for llvm and clang can be found here:
<http://llvm.org/releases/3.4/docs/ReleaseNotes.html>
<http://llvm.org/releases/3.4/tools/clang/docs/ReleaseNotes.html>

MFC after: 1 month

10 years agoAdd an UPDATING entry about the nve(4) driver removal.
brueffer [Sun, 16 Feb 2014 19:33:34 +0000 (19:33 +0000)]
Add an UPDATING entry about the nve(4) driver removal.

10 years ago- Decrease buffer size.
br [Sun, 16 Feb 2014 19:21:44 +0000 (19:21 +0000)]
- Decrease buffer size.
- Handle eDMA interrupt on running channel only.

10 years agoStart getty(8) on ttyu1 as well. It's not uncommon for HP hardware
marcel [Sun, 16 Feb 2014 19:08:10 +0000 (19:08 +0000)]
Start getty(8) on ttyu1 as well. It's not uncommon for HP hardware
to have that be the iLO console (e.g. pluto).

10 years agoAfter a timeout, reset the controller using SDHCI_RESET_CMD|SDHCI_RESET_DATA
ian [Sun, 16 Feb 2014 17:22:49 +0000 (17:22 +0000)]
After a timeout, reset the controller using SDHCI_RESET_CMD|SDHCI_RESET_DATA
rather than SDHCI_RESET_ALL; the latter turns off clocks and power, removing
any possibility of recovering from the error.

Also, double the timeout to 2 seconds.  Despite what the SD spec says about
all transactions completing in 250ms or less, I have a card which sometimes
takes more than a second to complete a write.

10 years agoAdd driver for Synchronous Audio Interface (SAI).
br [Sun, 16 Feb 2014 16:49:54 +0000 (16:49 +0000)]
Add driver for Synchronous Audio Interface (SAI).

SAI supports full-duplex serial interfaces with frame
synchronization such as I2S, AC97, TDM, and codec/DSP
interfaces.

10 years agoAdd new PCI ID for hardware which needs port routing for USB 3.0.
hselasky [Sun, 16 Feb 2014 14:37:23 +0000 (14:37 +0000)]
Add new PCI ID for hardware which needs port routing for USB 3.0.

PR: usb/186811
MFC after: 1 week
Submitted by: Philipp Maechler <philipp.maechler@mamo.li>

10 years agoRemove an nve(4)-specific workaround from the xbox port. nfe(4) doesn't
brueffer [Sun, 16 Feb 2014 14:35:19 +0000 (14:35 +0000)]
Remove an nve(4)-specific workaround from the xbox port.  nfe(4) doesn't
need it.

Reviewed by: ed

10 years agoUse DESTDIR for the installation of the /usr/tests/local symlink.
jmmv [Sun, 16 Feb 2014 12:56:05 +0000 (12:56 +0000)]
Use DESTDIR for the installation of the /usr/tests/local symlink.

MFC after: 5 days

10 years agoIn sys/dev/usb/controller/musb_otg.c, fix a warning about musbotg_odevd
dim [Sun, 16 Feb 2014 12:41:57 +0000 (12:41 +0000)]
In sys/dev/usb/controller/musb_otg.c, fix a warning about musbotg_odevd
being unused, by adding it to the part that handles getting descriptors.

Reviewed by: hselasky
MFC after: 3 days

10 years agoNote the removal of nve(4).
brueffer [Sun, 16 Feb 2014 12:25:22 +0000 (12:25 +0000)]
Note the removal of nve(4).

10 years agoRetire the nve(4) driver; nfe(4) has been the default driver for NVIDIA
brueffer [Sun, 16 Feb 2014 12:22:43 +0000 (12:22 +0000)]
Retire the nve(4) driver; nfe(4) has been the default driver for NVIDIA
nForce MCP adapters for a long time.

Yays: jhb, remko, yongari
Nays: none on the current and stable lists

10 years agoMention that rctl(8) was sponsored by the Foundation.
trasz [Sun, 16 Feb 2014 08:42:52 +0000 (08:42 +0000)]
Mention that rctl(8) was sponsored by the Foundation.

Sponsored by: The FreeBSD Foundation

10 years agoAdd zfsboot to the scripted interface of bsdinstall(8); oops!
dteske [Sun, 16 Feb 2014 06:56:44 +0000 (06:56 +0000)]
Add zfsboot to the scripted interface of bsdinstall(8); oops!
NB: If the zfsboot variables ($ZFSBOOT_*) are set, a script is
assumed to want zfsboot module instead of scriptedpart module.

Submitted by: Loïc Brarda <loic.brarda@cern.ch>
Reviewed by: nwhitehorn@
MFC after: 3 days

10 years agoInstall a symlink from /usr/tests/local to /usr/local/tests.
jmmv [Sun, 16 Feb 2014 04:11:40 +0000 (04:11 +0000)]
Install a symlink from /usr/tests/local to /usr/local/tests.

This is to let Kyua descend into any tests that may have been installed by
ports under /usr/local/tests when running the test suite from /usr/tests.

Some ports (namely those that build Kyua) already install test programs
into /usr/local/tests.  Just make sure to select the TEST option while
building them.

MFC after: 3 days

10 years agoCatch up with last-second name change.
ian [Sun, 16 Feb 2014 03:34:07 +0000 (03:34 +0000)]
Catch up with last-second name change.

10 years agoOops, remove some dregs of debugging.
ian [Sun, 16 Feb 2014 03:30:22 +0000 (03:30 +0000)]
Oops, remove some dregs of debugging.

10 years agoMake it possible to access the ocotp registers before the ocotp device
ian [Sun, 16 Feb 2014 03:09:39 +0000 (03:09 +0000)]
Make it possible to access the ocotp registers before the ocotp device
is attached, by establishing a temporary mapping of the registers when
necessary.  This is a temporary measure to keep progress moving; in the
long run we need better control over the order in which devices attach
(better than "the order they appear in the fdt dts source").

10 years agoAdd a helper routine to depth-search the device tree for a node with a
ian [Sun, 16 Feb 2014 03:00:59 +0000 (03:00 +0000)]
Add a helper routine to depth-search the device tree for a node with a
matching 'compatible' property.  This probably has a short half-life (as
do most of the fdt_ functions), but it helps solve some near-term needs
until we work out the larger problems of device instantiation order
versus the order of things in the fdt data.

10 years agoCorrect a typo in Malcolm MacDougall's name.
marcus [Sat, 15 Feb 2014 22:15:24 +0000 (22:15 +0000)]
Correct a typo in Malcolm MacDougall's name.

Approved by: gabor

10 years agoSweep up a couple crumbs left over from the imx6->fsl renaming.
ian [Sat, 15 Feb 2014 21:59:00 +0000 (21:59 +0000)]
Sweep up a couple crumbs left over from the imx6->fsl renaming.

10 years agoIt turns out Freescale cleverly made the ocotp device compatible across
ian [Sat, 15 Feb 2014 21:21:57 +0000 (21:21 +0000)]
It turns out Freescale cleverly made the ocotp device compatible across
several different families of SoCs, so move it to the freescale directory
and prefix everything with fsl rather than imx6.

10 years agoAdd timeout logic to sdhci, separate from the timeouts done by the hardware.
ian [Sat, 15 Feb 2014 20:45:53 +0000 (20:45 +0000)]
Add timeout logic to sdhci, separate from the timeouts done by the hardware.

If the hardware is not in a good state (like maybe clocks aren't running
because of a configuration glitch) its timeout clock may also not work
correctly, and the next command sent will hang that thread forever.  The
thread in question is usually the one and only thread (at init time) or
a bio queue worker thread whose lockup will eventually lead to the whole
system locking up when it runs out of buffers.

No sd card command should take longer than 250ms.  This new code establishes
a 1-second timeout to allow plenty of safety margin over that.

10 years agoIf no compatible cards were found after probing the bus, say so.
ian [Sat, 15 Feb 2014 20:36:54 +0000 (20:36 +0000)]
If no compatible cards were found after probing the bus, say so.

10 years agoSummary: Two quick edits to the implementation notes as they're no
gnn [Sat, 15 Feb 2014 18:36:31 +0000 (18:36 +0000)]
Summary: Two quick edits to the implementation notes as they're no
longer stored in netinet but in netpfil.

10 years agoIncrease the wait time for acquiring the bus from 10 to 250ms.
ian [Sat, 15 Feb 2014 17:59:32 +0000 (17:59 +0000)]
Increase the wait time for acquiring the bus from 10 to 250ms.

Normally it never needs to wait here at all; waiting is done at the end
of the prior command.  When doing a crash dump, the normal interrupt
mechanism isn't used; instead the interrupt handler is called repeatedly
in a polling-like manner.  This can subvert hardware-specific drivers
and lead to trying to start a new command while the previous command is
still busy on the bus.  Since the SD spec says the longest a card can
take to execute any command is 250ms, use that as a timeout.

10 years agoConvert the "R1B fix" from a busy-loop in the interrupt handler to a callout.
ian [Sat, 15 Feb 2014 17:55:35 +0000 (17:55 +0000)]
Convert the "R1B fix" from a busy-loop in the interrupt handler to a callout.

10 years agoAdd a driver to provide access to imx6 on-chip one-time-programmble data.
ian [Sat, 15 Feb 2014 17:19:55 +0000 (17:19 +0000)]
Add a driver to provide access to imx6 on-chip one-time-programmble data.

Submitted by: Steven Lawrance <stl@koffein.net>

10 years agoBetter build fix.
glebius [Sat, 15 Feb 2014 16:22:51 +0000 (16:22 +0000)]
Better build fix.

10 years agoRework rctl(8) manpage
bdrewery [Sat, 15 Feb 2014 14:56:50 +0000 (14:56 +0000)]
Rework rctl(8) manpage

- Note that kernel options are required
- Shift parameters around in SYNOPSIS to make it more clear that there are
  different modes
- For all literal symbols such as 'process' or 'loginclass' or 'wallclock',
  etc, make them into bold symbols with .Sy
- For each subject:subject-id:etc: use .Em to underline to make it more clear
  they relate to the rule syntax
- Document how devd(8) support works
- Move RSS warning to BUGS and replace RSS with 'memoryuse' since 'RSS' is not
  defined in the manpage
- Add more examples around listing existing rules
- Make rule syntax into a list to improve readability
- Add a list of subjects and their corresponding subject-id same as
  RESOURCES/ACTIONS have lists
- Note that rctl(8) takes affect on all current and future processes
- Note that amount can take human numbers
- Add reference to login.conf(5) in few places login class is mentioned

Reviewed by: trasz
Approved by: bapt (mentor)
MFC after: 1 week

10 years agoAdd forgotten rc.conf(5) update with r261931
bdrewery [Sat, 15 Feb 2014 14:52:12 +0000 (14:52 +0000)]
Add forgotten rc.conf(5) update with r261931

Reviewed by: trasz
Approved by: bapt (mentor)
MFC after: 1 week

10 years agoAllow overriding rctl.conf(5) file location for /etc/rc.d/rctl
bdrewery [Sat, 15 Feb 2014 14:50:47 +0000 (14:50 +0000)]
Allow overriding rctl.conf(5) file location for /etc/rc.d/rctl

Reviewed by: trasz
Approved by: bapt (mentor)
MFC after:      1 week

10 years agoHandle pmap_enter() on already promoted mappings for ARMv6/v7
zbb [Sat, 15 Feb 2014 13:27:45 +0000 (13:27 +0000)]
Handle pmap_enter() on already promoted mappings for ARMv6/v7

Attempt to demote the superpage if trying to pmap_enter() on
one. Panic only when the particular superpage should
no longer exist for that pmap and address.

10 years agoRemove spurious assertion from pmap_extract_locked() on ARM
zbb [Sat, 15 Feb 2014 13:24:58 +0000 (13:24 +0000)]
Remove spurious assertion from pmap_extract_locked() on ARM

The condition under assertion is no longer valid since
superpages support is operating on section mappings.

10 years agoAvoid redundant superpage promotion attempts on ARM
zbb [Sat, 15 Feb 2014 13:22:37 +0000 (13:22 +0000)]
Avoid redundant superpage promotion attempts on ARM

Because pmap_enter_locked() is called from few different functions
some redundancy in superpage promotion attempts can be observed.
Hence, avoid promotion in pmap_enter_object() (if the object can
be mapped by superpage it will be handled by pmap_enter_object()
itself) and also do not waste time in pmap_enter_quick().
From now on the promotion will be performed only in pmap_enter().

10 years agoFix superpage promotion on ARM with respect to RO/RW and wired attributes
zbb [Sat, 15 Feb 2014 13:20:17 +0000 (13:20 +0000)]
Fix superpage promotion on ARM with respect to RO/RW and wired attributes

It was possible to create RW superpage mapping even if
the base pages were RO due to wrong setting of the prot
flag passed to pmap_map_section().
Promotion attempt should be canceled in case of attributes
mismatch between any two base pages. Since we still use
pv_flags to maintain permission to write (PVF_WRITE) and
wired status (PVF_WIRED) for a page, it is also necessary
to take those variables into account.

10 years agoEnsure proper TLB invalidation on superpage promotion and demotion on ARM
zbb [Sat, 15 Feb 2014 13:17:51 +0000 (13:17 +0000)]
Ensure proper TLB invalidation on superpage promotion and demotion on ARM

Base pages within newly created superpage need to be invalidated so that
new mapping is "visible" immediately after creation.

10 years agoAlways clear L1 PTE descriptor when removing superpage on ARM
zbb [Sat, 15 Feb 2014 13:13:00 +0000 (13:13 +0000)]
Always clear L1 PTE descriptor when removing superpage on ARM

Invalidate L1 PTE regardles of existance of the corresponding
l2_bucket. This is relevant when superpage is entered via
pmap_enter_object() and will fix crash on entering page
in place of not properly removed superpage.

10 years agoIn sys/dev/xen/console/console.c, #if 0 an unused static function.
dim [Sat, 15 Feb 2014 12:37:26 +0000 (12:37 +0000)]
In sys/dev/xen/console/console.c, #if 0 an unused static function.

MFC after: 3 days

10 years agoUnder sys/netpfil/ipfw, surround two IPv6-specific static functions with
dim [Sat, 15 Feb 2014 12:25:01 +0000 (12:25 +0000)]
Under sys/netpfil/ipfw, surround two IPv6-specific static functions with
#ifdef INET6, since they are unused when INET6 is disabled.

MFC after: 3 days

10 years agoIn sys/fs/nandfs/nandfs_vfsops.c, #if 0 an unused static function.
dim [Sat, 15 Feb 2014 11:42:56 +0000 (11:42 +0000)]
In sys/fs/nandfs/nandfs_vfsops.c, #if 0 an unused static function.

MFC after: 3 days

10 years agoSwitch the hardcoded default hash function from MD5 / DES to SHA512.
des [Sat, 15 Feb 2014 10:53:44 +0000 (10:53 +0000)]
Switch the hardcoded default hash function from MD5 / DES to SHA512.

10 years agocomplete svn 261909 - new netmap version.
luigi [Sat, 15 Feb 2014 08:23:31 +0000 (08:23 +0000)]
complete svn 261909 - new netmap version.
since i updated the manpage i might as well commit it.

MFC after: 3 days

10 years agoMake sure that the flowtable flowid is only set to m_flowid if there
adrian [Sat, 15 Feb 2014 07:57:01 +0000 (07:57 +0000)]
Make sure that the flowtable flowid is only set to m_flowid if there
isn't one already supplied.

The previous flowtable code also did this.

Reviewed by: glebius
Sponsored by: Netflix, Inc.

10 years agodocument _JAIL as a possible option to set a cpuset for a jail..
jmg [Sat, 15 Feb 2014 07:01:45 +0000 (07:01 +0000)]
document _JAIL as a possible option to set a cpuset for a jail..

MFC after: 3 days

10 years agoThis new version of netmap brings you the following:
luigi [Sat, 15 Feb 2014 04:53:04 +0000 (04:53 +0000)]
This new version of netmap brings you the following:

- netmap pipes, providing bidirectional blocking I/O while moving
  100+ Mpps between processes using shared memory channels
  (no mistake: over one hundred million. But mind you, i said
  *moving* not *processing*);

- kqueue support (BHyVe needs it);

- improved user library. Just the interface name lets you select a NIC,
  host port, VALE switch port, netmap pipe, and individual queues.
  The upcoming netmap-enabled libpcap will use this feature.

- optional extra buffers associated to netmap ports, for applications
  that need to buffer data yet don't want to make copies.

- segmentation offloading for the VALE switch, useful between VMs.

and a number of bug fixes and performance improvements.

My colleagues Giuseppe Lettieri and Vincenzo Maffione did a substantial
amount of work on these features so we owe them a big thanks.

There are some external repositories that can be of interest:

    https://code.google.com/p/netmap
        our public repository for netmap/VALE code, including
        linux versions and other stuff that does not belong here,
        such as python bindings.

    https://code.google.com/p/netmap-libpcap
        a clone of the libpcap repository with netmap support.
With this any libpcap client has access to most netmap
feature with no recompilation. E.g. tcpdump can filter
packets at 10-15 Mpps.

    https://code.google.com/p/netmap-ipfw
        a userspace version of ipfw+dummynet which uses netmap
        to send/receive packets. Speed is up in the 7-10 Mpps
        range per core for simple rulesets.

Both netmap-libpcap and netmap-ipfw will be merged upstream at some
point, but while this happens it is useful to have access to them.

And yes, this code will be merged soon. It is infinitely better
than the version currently in 10 and 9.

MFC after: 3 days

10 years agoFix a typo, C_ALSOLUTE -> C_ABSOLUTE.
ian [Sat, 15 Feb 2014 02:30:34 +0000 (02:30 +0000)]
Fix a typo, C_ALSOLUTE -> C_ABSOLUTE.

10 years agoIn cxgbe, conditionalize the t4_pgprot_wc() function, since it is only
dim [Fri, 14 Feb 2014 23:38:42 +0000 (23:38 +0000)]
In cxgbe, conditionalize the t4_pgprot_wc() function, since it is only
used when DOT5 is defined.

Reviewed by: np
MFC after: 3 days

10 years agoInclude the CPU id in the per-CPU timer swi thread descriptions.
adrian [Fri, 14 Feb 2014 23:19:51 +0000 (23:19 +0000)]
Include the CPU id in the per-CPU timer swi thread descriptions.

Original patch by: jhb

10 years agoUpdate bhyve(8) man page to describe the usage of the "-s" option to assign
neel [Fri, 14 Feb 2014 21:46:04 +0000 (21:46 +0000)]
Update bhyve(8) man page to describe the usage of the "-s" option to assign
bus numbers to emulated devices. Also add the restriction that the LPC bridge
emulation can only be configured on bus 0.

Reviewed by: grehan@

10 years agoAllow PCI devices to be configured on all valid bus numbers from 0 to 255.
neel [Fri, 14 Feb 2014 21:34:08 +0000 (21:34 +0000)]
Allow PCI devices to be configured on all valid bus numbers from 0 to 255.

This is done by representing each bus as root PCI device in ACPI. The device
implements the _BBN method to return the PCI bus number to the guest OS.

Each PCI bus keeps track of the resources that is decodes for devices
configured on the bus: i/o, mmio (32-bit) and mmio (64-bit). These windows
are advertised to the guest via the _CRS object of the root device.

Bus 0 is treated specially since it consumes the I/O ports to access the
PCI config space [0xcf8-0xcff]. It also decodes the legacy I/O ports that
are consumed by devices on the LPC bus. For this reason the LPC bridge can
be configured only on bus 0.

The bus number can be specified using the following command line option
to bhyve(8): "-s <bus>:<slot>:<func>,<emul>[,<config>]"

Discussed with: grehan@
Reviewed by: jhb@

10 years agoDisable warning about unused static const variables for sys/pci/ncr.c.
dim [Fri, 14 Feb 2014 21:20:16 +0000 (21:20 +0000)]
Disable warning about unused static const variables for sys/pci/ncr.c.

MFC after: 3 days

10 years agoIn r260111, in sys/conf/files, I disabled warning about unused functions
dim [Fri, 14 Feb 2014 21:06:12 +0000 (21:06 +0000)]
In r260111, in sys/conf/files, I disabled warning about unused functions
for the wrong mcg.c, the one in ofed/drivers/infiniband/hw/mlx4.
Disable the warning for ofed/drivers/net/mlx4/mcg.c instead.

MFC after: 3 days

10 years agoPreserve one character space for a trailing '\0'.
pluknet [Fri, 14 Feb 2014 20:54:03 +0000 (20:54 +0000)]
Preserve one character space for a trailing '\0'.

Found by: Ivan Klymenko via cppcheck
Discussed with: ae
MFC after: 1 week

10 years agoIn chat_UpdateSet(), initialize the input buffer to prevent stale data
brueffer [Fri, 14 Feb 2014 20:34:24 +0000 (20:34 +0000)]
In chat_UpdateSet(), initialize the input buffer to prevent stale data
from previous timed out commands.

PR: 186530
Submitted by: Alexander Zagrebin <alexz at visp.ru>
Reviewed by: brian
MFC after: 1 week

10 years agoSimilar to r260026, disable warning about unused functions for
dim [Fri, 14 Feb 2014 20:11:06 +0000 (20:11 +0000)]
Similar to r260026, disable warning about unused functions for
ieee80211_adhoc.c, ieee80211_hostap.c and ieee80211_sta.c.

MFC after: 3 days

10 years agoFix build on 32bit arches broken by me in r261882.
glebius [Fri, 14 Feb 2014 19:43:00 +0000 (19:43 +0000)]
Fix build on 32bit arches broken by me in r261882.

10 years agoMFV: Import atf-0.20.
jmmv [Fri, 14 Feb 2014 19:33:16 +0000 (19:33 +0000)]
MFV: Import atf-0.20.

10 years agoAfter r251709, avoid a clang 3.4 warning about an unused static const
dim [Fri, 14 Feb 2014 17:47:18 +0000 (17:47 +0000)]
After r251709, avoid a clang 3.4 warning about an unused static const
variable (uma_max_ipers), when asserts are disabled.

Reviewed by: glebius
MFC after: 3 days

10 years agoRemove mention of minimum password length and upper/lower case checking,
wblock [Fri, 14 Feb 2014 15:46:06 +0000 (15:46 +0000)]
Remove mention of minimum password length and upper/lower case checking,
patch supplied by Allan Jude <freebsd@allanjude.com>.  Add xref to
pam_passwdqc(8), where that testing is now done.

PR: docs/184482
Submitted by: Ryan Gerstenkorn <ryan_gerstenkorn@fastmail.fm>
Reviewed by: jilles, eadler
MFC after: 3 days

10 years agomove devd rules for zfs events into a separate file and fix stale event types
avg [Fri, 14 Feb 2014 15:31:48 +0000 (15:31 +0000)]
move devd rules for zfs events into a separate file and fix stale event types

Also, extend with some new events.
Additionally, tag syslog messages with 'ZFS' instead of using explicit "ZFS: "
prefix in the messages themselves.

Tested by: Daniel O'Connor <doconnor@gsoft.com.au>
MFC after: 8 days
Sponsored by: HybridCluster

10 years agozfs.8: fix garbled options in a sample zfs send -R command line
avg [Fri, 14 Feb 2014 15:21:21 +0000 (15:21 +0000)]
zfs.8: fix garbled options in a sample zfs send -R command line

MFC after: 5 days

10 years agozpool.8: fix typo in option description of labelclear command
avg [Fri, 14 Feb 2014 15:20:49 +0000 (15:20 +0000)]
zpool.8: fix typo in option description of labelclear command

MFC after: 5 days

10 years agoprovide fast versions of ffsl and flsl for i386; ffsll and flsll for amd64
avg [Fri, 14 Feb 2014 15:18:37 +0000 (15:18 +0000)]
provide fast versions of ffsl and flsl for i386; ffsll and flsll for amd64

Reviewed by: jhb
MFC after: 10 days
X-MFC note: consider thirdparty modules depending on these symbols
Sponsored by: HybridCluster

10 years agoupdate taskqueue(9) manual page
avg [Fri, 14 Feb 2014 15:03:55 +0000 (15:03 +0000)]
update taskqueue(9) manual page

Many thanks to bjk, gjb and pluknet for improvements and suggestions.

MFC after: 5 days
Sponsored by: HybridCluster

10 years agoImport atf-0.20:
jmmv [Fri, 14 Feb 2014 14:44:03 +0000 (14:44 +0000)]
Import atf-0.20:

Experimental version released on February 7th, 2014.

This is the first release without the code for the deprecated tools.  If
you require such code, please fetch a copy of the 0.19 release and extract
the 'tools' directory for your own consumption.

* Removed the deprecated tools.  This includes atf-config, atf-report,
  atf-run and atf-version.

10 years agoImport atf-0.19:
jmmv [Fri, 14 Feb 2014 14:41:25 +0000 (14:41 +0000)]
Import atf-0.19:

Experimental version released on February 7th, 2014.

This is the last release to bundle the code for the deprecated tools.
The next release will drop their code and will stop worrying about
backwards compatibility between the ATF libraries and what the old tools
may or may not support.

If you still require the old tools for some reason, grab a copy of the
'tools' directory now.  The code in this directory is standalone and
does not depend on any internal details of atf-c++ any longer.

* Various fixes and improvements to support running as part of the FreeBSD
  test suite.

* Project hosting moved from Google Code (as a subproject of Kyua) to
  GitHub (as a first-class project).  The main reason for the change is
  the suppression of binary downloads in Google Code on Jan 15th, 2014.
  See https://github.com/jmmv/atf/

* Removed builtin help from atf-sh(1) and atf-check(1) for simplicity
  reasons.  In other words, their -h option is gone.

* Moved the code of the deprecated tools into a 'tools' directory and
  completely decoupled their code from the internals of atf-c++.  The
  reason for this is to painlessly allow a third-party to maintain a
  copy of these tools after we delete them because upcoming changes to
  atf-c++ would break the stale tools.

10 years agoIn sgetpwnam(), save and free pw_class like all other char members
brueffer [Fri, 14 Feb 2014 12:01:52 +0000 (12:01 +0000)]
In sgetpwnam(), save and free pw_class like all other char members
of struct passwd.  This fixes spurious "login_getclass: unknown class"
errors.

PR: 186439
Submitted by: UEMURA Tetsuya <t_uemura at macome.co.jp>
MFC after: 1 week

10 years agoCorrect the order of arguments to mtx_init().
brueffer [Fri, 14 Feb 2014 11:18:15 +0000 (11:18 +0000)]
Correct the order of arguments to mtx_init().

PR: 186701
Submitted by: Takanori Sawada <tak.swd at gmail.com>
MFC after: 2 weeks

10 years agoWhenever flowtable lookup fails, we do route lookup and then try to
glebius [Fri, 14 Feb 2014 10:56:26 +0000 (10:56 +0000)]
Whenever flowtable lookup fails, we do route lookup and then try to
insert flow entry. During the route lookup the critical section is
exited. It may happen, that after route lookup we will be executed
on an other CPU that already has such flowentry. Before this change
we simply freed the flowentry and returned to ip_output() with
failure.

Actually there is nothing wrong with using previously allocated
flow entry, updating it properly. Thus, make flowentry_insert()
return the new either old fle, and make use of it.

Count reuses as "collisions" and real inserts as "inserts".

Reviewed by: adrian
Sponsored by: Netflix
Sponsored by: Nginx, Inc.

10 years agoOnce pf became not covered by a single mutex, many counters in it became
glebius [Fri, 14 Feb 2014 10:05:21 +0000 (10:05 +0000)]
Once pf became not covered by a single mutex, many counters in it became
race prone. Some just gather statistics, but some are later used in
different calculations.

A real problem was the race provoked underflow of the states_cur counter
on a rule. Once it goes below zero, it wraps to UINT32_MAX. Later this
value is used in pf_state_expires() and any state created by this rule
is immediately expired.

Thus, make fields states_cur, states_tot and src_nodes of struct
pf_rule be counter(9)s.

Thanks to Dennis for providing me shell access to problematic box and
his help with reproducing, debugging and investigating the problem.

Thanks to: Dennis Yusupoff <dyr smartspb.net>
Also reported by: dumbbell, pgj, Rambler
Sponsored by: Nginx, Inc.

10 years agoBump __FreeBSD_version after the libc++ 3.4 ABI compatibility fix in
dim [Fri, 14 Feb 2014 08:42:39 +0000 (08:42 +0000)]
Bump __FreeBSD_version after the libc++ 3.4 ABI compatibility fix in
r261801.

Requested by: portmgr

10 years agoReword.
adrian [Fri, 14 Feb 2014 07:43:39 +0000 (07:43 +0000)]
Reword.

Suggestion: glebius

10 years agoFix minor logical error in the XHCI driver. Set correct SETUP packet
hselasky [Fri, 14 Feb 2014 07:17:36 +0000 (07:17 +0000)]
Fix minor logical error in the XHCI driver. Set correct SETUP packet
direction value.

MFC after: 2 days
Reported by: Horse Ma <HMa@wyse.com>

10 years agoEnable use of the PCIe connected wifi on the DB120 (AR9344) board.
adrian [Fri, 14 Feb 2014 05:25:15 +0000 (05:25 +0000)]
Enable use of the PCIe connected wifi on the DB120 (AR9344) board.

The on-board NIC is an 3x3 AR9380 with 5GHz only.

* enable pci code in AR9344_BASE
* enable ath_pci and the firmware loading bits in DB120
* add in the relevant hints in DB120.hints to inform the probe/attach
  code where the PCIe fixup data is for the onboard chip.

This is only relevant for a default development board.  I also have a
DB120 with the on-board PCIe wifi NIC disabled and it's exposed as
a real PCIe slot (to put normal PCIe NICs in); the fixup code will need
to be disabled to make this work correctly.

Tested:

* DB120

10 years agoDisable this check for now; it fails on the AR9344 PCI fixup code.
adrian [Fri, 14 Feb 2014 05:22:28 +0000 (05:22 +0000)]
Disable this check for now; it fails on the AR9344 PCI fixup code.

I'll make it conditional later.

Tested:

* DB120

10 years agoAdd the ath0 EEPROM hints required to detect the on-chip wifi.
adrian [Fri, 14 Feb 2014 04:03:17 +0000 (04:03 +0000)]
Add the ath0 EEPROM hints required to detect the on-chip wifi.

This allows the on-chip wifi to work; however it's not yet fully
tested.

ath0: Vendor=0x168c, Device=0x0031
ath0: Vendor=0x168c, Device=0x0031
ath0: <Atheros AR934x> at mem 0x18100000-0x1811ffff irq 0 on nexus0
...
ath0: [HT] enabling HT modes
ath0: [HT] enabling short-GI in 20MHz mode
ath0: [HT] 1 stream STBC receive enabled
ath0: [HT] 1 stream STBC transmit enabled
ath0: [HT] 2 RX streams; 2 TX streams

Tested:

* DB120 development board

10 years agoFix-up r254141: in the process of making a failing vm_page_rename()
attilio [Fri, 14 Feb 2014 03:34:12 +0000 (03:34 +0000)]
Fix-up r254141: in the process of making a failing vm_page_rename()
a call of pager_swap_freespace() was moved around, now leading to freeing
the incorrect page because of the pindex changes after vm_page_rename().

Get back to use the correct pindex when destroying the swap space.

Sponsored by: EMC / Isilon storage division
Reported by: avg
Tested by: pho
MFC after: 7 days

10 years agoAdd urtwn_start_locked() to avoid unlocking during TX.
rpaulo [Fri, 14 Feb 2014 01:47:12 +0000 (01:47 +0000)]
Add urtwn_start_locked() to avoid unlocking during TX.

10 years agocheck for defrag only when bus_dmamap_load_mbuf_sg() returns EFBIG. Comment in
davidcs [Fri, 14 Feb 2014 01:02:06 +0000 (01:02 +0000)]
check for defrag only when bus_dmamap_load_mbuf_sg() returns EFBIG. Comment in
qla_hw_send is moot.

10 years agoDon't insert a flowtable entry if the lle isn't yet valid.
adrian [Fri, 14 Feb 2014 00:05:09 +0000 (00:05 +0000)]
Don't insert a flowtable entry if the lle isn't yet valid.

Some of the collisions that are occuring are due to flowtable lookups
that succeed but have an invalid lle - typically because the L2 adjacency
lookup hasn't completed.  This would lead to a follow-up insert which
would then fail (ie, collision) and the code would fall through to doing
a slow-path L2/L3 lookup in the netinet/netinet6 code.

This patch simply aborts storing a new flowtable entry if the lle isn't
yet valid.

Whilst I'm here, add a new pcpu counter for the item so the number of
failures can be tracked separately from generic "collisions."

Reviewed by: glebius
MFC after: 10 days
Sponsored by: Netflix, Inc.

10 years agoFix a bug in be_uuid_dec(); it called le16dec() instead of be16dec(),
brueffer [Thu, 13 Feb 2014 22:24:36 +0000 (22:24 +0000)]
Fix a bug in be_uuid_dec(); it called le16dec() instead of be16dec(),
probably due to copy+pasting le_uuid_dec().

PR: 146588
Submitted by: Erwin Rol <erwin at erwinrol.com>
Reviewed by: marcel
MFC after: 1 week

10 years agoAllow the kernel to be loaded at any 1MiB address. This requirement is
andrew [Thu, 13 Feb 2014 21:30:54 +0000 (21:30 +0000)]
Allow the kernel to be loaded at any 1MiB address. This requirement is
because we use the 1MiB section maps as they only need a single pagetable.

To allow this we only use pc relative loads to ensure we only load from
physical addresses until we are running from a known virtual address.

As a side effect any data from before or 64MiB after the kernel needs to
be mapped in to be used. This should not be an issue for kernels loaded
with ubldr as it places this data just after the kernel. It will be a
problem when loading directly from anything using the Linux ABI that
places the ATAG data outside this range, for example U-Boot.

10 years agoRemove a couple obsolete function declarations.
ian [Thu, 13 Feb 2014 19:14:23 +0000 (19:14 +0000)]
Remove a couple obsolete function declarations.

10 years agoFurther simplify nd6_output_lle.
melifaro [Thu, 13 Feb 2014 19:09:04 +0000 (19:09 +0000)]
Further simplify nd6_output_lle.
Currently we have 3 usage patterns:
1) nd6_output (most traffic flow, no lle supplied, lle RLOCK sufficient)
2) corner cases for output (no lle, STALE lle, so on). lle WLOCK needed.
3) nd* iunternal machinery (WLOCK'ed lle provided, perform packet queing).

We separate case 1 and implement it inside its only customer - nd6_output.
This leads to some code duplication (especialy SEND stuff, which should be
hooked to output in a different way), but simplifies locking and control
flow logic fir nd6_output_lle.

Reviewed by: ae
MFC after: 3 weeks
Sponsored by: Yandex LLC

10 years agoMake the gpioled(4) work out of the box on BBB.
loos [Thu, 13 Feb 2014 18:51:37 +0000 (18:51 +0000)]
Make the gpioled(4) work out of the box on BBB.

Add gpioled(4) to BEAGLEBONE kernel and add the description of the four
on-board leds of beaglebone-black to its DTS file.

Approved by: adrian (mentor, implicit)

10 years agoAllow the use of the OFW GPIO bus for ti_gpio and bcm2835_gpio. With this
loos [Thu, 13 Feb 2014 18:42:23 +0000 (18:42 +0000)]
Allow the use of the OFW GPIO bus for ti_gpio and bcm2835_gpio.  With this
change the gpio children can be described as directly connected to the GPIO
controller without the need of describing the OFW GPIO bus itself on the
DTS file.

With this commit the OFW GPIO bus is fully functional on BBB and RPi.

GPIO controllers which want to use the OFW GPIO bus will need similar
changes.

Approved by: adrian (mentor, implicit)

10 years agoAllow the use of OFW I2C bus together with iicbb(4) on OFW-based systems.
loos [Thu, 13 Feb 2014 18:22:49 +0000 (18:22 +0000)]
Allow the use of OFW I2C bus together with iicbb(4) on OFW-based systems.

This change makes ofw_iicbus attach to iicbb(4) controllers in addition to
the already supported i2c host bridges (iichb).

On iicbb(4) allow the direct access of the OFW parent node by its children,
so they can be directly attached to iicbb(4) node on the DTS without the
need of describing the i2c bus.

Approved by: adrian (mentor, implicit)

10 years agoAdd OFW support to the in tree gpio compatible devices: gpioiic(4) and
loos [Thu, 13 Feb 2014 17:58:52 +0000 (17:58 +0000)]
Add OFW support to the in tree gpio compatible devices: gpioiic(4) and
gpioled(4).

Tested on RPi and BBB (using the hardware I2C controller and gpioiic(4) for
the I2C tests).  It was also verified for regressions on RSPRO (MIPS/ar71xx)
used as reference for a non OFW-based system.

Update the gpioled(4) and gpioiic(4) man pages with some details and
examples about the FDT/OFW support.

Some compatibility details pointed out by imp@ will follow in subsequent
commits.

Approved by: adrian (mentor, implicit)