]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
7 years agoModularize evdev
gonzo [Sun, 2 Oct 2016 03:20:31 +0000 (03:20 +0000)]
Modularize evdev

- Convert "options EVDEV" to "device evdev" and "device uinput", add
    modules for both new devices. They are isolated subsystems and do not
    require any compile-time changes to general kernel subsytems
- For hybrid drivers that have evdev as an optional way to deliver input
    events add option EVDEV_SUPPORT. Update all existing hybrid drivers
    to use it instead of EVDEV
- Remove no-op DECLARE_MODULE in evdev, it's not required, MODULE_VERSION
    is enough
- Add evdev module dependency to uinput

Submitted by: Vladimir Kondratiev <wulf@cicgroup.ru>

7 years agoFix gcc compilation error
gonzo [Sun, 2 Oct 2016 03:06:58 +0000 (03:06 +0000)]
Fix gcc compilation error

input_absinfo.code is unsigned so condition is always false

7 years agoAdd GARP retransmit capability
vangyzen [Sun, 2 Oct 2016 01:42:45 +0000 (01:42 +0000)]
Add GARP retransmit capability

A single gratuitous ARP (GARP) is always transmitted when an IPv4
address is added to an interface, and that is usually sufficient.
However, in some circumstances, such as when a shared address is
passed between cluster nodes, this single GARP may occasionally be
dropped or lost.  This can lead to neighbors on the network link
working with a stale ARP cache and sending packets destined for
that address to the node that previously owned the address, which
may not respond.

To avoid this situation, GARP retransmissions can be enabled by setting
the net.link.ether.inet.garp_rexmit_count sysctl to a value greater
than zero.  The setting represents the maximum number of retransmissions.
The interval between retransmissions is calculated using an exponential
backoff algorithm, doubling each time, so the retransmission intervals
are: {1, 2, 4, 8, 16, ...} (seconds).

Due to the exponential backoff algorithm used for the interval
between GARP retransmissions, the maximum number of retransmissions
is limited to 16 for sanity.  This limit corresponds to a maximum
interval between retransmissions of 2^16 seconds ~= 18 hours.
Increasing this limit is possible, but sending out GARPs spaced
days apart would be of little use.

Submitted by: David A. Bright <david.a.bright@dell.com>
MFC after: 1 month
Relnotes: yes
Sponsored by: Dell EMC
Differential Revision: https://reviews.freebsd.org/D7695

7 years agortsold: Log messages about unexpected RAs at LOG_DEBUG.
markj [Sun, 2 Oct 2016 00:56:21 +0000 (00:56 +0000)]
rtsold: Log messages about unexpected RAs at LOG_DEBUG.

Because rtsold listens for RAs on a raw socket, it may receive RAs from
interfaces that it does not manage. Such events can result in excessive
logging.

Submitted by: Franco Fichtner <franco@opnsense.org>
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D8108

7 years agoAllow tracing of functions prefixed by "__".
markj [Sun, 2 Oct 2016 00:35:00 +0000 (00:35 +0000)]
Allow tracing of functions prefixed by "__".

This restriction was inherited from upstream but is not relevant on FreeBSD.
Furthermore, it hindered the tracing of locking primitive subroutines.

MFC after: 1 week

7 years agoAdd the __printflike attribute to the declaration of vdprintf(3)
vangyzen [Sat, 1 Oct 2016 23:08:26 +0000 (23:08 +0000)]
Add the __printflike attribute to the declaration of vdprintf(3)

I intended to add this in r306568.

MFC after: 3 days
Sponsored by: Dell EMC

7 years agoAdd the __printflike attribute to the declaration of dprintf(3)
vangyzen [Sat, 1 Oct 2016 22:34:38 +0000 (22:34 +0000)]
Add the __printflike attribute to the declaration of dprintf(3)

MFC after: 3 days
Sponsored by: Dell EMC

7 years agolmc(4): fix the build without the bpf device
vangyzen [Sat, 1 Oct 2016 22:21:10 +0000 (22:21 +0000)]
lmc(4): fix the build without the bpf device

"make buildkernel" now works with and without "device bpf".

Reported by: Dave Mischler <dave@mischler.com>
MFC after: 3 days
Sponsored by: Dell EMC

7 years agoDon't declare the 'temp' timeval as static.
jhb [Sat, 1 Oct 2016 22:17:40 +0000 (22:17 +0000)]
Don't declare the 'temp' timeval as static.

7 years agoUse timercmp() and timersub() in kdump.
jhb [Sat, 1 Oct 2016 22:12:33 +0000 (22:12 +0000)]
Use timercmp() and timersub() in kdump.

Previously, kdump used the kernel-only timervalsub() macro which required
defining _KERNEL when including <sys/time.h>.  Now, kdump uses the existing
userland API.  The timercmp() usage to check for a backwards timestamp is
also clearer and simpler than the previous code which checked the result of
the subtraction for a negative value.

While here, take advantage of the 3-arg timersub() to store the subtraction
results in a tempory timeval instead of overwriting the timestamp in the
ktrace record and then having to restore it.

7 years agoExpose kernel-only errno values if _WANT_KERNEL_ERRNO is defined.
jhb [Sat, 1 Oct 2016 22:08:07 +0000 (22:08 +0000)]
Expose kernel-only errno values if _WANT_KERNEL_ERRNO is defined.

The kernel uses a few negative errno values for internal conditions
such as requesting a system call restart.  Normally these errno values
are not exposed to userland.  However, kdump needs access to these
values as some of then can be present in a ktrace system call return
record.  Previously kdump was defining _KERNEL to gain access to ehse
values, but was then having to manually declare 'errno' (and doing it
incorrectly).  Now, kdump uses _WANT_KERNEL_ERRNO instead of _KERNEL
and uses the system-provided declaration of errno.

7 years agoDecode arguments to truncate and ftruncate.
jhb [Sat, 1 Oct 2016 22:03:41 +0000 (22:03 +0000)]
Decode arguments to truncate and ftruncate.

In particular, decode the off_t argument as a 64-bit argument to fix
decoding for 32-bit processes.

7 years agoHandle 64-bit system call arguments (off_t, id_t).
jhb [Sat, 1 Oct 2016 22:01:41 +0000 (22:01 +0000)]
Handle 64-bit system call arguments (off_t, id_t).

In particular, 64-bit system call arguments use up two register_t
arguments for 32-bit processes.  They must also be aligned on a 64-bit
boundary on 32-bit powerpc processes.  This fixes the decoding of
lseek(), procctl(), and wait6() arguments for 32-bit processes (both
native and via freebsd32).

Note that the ktrace system call return record only returns a single
register, so the return value of lseek is always truncated to the low
32-bits for 32-bit processes.

7 years agopatch(1): make some macros look boolean.
pfg [Sat, 1 Oct 2016 20:46:01 +0000 (20:46 +0000)]
patch(1): make some macros look boolean.

Similar to r306560, plus remove an unused macro.

Suggested by: jmallett

7 years agopatch(1): make some macros look boolean.
pfg [Sat, 1 Oct 2016 20:31:00 +0000 (20:31 +0000)]
patch(1): make some macros look boolean.

Minor cleanup inspired by a new patch(1) variant in schily tools.

For reference:
https://sourceforge.net/p/schillix-on/

MFC after: 1 week

7 years agor297225 broke udp_output() for the case where the "addr" argument
rmacklem [Sat, 1 Oct 2016 19:39:09 +0000 (19:39 +0000)]
r297225 broke udp_output() for the case where the "addr" argument
is NULL and the function jumps to the "release:" label.
For this case, the "inp" was write locked, but the code attempted to
read unlock it. This patch fixes the problem.
This case could occur for NFS over UDP mounts, where the server was
down for a few minutes under certain circumstances.

Reported by: bde
Tested by: bde
Reviewed by: gnn
MFC after: 2 weeks

7 years agoUse VM_MEMATTR_WRITE_COMBINING memattr for mmap(2) on framebuffer
gonzo [Sat, 1 Oct 2016 17:57:32 +0000 (17:57 +0000)]
Use VM_MEMATTR_WRITE_COMBINING memattr for mmap(2) on framebuffer

VM_MEMATTR_WRITE_COMBINING sets write-through cache flag for framebuffer
memory that prevents pixel data from being stuck in cache until evicition
happens

7 years agoBump _FreeBSD_version after adding fb_memattr field to fb_info in r306555
gonzo [Sat, 1 Oct 2016 17:48:41 +0000 (17:48 +0000)]
Bump _FreeBSD_version after adding fb_memattr field to fb_info in r306555

7 years agoProvide way for framebuffer driver to request mmap(2) mapping type
gonzo [Sat, 1 Oct 2016 17:43:02 +0000 (17:43 +0000)]
Provide way for framebuffer driver to request mmap(2) mapping type

On ARM if memattr is not overriden mmap(2) maps framebuffer
memory as WBWA which means part of changes to content in userland
end up in cache and appear on screen gradually as cache lines are
evicted. This change adds configurable memattr that hardware fb
implementation can set to get the memory mapping type it
requires:

- Add new flag FB_FLAG_MEMATTR that indicates that framebuffer
    driver overrides default memattr
- Add new field fb_memattr to struct fb_info to specify requested
    memattr

Reviewed by: ray
Differential Revision: https://reviews.freebsd.org/D8064

7 years agoUse accept4 with O_NONBLOCK rather than accept + fcntl
bapt [Sat, 1 Oct 2016 11:43:37 +0000 (11:43 +0000)]
Use accept4 with O_NONBLOCK rather than accept + fcntl

7 years agoFix remaining cstyle issues in libstand/cd9660.c
tsoome [Sat, 1 Oct 2016 07:46:28 +0000 (07:46 +0000)]
Fix remaining cstyle issues in libstand/cd9660.c

Reported by: Bruce Evans <brde@optusnet.com.au>
Reviewed by: allanjude
Approved by: allanjude (mentor)
Differential Revision: https://reviews.freebsd.org/D8107

7 years agoTEGRA: Fix bindings for cpufreq and coretemp drivers,
mmel [Sat, 1 Oct 2016 06:50:16 +0000 (06:50 +0000)]
TEGRA: Fix bindings for cpufreq and coretemp drivers,
it was broken in r306477.
Correct a description for coretemp driver.

7 years agoTEGRA: Extend timeout for PLLs lock to 5 ms. Real lock time for PLLA
mmel [Sat, 1 Oct 2016 03:35:03 +0000 (03:35 +0000)]
TEGRA: Extend timeout for PLLs lock to 5 ms. Real lock time for PLLA
has been very near to old limit.

7 years agond6_dad_timer(): don't assert that the address is tentative.
markj [Sat, 1 Oct 2016 01:30:34 +0000 (01:30 +0000)]
nd6_dad_timer(): don't assert that the address is tentative.

It appears that this assertion can be tripped in some cases when
multiple interfaces are on the same link. Until this is resolved, revert a
part of r306305 and simply log a message if the DAD timer fires on a
non-tentative address.

Reported by: jhb
X-MFC With: r306305

7 years agoRevert r306473.
jhibbits [Sat, 1 Oct 2016 01:10:51 +0000 (01:10 +0000)]
Revert r306473.

Some objections were noted, and it was purely a cosmetic change anyway.

7 years agoImport libucl 20160812
bapt [Sat, 1 Oct 2016 00:14:01 +0000 (00:14 +0000)]
Import libucl 20160812

7 years agoUpdate libucl to snapshot 20160812
bapt [Sat, 1 Oct 2016 00:11:09 +0000 (00:11 +0000)]
Update libucl to snapshot 20160812

7 years agoImport dma 20160929
bapt [Fri, 30 Sep 2016 23:38:26 +0000 (23:38 +0000)]
Import dma 20160929

MFC after: 1 week

7 years agocstyle fix of cd9660_open in libstand
tsoome [Fri, 30 Sep 2016 23:19:08 +0000 (23:19 +0000)]
cstyle fix of cd9660_open in libstand

rS306534 did create bad cstyle by my mistake, correcting it.

Reviewed by: allanjude
Approved by: allanjude (mentor)
Differential Revision: https://reviews.freebsd.org/D8103

7 years agoopen.2: Document Capsicum behavior
cem [Fri, 30 Sep 2016 23:01:37 +0000 (23:01 +0000)]
open.2: Document Capsicum behavior

Document open(2) and openat(2) behavior in Capsicum capability mode.

Reviewed by: ed (previous version), emaste, rwatson (previous version),
wblock
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D7947

7 years agocd9660_open should check for padding
tsoome [Fri, 30 Sep 2016 22:28:20 +0000 (22:28 +0000)]
cd9660_open should check for padding

The libstand cd9660 reader code must check for extents having padding.

Reviewed by: jhb
Approved by: allanjude (mentor)
Differential Revision: https://reviews.freebsd.org/D8101

7 years agoAdd dependency to evdev module
gonzo [Fri, 30 Sep 2016 21:14:42 +0000 (21:14 +0000)]
Add dependency to evdev module

7 years agoAdd dependency to evdev module (if required)
gonzo [Fri, 30 Sep 2016 21:13:19 +0000 (21:13 +0000)]
Add dependency to evdev module (if required)

7 years agoDeclare a module for evdev and add dependency to ukbd(4) and ums(4)
gonzo [Fri, 30 Sep 2016 21:04:56 +0000 (21:04 +0000)]
Declare a module for evdev and add dependency to ukbd(4) and ums(4)

Prepare for making evdev a module. "Pure" evdev device drivers (like
touchscreen) and evdev itself can be built as a modules regardless of
"options EVDEV" in kernel config. So if people does not require evdev
functionality in hybrid drivers like ums and ukbd they can, for instance,
kldload evdev and utouchscreen to run FreeBSD in kiosk mode.

7 years agocam_periph_ccbwait could return while ccb in progress
markj [Fri, 30 Sep 2016 21:00:09 +0000 (21:00 +0000)]
cam_periph_ccbwait could return while ccb in progress

In cam_periph_runccb, cam_periph_ccbwait was using the value of the ccb
pinfo.index and status fields to determine whether the ccb was done,
but these fields are updated without a contending lock and could glitch
into states that would be erroneously interpreted as done.  Instead,
have cam_periph_ccbwait look for the explicit result of the function
cam_periph_done.

Submitted by: Ryan Libby <rlibby@gmail.com>
Reviewed by: mav
MFC after: 3 weeks
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D8020

7 years agoFix `sesutil fault` operation.
mav [Fri, 30 Sep 2016 20:35:12 +0000 (20:35 +0000)]
Fix `sesutil fault` operation.

Fault and ident bits are located in different control bytes, so previous
code was just doing nothing, writing into reserved bit.

MFC after: 1 week

7 years agolibm: remove unused variables for LDBL_MANT_DIG != 113
emaste [Fri, 30 Sep 2016 20:20:07 +0000 (20:20 +0000)]
libm: remove unused variables for LDBL_MANT_DIG != 113

Sponsored by: The FreeBSD Foundation

7 years agoAdd NetBSD 5.1.4, 5.2.2 & 7.0.1 releases to the tree.
sevan [Fri, 30 Sep 2016 20:06:05 +0000 (20:06 +0000)]
Add NetBSD 5.1.4, 5.2.2 & 7.0.1 releases to the tree.
Ammend the position of NetBSD 6.0.2 release in the tree as it came
after OpenBSD[1] & DragonFlyBSD[2] release according to the release
information.
The entries for the 6.0.5 & 6.1.5 releases were incorrect (fetched from
NetBSD CVS copy) and confirmed with history page[3]

[1] http://www.openbsd.org/53.html
[2] https://www.dragonflybsd.org/releases/
[3] http://netbsd.org/releases/formal.html#history

Approved by: bcr (mentor)
Differential Revision: https://reviews.freebsd.org/D8099

7 years agoAdd librss, a simple wrapper around RSS APIs so applications can begin auto-tuning.
adrian [Fri, 30 Sep 2016 19:59:56 +0000 (19:59 +0000)]
Add librss, a simple wrapper around RSS APIs so applications can begin auto-tuning.

I've used this in a handful of RSS test applications.  It is just some
very simple functions to fetch the RSS configuration, query the per-bucket
CPU set, and mark sockets as local to an RSS bucket.  It should be sufficient
for both thread-based and process-based workloads.

(Yes, I wrote a manpage.)

This is based on some early RSS API and wrapper API work I did whilst
I was at Netflix.  Thanks to Netflix for the very original work that
spawned this; thanks to Peter Grehan for his feedback about RSS APIs
and thanks to Jack Vogel and Navdeep Parhar for the NIC-facing side of the
APIs.  These fed into the simple userland API I wrote up here.

Reviewed by: gallatin

7 years agoUpgrade Firmware/Bootloader/ResetSeq/Minidump to revision 5.4.62
davidcs [Fri, 30 Sep 2016 19:21:02 +0000 (19:21 +0000)]
Upgrade Firmware/Bootloader/ResetSeq/Minidump to revision 5.4.62

MFC after:5 days

7 years agoRevert r306516 for now, it is incomplete on i386
cem [Fri, 30 Sep 2016 18:58:50 +0000 (18:58 +0000)]
Revert r306516 for now, it is incomplete on i386

Noted by: kib

7 years agonet80211: do not cancel scan when packet is sent.
avos [Fri, 30 Sep 2016 18:43:39 +0000 (18:43 +0000)]
net80211: do not cancel scan when packet is sent.

Restore pre-r300383 behavior when a frame is sent:
- stop scan;
- send frame;
- when beacon arrives and our bit in TIM is not set - restart the scan.

NOTE:
Ideally, this should introduce new interface (ieee80211_pause_anyscan());
however, since ieee80211_cancel_anyscan() is not used by drivers and only
called by ieee80211_start_pkt() the current patch overrides it's behavior
instead.

Tested with Intel 3945BG, STA mode

Reviewed by: adrian
Differential Revision: https://reviews.freebsd.org/D7979

7 years agoAdd myself to the list & note who is my mentor.
sevan [Fri, 30 Sep 2016 18:36:23 +0000 (18:36 +0000)]
Add myself to the list & note who is my mentor.

Approved by: bcr (mentor)

7 years agoReduce the cost of TLB invalidation on x86 by using per-CPU completion flags
cem [Fri, 30 Sep 2016 18:12:16 +0000 (18:12 +0000)]
Reduce the cost of TLB invalidation on x86 by using per-CPU completion flags

Reduce contention during TLB invalidation operations by using a per-CPU
completion flag, rather than a single atomically-updated variable.

On a Westmere system (2 sockets x 4 cores x 1 threads), dtrace measurements
show that smp_tlb_shootdown is about 50% faster with this patch; observations
with VTune show that the percentage of time spent in invlrng_single_page on an
interrupt (actually doing invalidation, rather than synchronization) increases
from 31% with the old mechanism to 71% with the new one.  (Running a basic file
server workload.)

Submitted by: Anton Rang <rang at acm.org>
Reviewed by: cem (earlier version), kib
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D8041

7 years agoRevert commit
davidcs [Fri, 30 Sep 2016 18:08:16 +0000 (18:08 +0000)]
Revert commit
r306284 - Fixes for issues under high workloads

Will fix and recommit patch

7 years agoCompute two new metrics. Disk load, the average number of transactions
imp [Fri, 30 Sep 2016 17:49:04 +0000 (17:49 +0000)]
Compute two new metrics. Disk load, the average number of transactions
we have queued up normaliazed to the queue size. Also compute buckets
of latency to help compute, in userland, estimates of Median, P90, P95
and P99 values.

Sponsored by: Netflix, Inc

7 years agoRemove the GLOBAL queue lock which just adds unnecessary complexity to code
loos [Fri, 30 Sep 2016 17:30:39 +0000 (17:30 +0000)]
Remove the GLOBAL queue lock which just adds unnecessary complexity to code
(when used together with the individual tx and rx locks).

Sponsored by: Rubicon Communications, LLC (Netgate)

7 years agovfs: batch free vnodes in per-mnt lists
mjg [Fri, 30 Sep 2016 17:27:17 +0000 (17:27 +0000)]
vfs: batch free vnodes in per-mnt lists

Previously free vnodes would always by directly returned to the global
LRU list. With this change up to mnt_free_list_batch vnodes are collected
first.

syncer runs always return the batch regardless of its size.

While vnodes on per-mnt lists are not counted as free, they can be
returned in case of vnode shortage.

Reviewed by: kib
Tested by: pho

7 years agoFix a typo in CPSW_DEBUG MACRO and then replace all the CPSWP_DEBUG() calls
loos [Fri, 30 Sep 2016 17:19:43 +0000 (17:19 +0000)]
Fix a typo in CPSW_DEBUG MACRO and then replace all the CPSWP_DEBUG() calls
with CPSW_DEBUG().

Sponsored by: Rubicon Communications, LLC (Netgate)

7 years agoSort and remove unnecessary includes.
loos [Fri, 30 Sep 2016 17:16:02 +0000 (17:16 +0000)]
Sort and remove unnecessary includes.

No functional changes.

Sponsored by: Rubicon Communications, LLC (Netgate)

7 years agovfs: remove the __bo_vnode field from struct vnode
mjg [Fri, 30 Sep 2016 17:11:03 +0000 (17:11 +0000)]
vfs: remove the __bo_vnode field from struct vnode

The pointer can be obtained using __containerof instead.

Reviewed by: kib

7 years agoFix blacklistd's state restoral at startup
lidl [Fri, 30 Sep 2016 16:35:30 +0000 (16:35 +0000)]
Fix blacklistd's state restoral at startup

The blacklistd daemon attempted to restore the filtering rules
before the database of blocked addresses was opened, so no rules
were being reloaded.  Now the rules are properly recreated when the
daemon is started with '-r'.

This bug was fixed locally, and then sent upstream to NetBSD.
This changeset is the import the NetBSD version of the change,
which added debugging output to alert about a null database.

Reviewed by: emaste
Obtained from: NetBSD
MFC after: 1 week
Sponsored by: The FreeBSD Foundation

7 years agoUpdate blacklistd.8 with changes from NetBSD
lidl [Fri, 30 Sep 2016 16:31:12 +0000 (16:31 +0000)]
Update blacklistd.8 with changes from NetBSD

Obtained from: NetBSD
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D8079

7 years agoReword the statement.
kib [Fri, 30 Sep 2016 16:02:25 +0000 (16:02 +0000)]
Reword the statement.

Submitted by: wblock
MFC after: 3 days

7 years agoAdd an article.
kib [Fri, 30 Sep 2016 15:47:13 +0000 (15:47 +0000)]
Add an article.

Submitted by: wblock
MFC after: 3 days

7 years agoFix a cluster of bugs in list EFI environment variables:
imp [Fri, 30 Sep 2016 15:41:12 +0000 (15:41 +0000)]
Fix a cluster of bugs in list EFI environment variables:
1. Size returned for variable name is in bytes, not CHAR16 (the
   UEFI standard is unclear on this, where it is clear on the size of
   the variable).
2. Dynamically allocate the buffers so we can grow them if someone
   defines a super-long variable name.

These two fixes allow me to examine all the variables in my BIOS and
also removes the repeated printing of variables.

7 years agoRevert an accedintal commit.
andrew [Fri, 30 Sep 2016 14:00:23 +0000 (14:00 +0000)]
Revert an accedintal commit.

7 years agoprimes: trivially capsicumize
emaste [Fri, 30 Sep 2016 13:50:59 +0000 (13:50 +0000)]
primes: trivially capsicumize

Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D7982

7 years agoFix the spelling of Cortex.
andrew [Fri, 30 Sep 2016 13:47:52 +0000 (13:47 +0000)]
Fix the spelling of Cortex.

7 years agoxen/vchan: change license of header from Lesser GPL v2.1 to BSD
royger [Fri, 30 Sep 2016 13:41:24 +0000 (13:41 +0000)]
xen/vchan: change license of header from Lesser GPL v2.1 to BSD

This is a license change only commit, which can be found upstream in the Xen
tree as 937324f032f4f77866e80e39de0d697fa5131df1.

Sponsored by: Citrix Systems R&D

7 years agoral (rt2860): eliminate duplicate ieee80211_process_callback() call
avos [Fri, 30 Sep 2016 13:37:50 +0000 (13:37 +0000)]
ral (rt2860): eliminate duplicate ieee80211_process_callback() call
(left after r287197)

MFC after: 1 week

7 years agocrunchgen: do not strip crunched binary (it will be done by install)
emaste [Fri, 30 Sep 2016 13:16:04 +0000 (13:16 +0000)]
crunchgen: do not strip crunched binary (it will be done by install)

Reviewed by: adrian, imp (earlier)
Differential Revision: https://reviews.freebsd.org/D2003

7 years agoReinstate Xr macros that were accidentally removed in a previous
des [Fri, 30 Sep 2016 13:05:32 +0000 (13:05 +0000)]
Reinstate Xr macros that were accidentally removed in a previous
commit.  Add some missing cross-references to the SEE ALSO section.
Bump date now that there are content changes.

MFC after: 1 week

7 years agoMinor markup and wording fixes.
des [Fri, 30 Sep 2016 13:04:18 +0000 (13:04 +0000)]
Minor markup and wording fixes.

MFC after: 1 week

7 years agoAfter perusal of the documentation and some experimentation, I found a
des [Fri, 30 Sep 2016 11:05:29 +0000 (11:05 +0000)]
After perusal of the documentation and some experimentation, I found a
version that works with both groff and mandoc.

Hat tip to: kib
MFC after: 1 week

7 years agoAdd support for RPI2 to the armv6 GENERIC kernel.
manu [Fri, 30 Sep 2016 10:46:27 +0000 (10:46 +0000)]
Add support for RPI2 to the armv6 GENERIC kernel.

7 years agoRemove the duplicate ukbd device from the armv6 GENERIC
andrew [Fri, 30 Sep 2016 10:22:50 +0000 (10:22 +0000)]
Remove the duplicate ukbd device from the armv6 GENERIC

Sponsored by: ABT Systems Ltd

7 years agoRPI2: Add support for MULTIDELAY, this is needed for inclusion into GENERIC.
manu [Fri, 30 Sep 2016 10:21:04 +0000 (10:21 +0000)]
RPI2: Add support for MULTIDELAY, this is needed for inclusion into GENERIC.

7 years agoAdd support for Tegra to the armv6 GENERIC kernel.
andrew [Fri, 30 Sep 2016 10:20:53 +0000 (10:20 +0000)]
Add support for Tegra to the armv6 GENERIC kernel.

Reviewed by: imp, mmel
Sponsored by: ABT Systems Ltd
Differential Revision: https://reviews.freebsd.org/D8084

7 years agobcm2835_cpufreq: Only attach driver if we correcly match on the machine
manu [Fri, 30 Sep 2016 10:00:57 +0000 (10:00 +0000)]
bcm2835_cpufreq: Only attach driver if we correcly match on the machine
compatible string.

7 years agoFormat the table correctly, using cell separators instead of relying
des [Fri, 30 Sep 2016 09:23:29 +0000 (09:23 +0000)]
Format the table correctly, using cell separators instead of relying
on *roff or mandoc to guess where one cell ends and the next begins.

MFC after: 1 week

7 years agoMove the ConnectX-3 and ConnectX-2 driver from sys/ofed into sys/dev/mlx4
hselasky [Fri, 30 Sep 2016 08:23:06 +0000 (08:23 +0000)]
Move the ConnectX-3 and ConnectX-2 driver from sys/ofed into sys/dev/mlx4
like other PCI network drivers. The sys/ofed directory is now mainly
reserved for generic infiniband code, with exception of the mthca driver.

- Add new manual page, mlx4en(4), describing how to configure and load
mlx4en.

- All relevant driver C-files are now prefixed mlx4, mlx4_en and
mlx4_ib respectivly to avoid object filename collisions when compiling
the kernel. This also fixes an issue with proper dependency file
generation for the C-files in question.

- Device mlxen is now device mlx4en and depends on device mlx4, see
mlx4en(4). Only the network device name remains unchanged.

- The mlx4 and mlx4en modules are now built by default on i386 and
amd64 targets. Only building the mlx4ib module depends on
WITH_OFED=YES .

Sponsored by: Mellanox Technologies

7 years agohyperv/hn: Add stubs for OFFLOAD_CURRENT_CONFIG and NETWORK_CHANGE status
sephe [Fri, 30 Sep 2016 06:58:45 +0000 (06:58 +0000)]
hyperv/hn: Add stubs for OFFLOAD_CURRENT_CONFIG and NETWORK_CHANGE status

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

7 years agohyperv/vmbus: Add missing vmbus_if.c to module build.
sephe [Fri, 30 Sep 2016 06:49:39 +0000 (06:49 +0000)]
hyperv/vmbus: Add missing vmbus_if.c to module build.

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

7 years agohyperv/hn: Fix detach and attach error handling.
sephe [Fri, 30 Sep 2016 06:30:16 +0000 (06:30 +0000)]
hyperv/hn: Fix detach and attach error handling.

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

7 years agohyperv/hn: If synthetic parts are detached, don't touch them.
sephe [Fri, 30 Sep 2016 06:21:00 +0000 (06:21 +0000)]
hyperv/hn: If synthetic parts are detached, don't touch them.

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

7 years agox86/ioapic: Fix destination cpu for Hyper-V
sephe [Fri, 30 Sep 2016 06:08:21 +0000 (06:08 +0000)]
x86/ioapic: Fix destination cpu for Hyper-V

On Hyper-V:
- Stick to the first cpu for all I/O APIC pins.
- And don't allow destination cpu changes.

Reviewed by: jhb
MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D7949

7 years agolinuxkpi: Fix PCI BAR lazy allocation support.
sephe [Fri, 30 Sep 2016 05:51:11 +0000 (05:51 +0000)]
linuxkpi: Fix PCI BAR lazy allocation support.

FreeBSD supports lazy allocation of PCI BAR, that is, when a device
driver's attach method is invoked, even if the device's PCI BAR
address wasn't initialized, the invocation of bus_alloc_resource_any()
(the call chain: pci_alloc_resource() -> pci_alloc_multi_resource() ->
pci_reserve_map() -> pci_write_bar()) would allocate a proper address
for the PCI BAR and write this 'lazy allocated' address into the PCI
BAR.

This model works fine for native FreeBSD device drivers, but _not_ for
device drivers shared with Linux (e.g. dev/mlx5/mlx5_core/mlx5_main.c
and ofed/drivers/net/mlx4/main.c.  Both of them use
pci_request_regions(), which doesn't work properly with the PCI BAR
lazy allocation, because pci_resource_type() -> _pci_get_rle() always
returns NULL, so pci_request_regions() doesn't have the opportunity to
invoke bus_alloc_resource_any().  We now use pci_find_bar() in
pci_resource_type(), which is able to locate all available PCI BARs
even if some of them will be lazy allocated.

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

7 years agoALLWINNER: ahci_devclass is local variable, don't export it.
mmel [Fri, 30 Sep 2016 05:30:16 +0000 (05:30 +0000)]
ALLWINNER: ahci_devclass is local variable, don't export it.

7 years agoAdd new USB ID.
hselasky [Fri, 30 Sep 2016 05:28:11 +0000 (05:28 +0000)]
Add new USB ID.

While at it remove some whitespaces.

Submitted by: Jose Luis Duran <jlduran@gmail.com>
PR: 213110
MFC after: 1 week

7 years agoTEGRA: Prepare Tegra subtree for inclusion into ARM generic kernel.
mmel [Fri, 30 Sep 2016 05:25:15 +0000 (05:25 +0000)]
TEGRA: Prepare Tegra subtree for inclusion into ARM generic kernel.
 - use DEFINE_CLASS_0() for driver classes
 - unify driver names
 - cleanup driver definitions and bindings

7 years agoReplace explicit TUNABLE_INT to sysctl with CTLFLAG_TUN
gonzo [Fri, 30 Sep 2016 03:03:42 +0000 (03:03 +0000)]
Replace explicit TUNABLE_INT to sysctl with CTLFLAG_TUN

- Replace tunables-only hw.psm.synaptics_support, hw.psm.trackpoint_support,
    and hw.psm.elantech_support with respective sysctls declared with
    CTLFLAG_TUN. It simplifies checking them in userland, also makes them
    easier to get discovered by user
- Get rid of debug.psm.loglevel and hw.psm.tap_enabled TUNABLE_INT
    declaration by adding CTLFLAG_TUN to read/write sysctls that were
    already declared for these tunables.

Suggested by: jhb

7 years agoUse the cell-index property as the unit number if available.
jhibbits [Fri, 30 Sep 2016 02:48:40 +0000 (02:48 +0000)]
Use the cell-index property as the unit number if available.

Summary:
NXP/Freescale, among others, includes an optional cell-index property
on nodes to denote the SoC block number of the node.  This can be useful if, for
example, a node is disabled or nonexistent in the fdt, or the blocks are not
organized in address-sorted order.  For instance, on the P1022, DMA2 is located
at CCSR offset 0xC000, while DMA1 is located at 0x21000.

Reviewed By: jmcneill

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

7 years agocxgbe(4): Claim the T6 -DBG card.
np [Fri, 30 Sep 2016 00:16:54 +0000 (00:16 +0000)]
cxgbe(4): Claim the T6 -DBG card.

7 years agoThis adds a sysctl which allows you to disable the TCP hostcache. This is handy
hiren [Fri, 30 Sep 2016 00:10:57 +0000 (00:10 +0000)]
This adds a sysctl which allows you to disable the TCP hostcache. This is handy
during testing of network related changes where cached entries may pollute your
results, or during known congestion events where you don't want to unfairly
penalize hosts.

Prior to r232346 this would have meant you would break any connection with a sub
1500 MTU, as the hostcache was authoritative. All entries as they stand today
should simply be used to pre populate values for efficiency.

Submitted by: Jason Wolfe (j at nitrology dot com)
Reviewed by: rwatson, sbruno, rrs , bz (earlier version)
MFC after: 2 weeks
Sponsored by: Limelight Networks
Differential Revision: https://reviews.freebsd.org/D6198

7 years agoProvide kern.maxphys sysctl, which returns MAXPHYS. Naming matches NetBSD.
glebius [Thu, 29 Sep 2016 23:07:28 +0000 (23:07 +0000)]
Provide kern.maxphys sysctl, which returns MAXPHYS.  Naming matches NetBSD.

7 years agoAdd dtb module for Jetson-TK1 board
gonzo [Thu, 29 Sep 2016 22:01:09 +0000 (22:01 +0000)]
Add dtb module for Jetson-TK1 board

7 years agoFix bug introduced in r274300.
ae [Thu, 29 Sep 2016 19:57:37 +0000 (19:57 +0000)]
Fix bug introduced in r274300.

In icmp6_reflect() use original source address of erroneous packet as
destination address for source selection algorithm when original
destination address is not one of our own.

Reported by: Mark Kamichoff <prox at prolixium com>
Tested by: Mark Kamichoff <prox at prolixium com>
MFC after: 1 week

7 years agoProperly preserve ip_tos bits for IPv4 packets
lidl [Thu, 29 Sep 2016 19:45:24 +0000 (19:45 +0000)]
Properly preserve ip_tos bits for IPv4 packets

Restructure code slightly to save ip_tos bits earlier.  Fix the bug
where the ip_tos field is zeroed out before assigning to the iptos
variable. Restore the ip_tos and ip_ver fields only if they have
been zeroed during the pseudo-header checksum calculation.

Reviewed by: cem, gnn, hiren
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D8053

7 years agoUpgrade to Unbound 1.5.10.
des [Thu, 29 Sep 2016 18:24:29 +0000 (18:24 +0000)]
Upgrade to Unbound 1.5.10.

7 years agoAdd #ifdef _KERNEL around send_holes_without_birth_time sysctl.
mav [Thu, 29 Sep 2016 17:48:53 +0000 (17:48 +0000)]
Add #ifdef _KERNEL around send_holes_without_birth_time sysctl.

Reported by: avg@

7 years agoUse SV_ABI_ERRNO to set the syscall return value. The Linuxulator will
andrew [Thu, 29 Sep 2016 17:13:17 +0000 (17:13 +0000)]
Use SV_ABI_ERRNO to set the syscall return value. The Linuxulator will
need this.

Submitted by: Grégory Soutadé <soutade@gmail.com>
Differential Revision: https://reviews.freebsd.org/D7976

7 years agoSet hardware stats flag to avoid double counting the number of incoming bytes.
hselasky [Thu, 29 Sep 2016 16:36:32 +0000 (16:36 +0000)]
Set hardware stats flag to avoid double counting the number of incoming bytes.

Found by: Ben RUBSON <ben.rubson@gmail.com>
Sponsored by: Mellanox Technologies
MFC after: 1 week

7 years agoSet hardware stats flag to avoid double counting the number of incoming bytes.
hselasky [Thu, 29 Sep 2016 16:35:52 +0000 (16:35 +0000)]
Set hardware stats flag to avoid double counting the number of incoming bytes.

Found by: Ben RUBSON <ben.rubson@gmail.com>
Sponsored by: Mellanox Technologies
MFC after: 1 week

7 years agoAllow reading the following sysctl MIBs in capability mode:
allanjude [Thu, 29 Sep 2016 16:29:49 +0000 (16:29 +0000)]
Allow reading the following sysctl MIBs in capability mode:
kern.hostname, kern.domainname, and kern.hostuuid

This allows sandboxed applications to read these sysctls

Submitted by: cem (original version)
Reviewed by: cem, jonathan, rwatson (original version)
Sponsored by: ScaleEngine Inc.
Differential Revision: https://reviews.freebsd.org/D8015

7 years agoThe IORESOURCE_XXX defines should resemble a bitmask while SYS_RES_XXX
hselasky [Thu, 29 Sep 2016 14:35:32 +0000 (14:35 +0000)]
The IORESOURCE_XXX defines should resemble a bitmask while SYS_RES_XXX
are not bitmasks. Fix return value of pci_resource_flags() to reflect
this change.

MFC after: 1 week
Sponsored by: Mellanox Technologies

7 years agosysctl.9: add missing underscore (SYSCTL_HANDLERARGS -> SYSCTL_HANDLER_ARGS)
avos [Thu, 29 Sep 2016 14:14:39 +0000 (14:14 +0000)]
sysctl.9: add missing underscore (SYSCTL_HANDLERARGS -> SYSCTL_HANDLER_ARGS)

7 years agoRemove an extra etter.
eadler [Thu, 29 Sep 2016 14:01:06 +0000 (14:01 +0000)]
Remove an extra etter.

7 years agoRemove a a duplicated word.
eadler [Thu, 29 Sep 2016 13:59:14 +0000 (13:59 +0000)]
Remove a a duplicated word.

7 years agoTEGRA: Rename (cut & pasted) genahci to tegra_ahci. Make device class definition...
mmel [Thu, 29 Sep 2016 13:54:09 +0000 (13:54 +0000)]
TEGRA: Rename (cut & pasted) genahci to tegra_ahci. Make device class definition static.