]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
8 years agoMFH
gjb [Mon, 11 Apr 2016 15:24:59 +0000 (15:24 +0000)]
MFH

Sponsored by: The FreeBSD Foundation

8 years agoFix the problem, when gpart(8) can't write both bootcode and partcode
ae [Mon, 11 Apr 2016 13:44:31 +0000 (13:44 +0000)]
Fix the problem, when gpart(8) can't write both bootcode and partcode
in one command due to wrong file size limit. Do not use bootcode size
to calculate partsize limit.
Also add report message about successful partcode writing.

Reported by: Trond Endrestøl
MFC after: 2 weeks

8 years agoOnly include sysctl in kernel build
smh [Mon, 11 Apr 2016 13:17:11 +0000 (13:17 +0000)]
Only include sysctl in kernel build

Only include sysctl in kernel builds fixing warning about implicit
declaration of function 'sysctl_handle_int'.

PR: 204140
MFC after: 1 week
X-MFC-With: r297813
Sponsored by: Multiplay

8 years agoUpdate 25xx chips firmware from 7.03.00 to 8.03.00.
mav [Mon, 11 Apr 2016 10:53:25 +0000 (10:53 +0000)]
Update 25xx chips firmware from 7.03.00 to 8.03.00.

While the same update is also available for 24xx chips, it seems have
a problem with disabling virtual ports -- firmware handles the request,
but does not respong on it, causing timeout in driver.

MFC after: 1 month

8 years agoPolish debugging IOCB dumping.
mav [Mon, 11 Apr 2016 10:48:26 +0000 (10:48 +0000)]
Polish debugging IOCB dumping.

Add few more missing cases, unify byte order.

MFC after: 1 month

8 years agoDuring if_vmove() we call if_detach_internal() which in turn calls the event
bz [Mon, 11 Apr 2016 10:00:38 +0000 (10:00 +0000)]
During if_vmove() we call if_detach_internal() which in turn calls the event
handler notifying about interface departure and one of the consumers will
detach if_bpf.
There is no way for us to re-attach this easily as the DLT and hdrlen are
only given on interface creation.
Add a function to allow us to query the DLT and hdrlen from a current
BPF attachment and after if_attach_internal() manually re-add the if_bpf
attachment using these values.

Found by panics triggered by nd6 packets running past BPF_MTAP() with no
proper if_bpf pointer on the interface.

Also add a basic DDB show function to investigate the if_bpf attachment
of an interface.

Reviewed by: gnn
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D5896

8 years agohyperv: Typo
sephe [Mon, 11 Apr 2016 09:52:24 +0000 (09:52 +0000)]
hyperv: Typo

Noticed by: kib
MFC after: 1 week
Sponsored by: Microsoft OSTC

8 years agoOnly include sysctl in kernel build
smh [Mon, 11 Apr 2016 08:57:54 +0000 (08:57 +0000)]
Only include sysctl in kernel build

Only include sysctl in kernel builds fixing warning about implicit
declaration of function 'sysctl_handle_int'.

Sponsored by: Multiplay

8 years agozio: align use of "no dump" flag between use_uma and !use_uma cases
avg [Mon, 11 Apr 2016 07:11:20 +0000 (07:11 +0000)]
zio: align use of "no dump" flag between use_uma and !use_uma cases

At the moment no ZFS buffers are included into a crash dump unless
ZFS_DEBUG (or INVARIANTS) kernel option is enabled.  That's not very
helpful for debugging of ZFS problems, because important information
often resides in metadata buffers.
This change switches the dumping behavior when UMA is used from the
illumos behavior to a more useful behavior that we have on FreeBSD
when ZFS buffers are allocated via malloc.

Reviewed by: smh, mav
MFC after: 3 weeks
Differential Revision: https://reviews.freebsd.org/D5892

8 years agohyperv/hn: Remove unnecessary NULL checks
sephe [Mon, 11 Apr 2016 06:59:13 +0000 (06:59 +0000)]
hyperv/hn: Remove unnecessary NULL checks

Submitted by: Jun Su <junsu microsoft com>
Reviewed by: sephe
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D5905

8 years agohyperv/hn: By default enable multiple TX/RX rings, aka vRSS.
sephe [Mon, 11 Apr 2016 06:37:50 +0000 (06:37 +0000)]
hyperv/hn: By default enable multiple TX/RX rings, aka vRSS.

Reviewed by: Dexuan Cui <decui microsoft com>
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D5880

8 years agohyperv/hn: Cap default # of rings to 8.
sephe [Mon, 11 Apr 2016 06:31:52 +0000 (06:31 +0000)]
hyperv/hn: Cap default # of rings to 8.

8 gives the best performance in both Azure and local Hyper-V on both
10Ge and 40Ge. More rings are still allowed by manual configuration.

Reviewed by: Dexuan Cui <decui microsoft com>
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D5879

8 years agohyperv: Define macro for Hyper-V interface
sephe [Mon, 11 Apr 2016 06:22:26 +0000 (06:22 +0000)]
hyperv: Define macro for Hyper-V interface

Suggested by: rpokala
MFC after: 1 week
Sponsored by: Microsoft OSTC

8 years agohyperv: Print more features
sephe [Mon, 11 Apr 2016 06:15:40 +0000 (06:15 +0000)]
hyperv: Print more features

And add comment about the MSR features.

MFC after: 1 week
Sponsored by: Microsoft OSTC

8 years agoAllow guest writes to AMD microcode update[0xc0010020] MSR without updating actual...
anish [Mon, 11 Apr 2016 05:09:43 +0000 (05:09 +0000)]
Allow guest writes to AMD microcode update[0xc0010020] MSR without updating actual hardware MSR. This allows guest microcode update to go through which otherwise failing because wrmsr() was returning EINVAL.

Submitted by:Yamagi Burmeister
Approved by:grehan
MFC after:2 weeks

8 years agohyperv: Break long line
sephe [Mon, 11 Apr 2016 04:56:23 +0000 (04:56 +0000)]
hyperv: Break long line

MFC after: 1 week
Sponsored by: Microsoft OSTC

8 years agohyperv: Declare hyperv_{features,recommends} properly
sephe [Mon, 11 Apr 2016 04:49:21 +0000 (04:49 +0000)]
hyperv: Declare hyperv_{features,recommends} properly

MFC after: 1 week
Sponsored by: Microsoft OSTC

8 years agohyperv: Resurrect r297481
sephe [Mon, 11 Apr 2016 03:36:07 +0000 (03:36 +0000)]
hyperv: Resurrect r297481

This time we make sure that the TIME_REF_COUNT MSR exists.

Submitted by: Jun Su <junsu microsoft com>
Reviewed by: sephe, Dexuan Cui <decui microsoft com>
MFC after: 1 week
Sponsored by: Microsoft OSTC

8 years agohyperv: Identify Hyper-V features and recommends properly
sephe [Mon, 11 Apr 2016 03:28:17 +0000 (03:28 +0000)]
hyperv: Identify Hyper-V features and recommends properly

Features bits will be used to detect devices, e.g. timers, which
do not have corresponding event channels.

Submitted by: Jun Su <junsu microsoft com>
Reviewed by: sephe, Dexuan Cui <decui microsoft com>
Rearranged by: sephe
MFC after: 1 week
Sponsored by: Microsoft OSTC

8 years agohyperv/vmbus: Get rid of max_leaf detection; this is actually not used.
sephe [Mon, 11 Apr 2016 03:14:28 +0000 (03:14 +0000)]
hyperv/vmbus: Get rid of max_leaf detection; this is actually not used.

It will be replaced by a new one.

MFC after: 1 week
Sponsored by: Microsoft OSTC

8 years agohyperv/vmbus: Nuke unused function
sephe [Mon, 11 Apr 2016 03:07:35 +0000 (03:07 +0000)]
hyperv/vmbus: Nuke unused function

MFC after: 1 week
Sponsored by: Microsoft OSTC

8 years agocxgbe(4): Provide an explicit value for nqpcq in the firmware
np [Mon, 11 Apr 2016 02:18:59 +0000 (02:18 +0000)]
cxgbe(4): Provide an explicit value for nqpcq in the firmware
configuration file.

8 years agoext2fs: replace 0 with NULL for pointers.
pfg [Mon, 11 Apr 2016 00:12:24 +0000 (00:12 +0000)]
ext2fs: replace 0 with NULL for pointers.

While here do late initialization of ebap, similar as was
done in UFS.

Found with devel/coccinelle.

MFC after: 2 weeks

8 years agolpr: replace 0 with NULL for pointers.
pfg [Sun, 10 Apr 2016 23:47:40 +0000 (23:47 +0000)]
lpr: replace 0 with NULL for pointers.

Found with devel/coccinelle.

Reviewed by: gad

8 years agoFix IIC "how" argument dereferencing on big-endian platforms
gonzo [Sun, 10 Apr 2016 23:17:06 +0000 (23:17 +0000)]
Fix IIC "how" argument dereferencing on big-endian platforms

"how" argument is passed as value of int* pointer to callback
function but dereferenced as char* so only one byte taken into
into account. On little-endian systems it happens to work because
first byte is LSB that contains actual value, on big-endian it's
MSB and in this case it's always equal zero

PR: 207786
Submitted by: chadf@triularity.org

8 years agoCleanup unnecessary semicolons from the kernel.
pfg [Sun, 10 Apr 2016 23:07:00 +0000 (23:07 +0000)]
Cleanup unnecessary semicolons from the kernel.

Found with devel/coccinelle.

8 years agoSince r296250 it is no longer possible for devices to use bus space
marius [Sun, 10 Apr 2016 22:43:36 +0000 (22:43 +0000)]
Since r296250 it is no longer possible for devices to use bus space
addresses exceeding 32 bit, so bump BUS_SPACE_MAXADDR to 64 bit.
The whole situation is sub par, though; prior to r296250 and despite
what their names imply, BUS_SPACE_MAX* were primarily, even almost
exclusively used for bus_dma(9). Now these macros also have a vital
role for bus_space(9). However, it does not necessarily hold that
both bus DMA and space addresses universally have the same limits
per platform.
As for sparc64, 64 bit clearly is beyond what can be addressed via
the various IOMMUs. With this change in place, we now rely on the
parent bus DMA tags of the host-to-foo drivers causing the child
tags to be capped as necessary.

PR: 207998

8 years agoufs: replace 0 with NULL for pointers.
pfg [Sun, 10 Apr 2016 21:48:11 +0000 (21:48 +0000)]
ufs: replace 0 with NULL for pointers.

While here also do late initialization of the variables we are
changing.

Found with devel/coccinelle.

Reviewed by: mckusick
MFC after: 2 weeks

8 years agolibc: replace 0 with NULL for pointers.
pfg [Sun, 10 Apr 2016 19:33:58 +0000 (19:33 +0000)]
libc: replace 0 with NULL for pointers.

While here also cleanup some surrounding code; particularly
drop some malloc() casts.

Found with devel/coccinelle.

Reviewed by: bde (previous version - all new bugs are mine)

8 years agoAdd bofh@ in calendar.freebsd
bofh [Sun, 10 Apr 2016 16:48:21 +0000 (16:48 +0000)]
Add bofh@ in calendar.freebsd

8 years agoVM_MAXUSER_ADDRESS is highest page start, not highest address.
jhibbits [Sun, 10 Apr 2016 15:50:45 +0000 (15:50 +0000)]
VM_MAXUSER_ADDRESS is highest page start, not highest address.

In case a single page mapping is requested first, which might overlap the user
address space, fix the device map block to the next page.

8 years agoRestructure device mappings for Book-E.
jhibbits [Sun, 10 Apr 2016 15:48:09 +0000 (15:48 +0000)]
Restructure device mappings for Book-E.

Summary:
There is currently a 1GB hole between user and kernel address spaces
into which direct (1:1 PA:VA) device mappings go.  This appears to go largely
unused, leaving all devices to contend with the 128MB block at the end of the
32-bit space (0xf8000000-0xffffffff).  This easily fills up, and needs to be
densely packed.  However, dense packing wastes precious TLB1 space, of which
there are only 16 (e500v2) or 64(e5500) entries available.

Change this by using the 1GB space for all device mappings, and allow the kernel
to use the entire upper 1GB for KVA.  This also allows us to use sparse device
mappings, freeing up TLB entries.

Test Plan: Boot tested on p5020.

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

8 years agoMore complete implementation of /proc/self/limits.
dchagin [Sun, 10 Apr 2016 07:11:29 +0000 (07:11 +0000)]
More complete implementation of /proc/self/limits.
Fix the way the code accesses process limits struct - pointed out by mjg@.

PR: 207386
Reviewed by: no objection form des@
MFC after: 3 weeks

8 years agoAdd a 'show t4 devlog <nexus>' DDB command.
jhb [Sun, 10 Apr 2016 06:19:26 +0000 (06:19 +0000)]
Add a 'show t4 devlog <nexus>' DDB command.

This command displays the adapter's firmware device log similar to the
dev.<nexus>.misc.devlog sysctl.

Sponsored by: Chelsio Communications

8 years agoAllow the location of the kernel source tree to be overridden.
grehan [Sun, 10 Apr 2016 05:58:19 +0000 (05:58 +0000)]
Allow the location of the kernel source tree to be overridden.
This makes it easier for the bhyve executable to be built
out of the tree.

8 years agoAdd a 'show t4 tcb <nexus> <tid>' command to dump a TCB from DDB.
jhb [Sun, 10 Apr 2016 05:06:58 +0000 (05:06 +0000)]
Add a 'show t4 tcb <nexus> <tid>' command to dump a TCB from DDB.

This allows the contents of a TCB to be extracted from a T4/T5 card in
DDB after a panic.

8 years agoAdd a function to lookup a device_t object by name.
jhb [Sun, 10 Apr 2016 05:05:02 +0000 (05:05 +0000)]
Add a function to lookup a device_t object by name.

This just walks the global list of devices looking for one with the
requested name.  The one use case outside of devctl2's implementation
is for DDB commands that wish to lookup devices by name.

8 years ago[net80211] correctly (i hope, wow) do a ticks comparison to limit A-MPDU attempts
adrian [Sun, 10 Apr 2016 04:16:34 +0000 (04:16 +0000)]
[net80211] correctly (i hope, wow) do a ticks comparison to limit A-MPDU attempts

I was seeing the stack constantly attempt to renegotiate A-MPDU TX
even after 3 failures.  My hunch is that the direct ticks comparison
is failing around the ticks wrap-around point.

This failure shouldn't /really/ happen normally, but it turns out being
the IBSS master node on FreeBSD doesn't quite setup 11n right, so
negotiating A-MPDU TX fails.

8 years ago[net80211] unconditionally do A-MPDU RX aging.
adrian [Sun, 10 Apr 2016 03:35:17 +0000 (03:35 +0000)]
[net80211] unconditionally do A-MPDU RX aging.

It's 2016 and vendors (including us!) still have 802.11n TX/RX sequence
handling bugs.  It's suboptimal, but I'd rather see us default to handling
things in a sensible way.

So, just delete the #ifdef'ed code for now.  I'll leave the option in
so it doesn't break existing configurations.

This all started because I've started getting reports about urtwn not
working after I enabled 802.11n support, and it's because the ARM kernel
configs don't include A-MPDU RX aging.

8 years agoImplement support for boot-time DTrace.
markj [Sun, 10 Apr 2016 01:25:48 +0000 (01:25 +0000)]
Implement support for boot-time DTrace.

This allows one to enable DTrace probes relatively early during boot,
during SI_SUB_DTRACE_ANON, before dtrace(1) can invoked. The desired
enabling is created using dtrace -A, which writes a /boot/dtrace.dof
file and uses nextboot(8) to ensure that DTrace kernel modules are loaded
and that the DOF file describing the enabling is loaded by loader(8)
during the subsequent boot. The trace output can then be fetched with
dtrace -a.

With this commit, boot-time DTrace is only functional on i386 and amd64: on
other architectures, the high-resolution timer frequency is initialized
during SI_SUB_CLOCKS and is thus not available when the anonymous
tracing state is initialized. On x86, the TSC is used and is thus available
earlier.

MFC after: 1 month
Relnotes: yes

8 years agonextboot(8): add a -a option for appending to a configuration.
markj [Sun, 10 Apr 2016 01:25:12 +0000 (01:25 +0000)]
nextboot(8): add a -a option for appending to a configuration.

By default, a nextboot invocation will clobber any existing nextboot
configuration.

MFC after: 2 weeks
Relnotes: yes

8 years agoInitialize SDT probes during SI_SUB_DTRACE_PROVIDER.
markj [Sun, 10 Apr 2016 01:24:27 +0000 (01:24 +0000)]
Initialize SDT probes during SI_SUB_DTRACE_PROVIDER.

This is consistent with all other DTrace providers and ensures that
SDT probes are available for boot-time tracing.

MFC after: 2 weeks

8 years agoInitialize DTrace hrtimer frequency during SI_SUB_CPU on i386 and amd64.
markj [Sun, 10 Apr 2016 01:23:39 +0000 (01:23 +0000)]
Initialize DTrace hrtimer frequency during SI_SUB_CPU on i386 and amd64.

This allows the hrtimer to be used earlier during boot. This is required
for boot-time DTrace: anonymous enablings are created during
SI_SUB_DTRACE_ANON, which runs before APs are started. In particular,
the DTrace deadman timer requires that the hrtimer be functional.

MFC after: 2 weeks

8 years ago[net80211] log the node pointer when calling ht node init/cleanup
adrian [Sat, 9 Apr 2016 22:01:32 +0000 (22:01 +0000)]
[net80211] log the node pointer when calling ht node init/cleanup

This makes it easier to track which node is having what done do it
during normal use.

This is likely the eighth time I've done this since I started doing
net80211 development, so I think it's about time I just committed it.

8 years ago[net80211] add back in the ff/superg node init call that I accidentally
adrian [Sat, 9 Apr 2016 21:57:34 +0000 (21:57 +0000)]
[net80211] add back in the ff/superg node init call that I accidentally
deleted.

It's mostly a no-op right now, so it shouldn't have changed behaviour.

8 years agoUSB: replace 0 with NULL for pointers.
pfg [Sat, 9 Apr 2016 20:36:07 +0000 (20:36 +0000)]
USB: replace 0 with NULL for pointers.

Found with devel/coccinelle.

Reviewed by: hselasky

8 years agoMFV r297760: 6418 zpool should have a label clearing command
mav [Sat, 9 Apr 2016 20:30:50 +0000 (20:30 +0000)]
MFV r297760: 6418 zpool should have a label clearing command

Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Author: Will Andrews <will@firepipe.net>

Closes #83
Closes #32

openzfs/openzfs@9663688425131744221ea99f9e66b9ed964492ae

FreeBSD already had `zpool labelclear` functionality, so this is mostly
just a diff reduction.

MFC after: 1 month

8 years agoUse DELAY() instead of sleeping during boot-time attach.
jhb [Sat, 9 Apr 2016 20:18:34 +0000 (20:18 +0000)]
Use DELAY() instead of sleeping during boot-time attach.

Tested by: Wolfgang Zenker <wolfgang@lyxys.ka.sub.org>

8 years agosh(1): replace 0 with NULL for pointers.
pfg [Sat, 9 Apr 2016 20:05:39 +0000 (20:05 +0000)]
sh(1): replace 0 with NULL for pointers.

Found with devel/coccinelle.

Reviewed by: jilles

8 years agoAlign the start of the text segment to an 8-byte boundary. This fixes
ian [Sat, 9 Apr 2016 19:09:06 +0000 (19:09 +0000)]
Align the start of the text segment to an 8-byte boundary.  This fixes
alignment aborts in ubldr.bin for RPi that started happening with clang 3.8
(earlier clang apparently didn't generate strd instructions that trigger
the alignment fault).  The abort happened in ubldr.bin and not ubldr (elf
version) because the elf headers are 0xf4 bytes long, and stripping them
off left everything 4-byte aligned.

While here, also stop aligning the data segment to a page boundary, align
it to 8 bytes instead (aligning to a page just needlessly makes the file
bigger); pointed out by andrew@.

8 years agolibedit: replace 0 with NULL for pointers.
pfg [Sat, 9 Apr 2016 18:52:09 +0000 (18:52 +0000)]
libedit: replace 0 with NULL for pointers.

Found with devel/coccinelle.

Reviewed by: Christos Zoulas

8 years agoAdd couple new constants from SPC5r08.
mav [Sat, 9 Apr 2016 18:39:57 +0000 (18:39 +0000)]
Add couple new constants from SPC5r08.

8 years agolibpam: replace 0 with NULL for pointers.
pfg [Sat, 9 Apr 2016 18:09:10 +0000 (18:09 +0000)]
libpam: replace 0 with NULL for pointers.

Found with devel/coccinelle.

Reviewed by: des

8 years agolibfetch: replace 0 with NULL for pointers.
pfg [Sat, 9 Apr 2016 18:08:21 +0000 (18:08 +0000)]
libfetch: replace 0 with NULL for pointers.

Found with devel/coccinelle.

Reviewed by: des

8 years agoixl(4): replace 0 with NULL for pointers.
pfg [Sat, 9 Apr 2016 17:37:36 +0000 (17:37 +0000)]
ixl(4): replace 0 with NULL for pointers.

Found by devel/coccinelle.

Differential Revision: https://reviews.freebsd.org/D5894
Reviewed by: erj

8 years agosh: Fix some unquoted variables in tests.
jilles [Sat, 9 Apr 2016 16:06:13 +0000 (16:06 +0000)]
sh: Fix some unquoted variables in tests.

The builtins/getopts1.0 test failed if a single-character file existed in
the current directory.

8 years agoRegister symbolic port/node names in FC name server.
mav [Sat, 9 Apr 2016 14:50:47 +0000 (14:50 +0000)]
Register symbolic port/node names in FC name server.

This is cosmetics that simplifies identification of new ports on FC switch.

It would be good to use target name from CTL here instead of hostname, but
it is not passed here through CAM now.

MFC after: 2 weeks

8 years agoAdd more fine-grained kernel options for NUMA support.
jhb [Sat, 9 Apr 2016 13:58:04 +0000 (13:58 +0000)]
Add more fine-grained kernel options for NUMA support.

VM_NUMA_ALLOC is used to enable use of domain-aware memory allocation in
the virtual memory system.  DEVICE_NUMA is used to enable affinity
reporting for devices such as bus_get_domain().

MAXMEMDOM must still be set to a value greater than for any NUMA support
to be effective.  Note that 'cpuset -gd' always works if MAXMEMDOM is
enabled and the system supports NUMA.

Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D5782

8 years agoioat(4): ioat_get_dmaengine(): Add M_WAITOK mode
cem [Sat, 9 Apr 2016 13:15:34 +0000 (13:15 +0000)]
ioat(4): ioat_get_dmaengine(): Add M_WAITOK mode

Sponsored by: EMC / Isilon Storage Division

8 years agoMfp: r296310,r296343
bz [Sat, 9 Apr 2016 12:05:23 +0000 (12:05 +0000)]
Mfp: r296310,r296343

It looks like as with the safety belt of DELAY() fastened (*) we can
completely tear down and free all memory for TCP (after r281599).

(*) in theory a few ticks should be good enough to make sure the timers
are all really gone. Could we use a better matric here and check a
tcbcb count as an optimization?

PR: 164763
Reviewed by: gnn, emaste
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D5734

8 years agoReduce code duplication when executing Passthrough IOCB.
mav [Sat, 9 Apr 2016 11:54:09 +0000 (11:54 +0000)]
Reduce code duplication when executing Passthrough IOCB.

MFC after: 2 weeks

8 years agoMfp: r296260
bz [Sat, 9 Apr 2016 11:27:47 +0000 (11:27 +0000)]
Mfp: r296260

The tcp_inpcb (pcbinfo) zone should be safe to destroy.

PR: 164763
Reviewed by: gnn
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D5732

8 years agoEnable PHY regulator when the optional "phy-supply" property is present.
jmcneill [Sat, 9 Apr 2016 11:23:46 +0000 (11:23 +0000)]
Enable PHY regulator when the optional "phy-supply" property is present.

Submitted by: Emmanuel Vadot <manu@bidouilliste.com>

8 years agoMfp: r296259
bz [Sat, 9 Apr 2016 10:58:08 +0000 (10:58 +0000)]
Mfp: r296259

We attach the "counter" to the tcpcbs. Thus don't free the
TCP Fastopen zone before the tcpcbs are gone, as otherwise
the zone won't be empty.
With that it should be safe to destroy the "tfo" zone without
leaking the memory.

PR: 164763
Reviewed by: gnn
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D5731

8 years agoCreate /usr/local/etc before filling things into it.
phk [Sat, 9 Apr 2016 10:53:21 +0000 (10:53 +0000)]
Create /usr/local/etc before filling things into it.

Only run mtree if the NANO_CUST_FILES_MTREE is nonempty

Also umount the packages on non-signal failure

8 years agoMfp: r296309
bz [Sat, 9 Apr 2016 10:51:07 +0000 (10:51 +0000)]
Mfp: r296309

While there is no dependency interaction, stopping the timer before
freeing the rest of the resources seems more natural and avoids it
being scheduled an extra time when it is no longer needed.

Reviewed by: gnn, emaste
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D5733

8 years agoMfp: r296345
bz [Sat, 9 Apr 2016 10:44:57 +0000 (10:44 +0000)]
Mfp: r296345

No need to keep type stability on raw sockets zone.
We've also been running with a KASSERT since r222488 to make sure the
ipi_count is 0 on destroy.

PR: 164763
Reviewed by: gnn
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D5735

8 years agoMfp: r296346
bz [Sat, 9 Apr 2016 10:39:54 +0000 (10:39 +0000)]
Mfp: r296346

No reason identified to keep UMA_ZONE_NOFREE here.

Reviewed by: gnn
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D5736

8 years agoTry to unbreak the build: the 'vap' variable is only used if ieee80211
bz [Sat, 9 Apr 2016 09:31:28 +0000 (09:31 +0000)]
Try to unbreak the build: the 'vap' variable is only used if ieee80211
debugging compile is on.

8 years agoMake the KASSERT message in hash destroy more informative.
bz [Sat, 9 Apr 2016 09:24:05 +0000 (09:24 +0000)]
Make the KASSERT message in hash destroy more informative.
While the pointer might not be too helpful, the malloc type might at
least give a good hint about which hashtbl we are talking.

MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Reviewed by: gnn, emaste
Differential Revision: https://reviews.freebsd.org/D5802

8 years ago[net80211] print out the channel type (eg a, b, g, n) when creating
adrian [Sat, 9 Apr 2016 04:57:25 +0000 (04:57 +0000)]
[net80211] print out the channel type (eg a, b, g, n) when creating
an IBSS network.

8 years agoFix a masking bug for e500 PMC.
jhibbits [Sat, 9 Apr 2016 01:02:17 +0000 (01:02 +0000)]
Fix a masking bug for e500 PMC.

No idea how this slipped through my regression testing.  pe_code is the event to
count, pe_cpu is the CPU family mask.

8 years ago[ath] Only process beacon frames for the IBSS/BSSID if appropriate.
adrian [Sat, 9 Apr 2016 00:58:38 +0000 (00:58 +0000)]
[ath] Only process beacon frames for the IBSS/BSSID if appropriate.

* Don't use arbitrary frames for the average RX RSSI - only frames
  from the current BSSID

* Don't log / do the syncbeacon logic for another BSSID and definitely
  don't do the syncbeacon call if we miss beacons outside of STA mode.

* Don't do the IBSS merge bits if the current node plainly won't ever
  match our current BSS (ie, the IBSS doesn't have to match, but all
  the same bits that we check in ieee80211_ibss_merge() have to match.)

Tested:

* ath(4), AR9380, IBSS mode, surrounded by a lot of IBSS 11ac networks.

Sponsored by: Eva Automation, Inc.

8 years ago[net8021] Pull out the ibss check code into a public function.
adrian [Sat, 9 Apr 2016 00:55:55 +0000 (00:55 +0000)]
[net8021] Pull out the ibss check code into a public function.

The ath(4) driver now sees beacons and management frames for different
BSSIDs in IBSS mode, which is a problem when you're in a very busy
IBSS environment.

So, expose this function so drivers can use it to check if the current
RX node is actually for a BSS we need to pay attention to or not.

PR: kern/208644
Sponsored by: Eva Automation. Inc.

8 years ago[net80211] revert part of r282405 in order to restore IBSS behaviour.
adrian [Sat, 9 Apr 2016 00:54:02 +0000 (00:54 +0000)]
[net80211] revert part of r282405 in order to restore IBSS behaviour.

This prevents nodes being created for peers on BSSes that are not our own.
(Ie, same channel, IBSS, but different BSS.)

The "IBSS merge" thing was fixed by me enabling "see all beacons" in
the ath(4) driver a few months ago.  Trouble is, we now need the filtering
again.

Tested:

* ath(4), IBSS, on a very busy IBSS channel with lots (> 15) IBSS networks.

PR: kern/208643
Sponsored by: Eva Automation, Inc.

8 years agoFix incorrect pin definitions for Allwinner A31.
jmcneill [Fri, 8 Apr 2016 23:11:00 +0000 (23:11 +0000)]
Fix incorrect pin definitions for Allwinner A31.

8 years agoAttach hwreset resources at the same time as clock resources.
jmcneill [Fri, 8 Apr 2016 23:07:16 +0000 (23:07 +0000)]
Attach hwreset resources at the same time as clock resources.

8 years agoMake it possible to tweak RCTL throttling sysctls at runtime.
trasz [Fri, 8 Apr 2016 18:15:31 +0000 (18:15 +0000)]
Make it possible to tweak RCTL throttling sysctls at runtime.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agoFix sending TSO packets larger than single DMA segment on VNIC
zbb [Fri, 8 Apr 2016 16:14:18 +0000 (16:14 +0000)]
Fix sending TSO packets larger than single DMA segment on VNIC

Due to the bug in the number of 'GATHER' subdescriptors for TSO
packets, VNIC was not able to transmit more than one DMA segment
with TSO enabled.

Obtained from: Semihalf
Sponsored by:  Cavium

8 years agoFix MIPS INTRNG omissions, add soft/hard interrupts with different names
sgalabov [Fri, 8 Apr 2016 15:48:10 +0000 (15:48 +0000)]
Fix MIPS INTRNG omissions, add soft/hard interrupts with different names

Reviewed by: kan
Approved by: adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D5888

8 years agoIntroduce better locking for mtk_gpio_v[12] drivers
sgalabov [Fri, 8 Apr 2016 15:28:12 +0000 (15:28 +0000)]
Introduce better locking for mtk_gpio_v[12] drivers

Approved by: adrian (mentor)
Sponsored by: Smartcom - Bulgaria AD
Differential Revision: https://reviews.freebsd.org/D5887

8 years agoIntroduce Mediatek/Ralink PCIe support
sgalabov [Fri, 8 Apr 2016 15:26:49 +0000 (15:26 +0000)]
Introduce Mediatek/Ralink PCIe support

This revision introduces PCIe support for the relevant Mediatek/Ralink
SoCs.
Currently the PCIe support is not converted to INTRNG, this may be a
task for the future.

Approved by: adrian (mentor)
Sponsored by: Smartcom - Bulgaria AD
Differential Revision: https://reviews.freebsd.org/D5886

8 years agoIntroduce XHCI support for MT7621 SoC
sgalabov [Fri, 8 Apr 2016 15:22:30 +0000 (15:22 +0000)]
Introduce XHCI support for MT7621 SoC

Tested on a MT7621 board, similar to the WiTi board.
More testing will be required to confirm everything is fine, but things
look good so far.

Approved by: adrian (mentor)
Sponsored by: Smartcom - Bulgaria AD
Differential Revision: https://reviews.freebsd.org/D5885

8 years agoDisable USB PHY slew rate calibration for Mediatek SoCs for now
sgalabov [Fri, 8 Apr 2016 15:20:58 +0000 (15:20 +0000)]
Disable USB PHY slew rate calibration for Mediatek SoCs for now

USB on both MT7621 and MT7688 seems to work much better without doing
slew rate calibration.
These are the only two SoCs, apart from MT7628, which actually make
use of the slew rate calibration routines implemented in the mtk_usb_phy
driver. Since MT7628 is actually a superset of MT7688 things should be
the same for it as well.

We do not remove the code, we simply define it out.

Approved by: adrian (mentor)
Sponsored by: Smartcom - Bulgaria AD
Differential Revision: https://reviews.freebsd.org/D5884

8 years agoFix wrong memory mapping
sgalabov [Fri, 8 Apr 2016 15:13:38 +0000 (15:13 +0000)]
Fix wrong memory mapping

In mtk_soc.c memory is mapped incorrectly for MT7621. This revision fixes
this.

Approved by: adrian (mentor)
Sponsored by: Smartcom - Bulgaria AD
Differential Revision: https://reviews.freebsd.org/D5882

8 years agobsdinstall/zfsboot should create /tmp and /var/tmp if they do not exist
allanjude [Fri, 8 Apr 2016 15:08:22 +0000 (15:08 +0000)]
bsdinstall/zfsboot should create /tmp and /var/tmp if they do not exist

PR: 208629
PR: 208568
Submitted by: Galael LAPLANCHE <ganael.laplanche@corp.ovh.com>
MFC after: 2 weeks

8 years agoDo not add swap to fstab when swapsize is 0
allanjude [Fri, 8 Apr 2016 15:05:06 +0000 (15:05 +0000)]
Do not add swap to fstab when swapsize is 0

If a user requested encrypted swap, but 0 sized, it would still be added to fstab

PR: 208630
Submitted by: Ganael LAPLANCHE <ganael.laplanche@corp.ovh.com>
MFC after: 2 weeks
Sponsored by: ScaleEngine Inc.

8 years agotopo_set_pu_id: turn a check into an assertion
avg [Fri, 8 Apr 2016 11:59:11 +0000 (11:59 +0000)]
topo_set_pu_id: turn a check into an assertion

The new id must not be present in any cpu set in any topology element.

MFC after: 30 days

8 years agozio write issue threads should have lower (numerically greater) priority
avg [Fri, 8 Apr 2016 11:58:24 +0000 (11:58 +0000)]
zio write issue threads should have lower (numerically greater) priority

This is because they might do data compression which is quite CPU
expensive.  The original code is correct for illumos, because there
a higher priority corresponds to a greater number.

MFC after: 2 weeks

8 years agoHandle whois referrals between RIRs
fanf [Fri, 8 Apr 2016 11:43:22 +0000 (11:43 +0000)]
Handle whois referrals between RIRs

This is rather ugly, because the RIPE and APNIC whois servers do
not provide referrals for address blocks that they do not manage.
However ARIN is usually the right place or knows the right place
so we try there.

The particular instance which clued me in to this bug is U.Mich.
141.211.0.0/16 for which the referral chain should be IANA ->
RIPE -> ARIN. RIPE's RDAP does provide useful redirects (for
example try `curl -I http://rdap.db.ripe.net/ip/141.211.0.0)
so maybe their whois server can be improved.

AfriNIC's whois server gives more direct referrals, but they are
designed to be human-readable. Ugly, but we can manage.

The issue of referrals between RIRs is likely to become more important
in the future whith the increasing number of cross-region IP address
block transfers increases.

8 years agoSpeedup BGX link polling on ARM64
wma [Fri, 8 Apr 2016 11:20:56 +0000 (11:20 +0000)]
Speedup BGX link polling on ARM64

The previous values caused the callout thread stall for 100ms each 2s
if no link is present. Dtrace analysis showed that it has significant
impact on overall interrupt performance.
Decrease these values by a factor of 100.

Obtained from:         Semihalf
Sponsored by:          Cavium
Reviewed by:           zbb
Differential Revision: https://reviews.freebsd.org/D5854

8 years agoUse __FBSDID() for .c files from lib/libthr/thread.
kib [Fri, 8 Apr 2016 11:15:26 +0000 (11:15 +0000)]
Use __FBSDID() for .c files from lib/libthr/thread.

Sponsored by: The FreeBSD Foundation

8 years agoFix regression introduced in r296986.
ae [Fri, 8 Apr 2016 11:13:24 +0000 (11:13 +0000)]
Fix regression introduced in r296986.

Currently we don't keep zoneid in in6_ifaddr structure, because there
is still some code, that doesn't properly initialize sin6_scope_id,
but some functions use sa_equal() for addresses comparison. sa_equal()
compares full sockaddr_in6 structures and such comparison will fail.
For now use zero zoneid in in6ifa_ifwithaddr(). It is safe, because
used address is in embedded form. In future we will use zoneid, so mark it
with XXX comment.

Reported by: kp
Tested by: kp

8 years agoUse ANSI C function definitions, fix spelling in a comment.
kib [Fri, 8 Apr 2016 10:59:06 +0000 (10:59 +0000)]
Use ANSI C function definitions, fix spelling in a comment.

Sponsored by: The FreeBSD Foundation

8 years agoAdd function for mapping SRAM-D area to USB0 (OTG) controller. Use a lower
jmcneill [Fri, 8 Apr 2016 10:54:59 +0000 (10:54 +0000)]
Add function for mapping SRAM-D area to USB0 (OTG) controller. Use a lower
pass number to ensure that this driver is loaded before EMAC or OTG,
regardless of the order of nodes in the DT.

8 years agoUse the ABI-prescribed name for SHT_X86_64_UNWIND in the loader and
kib [Fri, 8 Apr 2016 10:23:48 +0000 (10:23 +0000)]
Use the ABI-prescribed name for SHT_X86_64_UNWIND in the loader and
kernel linker, after the r297686.

Sponsored by: The FreeBSD Foundation

8 years agoAssert that the lock objects put into the off-page, fit into the page.
kib [Fri, 8 Apr 2016 10:21:43 +0000 (10:21 +0000)]
Assert that the lock objects put into the off-page, fit into the page.

Sponsored by: The FreeBSD Foundation

8 years agohyperv: Revert r297481
sephe [Fri, 8 Apr 2016 09:20:46 +0000 (09:20 +0000)]
hyperv: Revert r297481

Use vm_guest == VM_GUEST_HV is not enough to determine whether FreeBSD
is running on Hyper-V or not.  What a mess.

Reported by: smokehydration tutanota com
Sponsored by: Microsoft OSTC

8 years agoAdd new USB quirk.
hselasky [Fri, 8 Apr 2016 06:51:49 +0000 (06:51 +0000)]
Add new USB quirk.

Submitted by: AJ <aleksanderlothe@live.com>
PR: 208623
MFC after: 1 week

8 years agoFix comment.
kevlo [Fri, 8 Apr 2016 04:29:05 +0000 (04:29 +0000)]
Fix comment.