freebsd.git
8 years agoAdd a missing section to a cross-reference.
jhb [Tue, 10 May 2016 16:13:54 +0000 (16:13 +0000)]
Add a missing section to a cross-reference.

While here, add bus_space(9) to the SEE ALSO section.

8 years agoAdd "camcontrol reprobe" subcommand, and implement it for da(4).
trasz [Tue, 10 May 2016 15:46:33 +0000 (15:46 +0000)]
Add "camcontrol reprobe" subcommand, and implement it for da(4).
This makes it possible to manually force updating capacity data
after the disk got resized. Without it it might be neccessary to
reboot before FreeBSD notices updated disk size under eg VMWare.

Discussed with: imp@
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D6108

8 years agoPush the logic to talk with the MSI/MSI-X interrupt controller to the FDT
andrew [Tue, 10 May 2016 15:45:59 +0000 (15:45 +0000)]
Push the logic to talk with the MSI/MSI-X interrupt controller to the FDT
attachment. This is where it will live when we import intrng as it will
need to look at either the msi-parent or msi-map FDT properties.

Obtained from: ABT Systems Ltd
Sponsored by: The FreeBSD Foundation

8 years agoRemove NULL checks after M_WAITOK allocations from mpr(4).
trasz [Tue, 10 May 2016 15:04:24 +0000 (15:04 +0000)]
Remove NULL checks after M_WAITOK allocations from mpr(4).

Reviewed by: asomers@
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D6297

8 years agosiba depends on bhndbus; add the device to the kernel config.
bz [Tue, 10 May 2016 14:59:48 +0000 (14:59 +0000)]
siba depends on bhndbus; add the device to the kernel config.
This gets us past compiling and now only linking is failing on builtins.

8 years agoRemove NULL checks after M_WAITOK allocations from mps(4).
trasz [Tue, 10 May 2016 14:57:14 +0000 (14:57 +0000)]
Remove NULL checks after M_WAITOK allocations from mps(4).

Reviewed by: asomers@
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D6296

8 years agobsdinstall/zfsboot: Do not mirror swap when swapsize is 0
allanjude [Tue, 10 May 2016 14:38:43 +0000 (14:38 +0000)]
bsdinstall/zfsboot: Do not mirror swap when swapsize is 0

PR: 209415
Submitted by: Ganael LAPLANCHE <ganael.laplanche@corp.ovh.com>
MFC after: 2 weeks

8 years agoCapitalize "LDAP" in the description field of the _ypldap entry.
bcr [Tue, 10 May 2016 12:47:36 +0000 (12:47 +0000)]
Capitalize "LDAP" in the description field of the _ypldap entry.

Reviewed by: bapt
MFC after: 5 days
Differential Revision: https://reviews.freebsd.org/D5267

8 years agoAdd more LinuxKPI I/O functions.
hselasky [Tue, 10 May 2016 12:04:57 +0000 (12:04 +0000)]
Add more LinuxKPI I/O functions.

Obtained from: kmacy @
MFC after: 1 week
Sponsored by: Mellanox Technologies

8 years agoUse function macros when possible to avoid stray substitutions.
hselasky [Tue, 10 May 2016 11:39:36 +0000 (11:39 +0000)]
Use function macros when possible to avoid stray substitutions.

MFC after: 1 week
Sponsored by: Mellanox Technologies

8 years agoRename getline with get_line to avoid collision with getline(3)
bapt [Tue, 10 May 2016 11:35:03 +0000 (11:35 +0000)]
Rename getline with get_line to avoid collision with getline(3)

When getline(3) in 2009 was added a _WITH_GETLINE guard has also been added.
This rename is made in preparation for the removal of this guard

8 years agoAdd missing semicolon and properly wrap macro argument.
hselasky [Tue, 10 May 2016 11:34:22 +0000 (11:34 +0000)]
Add missing semicolon and properly wrap macro argument.

MFC after: 1 week
Sponsored by: Mellanox Technologies

8 years agoAllow the argument for the cpu_to_xxxp() and xxx_to_cpup() macros to
hselasky [Tue, 10 May 2016 11:31:00 +0000 (11:31 +0000)]
Allow the argument for the cpu_to_xxxp() and xxx_to_cpup() macros to
point to a constant.

Obtained from: kmacy @
MFC after: 1 week
Sponsored by: Mellanox Technologies

8 years agoDirectly set the NONBLOCK flags when creating the socket
bapt [Tue, 10 May 2016 11:18:53 +0000 (11:18 +0000)]
Directly set the NONBLOCK flags when creating the socket

No functional changes

8 years agoRename getline with get_line to avoid collision with getline(3)
bapt [Tue, 10 May 2016 11:17:36 +0000 (11:17 +0000)]
Rename getline with get_line to avoid collision with getline(3)

When getline(3) in 2009 was added a _WITH_GETLINE guard has also been added.
This rename is made in preparation for the removal of this guard

8 years agoRename getline with get_line to avoid collision with getline(3)
bapt [Tue, 10 May 2016 11:17:19 +0000 (11:17 +0000)]
Rename getline with get_line to avoid collision with getline(3)

When getline(3) in 2009 was added a _WITH_GETLINE guard has also been added.
This rename is made in preparation for the removal of this guard

8 years agoRename getline with get_line to avoid collision with getline(3)
bapt [Tue, 10 May 2016 11:12:31 +0000 (11:12 +0000)]
Rename getline with get_line to avoid collision with getline(3)

When getline(3) in 2009 was added a _WITH_GETLINE guard has also been added.
This rename is made in preparation for the removal of this guard

8 years agoRename getline with get_line to avoid collision with getline(3)
bapt [Tue, 10 May 2016 11:11:23 +0000 (11:11 +0000)]
Rename getline with get_line to avoid collision with getline(3)

When getline(3) in 2009 was added a _WITH_GETLINE guard has also been added.
This rename is made in preparation for the removal of this guard

Obtained from: NetBSD

8 years agoRename getline with get_line to avoid collision with getline(3)
bapt [Tue, 10 May 2016 11:09:26 +0000 (11:09 +0000)]
Rename getline with get_line to avoid collision with getline(3)

When getline(3) in 2009 was added a _WITH_GETLINE guard has also been added.
This rename is made in preparation for the removal of this guard

Obtained from: OpenBSD

8 years agoRemove misc NULL checks after M_WAITOK allocations.
trasz [Tue, 10 May 2016 10:26:07 +0000 (10:26 +0000)]
Remove misc NULL checks after M_WAITOK allocations.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agoRemove NULL check after M_WAITOK allocations from mfi(4).
trasz [Tue, 10 May 2016 10:24:35 +0000 (10:24 +0000)]
Remove NULL check after M_WAITOK allocations from mfi(4).

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agoRemove NULL checks after M_WAITOK allocations from firewire.
trasz [Tue, 10 May 2016 10:21:03 +0000 (10:21 +0000)]
Remove NULL checks after M_WAITOK allocations from firewire.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agoAdd locking annotations to amd64 struct md_page members.
kib [Tue, 10 May 2016 09:58:51 +0000 (09:58 +0000)]
Add locking annotations to amd64 struct md_page members.

Reviewed by: alc
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

8 years agoRefactor the root mount hold code and add the wait to etc/rc.d/fsck.
trasz [Tue, 10 May 2016 08:44:44 +0000 (08:44 +0000)]
Refactor the root mount hold code and add the wait to etc/rc.d/fsck.
This fixes mounting (non-root) USB drives on boot with fsck enabled
(with non-zero 'Pass#' field in fstab(5)).

Reported by: Graham Menhennitt <graham at menhennitt.com.au>
Reviewed by: jilles@
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D6221

8 years agoFix previous commit to report proper error code.
mav [Tue, 10 May 2016 08:37:41 +0000 (08:37 +0000)]
Fix previous commit to report proper error code.

MFC after: 2 weeks

8 years agoValidate XCOPY range offsets and lengths.
mav [Tue, 10 May 2016 08:28:16 +0000 (08:28 +0000)]
Validate XCOPY range offsets and lengths.

MFC after: 2 weeks

8 years agoMore XCOPY parameters validation.
mav [Tue, 10 May 2016 08:08:39 +0000 (08:08 +0000)]
More XCOPY parameters validation.

MFC after: 2 weeks

8 years agosfxge(4): cleanup: fix typo
arybchik [Tue, 10 May 2016 08:00:40 +0000 (08:00 +0000)]
sfxge(4): cleanup: fix typo

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week

8 years agosfxge(4): cleanup: remove unneeded include files
arybchik [Tue, 10 May 2016 07:59:23 +0000 (07:59 +0000)]
sfxge(4): cleanup: remove unneeded include files

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week

8 years agoRename dprintf into dbg_printf to avoid collision with dprintf(3)
bapt [Tue, 10 May 2016 07:52:17 +0000 (07:52 +0000)]
Rename dprintf into dbg_printf to avoid collision with dprintf(3)

When dprintf(3) in 2009 was added a _WITH_DPRINTF guard has also been added.
This rename is made in preparation for the removal of this guard

8 years agorename getline into zgetline to avoid collision with getline(3)
bapt [Tue, 10 May 2016 07:50:57 +0000 (07:50 +0000)]
rename getline into zgetline to avoid collision with getline(3)

When getline(3) in 2009 was added a _WITH_GETLINE guard has also been added.
This rename is made in preparation for the removal of this guard

Obtained from: NetBSD

8 years agoRename dprintf into dbg_printf to avoid collision with dprintf(3)
bapt [Tue, 10 May 2016 07:45:44 +0000 (07:45 +0000)]
Rename dprintf into dbg_printf to avoid collision with dprintf(3)

When dprintf(3) in 2009 was added a _WITH_DPRINTF guard has also been added.
This rename is made in preparation for the removal of this guard

8 years agosfxge(4): cleanup: remove unused efx_infer_family()
arybchik [Tue, 10 May 2016 07:42:18 +0000 (07:42 +0000)]
sfxge(4): cleanup: remove unused efx_infer_family()

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week

8 years agosfxge(4): cleanup: remove obsolete common code module
arybchik [Tue, 10 May 2016 07:40:03 +0000 (07:40 +0000)]
sfxge(4): cleanup: remove obsolete common code module

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week

8 years agosfxge(4): cleanup: fix typos
arybchik [Tue, 10 May 2016 07:38:23 +0000 (07:38 +0000)]
sfxge(4): cleanup: fix typos

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week

8 years agosfxge(4): cleanup efx_check.h comments and error messages
arybchik [Tue, 10 May 2016 07:22:19 +0000 (07:22 +0000)]
sfxge(4): cleanup efx_check.h comments and error messages

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week

8 years agosfxge(4): remove EFSYS_OPT_PHY_TXC43128
arybchik [Tue, 10 May 2016 07:21:14 +0000 (07:21 +0000)]
sfxge(4): remove EFSYS_OPT_PHY_TXC43128

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week

8 years agosfxge(4): remove EFSYS_OPT_PHY_SFX7101
arybchik [Tue, 10 May 2016 07:20:18 +0000 (07:20 +0000)]
sfxge(4): remove EFSYS_OPT_PHY_SFX7101

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week

8 years agosfxge(4): remove EFSYS_OPT_PHY_SFT9001
arybchik [Tue, 10 May 2016 07:19:15 +0000 (07:19 +0000)]
sfxge(4): remove EFSYS_OPT_PHY_SFT9001

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week

8 years agosfxge(4): remove EFSYS_OPT_PHY_QT2025C
arybchik [Tue, 10 May 2016 07:18:18 +0000 (07:18 +0000)]
sfxge(4): remove EFSYS_OPT_PHY_QT2025C

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week

8 years agosfxge(4): remove EFSYS_OPT_PHY_QT2022C2
arybchik [Tue, 10 May 2016 07:17:08 +0000 (07:17 +0000)]
sfxge(4): remove EFSYS_OPT_PHY_QT2022C2

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week

8 years agosfxge(4): remove EFSYS_OPT_PHY_NULL
arybchik [Tue, 10 May 2016 07:15:57 +0000 (07:15 +0000)]
sfxge(4): remove EFSYS_OPT_PHY_NULL

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week

8 years agosfxge(4): remove EFSYS_OPT_NVRAM_SFX7101
arybchik [Tue, 10 May 2016 07:15:09 +0000 (07:15 +0000)]
sfxge(4): remove EFSYS_OPT_NVRAM_SFX7101

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week

8 years agoImprove validation of some POPULATE TOKEN parameters.
mav [Tue, 10 May 2016 07:14:49 +0000 (07:14 +0000)]
Improve validation of some POPULATE TOKEN parameters.

MFC after: 2 weeks

8 years agosfxge(4): remove EFSYS_OPT_NVRAM_SFT9001
arybchik [Tue, 10 May 2016 07:13:45 +0000 (07:13 +0000)]
sfxge(4): remove EFSYS_OPT_NVRAM_SFT9001

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week

8 years agosfxge(4): remove EFSYS_OPT_FALCON_BOOTROM
arybchik [Tue, 10 May 2016 07:12:27 +0000 (07:12 +0000)]
sfxge(4): remove EFSYS_OPT_FALCON_BOOTROM

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week

8 years agosfxge(4): remove EFSYS_OPT_MON_NULL
arybchik [Tue, 10 May 2016 07:11:09 +0000 (07:11 +0000)]
sfxge(4): remove EFSYS_OPT_MON_NULL

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week

8 years agosfxge(4): remove EFSYS_OPT_MON_MAX6647
arybchik [Tue, 10 May 2016 07:09:18 +0000 (07:09 +0000)]
sfxge(4): remove EFSYS_OPT_MON_MAX6647

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week

8 years agosfxge(4): remove EFSYS_OPT_MON_LM87
arybchik [Tue, 10 May 2016 07:08:40 +0000 (07:08 +0000)]
sfxge(4): remove EFSYS_OPT_MON_LM87

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week

8 years agosfxge(4): remove EFSYS_OPT_MAC_FALCON_XMAC
arybchik [Tue, 10 May 2016 07:07:49 +0000 (07:07 +0000)]
sfxge(4): remove EFSYS_OPT_MAC_FALCON_XMAC

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week

8 years agosfxge(4): remove EFSYS_OPT_MAC_FALCON_GMAC
arybchik [Tue, 10 May 2016 07:06:44 +0000 (07:06 +0000)]
sfxge(4): remove EFSYS_OPT_MAC_FALCON_GMAC

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week

8 years agosfxge(4): remove EFSYS_OPT_FALCON_NIC_CFG_OVERRIDE
arybchik [Tue, 10 May 2016 07:02:59 +0000 (07:02 +0000)]
sfxge(4): remove EFSYS_OPT_FALCON_NIC_CFG_OVERRIDE

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week

8 years agosfxge(4): remove EFSYS_OPT_FALCON
arybchik [Tue, 10 May 2016 07:01:06 +0000 (07:01 +0000)]
sfxge(4): remove EFSYS_OPT_FALCON

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week

8 years agosfxge(4): add TLV item manipulation functions to common code
arybchik [Tue, 10 May 2016 06:53:38 +0000 (06:53 +0000)]
sfxge(4): add TLV item manipulation functions to common code

Add creation, deletion and checksumming operations to the private copy of
TLV functions in the common code.  Functions added in preparation for V3
licensing support, as licensing keys are stored in the TLV format.  Missing
support for multiple segment partitions added. Annotations for Windows code
analysis also updated.

Submitted by:   Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D6264

8 years agosfxge(4): restructure TLV buffer validation
arybchik [Tue, 10 May 2016 06:51:20 +0000 (06:51 +0000)]
sfxge(4): restructure TLV buffer validation

Move TLV buffer validation into ef10-specific function and add accessor
function which also converts the partition ID to the internal
representation.

Submitted by:   Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D6263

8 years agoRevert r299292, which was not a mismerge. It has an additional horrible
gjb [Tue, 10 May 2016 05:47:25 +0000 (05:47 +0000)]
Revert r299292, which was not a mismerge.  It has an additional horrible
side effect of replacing /etc/{master.,}passwd and /etc/group.

Submitted by: O. Hartmann
Pointyhat to: gjb (myself)
Sponsored by: The FreeBSD Foundation

8 years ago[siba] migrate siba.c to siba_mips.c
adrian [Tue, 10 May 2016 05:05:23 +0000 (05:05 +0000)]
[siba] migrate siba.c to siba_mips.c

Turns out that ye olde siba.c is /just/ the siba mips code (used by
the initial SENTRY5 port.  However, I don't think it was ever
finished enough to be useful, and I do have this nagging feeling
that we'll eventually replace it with the bhnd code.

But, since bhnd(4) introduced siba.c too, we ended up with a
source file name clash, and that broke the SENTRY5 build.

It /looks/ like this is the only place siba.c / device siba is
used.

8 years agotcp/syncache: Add comment for syncache_respond
sephe [Tue, 10 May 2016 04:59:04 +0000 (04:59 +0000)]
tcp/syncache: Add comment for syncache_respond

Suggested by: hiren, hps
Reviewed by: sbruno
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6148

8 years ago[bhnd] fix bcma resource allocation for regions; EROM work around.
adrian [Tue, 10 May 2016 04:55:57 +0000 (04:55 +0000)]
[bhnd] fix bcma resource allocation for regions; EROM work around.

* bcma.c - assign different resource IDs for different regions
* bcma_erom.c - workaround for BCM/MIPS bus enumerations

Tested:

* (submitter) Tested on ASUS RT-N16 initially, double checked on ASUS RT-N53
* (landonf) BCM4331

Submitted by: Michael Zhilin <mizkha@gmail.com>
Differential Revision: https://reviews.freebsd.org/D6245

8 years agoBump date. Forgotten in r299312.
imp [Tue, 10 May 2016 04:01:04 +0000 (04:01 +0000)]
Bump date. Forgotten in r299312.

8 years agoDocument g_reset_bio(). This is long overdue. g_reset_bio will reset
imp [Tue, 10 May 2016 03:57:47 +0000 (03:57 +0000)]
Document g_reset_bio(). This is long overdue. g_reset_bio will reset
the bio to a pristine state should you wish to re-use it for another
I/O without freeing it. In the bast, a simple bzero was done to do
this, but that may not be sufficient in the future when the bio may
contain state that's not part of the documented API. Besides, it makes
the code clearer as to the intent...

Noticed by: smh@

8 years agoDon't store generated firmware object files in the source directory.
jhb [Tue, 10 May 2016 03:34:20 +0000 (03:34 +0000)]
Don't store generated firmware object files in the source directory.

Trim the leading directory of a firmware source file from the resulting
target object file name so the object file is stored in the object
directory. Previously, using 'FIRMWS= /path/to/fw.bin:fw.bin' would
store the generated 'fw.bin.fwo' file in the /path/to directory. Now
it stores it in the object directory of the kernel module being built.

Reviewed by: bdrewery
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D6285

8 years agoForward declare 'struct cpl_set_tcb_rpl' before including t4_tom.h.
jhb [Tue, 10 May 2016 03:32:22 +0000 (03:32 +0000)]
Forward declare 'struct cpl_set_tcb_rpl' before including t4_tom.h.

8 years agoRevert r299279:
pfg [Tue, 10 May 2016 02:02:50 +0000 (02:02 +0000)]
Revert r299279:
Simplify redundant malloc'ing in sed -e.

It is causing havoc in the ports tree:

===>  Configuring for wxsvg-1.5.7
sed: 1: "/gcc_dir=\\`/s/gcc /$CC /": bad flag in substitute command: '/'
*** Error code 1

===>  Patching for vips-8.3.1
sed: 1: "1s|^#![[:space:]]*/usr/ ...": bad flag in substitute command: 's'
*** Error code 1

PR: 195929
Reported by: danilo

8 years agoUpdate share/examples/* to properly install /usr/share/examples.
gjb [Tue, 10 May 2016 00:51:50 +0000 (00:51 +0000)]
Update share/examples/* to properly install /usr/share/examples.

As result of this, a new examples package is now created.

Note, this is only effective with 'SHARED=copies' (the default),
as the 'SHARED=symlinks' mechanism will create a symlink to the
source tree version of the file(s).

Sponsored by: The FreeBSD Foundation

8 years agoCombine the 'reinstall' and 'restage' targets, which appears to have
gjb [Tue, 10 May 2016 00:47:49 +0000 (00:47 +0000)]
Combine the 'reinstall' and 'restage' targets, which appears to have
been a mismerge.

Sponsored by: The FreeBSD Foundation

8 years agoAdd (commented) 'vital' flag to the runtime packages. Support for
gjb [Tue, 10 May 2016 00:38:14 +0000 (00:38 +0000)]
Add (commented) 'vital' flag to the runtime packages.  Support for
it is expected in pkg-1.8.0, which will cause 'pkg del -afy' to not
destroy a system by forcefully removing everything.

As there are valid use cases for doing such (test jails, for example),
it will be overrideable.

In addition, ensure /dev and /tmp exist, as /dev is not created by
default currently, and pkg(8) requires /tmp to exist, which is also
not created by default.

This needs to be moved to the clibs package, since runtime depends on
that package, however I need to first verify that it will work as it
is expected.

Sponsored by: The FreeBSD Foundation

8 years agoRemove obsolescent comments from nd6_purge().
markj [Mon, 9 May 2016 23:43:12 +0000 (23:43 +0000)]
Remove obsolescent comments from nd6_purge().

MFC after: 1 week

8 years agoDIRDEPS_BUILD: Run the staged bootstrap-tools version of build-tools.
bdrewery [Mon, 9 May 2016 22:21:09 +0000 (22:21 +0000)]
DIRDEPS_BUILD: Run the staged bootstrap-tools version of build-tools.

This avoids running target binaries.

Sponsored by: EMC / Isilon Storage Division

8 years agoRationalize license numbering
bapt [Mon, 9 May 2016 20:55:35 +0000 (20:55 +0000)]
Rationalize license numbering

8 years agoSome style(9) fixes
bapt [Mon, 9 May 2016 20:55:00 +0000 (20:55 +0000)]
Some style(9) fixes

No functional changes

Obtained from: OpenBSD

8 years agoAdd a new bus method to fetch device-specific CPU sets.
jhb [Mon, 9 May 2016 20:50:21 +0000 (20:50 +0000)]
Add a new bus method to fetch device-specific CPU sets.

bus_get_cpus() returns a specified set of CPUs for a device.  It accepts
an enum for the second parameter that indicates the type of cpuset to
request.  Currently two valus are supported:

 - LOCAL_CPUS (on x86 this returns all the CPUs in the package closest to
   the device when DEVICE_NUMA is enabled)
 - INTR_CPUS (like LOCAL_CPUS but only returns 1 SMT thread for each core)

For systems that do not support NUMA (or if it is not enabled in the kernel
config), LOCAL_CPUS fails with EINVAL.  INTR_CPUS is mapped to 'all_cpus'
by default.  The idea is that INTR_CPUS should always return a valid set.

Device drivers which want to use per-CPU interrupts should start using
INTR_CPUS instead of simply assigning interrupts to all available CPUs.
In the future we may wish to add tunables to control the policy of
INTR_CPUS (e.g. should it be local-only or global, should it ignore
SMT threads or not).

The x86 nexus driver exposes the internal set of interrupt CPUs from the
the x86 interrupt code via INTR_CPUS.

The ACPI bus driver and PCI bridge drivers use _PXM to return a suitable
LOCAL_CPUS set when _PXM exists and DEVICE_NUMA is enabled.  They also and
the global INTR_CPUS set from the nexus driver with the per-domain set from
_PXM to generate a local INTR_CPUS set for child devices.

Compared to the r298933, this version uses 'struct _cpuset' in
<sys/bus.h> instead of 'cpuset_t' to avoid requiring <sys/param.h>
(<sys/_cpuset.h> still requires <sys/param.h> for MAXCPU even though
<sys/_bitset.h> does not after recent changes).

8 years agoAdd myself (woodsb02) to the calendar.freebsd file
woodsb02 [Mon, 9 May 2016 20:21:49 +0000 (20:21 +0000)]
Add myself (woodsb02) to the calendar.freebsd file

Approved by: adamw (mentor)
Differential Revision: https://reviews.freebsd.org/D6276

8 years agoReplace fparseln(3) with getline(3) to remove dependency on libutil
bapt [Mon, 9 May 2016 20:04:22 +0000 (20:04 +0000)]
Replace fparseln(3) with getline(3) to remove dependency on libutil

8 years agoForward declare 'struct cpl_set_tcb_rpl' before including t4_tom.h.
jhb [Mon, 9 May 2016 20:01:34 +0000 (20:01 +0000)]
Forward declare 'struct cpl_set_tcb_rpl' before including t4_tom.h.

Other structures needed by prototypes in t4_tom.h are explicitly
declared in this file, so adding the prototype here seems most
consistent with existing code.

8 years agoAdd myself (woodsb02) as ports committer, and update mentor/mentee relationships
woodsb02 [Mon, 9 May 2016 20:01:18 +0000 (20:01 +0000)]
Add myself (woodsb02) as ports committer, and update mentor/mentee relationships

Approved by: adamw (mentor)
Differential Revision: https://reviews.freebsd.org/D6275

8 years agootus: minor catchup with OpenBSD.
pfg [Mon, 9 May 2016 19:28:22 +0000 (19:28 +0000)]
otus: minor catchup with OpenBSD.

Bump the OpenBSD revision tag since the corresponding changes don't
apply to us and drop an unnecessary header.

No functional change.

8 years agoAdd an option to use rfc6675 based pipe/inflight bytes calculation in htcp.
hiren [Mon, 9 May 2016 19:19:03 +0000 (19:19 +0000)]
Add an option to use rfc6675 based pipe/inflight bytes calculation in htcp.

Submitted by: Kevin Bowling <kevin.bowling@kev009.com>
MFC after: 1 week
Sponsored by: Limelight Networks

8 years agoSimplify redundant malloc'ing in sed -e.
pfg [Mon, 9 May 2016 18:53:46 +0000 (18:53 +0000)]
Simplify redundant malloc'ing in sed -e.

When encountering an -e argument, sed currently mallocs a string to COPY
the optarg -- with '\n' appended. The appendage does not seem necessary --
indeed, the same call to add_compunit processing the sole command (given
without -e) passes the *argv verbatim: without making a copy, and without
appending newline.

This matches what is done in other BSDs.

Submitted by: Mikhail T.
PR: 195929
MFC after: 2 weeks

8 years ago[bhnd] fix incorrect typing.
adrian [Mon, 9 May 2016 17:19:17 +0000 (17:19 +0000)]
[bhnd] fix incorrect typing.

Pointed out by: emaste

8 years agoUpdates to mpr driver man page.
slm [Mon, 9 May 2016 16:42:46 +0000 (16:42 +0000)]
Updates to mpr driver man page.

- Add 3216 and 3224 support.
- Add SSU, chain_alloc_fail, and spinup_wait_time information.
- Clear up some sentences.
- Correct some typos.

Reviewed by:    ken, scottl, ambrisko, asomers, wblock
Approved by: ken, scottl, ambrisko
MFC after:      1 week
Differential Revision: https://reviews.freebsd.org/D6104

8 years agoBump version of mpr driver to 13.00.00.00-fbsd
slm [Mon, 9 May 2016 16:38:51 +0000 (16:38 +0000)]
Bump version of mpr driver to 13.00.00.00-fbsd

Approved by: ken, scottl, ambrisko
MFC after:      1 week

8 years agoDisks can go missing until a reboot is done in some cases.
slm [Mon, 9 May 2016 16:36:40 +0000 (16:36 +0000)]
Disks can go missing until a reboot is done in some cases.

This is due to the DevHandle not being released, which causes the Firmware to
not allow that disk to be re-added.

Reviewed by:    ken, scottl, ambrisko, asomers
Approved by: ken, scottl, ambrisko
MFC after:      1 week
Differential Revision: https://reviews.freebsd.org/D6102

8 years agoCleanup a comment.
tuexen [Mon, 9 May 2016 16:35:05 +0000 (16:35 +0000)]
Cleanup a comment.

MFC after: 1 week

8 years agodone_ccb pointer can be used if it is NULL.
slm [Mon, 9 May 2016 16:34:06 +0000 (16:34 +0000)]
done_ccb pointer can be used if it is NULL.

To prevent this, move check for done_ccb == NULL to before done_ccb is used in
mprsas_stop_unit_done().

Reviewed by:    ken, scottl, ambrisko, asomers
Approved by: ken, scottl, ambrisko
MFC after:      1 week
Differential Revision: https://reviews.freebsd.org/D6099

8 years agoUse callout_reset_sbt() instead of callout_reset() if FreeBSD ver is >= 1000029
slm [Mon, 9 May 2016 16:31:43 +0000 (16:31 +0000)]
Use callout_reset_sbt() instead of callout_reset() if FreeBSD ver is >= 1000029

Reviewed by:    ken, scottl, ambrisko, asomers
Approved by: ken, scottl, ambrisko
MFC after:      1 week
Differential Revision: https://reviews.freebsd.org/D6101

8 years agoNo need to set the MPRSAS_SHUTDOWN flag because it's never used.
slm [Mon, 9 May 2016 16:29:25 +0000 (16:29 +0000)]
No need to set the MPRSAS_SHUTDOWN flag because it's never used.

Approved by: ken, scottl, ambrisko
MFC after:      1 week

8 years agoFix possible use of invalid pointer.
slm [Mon, 9 May 2016 16:26:34 +0000 (16:26 +0000)]
Fix possible use of invalid pointer.

It was possible to use an invalid pointer to get the target ID value. To fix
this, initialize a local Target ID variable to an invalid value and change that
variable to a valid value only if the pointer to the Target ID is not NULL.

Reviewed by:    ken, scottl, ambrisko, asomers
Approved by: ken, scottl, ambrisko
MFC after:      1 week
Differential Revision: https://reviews.freebsd.org/D6100

8 years agoChange logging level for a debug string to use MPR_LOG instead of MPR_INFO.
slm [Mon, 9 May 2016 16:24:16 +0000 (16:24 +0000)]
Change logging level for a debug string to use MPR_LOG instead of MPR_INFO.

Approved by: ken, scottl, ambrisko
MFC after:      1 week

8 years agoNo log bit in IOCStatus and endian-safe changes.
slm [Mon, 9 May 2016 16:21:14 +0000 (16:21 +0000)]
No log bit in IOCStatus and endian-safe changes.

Use MPI2_IOCSTATUS_MASK when checking IOCStatus to mask off the log bit, and
make a few more things endian-safe.

Reviewed by:    ken, scottl, ambrisko, asomers
Approved by: ken, scottl, ambrisko
MFC after:      1 week
Differential Revision: https://reviews.freebsd.org/D6097

8 years agoAdd support for the Broadcom (Avago/LSI) 9305 16 and 24 port HBA's.
slm [Mon, 9 May 2016 16:19:13 +0000 (16:19 +0000)]
Add support for the Broadcom (Avago/LSI) 9305 16 and 24 port HBA's.

Reviewed by:    ken, scottl, ambrisko, asomers
Approved by: ken, scottl, ambrisko
MFC after:      1 week
Relnotes:       yes
Differential Revision: https://reviews.freebsd.org/D6098

8 years agoSeveral style changes and add copyrights for 2016.
slm [Mon, 9 May 2016 16:16:00 +0000 (16:16 +0000)]
Several style changes and add copyrights for 2016.

Reviewed by:    ken, scottl, ambrisko, asomers
Approved by: ken, scottl, ambrisko
MFC after:      1 week
Differential Revision: https://reviews.freebsd.org/D6103

8 years agoifconfig: fix check for 40 MHz channels while applying country/regdomain.
avos [Mon, 9 May 2016 16:15:52 +0000 (16:15 +0000)]
ifconfig: fix check for 40 MHz channels while applying country/regdomain.

Do not use 20 MHz channel list while checking 40 MHz channels;
it may be different. Just use the corresponding list instead.

Tested by: Masachika ISHIZUKA <ish@amail.plala.or.jp>

PR: 209328

8 years agoUpdate MPI headers to version 42.
slm [Mon, 9 May 2016 16:12:32 +0000 (16:12 +0000)]
Update MPI headers to version 42.

Reviewed by:    ken, scottl, ambrisko, asomers
Approved by: ken, scottl, ambrisko
MFC after:      1 week
Differential Revision: https://reviews.freebsd.org/D6096

8 years agoCheck malloc succeeded in pic_create, with M_NOWAIT it may return NULL.
andrew [Mon, 9 May 2016 12:24:39 +0000 (12:24 +0000)]
Check malloc succeeded in pic_create, with M_NOWAIT it may return NULL.

Obtained from: ABT Systems Ltd
Sponsored by: The FreeBSD Foundation

8 years agoFix file polling bug.
hselasky [Mon, 9 May 2016 11:52:57 +0000 (11:52 +0000)]
Fix file polling bug.

Ensure the actual poll result is returned by the "linux_file_poll()"
function instead of zero which means no data is available.

MFC after: 3 days
Sponsored by: Mellanox Technologies

8 years agoo Stop to mention the slowstart_flightsize sysctl in the tuning(7).
maxim [Mon, 9 May 2016 11:48:09 +0000 (11:48 +0000)]
o Stop to mention the slowstart_flightsize sysctl in the tuning(7).

The slowstart_flightsize and local_slowstart_flightsize sysctl's
were removed from the TCP code in 226447 several years ago.

PR: 209376
MFC after: 1 week

8 years agosfxge(4): remove EFSYS_OPT_PCIE_TUNE
arybchik [Mon, 9 May 2016 08:38:56 +0000 (08:38 +0000)]
sfxge(4): remove EFSYS_OPT_PCIE_TUNE

With the removal of Falcon support, this is now dead code.

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week

8 years agosfxge(4): disable common code support for Falcon
arybchik [Mon, 9 May 2016 08:37:42 +0000 (08:37 +0000)]
sfxge(4): disable common code support for Falcon

This patch ensures that client code will fail to build
with Falcon support. Following patches remove Falcon
support code entirely.

sfxge(4) has never supported Falcon.

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week

8 years agosfxge(4): cleanup: fix obsolete EFSYS_OPT_PHY_BIST option
arybchik [Mon, 9 May 2016 08:35:08 +0000 (08:35 +0000)]
sfxge(4): cleanup: fix obsolete EFSYS_OPT_PHY_BIST option

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week