]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
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

8 years agosfxge(4): Siena no longer supports EFSYS_OPT_PCIE_TUNE
arybchik [Mon, 9 May 2016 08:32:49 +0000 (08:32 +0000)]
sfxge(4): Siena no longer supports EFSYS_OPT_PCIE_TUNE

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

8 years agosfxge(4): remove unused efx_nic_pcie_extended_sync()
arybchik [Mon, 9 May 2016 08:28:52 +0000 (08:28 +0000)]
sfxge(4): remove unused efx_nic_pcie_extended_sync()

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

8 years agoAdd a forgotten in r283424 .eh_frame section with CFI & FDE records to allow
dchagin [Mon, 9 May 2016 07:38:47 +0000 (07:38 +0000)]
Add a forgotten in r283424 .eh_frame section with CFI & FDE records to allow
stack unwinding through signal handler.

Reported by: Dmitry Sivachenko
MFC after: 2 weeks

8 years ago[siba] add 2GHz/5GHz FEM parameter fetching and accessor methods.
adrian [Mon, 9 May 2016 06:30:00 +0000 (06:30 +0000)]
[siba] add 2GHz/5GHz FEM parameter fetching and accessor methods.

This is used by the bwn(4) PHY-N code that I'm working on.

8 years ago[siba] add FEM variables from the r8 SPROM layout.
adrian [Mon, 9 May 2016 06:05:23 +0000 (06:05 +0000)]
[siba] add FEM variables from the r8 SPROM layout.

This will eventually be used the bwn(4) N-PHY code that I'm (slowly)
writing.

Obtained from: Linux b43

8 years ago[bwn] oops. typo.
adrian [Mon, 9 May 2016 06:02:57 +0000 (06:02 +0000)]
[bwn] oops.  typo.

8 years ago[bwn] add opt_bwi.h and BWN_DEBUG.
adrian [Mon, 9 May 2016 05:59:21 +0000 (05:59 +0000)]
[bwn] add opt_bwi.h and BWN_DEBUG.

It isn't used yet in the bwn(4) code; that'll come next.

8 years agoinstall: Add some tests.
jilles [Sun, 8 May 2016 21:11:24 +0000 (21:11 +0000)]
install: Add some tests.

8 years agoMake "-S" a default option for mountd.
rmacklem [Sun, 8 May 2016 20:10:22 +0000 (20:10 +0000)]
Make "-S" a default option for mountd.

After a discussion on freebsd-fs@ there seemed to be a consensus that
the "-S" option for mountd should become the default.
Since the only known issue w.r.t. using "-S" was fixed by r299201,
this commit adds "-S" to the default mountd_flags.

Discussed on: freebsd-fs
PR: 9619, 131342, 206855
MFC after: 2 weeks
Relnotes: yes

8 years ago[bhnd] Initial bhnd(4) SPROM/NVRAM support.
adrian [Sun, 8 May 2016 19:14:05 +0000 (19:14 +0000)]
[bhnd] Initial bhnd(4) SPROM/NVRAM support.

This adds support for the NVRAM handling and the basic SPROM
hardware used on siba(4) and bcma(4) devices, including:

* SPROM directly attached to the PCI core, accessible via PCI configuration
  space.
* SPROM attached to later ChipCommon cores.
* SPROM variables vended from the parent SoC bus (e.g. via a directly-attached
  flash device).

Additional improvements to the NVRAM/SPROM interface will
be required, but this changeset stands alone as working
checkpoint.

Submitted by: Landon Fuller <landonf@landonf.org>
Reviewed by: Michael Zhilin <mizkha@gmail.com> (Broadcom MIPS support)
Differential Revision: https://reviews.freebsd.org/D6196

8 years ago[bhnd] Add support for matching on chip identifiers.
adrian [Sun, 8 May 2016 18:30:08 +0000 (18:30 +0000)]
[bhnd] Add support for matching on chip identifiers.

This is used by the upcoming SPROM code to match on chipsets
that require special handling of muxed SPROM pins.

Submitted by: Landon Fuller <landonf@landonf.org>
Differential Revision: https://reviews.freebsd.org/D6195

8 years ago[bhnd] Add bhnd_resource support for the bus_(read|write)(_multi_)stream_* functions.
adrian [Sun, 8 May 2016 18:20:01 +0000 (18:20 +0000)]
[bhnd] Add bhnd_resource support for the bus_(read|write)(_multi_)stream_* functions.

This adds additional bhnd_resource shims used by the upcoming SPROM deltas.

Submitted by: Landon Fuller <landonf@landonf.org>
Differential Revision: https://reviews.freebsd.org/D6194

8 years agoMFV r299237: apply two upstream revisions to address upstream bug PR/540.
delphij [Sun, 8 May 2016 18:18:35 +0000 (18:18 +0000)]
MFV r299237: apply two upstream revisions to address upstream bug PR/540.

PR: 209211
MFC after: 2 weeks
X-MFC: if there is no new file release

8 years ago[bhnd] Replace is_hostb_device() with a more general find_hostb_device()
adrian [Sun, 8 May 2016 17:52:12 +0000 (17:52 +0000)]
[bhnd] Replace is_hostb_device() with a more general find_hostb_device()

This allows bus children to query for the host bridge device, rather
than having to iterate over all attached devices.

Submitted by: Landon Fuller <landonf@landonf.org>
Differential Revision: https://reviews.freebsd.org/D6193

8 years agoMFV r299233: Apply upstream fix 11edb37a71851b5bcbd4e51ca6ad3dcbf57e9761:
delphij [Sun, 8 May 2016 09:30:36 +0000 (09:30 +0000)]
MFV r299233: Apply upstream fix 11edb37a71851b5bcbd4e51ca6ad3dcbf57e9761:

Revert: Don't close stdin...

This have been observed by portupgrade in its interaction with file(1),
as reported as a regression in bin/209211.

PR: 209211
MFC after: 3 days

8 years agoINTRNG - update gpio pin capabilities according to r299198.
skra [Sun, 8 May 2016 09:01:30 +0000 (09:01 +0000)]
INTRNG - update gpio pin capabilities according to r299198.

8 years agoINTRNG - update gpio pin capabilities according to r299166.
skra [Sun, 8 May 2016 08:57:50 +0000 (08:57 +0000)]
INTRNG - update gpio pin capabilities according to r299166.

Note that the updated comment is valid only for INTRNG. This should not
be a problem as not INTRNG code is left in place for debugging reasons
only and should not be used anymore. It's anticipated that this old
code will be removed soon.

8 years agofd: assert dropped filedesc lock in fdcloseexec
mjg [Sun, 8 May 2016 03:26:12 +0000 (03:26 +0000)]
fd: assert dropped filedesc lock in fdcloseexec

8 years agoDon't increment srvrpccnt[] for the NFSv4.1 operations.
rmacklem [Sat, 7 May 2016 22:45:08 +0000 (22:45 +0000)]
Don't increment srvrpccnt[] for the NFSv4.1 operations.

When support for NFSv4.1 was added to the NFS server, it broke
the server rpc count stats, since newnfsstats.srvrpccnt[] doesn't
have entries for the new NFSv4.1 operations.
Without this patch, the code was incrementing bogus entries in
newnfsstats for the new NFSv4.1 operations.
This patch is an interim fix. The nfsstats structure needs to be
updated and that will come in a future commit.

Reported by: cem
MFC after: 2 weeks

8 years agoOnly one program is build in usr.bin/sdiff use the right include
bapt [Sat, 7 May 2016 20:23:26 +0000 (20:23 +0000)]
Only one program is build in usr.bin/sdiff use the right include

8 years agoRevert r299218 VISUAL is actually a perfecly valid env to specify an editor
bapt [Sat, 7 May 2016 18:58:07 +0000 (18:58 +0000)]
Revert r299218 VISUAL is actually a perfecly valid env to specify an editor

8 years agoOnly use EDITOR as a variable to specify which text editor to use
bapt [Sat, 7 May 2016 18:48:48 +0000 (18:48 +0000)]
Only use EDITOR as a variable to specify which text editor to use

8 years agoDirectly call the editor if needed instead of spawning /bin/sh
bapt [Sat, 7 May 2016 18:44:30 +0000 (18:44 +0000)]
Directly call the editor if needed instead of spawning /bin/sh

8 years agoReplace fparseln(3) with getline(3)
bapt [Sat, 7 May 2016 18:21:58 +0000 (18:21 +0000)]
Replace fparseln(3) with getline(3)

It removes a dependency on libutil.

8 years agoClean up callers of nd6_prelist_add().
markj [Sat, 7 May 2016 03:41:29 +0000 (03:41 +0000)]
Clean up callers of nd6_prelist_add().

nd6_prelist_add() sets *newp if and only if it is successful, so there's no
need for code that handles the case where the return value is 0 and
*newp == NULL. Fix some style bugs in nd6_prelist_add() while here.

MFC after: 1 week

8 years agoRemove two useless local variables from prelist_update().
markj [Sat, 7 May 2016 03:32:29 +0000 (03:32 +0000)]
Remove two useless local variables from prelist_update().

MFC after: 1 week

8 years agosed: rewrite the main loop.
pfg [Sat, 7 May 2016 01:44:22 +0000 (01:44 +0000)]
sed: rewrite the main loop.

Rewrite the main loop of the "sed s/..." command, shortening it by ten
lines and simplifying it by removing the switch statement implementing
/g, /1, and /2 separately and repetitively.

This will be needed to bring a fix from OpenBSD later.

Obtained from: OpenBSD (schwarze CVS Rev. 1.18)
MFC after: 3 weeks

8 years agoUse DDP to implement zerocopy TCP receive with aio_read().
jhb [Sat, 7 May 2016 00:33:35 +0000 (00:33 +0000)]
Use DDP to implement zerocopy TCP receive with aio_read().

Chelsio's TCP offload engine supports direct DMA of received TCP payload
into wired user buffers.  This feature is known as Direct-Data Placement.
However, to scale well the adapter needs to prepare buffers for DDP
before data arrives.  aio_read() is more amenable to this requirement than
read() as applications often call read() only after data is available in
the socket buffer.

When DDP is enabled, TOE sockets use the recently added pru_aio_queue
protocol hook to claim aio_read(2) requests instead of letting them use
the default AIO socket logic.  The DDP feature supports scheduling DMA
to two buffers at a time so that the second buffer is ready for use
after the first buffer is filled.  The aio/DDP code optimizes the case
of an application ping-ponging between two buffers (similar to the
zero-copy bpf(4) code) by keeping the two most recently used AIO buffers
wired.  If a buffer is reused, the aio/DDP code is able to reuse the
vm_page_t array as well as page pod mappings (a kind of MMU mapping the
Chelsio NIC uses to describe user buffers).  The generation of the
vmspace of the calling process is used in conjunction with the user
buffer's address and length to determine if a user buffer matches a
previously used buffer.  If an application queues a buffer for AIO that
does not match a previously used buffer then the least recently used
buffer is unwired before the new buffer is wired.  This ensures that no
more than two user buffers per socket are ever wired.

Note that this feature is best suited to applications sending a steady
stream of data vs short bursts of traffic.

Discussed with: np
Relnotes: yes
Sponsored by: Chelsio Communications

8 years agoSet the correct vnet in TOE event handlers.
jhb [Fri, 6 May 2016 23:49:10 +0000 (23:49 +0000)]
Set the correct vnet in TOE event handlers.

Differential Revision: https://reviews.freebsd.org/D6152

8 years agoRestore name=value format of PCI location strings.
jhb [Fri, 6 May 2016 23:46:35 +0000 (23:46 +0000)]
Restore name=value format of PCI location strings.

When devctl was added, the location string for PCI devices was changed to
use the PCI "selector" that pciconf and devctl accept.  However, devd
assumes that location strings are formatted as a list of name=value pairs.
As a result, devd is no longer parsing any of the values out of PCI
device events.  Restore the previous format of the PCI location strings
to restore the location and slot keywords in case any devd scripts are
using this.  Add the "selector" as a new 'dbsf' location variable.

Reviewed by: imp
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D6253