]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
7 years agoTurn off blacklistd daemon in defaults
lidl [Mon, 6 Jun 2016 17:01:35 +0000 (17:01 +0000)]
Turn off blacklistd daemon in defaults

Reported by: Matteo Riondato ( matteo @ FreeBSD.org )
Reviewed by: rpaulo
Approved by: rpaulo
Relnotes: YES
Sponsored by: The FreeBSD Foundation

7 years agoSimilarly to r301505 protect the removal of the ifa from the if_addrhead
bz [Mon, 6 Jun 2016 16:23:02 +0000 (16:23 +0000)]
Similarly to r301505 protect the removal of the ifa from the if_addrhead
by a lock (as well as the check that the list is not empty).

Obtained from: projects/vnet
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation

7 years agoindent(1): Fix typo.
pfg [Mon, 6 Jun 2016 16:10:52 +0000 (16:10 +0000)]
indent(1): Fix typo.

It's typedef, not typdef.

Obtained from: OpenBSD (CVS rev. 1.20)
MFC after: 3 days

7 years agoxen-netfront: fix initialization
royger [Mon, 6 Jun 2016 15:01:24 +0000 (15:01 +0000)]
xen-netfront: fix initialization

A couple of mostly cosmetic fixes for the final initialization of netfront:

 - Switch to "connected" state before starting to kick the rings.
 - Correctly use "rxq" in the initialization loop (previously rxq was not
   updated in the loop, and netfront would kick np->rxq[N] several times).
 - Declare and define xn_connect as static, it's not used outside of this
   file.

Reviewed by: Wei Liu <wei.liu2@citrix.com>
Sponsored by: Citrix Systems R&D
Differential revision: https://reviews.freebsd.org/D6657

7 years agoxen: Correct typo in #undef for symbol NBPL
royger [Mon, 6 Jun 2016 14:55:46 +0000 (14:55 +0000)]
xen: Correct typo in #undef for symbol NBPL

Submitted by: Akshay Jaggi <akshay1994.leo@gmail.com>
Reviewed by: royger

7 years agoMove the callout_reset() to the end of the work not having it stick
bz [Mon, 6 Jun 2016 14:01:09 +0000 (14:01 +0000)]
Move the callout_reset() to the end of the work not having it stick
before we do anything.

Obtained from: projects/vnet
MFC after: 2 week
Sponsored by: The FreeBSD Foundation

7 years agoIn if_purgeaddrs() we cannot hold the lock over the entire loop
bz [Mon, 6 Jun 2016 13:17:25 +0000 (13:17 +0000)]
In if_purgeaddrs() we cannot hold the lock over the entire loop
due to called functions (as in other parts of the stack, leave a comment).
Put around a lock the removal of the ifa from the list however to
reduce the possible race with other places.

Obtained from: projects/vnet
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation

7 years agoDestroy the mutex last. In this case it should not matter, but
bz [Mon, 6 Jun 2016 13:04:22 +0000 (13:04 +0000)]
Destroy the mutex last.   In this case it should not matter, but
generally cleanup code might still acquire it thus try to be
consistent destroying locks late.

Obtained from: projects/vnet
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation

7 years agoSYSINIT functions do not return a value; switch to void, remove
bz [Mon, 6 Jun 2016 13:01:57 +0000 (13:01 +0000)]
SYSINIT functions do not return a value; switch to void, remove
the return value, and mark the unused argument __unused.

Obtained from: projects/vnet
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation

7 years agoProvide a public interface to rt_flushifroutes which takes the address
bz [Mon, 6 Jun 2016 12:49:47 +0000 (12:49 +0000)]
Provide a public interface to rt_flushifroutes which takes the address
family as an argument as well.
This will be used to cleanup individual protocols during VNET teardown.

Obtained from: projects/vnet
Sponsored by: The FreeBSD Foundation

7 years agoMake the KASSERT message more helpful by also printing the ifp information
bz [Mon, 6 Jun 2016 10:13:48 +0000 (10:13 +0000)]
Make the KASSERT message more helpful by also printing the ifp information
which we are asserting.

Obtained from: projects/vnet
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation

7 years agoRemove erroneous lock assertions
sgalabov [Mon, 6 Jun 2016 10:07:57 +0000 (10:07 +0000)]
Remove erroneous lock assertions

In mediatek etherswitch support, functions mtkswitch_reg_write32_mt7621
and mtkswitch_reg_read32_mt7621 are called without locks held, so
lock assertions fail. Remove the lock assertions.

Sponsored by: Smartcom - Bulgaria AD

7 years agoAdd support to priority code point (PCP) that is an 3-bit field
araujo [Mon, 6 Jun 2016 09:51:58 +0000 (09:51 +0000)]
Add support to priority code point (PCP) that is an 3-bit field
which refers to IEEE 802.1p class of service and maps to the frame
priority level.

Values in order of priority are: 1 (Background (lowest)),
0 (Best effort (default)), 2 (Excellent effort),
3 (Critical applications), 4 (Video, < 100ms latency),
5 (Video, < 10ms latency), 6 (Internetwork control) and
7 (Network control (highest)).

Example of usage:
root# ifconfig em0.1 create
root# ifconfig em0.1 vlanpcp 3

Note:
The review D801 includes the pf(4) part, but as discussed with kristof,
we won't commit the pf(4) bits for now.
The credits of the original code is from rwatson.

Differential Revision: https://reviews.freebsd.org/D801
Reviewed by: gnn, adrian, loos
Discussed with: rwatson, glebius, kristof
Tested by: many including Matthew Grooms <mgrooms__shrew.net>
Obtained from: pfSense
Relnotes: Yes

7 years agosfxge(4): update TX vFIFO ULL tag location to avoid merge conflict
arybchik [Mon, 6 Jun 2016 09:30:31 +0000 (09:30 +0000)]
sfxge(4): update TX vFIFO ULL tag location to avoid merge conflict

Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week

7 years agosfxge(4): pick an RSS bucket for the packet enqueued and select TXQ accordingly
arybchik [Mon, 6 Jun 2016 09:08:16 +0000 (09:08 +0000)]
sfxge(4): pick an RSS bucket for the packet enqueued and select TXQ accordingly

Submitted by:   Ivan Malov <Ivan.Malov at oktetlabs.ru>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D6723

7 years agosfxge(4): set up the indirection table using the kernel-driven RSS bucket ids
arybchik [Mon, 6 Jun 2016 09:07:26 +0000 (09:07 +0000)]
sfxge(4): set up the indirection table using the kernel-driven RSS bucket ids

Submitted by:   Ivan Malov <Ivan.Malov at oktetlabs.ru>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D6722

7 years agosfxge(4): bind interrupts to CPUs in accordance with bucket to CPU map
arybchik [Mon, 6 Jun 2016 09:06:38 +0000 (09:06 +0000)]
sfxge(4): bind interrupts to CPUs in accordance with bucket to CPU map

Submitted by:   Ivan Malov <Ivan.Malov at oktetlabs.ru>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D6721

7 years agosfxge(4): restrict the maximum number of RSS channels by the number of RSS buckets
arybchik [Mon, 6 Jun 2016 09:05:52 +0000 (09:05 +0000)]
sfxge(4): restrict the maximum number of RSS channels by the number of RSS buckets

This is done because one has no point to have more channels since they
will be unused.

Submitted by:   Ivan Malov <Ivan.Malov at oktetlabs.ru>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D6720

7 years agosfxge(4): get RSS key to be programmed into NIC from the kernel
arybchik [Mon, 6 Jun 2016 09:05:06 +0000 (09:05 +0000)]
sfxge(4): get RSS key to be programmed into NIC from the kernel

Submitted by:   Ivan Malov <Ivan.Malov at oktetlabs.ru>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D6719

7 years agosfxge(4): prepare sfxge to be RSS API aware
arybchik [Mon, 6 Jun 2016 09:04:20 +0000 (09:04 +0000)]
sfxge(4): prepare sfxge to be RSS API aware

This change is needed because 'opt_rss.h' is included by multiple source
files and RSS macro is defined as 1 within the file during build process
if option RSS is enabled in the kernel.

Submitted by:   Ivan Malov <Ivan.Malov at oktetlabs.ru>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
Differential Revision:  https://reviews.freebsd.org/D6718

7 years agohyperv/vmbus: Constify channel message
sephe [Mon, 6 Jun 2016 07:39:44 +0000 (07:39 +0000)]
hyperv/vmbus: Constify channel message

MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6708

7 years agohyperv/vmbus: Factor out channel message processing
sephe [Mon, 6 Jun 2016 07:27:57 +0000 (07:27 +0000)]
hyperv/vmbus: Factor out channel message processing

This paves the way for further cleanup.

MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6707

7 years ago[bwn] don't use a 1MB CCK RTS frame for 11a OFDM transmissions.
adrian [Mon, 6 Jun 2016 07:09:02 +0000 (07:09 +0000)]
[bwn] don't use a 1MB CCK RTS frame for 11a OFDM transmissions.

7 years agohyperv/vmbus: Define type for channel messages.
sephe [Mon, 6 Jun 2016 06:18:18 +0000 (06:18 +0000)]
hyperv/vmbus: Define type for channel messages.

And fix message processing; only channel messages are supported.

MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6706

7 years agohyperv: Move machine dependent bits into machine dependent files.
sephe [Mon, 6 Jun 2016 05:55:37 +0000 (05:55 +0000)]
hyperv: Move machine dependent bits into machine dependent files.

MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6701

8 years agoFor pointers use NULL instead of 0.
araujo [Mon, 6 Jun 2016 04:18:56 +0000 (04:18 +0000)]
For pointers use NULL instead of 0.

8 years agoConnect ypldap(8) script on Makefile, forgotten on my previous commit r301480.
araujo [Mon, 6 Jun 2016 04:13:49 +0000 (04:13 +0000)]
Connect ypldap(8) script on Makefile, forgotten on my previous commit r301480.

8 years agoAdd rc.d script for ypldap(8).
araujo [Mon, 6 Jun 2016 03:55:00 +0000 (03:55 +0000)]
Add rc.d script for ypldap(8).

8 years agoInstall/Connect ypldap.conf(5) on examples.
araujo [Mon, 6 Jun 2016 02:43:41 +0000 (02:43 +0000)]
Install/Connect ypldap.conf(5) on examples.

8 years agoAdd missing constants from RFCs 4443 and 6550
gnn [Mon, 6 Jun 2016 00:35:45 +0000 (00:35 +0000)]
Add missing constants from RFCs 4443 and 6550

8 years agolegacy: Avoid building/installing headers twice.
bdrewery [Sun, 5 Jun 2016 23:56:28 +0000 (23:56 +0000)]
legacy: Avoid building/installing headers twice.

Sponsored by: EMC / Isilon Storage Division

8 years agoUse the in-tree sys/elf_common.h
bdrewery [Sun, 5 Jun 2016 23:34:19 +0000 (23:34 +0000)]
Use the in-tree sys/elf_common.h

This is the same fix as r301471.

8 years agoRegenerate
bdrewery [Sun, 5 Jun 2016 23:16:27 +0000 (23:16 +0000)]
Regenerate

8 years agoDocument WITH_META_MODE enforcing WITHOUT_SYSTEM_COMPILER.
bdrewery [Sun, 5 Jun 2016 23:14:06 +0000 (23:14 +0000)]
Document WITH_META_MODE enforcing WITHOUT_SYSTEM_COMPILER.

makeman doesn't handle this since it would need to enable all
non-default options when checking enabling 1 option, which
then convolutes what is really affecting each other.

8 years agoRegenerate
bdrewery [Sun, 5 Jun 2016 23:10:05 +0000 (23:10 +0000)]
Regenerate

8 years agoOnly include bsd.compiler.mk for bmakes that use -m .../share/mk by default.
bdrewery [Sun, 5 Jun 2016 23:05:17 +0000 (23:05 +0000)]
Only include bsd.compiler.mk for bmakes that use -m .../share/mk by default.

Otherwise they error when trying to include the file, which also has
its own dependencies.

Sponsored by: EMC / Isilon Storage Division

8 years agoUse the in-tree sys/elf_common.h to build libelftc.
bdrewery [Sun, 5 Jun 2016 23:05:14 +0000 (23:05 +0000)]
Use the in-tree sys/elf_common.h to build libelftc.

This fixes build failures on older releases that lack various
definitions such as EM_AARCH64 (which was unfixed before this).

Revert all of the recent compatibility changes that worked around this
problem.

This uses the same method of using the in-tree header as lib/libelf,
lib/libdwarf and usr.bin/readelf.

Reviewed by: emaste
Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D6734

8 years agoAdd a MINIMUM_SUPPORTED_OSREL and bump it to 900044.
bdrewery [Sun, 5 Jun 2016 23:05:10 +0000 (23:05 +0000)]
Add a MINIMUM_SUPPORTED_OSREL and bump it to 900044.

This is actually a revision in the stable/9 branch released as 9.1.  The
localedef build requires xlocale from this period.

Sponsored by: EMC / Isilon Storage Division

8 years agoDIRDEPS_BUILD: Fix bootstrap-tools not handling CCACHE_DIR properly.
bdrewery [Sun, 5 Jun 2016 23:05:07 +0000 (23:05 +0000)]
DIRDEPS_BUILD: Fix bootstrap-tools not handling CCACHE_DIR properly.

CCACHE_DIR needs to be resolved to its full path before processing
legacy.meta or meta mode may see the change to the stats file.

Sponsored by: EMC / Isilon Storage Division

8 years agoWITH_SYSTEM_COMPILER: Disable with WITH_META_MODE for now.
bdrewery [Sun, 5 Jun 2016 23:05:04 +0000 (23:05 +0000)]
WITH_SYSTEM_COMPILER: Disable with WITH_META_MODE for now.

The WITH_META_MODE build is intended to be a working incremental build.
It spies on the build command to see if things should be rebuilt if the
command changes.  If you run buildworld, it builds a cross-compiler,
then do installworld and buildworld again it will invoke the
WITH_SYSTEM_COMPILER logic.  This then adds on -target/--sysroot, etc,
and causes rebuilds due to the changed build command even though the
compiler used is technically the same revision.  Since the incremental
build is not cleaning anything by default then there is much
less risk to rebuilding the already-existing cross-compiler.  Just
disable the combined logic and always use and build the cross-compiler.

An alternative to this would be to always pass -target/--sysroot.  Doing
so may occur in the future.

Sponsored by: EMC / Isilon Storage Division

8 years agoWITH_META_MODE: Avoid host tool timestamps causing a rebuild.
bdrewery [Sun, 5 Jun 2016 23:05:01 +0000 (23:05 +0000)]
WITH_META_MODE: Avoid host tool timestamps causing a rebuild.

Using buildworld, installworld, buildworld.  It is expected that nothing
should rebuild.  However any host tool used could have its timestamp
updated.  Any library used by dynamic tools could have its timestamp
updated.  The filemon(4) data in the .meta files captures all reads to
these files.  This causes the 2nd buildworld to rebuild everything since
host tools and files have been updated.

Because the build is self-reliant and bootstraps itself, it should be
safe to ignore mtime changes on host files used during the build.  Host
files should only impact the build of legacy, build-tools, bootstrap-tools,
cross-tools, but those are already intended to be reproducible from its
own bootstrapping.  It is possible in a rare case that a bug in a host
file does produce a broken build tool.  If that happens it will just
have to be communicated properly.

An alternative solution would be to update the mtime of all files in the
object directory after installworld so that the host files are not newer
than the object files.  That also requires special care for read-only
obj directories and special care to not mess with any intended timestamps in
the build, such as done for reproducibility.

Reported by: many
Sponsored by: EMC / Isilon Storage Division

8 years agoWITH_META_MODE: Enable bmake's missing meta rebuild feature
bdrewery [Sun, 5 Jun 2016 23:04:42 +0000 (23:04 +0000)]
WITH_META_MODE: Enable bmake's missing meta rebuild feature

8 years agoFix bmake version upgrade logic to use the new bmake.
bdrewery [Sun, 5 Jun 2016 23:04:15 +0000 (23:04 +0000)]
Fix bmake version upgrade logic to use the new bmake.

Otherwise it was only used on the next build.

This was a flaw in r295980.

MFC after: 3 days
Sponsored by: EMC / Isilon Storage Division

8 years agoImport latest meta.stage.mk 1.45 (r301462)
bdrewery [Sun, 5 Jun 2016 21:21:41 +0000 (21:21 +0000)]
Import latest meta.stage.mk 1.45 (r301462)

8 years agoImport bmake-20160604
sjg [Sun, 5 Jun 2016 20:26:16 +0000 (20:26 +0000)]
Import bmake-20160604

Performace improvements for meta mode.

8 years agolibc/locale: Fix type breakage in __collate_range_cmp().
pfg [Sun, 5 Jun 2016 19:12:52 +0000 (19:12 +0000)]
libc/locale: Fix type breakage in __collate_range_cmp().

When collation support was brought in, the second and third
arguments in __collate_range_cmp() were changed from int to
wchar_t, breaking the ABI. Change them to a "char" type which
makes more sense and keeps the ABI compatible.

Also introduce __wcollate_range_cmp() which does work with wide
characters. This function is used only internally in libc so
we don't export it. Use the new function in glob(3), fnmatch(3),
and regexec(3).

PR: 179721
Suggested by: ache. jilles
MFC after: 3 weeks (perhaps partial only)

8 years agoCleanup COMPAT_FREEBSD32 support.
bdrewery [Sun, 5 Jun 2016 18:16:33 +0000 (18:16 +0000)]
Cleanup COMPAT_FREEBSD32 support.

This is a NOP.

The COMPAT_IA32 was renamed in r205014 to COMPAT_FREEBSD32 and
COMPAT_ARCH32 does not seem to have existed.  Also remove some
leftovers from the sysent rework in r301404.  Include
freebsd32_util.h for the freebsd32_sysent prototype.

X-MFC-With: r301404
Reported by: kib
MFC after: 3 days
Sponsored by: EMC / Isilon Storage Division

8 years agoAvoid spurious EINVAL in amd64 pmap_change_attr().
kib [Sun, 5 Jun 2016 17:11:23 +0000 (17:11 +0000)]
Avoid spurious EINVAL in amd64 pmap_change_attr().

Do not try to change attributes for DMAP when working on a mapping
which is not covered by the DMAP. This was reported on real system
where a BAR of a device (NTB) was mapped outside the PCI window.

Reported and tested by: mav
Reviewed by: jhb, mav
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D6668

8 years agoGet rid of struct proc p_sched and struct thread td_sched pointers.
kib [Sun, 5 Jun 2016 17:04:03 +0000 (17:04 +0000)]
Get rid of struct proc p_sched and struct thread td_sched pointers.

p_sched is unused.

The struct td_sched is always co-allocated with the struct thread,
except for the thread0.  Avoid useless indirection, instead calculate
td_sched location using simple pointer arithmetic in td_get_sched(9).
For thread0, which is statically allocated, create a structure to
emulate layout of the dynamic allocation.

Reviewed by: jhb (previous version)
Sponsored by: The FreeBSD Foundation
Differential revision: https://reviews.freebsd.org/D6711

8 years agoUse ANSI function definition.
kib [Sun, 5 Jun 2016 16:55:55 +0000 (16:55 +0000)]
Use ANSI function definition.

Sponsored by: The FreeBSD Foundation

8 years agoINTRNG - change the way how an interrupt mapping data are provided
skra [Sun, 5 Jun 2016 16:20:12 +0000 (16:20 +0000)]
INTRNG - change the way how an interrupt mapping data are provided
to the framework in OFW (FDT) case.

This is a follow-up to r301451.

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

8 years agosh: Improve descriptions in 'ulimit -a' output.
jilles [Sun, 5 Jun 2016 16:09:31 +0000 (16:09 +0000)]
sh: Improve descriptions in 'ulimit -a' output.

The format limits descriptions to 18 characters and is not changed, so
the descriptions do not describe the limits exactly.

8 years ago(1) Add a new bus method to get a mapping data for an interrupt.
skra [Sun, 5 Jun 2016 16:07:57 +0000 (16:07 +0000)]
(1) Add a new bus method to get a mapping data for an interrupt.

BUS_MAP_INTR() is used to get an interrupt mapping data according
to provided hints. The hints could be modified afterwards, but only
if mapping data was allocated. This method is intended to be called
before BUS_ALLOC_RESOURCE().

An interrupt mapping data describes an interrupt - hardware number,
type, configuration, cpu binding, and whatever is needed to setup it.

(2) Introduce a method which allows storing of an additional data
in struct resource to be available for bus drivers. This method is
convenient in two ways:
 - there is no need to rework existing bus drivers as they can simply
   be extended to provide an additional data,
 - there is no need to modify any existing bus methods as struct
   resource is already passed to them as argument and thus stored data
   is simply accessible by other bus drivers.
For now, implement this method only for INTRNG.

This is motivated by needs of modern SOCs where hardware initialization
is not straightforward and resources descriptions are complex, opaque
for everyone but provider, and may vary from SOC to SOC. Typical
situation is that one bus driver can fetch a resource description for
its child device, but it's opaque for this driver. Another bus driver
knows a provider for this kind of resource and can pass this resource
description to it. In fact, something like device IVARS would be
perfect for that if implemented generally enough. Unfortunatelly, IVARS
are usable only by their owners now. Only owner knows its IVARS layout,
thus other bus drivers are not able to use them.

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

8 years agoReflect error indication according to POSIX and what those functions
ache [Sun, 5 Jun 2016 15:46:14 +0000 (15:46 +0000)]
Reflect error indication according to POSIX and what those functions
currently do.

8 years agoFix build with external gcc
bapt [Sun, 5 Jun 2016 11:56:03 +0000 (11:56 +0000)]
Fix build with external gcc

Completly disable some extra optimisation for very recent gcc.
They would require some updated in the runtime which we do not have yet

8 years agoFix 4-byte overflow in ipv6_writemask.
melifaro [Sun, 5 Jun 2016 10:33:53 +0000 (10:33 +0000)]
Fix 4-byte overflow in ipv6_writemask.

This bug could cause some IPv6 table prefix delete requests to fail.

Obtained from: Yandex LLC

8 years agoEnsure old gcc does not accidently get the attributes it does not know about
bapt [Sun, 5 Jun 2016 09:38:48 +0000 (09:38 +0000)]
Ensure old gcc does not accidently get the attributes it does not know about

8 years agoRemove duplicated semicolons.
trasz [Sun, 5 Jun 2016 08:51:56 +0000 (08:51 +0000)]
Remove duplicated semicolons.

MFC after: 1 month

8 years agoReport negotiated MaxBurstLength and FirstBurstLength in "iscsictl -v"
trasz [Sun, 5 Jun 2016 08:48:37 +0000 (08:48 +0000)]
Report negotiated MaxBurstLength and FirstBurstLength in "iscsictl -v"
and "ctladm islist -v" outputs.

MFC after: 1 month

8 years ago[bwn] Add missing firmware release calls.
adrian [Sun, 5 Jun 2016 07:56:28 +0000 (07:56 +0000)]
[bwn] Add missing firmware release calls.

This trips me up whenever I'm fooling around with partially supported
NICs that fail to fully attach or initialise - the firmware gets loaded
and references, but something fails - and the firmware references
aren't cleaned up.

8 years ago[bwn] Enable PHY-LP 5GHz support for the one NIC I have tested it on so far.
adrian [Sun, 5 Jun 2016 07:55:21 +0000 (07:55 +0000)]
[bwn] Enable PHY-LP 5GHz support for the one NIC I have tested it on so far.

After perusing the PHY-LP code (don't ask why; honest) I discovered that
it /has/ 5GHz support - but it's not ever used.  I found one NIC - a
BCM4312 w/ pci id 0x4315 - which advertised dual-band PHY-LP support.

Turns out it works.

Whilst here, move up the support bit logging code so I can use it
to debug this.

Tested:

* BCM4312 (pci id 0x4315); 5GHz STA operation

8 years ago[bwn] complain usefully if a PHY-N PHY is detected with no support is compiled in.
adrian [Sun, 5 Jun 2016 07:51:36 +0000 (07:51 +0000)]
[bwn] complain usefully if a PHY-N PHY is detected with no support is compiled in.

Log something other than "error 6" if the attach fails because the
GPL PHY-N code isn't included.

8 years agosfxge(4): allow firmware to auto-configure event queues on Medford
arybchik [Sun, 5 Jun 2016 06:37:54 +0000 (06:37 +0000)]
sfxge(4): allow firmware to auto-configure event queues on Medford

On Medford, licenses are required to enable RX and event cut through and to
disable RX batching. To avoid the need for the driver to make decisions based on
the licensing state, the MC_CMD_INIT_EVQ has been extended to allow us to leave
the decision to the firmware. If the adapter is licensed for low-latency use,
the firmware will choose the optimal settings for latency, otherwise it will use
the best settings for throughput.

For Huntington we still need to choose the settings ourselves.

Submitted by:   Mark Spender <mspender at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D6717

8 years ago[ath_hal] add AR9462 (jupiter) RX gain / XLNA programming.
adrian [Sun, 5 Jun 2016 05:55:27 +0000 (05:55 +0000)]
[ath_hal] add AR9462 (jupiter) RX gain / XLNA programming.

This seems to make 5G work better.

It doesn't fix powersave handling though, that still sees the PHY get
stuck during initial calibration and everything goes pear shaped.
I'll look into that later.

Tested:

* QCAFN222 NIC, STA mode, 5GHz

Obtained from: Linux ath9k

8 years ago[ath_hal] Add Jupiter 2.1 (AR9462 mac 640.3) support.
adrian [Sun, 5 Jun 2016 02:17:51 +0000 (02:17 +0000)]
[ath_hal] Add Jupiter 2.1 (AR9462 mac 640.3) support.

Turns out I wasn't even initialising or programming a lot of stuff
for the AR9462 2.1 chip.  Oops.

This mostly gets it working. powersave scan results in some pretty
hilarious NFcal hangs and I don't see beacons reliably.
There are still some xlna gain tables missing that ath9k has; I'll
follow up with some fixes and then see if the QCAFN222 NIC I have
tests this path.

Tested:

* QCAFN222 NIC, STA mode, 2GHz and 5GHz

8 years ago[ath_hal] teach the reset path(s) about Jupiter 2.1.
adrian [Sun, 5 Jun 2016 02:16:16 +0000 (02:16 +0000)]
[ath_hal] teach the reset path(s) about Jupiter 2.1.

This was just .. not programming in things, and thus large chunks
of the radio wouldn't work.  Notably, 5GHz didn't work.

8 years ago[ath_hal] convert the MCI code over to work on Jupiter 2.1.
adrian [Sun, 5 Jun 2016 02:15:29 +0000 (02:15 +0000)]
[ath_hal] convert the MCI code over to work on Jupiter 2.1.

(Note: jupiter 1.0 was emulation / test silicon, and was never released
in production.  So, yes, AR_SREV_JUPITER() would really be fine.)

8 years ago[acpi] graphics drivers want access to acpi lid handle
adrian [Sun, 5 Jun 2016 02:02:51 +0000 (02:02 +0000)]
[acpi] graphics drivers want access to acpi lid handle

the graphics drivers can benefit from access to the lid handle for querying and getting notifications

Submitted by: kmacy
Differential Revision: https://reviews.freebsd.org/D6643

8 years agoAdd blacklist support to rlogind
lidl [Sun, 5 Jun 2016 01:42:58 +0000 (01:42 +0000)]
Add blacklist support to rlogind

Reviewed by: rpaulo
Approved by: rpaulo
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D6593

8 years ago[ath_hal] Make the AR9462 2.0 initvals from ath9k compile.
adrian [Sun, 5 Jun 2016 01:42:37 +0000 (01:42 +0000)]
[ath_hal] Make the AR9462 2.0 initvals from ath9k compile.

The (upcoming) semi-working AR9462 2.1 support uses the 2.0 initvals
where appropriate, and those need to at least compile under freebsd.

8 years agoCorrect path for blacklistd.conf in OptionalObsoleteFiles.inc
lidl [Sun, 5 Jun 2016 01:40:08 +0000 (01:40 +0000)]
Correct path for blacklistd.conf in OptionalObsoleteFiles.inc

Fix typo made when adding the blacklistd.conf file to OptionalObsoleteFiles.inc

Submitted by: Herbert J. Skuhra ( herbert at mailbox.org )
Reviewed by: rpaulo
Approved by: rpaulo
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D6715

8 years agoFix build after r301404.
bdrewery [Sat, 4 Jun 2016 23:34:51 +0000 (23:34 +0000)]
Fix build after r301404.

X-MFC-With: r301404
MFC after: 1 week

8 years agoDocument getent(1)'s ability to enumerate netgroup members.
markj [Sat, 4 Jun 2016 21:34:06 +0000 (21:34 +0000)]
Document getent(1)'s ability to enumerate netgroup members.

MFC after: 3 days

8 years agoFix markup.
kib [Sat, 4 Jun 2016 20:20:14 +0000 (20:20 +0000)]
Fix markup.

Sponsored by: The FreeBSD Foundation

8 years agobhnd(4): support IPX OTP NVRAM/SPROM data source
landonf [Sat, 4 Jun 2016 19:58:01 +0000 (19:58 +0000)]
bhnd(4): support IPX OTP NVRAM/SPROM data source

Add support for fetching SPROM data from OTP on chipsets with an
IPX OTP controller (including the BCM43225).

This integrates the NVRAM data source into the chipc_caps capability
structure, and adds a sprom_offset field that can be used with OTP
to locate the SPROM image data (found within the general use
region, H/W subregion).

This also removes one of two duplicate parse error messages reported by
both the bhnd_sprom driver and the underlying SPROM parsing API.

Approved by: adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D6729

8 years agoSwitch mips/sentry5 to bhnd(4), and unify with mips/broadcom
landonf [Sat, 4 Jun 2016 19:53:47 +0000 (19:53 +0000)]
Switch mips/sentry5 to bhnd(4), and unify with mips/broadcom

Now that bhnd(4) provides feature parity with the previous siba/mips
implementation, we can switch sentry5 over and begin lifting common
support code out for use across bhnd(4) embedded targets.

Changes:

- Fixed enumeration of siba(4) per-core address maps, required for
  discovery of memory mapped chipc flash region on siba(4) devices.
- Simplified bhnd kernel configuration (dropped 'bhndbus' option).
- Replaced files.broadcom's direct file references with their
  corresponding standard kernel options.
- Lifted out common bcma/siba nexus support, inheriting from the new
  generic bhnd_nexus driver.
- Dropped now-unused sentry5 siba code.
- Re-integrated BCM into the universe build now that it actually compiles.

Approved by: adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D6712

8 years agobhnd(4): Add support for chipc-attached flash
landonf [Sat, 4 Jun 2016 19:39:05 +0000 (19:39 +0000)]
bhnd(4): Add support for chipc-attached flash

This adds support for serial (via SPI) and parallel (via CFI) flash
as found on BCM47xx/BCM53xx SoCs.

Submitted by:   Michael Zhilin <mizhka@gmail.com>
Approved by:    adrian (mentor)
Differential Revision:  https://reviews.freebsd.org/D6250

8 years agoFix several MIPS/BCM-blocking bugs in bhnd(4) chipc
landonf [Sat, 4 Jun 2016 19:31:06 +0000 (19:31 +0000)]
Fix several MIPS/BCM-blocking bugs in bhnd(4) chipc

- Correct IRQ lines for UART (to fix IRQ lookup in future)
- Check device unit in resource assignment during chipc_add_child
- If chipc hint->size is RM_MAX_END, resource end should be same as window end
- Clear reference from resource list entry to resource in case of resource release
- Add CHIPC_GET_CAPS implementation
- Correct chipc flash constants (to be unshifted)
- Default implementation of get_attach_type should iterate over device tree
- Add default implementation for BHND_CHIPC_GET_CAPS usable by chipc grandchildren

Submitted by: Michael Zhilin <mizhka@gmail.com>
Approved by: adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D6584

8 years agoUpdate my e-mail address (and fix related typo in siba.4)
landonf [Sat, 4 Jun 2016 19:00:11 +0000 (19:00 +0000)]
Update my e-mail address (and fix related typo in siba.4)

Approved by: adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D6714

8 years agoDon't test for INKERNEL to check whether we're in kernel space.
ed [Sat, 4 Jun 2016 18:57:00 +0000 (18:57 +0000)]
Don't test for INKERNEL to check whether we're in kernel space.

It turns out that <machine/param.h> actually defines a macro under this
name, even when we're not in kernelspace. This causes us to suppress
some macro definitions that are used by userspace apps.

PR: 210026
Reported by: jbeich@
MFC after: 2 weeks

8 years agoSupport all architectures by just using sysent.
bdrewery [Sat, 4 Jun 2016 17:39:42 +0000 (17:39 +0000)]
Support all architectures by just using sysent.

PowerPC64 has two different ABIs, neither of which is elf64_freebsd_sysvec.
Using sysent and freebsd32_sysent achieves the same effect.

X-MFC-With: r301130
MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

8 years agoFix incorrect logic in r301394.
bdrewery [Sat, 4 Jun 2016 17:38:17 +0000 (17:38 +0000)]
Fix incorrect logic in r301394.

Reported by: Mark Millard

8 years agoDIRDEPS_BUILD: Update GCC dependencies.
bdrewery [Sat, 4 Jun 2016 17:37:25 +0000 (17:37 +0000)]
DIRDEPS_BUILD: Update GCC dependencies.

Sponsored by: EMC / Isilon Storage Division

8 years agoFollow-up r301287: Pass external compiler metadata when used.
bdrewery [Sat, 4 Jun 2016 17:17:10 +0000 (17:17 +0000)]
Follow-up r301287: Pass external compiler metadata when used.

This fixes WITH_SYSTEM_COMPILER, WITHOUT_CROSS_COMPILER, external compiler, to
pass the external compiler metadata rather than the ${CC} metadata.  On
a build host that has clang as CC it was passing the clang metadata rather than
GCC metadata during the build.

8 years agoFix typo preventing pw {user,group}next -C from working as expected
bapt [Sat, 4 Jun 2016 16:31:33 +0000 (16:31 +0000)]
Fix typo preventing pw {user,group}next -C from working as expected

Reported by: Mike Selnet via forums.freebsd.org
MFC after: 3 days

8 years agoImport libucl snapshot 20160604
bapt [Sat, 4 Jun 2016 14:57:25 +0000 (14:57 +0000)]
Import libucl snapshot 20160604

It replaces xxhash with mumhash
It fixes issues with msgpack on non x86

8 years agoUpdate libucl to 20160604 snapshot
bapt [Sat, 4 Jun 2016 14:50:12 +0000 (14:50 +0000)]
Update libucl to 20160604 snapshot

8 years agosfxge(4): always be ready to receive batched events
arybchik [Sat, 4 Jun 2016 09:20:46 +0000 (09:20 +0000)]
sfxge(4): always be ready to receive batched events

When the low-latency firmware variant is running, it is reported as not
being capable of batching RX events, but it can still do so if the
FORCE_EV_MERGING flag is set on an RXQ.  Therefore we need to handle
batched RX events even if the capability isn't set.

If this bug is fixed in the firmware such that the capability is set
even when running the low-latency firmware variant, it will almost
always be reported so I don't think we lose much by removing the check.

Submitted by:   Mark Spender <mspender at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D6705

8 years agosfxge(4): add helper to compute timer quantum
arybchik [Sat, 4 Jun 2016 09:17:45 +0000 (09:17 +0000)]
sfxge(4): add helper to compute timer quantum

This also adjusts the timer values used to match the Linux net
driver implementation:
a) non-zero time intervals should result in at least one quantum
b) timer load/reload values are only zero biased for Falcon/Siena

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D6704

8 years ago[ath] remove now unused parameters.
adrian [Sat, 4 Jun 2016 08:56:30 +0000 (08:56 +0000)]
[ath] remove now unused parameters.

These will move to being part of the driver btcoex stuff I'm working
on, since the HAL doesn't know what to do with them.

8 years agoUse the UEFI event timer to update the time on arm and arm64. The current
andrew [Sat, 4 Jun 2016 08:47:45 +0000 (08:47 +0000)]
Use the UEFI event timer to update the time on arm and arm64. The current
code uses the GetTime function from the Runtime Service, however this has
been shown to not return a useable time on many arm64 UEFI implementations.

Reviewed by: jhb, smh
Sponsored by: ABT Systems Ltd
Differential Revision: https://reviews.freebsd.org/D6709

8 years ago[ath_hal] add STOMP_AUDIO for AR9462/QCA9565.
adrian [Sat, 4 Jun 2016 07:29:10 +0000 (07:29 +0000)]
[ath_hal] add STOMP_AUDIO for AR9462/QCA9565.

Obtained from: Linux ath9k

8 years ago[ath_hal] add placeholders for AUDIO stomp for Kite/Kiwi.
adrian [Sat, 4 Jun 2016 07:28:36 +0000 (07:28 +0000)]
[ath_hal] add placeholders for AUDIO stomp for Kite/Kiwi.

It just stomps all; which is enough for some testing.

8 years ago[ath_hal] add BTCOEX_STOMP_AUDIO; delete unused methods.
adrian [Sat, 4 Jun 2016 07:28:09 +0000 (07:28 +0000)]
[ath_hal] add BTCOEX_STOMP_AUDIO; delete unused methods.

8 years ago[run] fix TSF locking in RX radiotap.
adrian [Sat, 4 Jun 2016 07:18:39 +0000 (07:18 +0000)]
[run] fix TSF locking in RX radiotap.

Submitted by: Imre Vadasz <imre@vdsz.com>

8 years agoioat(4): Always log capabilities on attach
cem [Sat, 4 Jun 2016 04:14:06 +0000 (04:14 +0000)]
ioat(4): Always log capabilities on attach

Different, relatively recent Intel Xeon hardware support radically different
features.  E.g., BDX support CRC32 while BDX-DE does not.

Reviewed by: rpokala (spiritually)
Sponsored by: EMC / Isilon Storage Division

8 years agoioat(4): Export the number of available channels
cem [Sat, 4 Jun 2016 03:54:30 +0000 (03:54 +0000)]
ioat(4): Export the number of available channels

Sponsored by: EMC / Isilon Storage Division

8 years agoioat(4): Make channel indices unsigned
cem [Sat, 4 Jun 2016 03:52:19 +0000 (03:52 +0000)]
ioat(4): Make channel indices unsigned

Sponsored by: EMC / Isilon Storage Division

8 years agoEnable daily_ntpd_leapfile_enable by default. Otherwise an expired
cy [Sat, 4 Jun 2016 01:01:46 +0000 (01:01 +0000)]
Enable daily_ntpd_leapfile_enable by default. Otherwise an expired
leapfile will be ignored and ntpd will behave as if it has no
leapfile.

While here, remove an extraneous blank line.

Suggested by: ache
MFC after: 1 week

8 years agoWhen negotiating NTB_SB01BASE_LOCKUP workaround, don't try to limit the
mav [Sat, 4 Jun 2016 00:18:59 +0000 (00:18 +0000)]
When negotiating NTB_SB01BASE_LOCKUP workaround, don't try to limit the
BAR size to 1MB.  According to Xeon v3 specifications and my tests, that
size register is write-once and so not writeable after BIOS written it.

Instead of that, make the code work with BAR of any sufficient size,
properly calculating offset within its base.  It also simplifies the code.

Discussed with: cem
MFC after: 2 weeks
Sponsored by: iXsystems, Inc.