]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
7 years agoDo not reallocate driver softc for uart unnecessarily.
br [Thu, 17 Nov 2016 16:06:53 +0000 (16:06 +0000)]
Do not reallocate driver softc for uart unnecessarily.

Do not assume that all uart drivers use uart_softc structure as is.
Some do a sensible thing and do declare their uart class and driver
properly and arrive into uart_bus_attach with suitably sized softc.

Submitted by: kan
Sponsored by: DARPA, AFRL

7 years agoMake gpiobus early driver at BUS_PAS_BUS.
br [Thu, 17 Nov 2016 15:37:44 +0000 (15:37 +0000)]
Make gpiobus early driver at BUS_PAS_BUS.

The gpiobus driver is attached explicitly and generally should be
at the same pass as its parent. Making it use BUS_PAS_BUS ensures
that it attaches immediately after parent adds it (assuming the
parent itself attached at BUS_PAS_BUS and above).

Submitted by: kan
Sponsored by: DARPA, AFRL

7 years agoMore robust handling of whois referrals from RIRs.
fanf [Thu, 17 Nov 2016 15:19:06 +0000 (15:19 +0000)]
More robust handling of whois referrals from RIRs.

An example problem case is 163.1.0.0 (University of Oxford)
which is in an APNIC ERX address range. Previously we assumed
that ARIN has the correct information for all ERX allocations,
but in this case ARIN refers back to APNIC, rather than referring
to RIPE. This caused whois to loop.

Whois will no longer loop back and forth forever between two RIRs
that don't have an answer, but instead try the other RIRs in turn.

7 years agoDeclare dwc_otg_detach as non-static (same as dwc_otg_attach),
br [Thu, 17 Nov 2016 15:12:03 +0000 (15:12 +0000)]
Declare dwc_otg_detach as non-static (same as dwc_otg_attach),
so it can be called from fdt-glue drivers.

Submitted by: kan
Sponsored by: DARPA, AFRL

7 years agoAllow operation with UTMI+ phy.
br [Thu, 17 Nov 2016 15:08:30 +0000 (15:08 +0000)]
Allow operation with UTMI+ phy.

Submitted by: kan
Sponsored by: DARPA, AFRL

7 years agoRemove outdated comment.
br [Thu, 17 Nov 2016 14:43:13 +0000 (14:43 +0000)]
Remove outdated comment.

Pointed out by: andrew (original author)
Sponsored by: DARPA, AFRL

7 years agoAdd support for UART found in the Ingenic XBurst system on chips.
br [Thu, 17 Nov 2016 14:41:22 +0000 (14:41 +0000)]
Add support for UART found in the Ingenic XBurst system on chips.

These CPUs has non-standard UART enable bit hidden in the UART FIFO
Control Register.

Sponsored by: DARPA, AFRL

7 years agoWriting out the L2TP control packet requires 12 bytes of
bz [Thu, 17 Nov 2016 14:03:44 +0000 (14:03 +0000)]
Writing out the L2TP control packet requires 12 bytes of
contiguous memory but in one path we did not always guarantee this,
thus do a m_pullup() there.

PR: 214385
Submitted by: Joe Jones (joeknockando googlemail.com)
MFC after: 3 days

7 years agoAdd driver for DM9000 Ethernet MAC Controller.
br [Thu, 17 Nov 2016 11:48:07 +0000 (11:48 +0000)]
Add driver for DM9000 Ethernet MAC Controller.

This device found in the Ingenic jz4780 SoC.

Submitted by: kan
Sponsored by: DARPA, AFRL

7 years agoImport Ingenic CI20 (jz4780) DTS files.
br [Thu, 17 Nov 2016 11:31:13 +0000 (11:31 +0000)]
Import Ingenic CI20 (jz4780) DTS files.

Submitted by: kan
Sponsored by: DARPA, AFRL

7 years agoNotify the use via setting errno when a TCP RST segment is received
tuexen [Thu, 17 Nov 2016 08:15:02 +0000 (08:15 +0000)]
Notify the use via setting errno when a TCP RST segment is received
either in the CLOSING or LAST-ACK state.

Reviewed by: hiren
MFC after: 3 weeks
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D8371

7 years ago[etherswitch] add infineon adm6996fc support on etherswitch
mizhka [Thu, 17 Nov 2016 07:33:37 +0000 (07:33 +0000)]
[etherswitch] add infineon adm6996fc support on etherswitch

This is Infineon ADM6996FC/M/MX driver code on etherswitch framework.
Support PORT and DOT1Q VLAN.
This code suppose ADM6996FC SDC/SDIO connect to SOC network interface
MDC/MDIO.
This code tested on Netgear WGR614Cv7.

Submitted by: Hiroki Mori <yamori813@yahoo.co.jp>
Reviewed by: adrian, mizhka
Approved by: adrian(mentor)
Differential Revision: https://reviews.freebsd.org/D8495

7 years agohyperv/vss: Install the userland daemon to /usr/sbin instead of /
sephe [Thu, 17 Nov 2016 03:02:35 +0000 (03:02 +0000)]
hyperv/vss: Install the userland daemon to /usr/sbin instead of /

Submitted by: markj
Reported by: markj
MFC after: 3 weeks
Sponsored by: Microsoft

7 years agohyperv/vss: Nuke unused variables.
sephe [Thu, 17 Nov 2016 03:00:56 +0000 (03:00 +0000)]
hyperv/vss: Nuke unused variables.

Submitted by: markj
Reported by: markj
MFC after: 3 weeks
Sponsored by: Microsoft

7 years agoFix grammar nit
bdrewery [Thu, 17 Nov 2016 00:21:55 +0000 (00:21 +0000)]
Fix grammar nit

7 years agoPass SWAPSIZE in env(1) when invoking mk-vmimage.sh, otherwise
gjb [Wed, 16 Nov 2016 18:08:50 +0000 (18:08 +0000)]
Pass SWAPSIZE in env(1) when invoking mk-vmimage.sh, otherwise
mkimg(1) does not create the second partition after r307008.

Sponsored by: The FreeBSD Foundation

7 years agoAllow installworld to be skipped as well as installkernel with -W.
imp [Wed, 16 Nov 2016 17:11:05 +0000 (17:11 +0000)]
Allow installworld to be skipped as well as installkernel with -W.
Allow -B to mean -K -W.

There are times when fixing non-base elementes of the build that you
don't want to wait to get a completely clean world install. This
allows that at the cost of a little danger.

Submitted by: gallatin@
Sponsored by: Netflix, Inc

7 years agoStart to move the old interface into a legacy file.
imp [Wed, 16 Nov 2016 16:49:21 +0000 (16:49 +0000)]
Start to move the old interface into a legacy file.

7 years agocrunchide: remove obsolete a.out header and comment
emaste [Wed, 16 Nov 2016 16:39:51 +0000 (16:39 +0000)]
crunchide: remove obsolete a.out header and comment

crunchide(1) gained ELF support in r39172, and lost the unused a.out
and non-functional ECOFF suport in r281655.

Sponsored by: The FreeBSD Foundation

7 years agoMove the fast fault path into the separate function.
kib [Wed, 16 Nov 2016 16:34:17 +0000 (16:34 +0000)]
Move the fast fault path into the separate function.

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

7 years agoAdd full softfloat and hardfloat support for RISC-V.
br [Wed, 16 Nov 2016 15:21:32 +0000 (15:21 +0000)]
Add full softfloat and hardfloat support for RISC-V.

Hardfloat is now default (use riscv64sf as TARGET_ARCH
for softfloat).

Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D8529

7 years agoMake sure MAC address is reprogrammed when if_init() callback is
hselasky [Wed, 16 Nov 2016 14:39:03 +0000 (14:39 +0000)]
Make sure MAC address is reprogrammed when if_init() callback is
invoked. Else promiscious mode must be used to pass traffic. While at
it fix a debug print macro.

MFC after: 1 week

7 years agoAdd bnxt(4) to the hardware notes.
brueffer [Wed, 16 Nov 2016 13:27:39 +0000 (13:27 +0000)]
Add bnxt(4) to the hardware notes.

7 years agoVarious minor cleanups.
brueffer [Wed, 16 Nov 2016 13:22:57 +0000 (13:22 +0000)]
Various minor cleanups.

7 years agoInclude the SMSC LAN91C111 driver, this is found in some of the ARM models.
andrew [Wed, 16 Nov 2016 11:37:43 +0000 (11:37 +0000)]
Include the SMSC LAN91C111 driver, this is found in some of the ARM models.

7 years agoUse the correct OF_getencprop to get the height.
andrew [Wed, 16 Nov 2016 11:31:53 +0000 (11:31 +0000)]
Use the correct OF_getencprop to get the height.

Reported by: jmcneill
Sponsored by: ABT Systems Ltd

7 years agohyperv/pcib: enable PCIe pass-through (a.k.a. Discrete Device Assignment)
dexuan [Wed, 16 Nov 2016 09:25:00 +0000 (09:25 +0000)]
hyperv/pcib: enable PCIe pass-through (a.k.a. Discrete Device Assignment)

The feature enables us to pass through physical PCIe devices to FreeBSD VM
running on Hyper-V (Windows Server 2016) to get near-native performance with
low CPU utilization.

The patch implements a PCI bridge driver to support the feature:

1) The pcib driver talks to the host to discover device(s) and presents
the device(s) to FreeBSD's pci driver via PCI configuration space (note:
to access the configuration space, we don't use the standard I/O port
0xCF8/CFC method; instead, we use an MMIO-based method supplied by Hyper-V,
which is very similar to the 0xCF8/CFC method).

2) The pcib driver allocates resources for the device(s) and initialize
the related BARs, when the device driver's attach method is invoked;

3) The pcib driver talks to the host to create MSI/MSI-X interrupt
remapping between the guest and the host;

4) The pcib driver supports device hot add/remove.

Reviewed by: sephe
Approved by: sephe (mentor)
MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D8332

7 years agohyperv/vmbus: add new vmbus methods to support PCIe pass-through
dexuan [Wed, 16 Nov 2016 09:08:32 +0000 (09:08 +0000)]
hyperv/vmbus: add new vmbus methods to support PCIe pass-through

The new methods will be used by the coming pcib driver.

Reviewed by: sephe
Approved by: sephe (mentor)
MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D8409

7 years agohyperv/vmbus: add a new method to get vcpu_id
dexuan [Wed, 16 Nov 2016 09:02:17 +0000 (09:02 +0000)]
hyperv/vmbus: add a new method to get vcpu_id

vcpu_id is host's representation of guest CPU.
We get the mapping between vcpu_id and FreeBSD kernel's cpu id when VMBus
driver is loaded. Later, when a driver, like the coming pcib driver, talks
to the host and needs to refer to a guest CPU, the driver must use the
vcpu_id.

Reviewed by: jhb, sephe
Approved by: sephe (mentor)
MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D8410

7 years agoSimplify the page tracking for VA<->PA translations.
jhibbits [Wed, 16 Nov 2016 05:24:42 +0000 (05:24 +0000)]
Simplify the page tracking for VA<->PA translations.

Drop the tracking down to the pmap layer, with optimizations to only track
necessary pages.  This should give a (slight) performance improvement, as well
as a stability improvement, as the tracking is already mostly handled by the
pmap layer.

7 years agoCompile trampoline with soft-float on MIPS, to match the rest of the kernel
kan [Wed, 16 Nov 2016 03:24:20 +0000 (03:24 +0000)]
Compile trampoline with soft-float on MIPS, to match the rest of the kernel

Core kernel is always compiled with -msoft-float on all of our platforms,
make sure we follow the suit with trampoline as well.

Reviewed by: adrian, br, imp
Differential Revision: https://reviews.freebsd.org/D8507

7 years agoMake MIPS startup assembly files use neutral float ABI.
kan [Wed, 16 Nov 2016 03:21:49 +0000 (03:21 +0000)]
Make MIPS startup assembly files use neutral float ABI.

This allows these files to be used with hard and softfloat targets
with no special flags passed to the compiler.

Reviewed by: adrian, br, imp
Differential Revision: https://reviews.freebsd.org/D8506

7 years agoSet endianness and floating point flags explicitly for MIPS targets
kan [Wed, 16 Nov 2016 03:19:36 +0000 (03:19 +0000)]
Set endianness and floating point flags explicitly for MIPS targets

The tree can be build with an external toolchain that will not
necessarily default to desired settings, so we have to specify
the required flags explicitly to force the required compilation
mode.

Reviewed by: adrian, br
Sponsored by: https://reviews.freebsd.org/D8505

7 years agoUpdate to reflect the demise of PG_CACHED pages.
alc [Wed, 16 Nov 2016 02:51:24 +0000 (02:51 +0000)]
Update to reflect the demise of PG_CACHED pages.

Reviewed by: kib, markj
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D8530

7 years agoAdd a GPIO poweroff and reset driver.
jhibbits [Wed, 16 Nov 2016 02:14:07 +0000 (02:14 +0000)]
Add a GPIO poweroff and reset driver.

Summary:
This implements part of the gpio-poweroff and gpio-restart device tree
bindings.  Optional properties are not handled currently.  It also currently
only supports level-triggered reset.

Reviewed By: gonzo
Differential Revision: https://reviews.freebsd.org/D8521

7 years agoReduce NFS "NFSv4( mounted on)? fileid > 32bits" log spam.
cperciva [Wed, 16 Nov 2016 01:11:49 +0000 (01:11 +0000)]
Reduce NFS "NFSv4( mounted on)? fileid > 32bits" log spam.

Rather than printing a warning for every time we receive a fileid > 2^32
from the NFS server, count warnings and print at most one of each warning
type per minute, e.g.,

Nov 15 05:17:34 ip-172-30-1-221 kernel: NFSv4 fileid > 32bits (24730 occurrences)
Nov 15 05:17:56 ip-172-30-1-221 kernel: NFSv4 mounted on fileid > 32bits (178 occurrences)
Nov 15 05:18:53 ip-172-30-1-221 kernel: NFSv4 fileid > 32bits (7582 occurrences)
Nov 15 05:18:58 ip-172-30-1-221 kernel: NFSv4 mounted on fileid > 32bits (23 occurrences)

A buildworld with an NFS mounted /usr/obj can otherwise result in
hundreds of thousands of lines being printed, which seems unnecessarily
verbose.

When ino_t becomes a 64-bit type, these printfs will no longer be needed
(and the problems associated with truncating 64-bit fileids to generate
32-bit inode numbers will also go away).

Reviewed by: rmacklem
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D8523

7 years agoRemove a lingering reference to cache pages from vmstat(8).
markj [Wed, 16 Nov 2016 00:21:18 +0000 (00:21 +0000)]
Remove a lingering reference to cache pages from vmstat(8).

Reported by: alc

7 years agoOn command error, reset only DMA and FIFO engines instead of the entire
jmcneill [Tue, 15 Nov 2016 23:48:30 +0000 (23:48 +0000)]
On command error, reset only DMA and FIFO engines instead of the entire
controller. Fixes eMMC device detection on OrangePi Plus 2e (and likely
others).

7 years agoAllow the MMC frequency to be set up to 52MHz for MMC high speed timings.
jmcneill [Tue, 15 Nov 2016 23:46:01 +0000 (23:46 +0000)]
Allow the MMC frequency to be set up to 52MHz for MMC high speed timings.

7 years ago[etherswitch] enable phy4/mac4 of ip175c
mizhka [Tue, 15 Nov 2016 22:30:25 +0000 (22:30 +0000)]
[etherswitch] enable phy4/mac4 of ip175c

If MII1 interface is disabled, then enable phy4/mac4.

Submitted by: Hiroki Mori <yamori813@yahoo.co.jp>
Reviewed by: mizhka, adrian
Approved by: adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D6832

7 years ago[etherswitch] add RTL8366SR support
mizhka [Tue, 15 Nov 2016 21:58:04 +0000 (21:58 +0000)]
[etherswitch] add RTL8366SR support

Add RTL8366SR support at etherswitch driver. Tested on RTL8366RB and
RTL8366SR.

Submitted by: Hiroki Mori <yamori813@yahoo.co.jp>
Reviewed by: adrian, mizhka
Approved by: adrian(mentor)
Differential Revision: https://reviews.freebsd.org/D6796

7 years ago[etherswitch] add Marvell 88e6060 switch support
mizhka [Tue, 15 Nov 2016 21:49:01 +0000 (21:49 +0000)]
[etherswitch] add Marvell 88e6060 switch support

Add 88e6060 basic support: only port-based VLAN is supported.
No vlan(4) support.

Submitted by: Hiroki Mori <yamori813@yahoo.co.jp>
Reviewed by: mizhka, adrian
Approved by: adrian(mentor)
Differential Revision: https://reviews.freebsd.org/D8344

7 years agoAfter r308533, the platform compatible string must be an exact match.
loos [Tue, 15 Nov 2016 21:18:55 +0000 (21:18 +0000)]
After r308533, the platform compatible string must be an exact match.

Use "ti,am33xx" instead of "ti,am335x", which gives an exact match in every
DTS we support.

This fixes the boot on TI SoCs after r308533.

Suggested by: gonzo
Sponsored by: Rubicon Communications, LLC (Netgate)

7 years ago[MIPS] Fix Config3[ULRI] printing
mizhka [Tue, 15 Nov 2016 20:44:19 +0000 (20:44 +0000)]
[MIPS] Fix Config3[ULRI] printing

Bit identifier of printf %b is octal integer, but not decimal. ULRI bit is
13-th bit (starting with 0) according to MIPS Architecture Volume III v.6.
In this case the bit identifier (starts with 1) should be \16.

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

7 years agoNew driver for Broadcom NetXtreme-C and NetXtreme-E devices.
shurd [Tue, 15 Nov 2016 20:35:29 +0000 (20:35 +0000)]
New driver for Broadcom NetXtreme-C and NetXtreme-E devices.

This driver uses the iflib framework supporting Broadcom
25/50Gbps devices.

Reviewed by: gallatin, wblock
Approved by: davidch
MFC after: 2 weeks
Relnotes: yes
Sponsored by: Broadcom Limited
Differential Revision: https://reviews.freebsd.org/D7551

7 years ago[BHND] correct spelling error in macro name
mizhka [Tue, 15 Nov 2016 20:05:22 +0000 (20:05 +0000)]
[BHND] correct spelling error in macro name

This commit is part of D6920 review. One of macro had wrong prefix:
 BMCA => BCMA

Reviewed by: landonf, adrian (mentor)
Approved by: adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D6920

7 years agoPlug a lock leak in sysctl_ifmalist().
markj [Tue, 15 Nov 2016 19:23:48 +0000 (19:23 +0000)]
Plug a lock leak in sysctl_ifmalist().

Fix style in the local variable declarations.

PR: 214542
MFC after: 1 week

7 years agoChange the TI aintc driver name to "ti_aintc" to avoid the conflict with
loos [Tue, 15 Nov 2016 19:09:36 +0000 (19:09 +0000)]
Change the TI aintc driver name to "ti_aintc" to avoid the conflict with
the aintc driver for Allwinner A10.

This fixes the boot of the GENERIC ARM kernel on TI/AM335x SoCs.

Sponsored by: Rubicon Communications, LLC (Netgate)

7 years agoFix ti_gpio_detach() to avoid crashing if something goes wrong.
loos [Tue, 15 Nov 2016 18:57:25 +0000 (18:57 +0000)]
Fix ti_gpio_detach() to avoid crashing if something goes wrong.

Sponsored by: Rubicon Communication, LLC (Netgate)

7 years agoRemove most of the code for implementing PG_CACHED pages. (This change does
alc [Tue, 15 Nov 2016 18:22:50 +0000 (18:22 +0000)]
Remove most of the code for implementing PG_CACHED pages.  (This change does
not remove user-space visible fields from vm_cnt or all of the references to
cached pages from comments.  Those changes will come later.)

Reviewed by: kib, markj
Tested by: pho
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D8497

7 years agoSync instruction cache's after writing user breakpoints on MIPS.
jhb [Tue, 15 Nov 2016 17:01:48 +0000 (17:01 +0000)]
Sync instruction cache's after writing user breakpoints on MIPS.

Add an implementation for pmaps_sync_icache() on MIPS that sync's the
instruction cache on all CPUs via smp_rendezvous() after a debugger
inserts a breakpoint via ptrace(PT_IO).

Tested by: kan (on Creator CI20 running Ingenic JZ4780 SOC)
MFC after: 2 weeks
Sponsored by: DARPA / AFRL

7 years agoPass CPUID[1] %edx (cpu_feature), %ecx (cpu_feature2) and
kib [Tue, 15 Nov 2016 09:43:26 +0000 (09:43 +0000)]
Pass CPUID[1] %edx (cpu_feature), %ecx (cpu_feature2) and
CPUID[7].%ebx (cpu_stdext_feature), %ecx (cpu_stdext_feature2) to the
ifunc resolvers on x86.

It is much more clean to use CPUID instruction in usermode to retrieve
this information than to pass AT_HWCAP aux vector from kernel, on
x86.  Still, the change does allow for use of AT_HWCAP on arches where it is
needed, by passing aux array to ifunc_init() initializer which should
prepare arguments for ifunc resolvers.

Current signature for resolvers on x86 is
func_t iresolve(uint32_t cpu_feature, uint32_t cpu_feature2,
    uint32_t cpu_stdext_feature, uint32_t cpu_stdext_feature2);
where arguments have identical meaning as the kernel variables of the
same name.  The ABIs allow to use resolvers with the void or shortened
list of arguments.

Reviewed by: jhb
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D8448

7 years agoAssert that there is no unresolved symbols during rtld linking.
kib [Tue, 15 Nov 2016 09:40:03 +0000 (09:40 +0000)]
Assert that there is no unresolved symbols during rtld linking.

Reviewed by: emaste, jhb
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
X-Differential revision: https://reviews.freebsd.org/D8448

7 years agoUpdate hint to utilize user variable.
kib [Tue, 15 Nov 2016 09:37:35 +0000 (09:37 +0000)]
Update hint to utilize user variable.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

7 years agoAdd myself (dexuan) as a src committer and sephe as my mentor.
dexuan [Tue, 15 Nov 2016 09:20:28 +0000 (09:20 +0000)]
Add myself (dexuan) as a src committer and sephe as my mentor.

Approved by: sephe (mentor)

7 years agoAdd missing support of named lookup tables to the IPv6 code.
ae [Tue, 15 Nov 2016 07:13:16 +0000 (07:13 +0000)]
Add missing support of named lookup tables to the IPv6 code.

PR: 214419
MFC after: 1 week
Sponsored by: Yandex LLC

7 years agoUpstream DTS provides PLL3 and PLL7 nodes (and their x2 form),
manu [Tue, 15 Nov 2016 07:08:33 +0000 (07:08 +0000)]
Upstream DTS provides PLL3 and PLL7 nodes (and their x2 form),
so remove them from our DTS and adapt the code to handle them correctly.
This fix HDMI video on A20.

7 years agoWhen you select make OLDTIMEZONES=1 then you need a few added directories
julian [Tue, 15 Nov 2016 06:37:44 +0000 (06:37 +0000)]
When you select make OLDTIMEZONES=1 then you need a few added directories
to be made or the command fails

Sponsored by: panzura

7 years agoAdd sdhci and mmc drivers to MPC85XX/MPC85XXSPE
jhibbits [Tue, 15 Nov 2016 05:05:51 +0000 (05:05 +0000)]
Add sdhci and mmc drivers to MPC85XX/MPC85XXSPE

sdhci was missing from MPC85XXSPE, and mmc/mmcsd were missing from both.

7 years agoWrite to the correct GPIO registers.
jhibbits [Tue, 15 Nov 2016 04:49:26 +0000 (04:49 +0000)]
Write to the correct GPIO registers.

Offset 0 is the direction register, not the data register.

MFC after: 1 week

7 years ago[evdev] Add evdev support to kbdmux(4) driver
gonzo [Tue, 15 Nov 2016 04:12:19 +0000 (04:12 +0000)]
[evdev] Add evdev support to kbdmux(4) driver

To enable event sourcing from kbdmux(4) kern.evdev.rcpt_mask value
should have bit 1 set (this is default)

Submitted by: Vladimir Kondratiev <wulf@cicgroup.ru>
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D8437

7 years agocache: plug a write-only variable in cache_negative_zap_one
mjg [Tue, 15 Nov 2016 03:43:10 +0000 (03:43 +0000)]
cache: plug a write-only variable in cache_negative_zap_one

7 years agocache: fix a race between entry removal and demotion
mjg [Tue, 15 Nov 2016 03:38:05 +0000 (03:38 +0000)]
cache: fix a race between entry removal and demotion

The negative list shrinker can demote an entry with only hotlist + neglist
locks held. On the other hand entry removal possibly sets the NCF_DVDROP
without aformentioned locks held prior to detaching it from the respective
netlist., which can lose the update made by the shrinker.

Reported and tested by: truckman

7 years agohyperv/vss: Add driver and tools for VSS
sephe [Tue, 15 Nov 2016 02:36:12 +0000 (02:36 +0000)]
hyperv/vss: Add driver and tools for VSS

VSS stands for "Volume Shadow Copy Service".  Unlike virtual machine
snapshot, it only takes snapshot for the virtual disks, so both
filesystem and applications have to aware of it, and cooperate the
whole VSS process.

This driver exposes two device files to the userland:

    /dev/hv_fsvss_dev

    Normally userland programs should _not_ mess with this device file.
    It is currently used by the hv_vss_daemon(8), which freezes and
    thaws the filesystem.  NOTE: currently only UFS is supported, if
    the system mounts _any_ other filesystems, the hv_vss_daemon(8)
    will veto the VSS process.

    If hv_vss_daemon(8) was disabled, then this device file must be
    opened, and proper ioctls must be issued to keep the VSS working.

    /dev/hv_appvss_dev

    Userland application can opened this device file to receive the
    VSS freeze notification, hold the VSS for a while (mainly to flush
    application data to filesystem), release the VSS process, and
    receive the VSS thaw notification i.e. applications can run again.

    The VSS will still work, even if this device file is not opened.
    However, only filesystem consistency is promised, if this device
    file is not opened or is not operated properly.

hv_vss_daemon(8) is started by devd(8) by default.  It can be disabled
by editting /etc/devd/hyperv.conf.

Submitted by: Hongjiang Zhang <honzhan microsoft com>
Reviewed by: kib, mckusick
MFC after: 3 weeks
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D8224

7 years ago[net80211] announce 11n capabilities in probe requests in IBSS mode.
adrian [Tue, 15 Nov 2016 01:47:37 +0000 (01:47 +0000)]
[net80211] announce 11n capabilities in probe requests in IBSS mode.

The 802.11-2012 specification notes that a subset of IEs should be present
in IBSS probe requests.  This is what (initially) allows nodes to discover
that other nodes are 11n capable.  Notably - HTCAP, but not HTINFO.

This isn't everything required to reliably enable 11n between net80211
peers; there's more work to come.

Tested:

* AR9380, IBSS+11n mode

7 years ago[mips] enable relbuf on mips for now to work around page aliasing in mips hardware.
adrian [Tue, 15 Nov 2016 01:41:45 +0000 (01:41 +0000)]
[mips] enable relbuf on mips for now to work around page aliasing in mips hardware.

Although the higher end MIPS hardware handles cache aliasing issues in
hardware, the older cores (r4k, etc) and some compile versions of the
newer cores (mips24k, mips34k, mips74k) don't have this feature.
This means we end up with some very unfortunate behaviour that was
made very obvious by some recent changes to the FFS pager by kib.

So, flip this off until we get our MIPS pmap/cache code upgraded to
handle aliased pages in software.

Discussed with: kib, bsdimp, juli

7 years ago[mips] make UMTX_CHAINS configurable at compile time.
adrian [Tue, 15 Nov 2016 01:34:38 +0000 (01:34 +0000)]
[mips] make UMTX_CHAINS configurable at compile time.

The default (512) wastes quite a bit of space which doesn't really buy
us much on highly embedded systems which don't take a lot of locks in
parallel.

This makes it at least build time configurable so people can experiment.

7 years agoReduce dmesg verbosity.
loos [Tue, 15 Nov 2016 00:58:31 +0000 (00:58 +0000)]
Reduce dmesg verbosity.

7 years agofold(1): Revert incorrect r308432
cem [Tue, 15 Nov 2016 00:24:18 +0000 (00:24 +0000)]
fold(1): Revert incorrect r308432

As Jean-Sébastien notes, fold(1) requires handling argv-supplied files.  That
will require a slightly more sophisticated approach.

Reported by: dumbbell@
Sponsored by: Dell EMC Isilon

7 years agonet80211: switch from ieee80211_iterate_nodes() to
avos [Mon, 14 Nov 2016 23:51:28 +0000 (23:51 +0000)]
net80211: switch from ieee80211_iterate_nodes() to
ieee80211_iterate_nodes_vap() where possible; this should
make the code a bit cleaner.

7 years ago[MIPS] Print Config7 on boot for several MIPS architectures
mizhka [Mon, 14 Nov 2016 21:38:36 +0000 (21:38 +0000)]
[MIPS] Print Config7 on boot for several MIPS architectures

Config7 contains useful fields, for instance, field AR indicating that the D-cache is configured to avoid cache aliases. This patch brings printing of config7 for MIPS 24K, 74K, 1004K.

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

7 years agoAdd the cpsw, the NIC driver for ti/am335x, to GENERIC kernel.
loos [Mon, 14 Nov 2016 20:57:30 +0000 (20:57 +0000)]
Add the cpsw, the NIC driver for ti/am335x, to GENERIC kernel.

While here:

 - remove 'device mii' - included by miibus;
 - remove 'device smcphy' - included by miibus;
 - sorted the network drivers list;
 - added a comment about miibus based on amd64/GENERIC.

Sponsored by: Rubicon Communications, LLC (Netgate)

7 years agortwn: drop excessive includes.
avos [Mon, 14 Nov 2016 20:37:07 +0000 (20:37 +0000)]
rtwn: drop excessive includes.

Since rom_defs.h is included in rxxx_var.h there is no need to
include both of them.

Submitted by: kevlo

7 years agoBuild the Ti/AM335x DTBs as part of GENERIC kernel.
loos [Mon, 14 Nov 2016 19:53:46 +0000 (19:53 +0000)]
Build the Ti/AM335x DTBs as part of GENERIC kernel.

Sponsored by: Rubicon Communications, LLC (Netgate)

7 years agoCheck if L2 entry exists for the given VA before loading L3 entry.
br [Mon, 14 Nov 2016 18:30:03 +0000 (18:30 +0000)]
Check if L2 entry exists for the given VA before loading L3 entry.

This is a fix for a panic that was easy to reproduce executing
"(/bin/ls &)" in the shell.

Sponsored by: DARPA, AFRL

7 years agoUpdate WOL support for newer em(4) devices.
sbruno [Mon, 14 Nov 2016 17:19:03 +0000 (17:19 +0000)]
Update WOL support for newer em(4) devices.

Do not overwrite the contents of the WUC register, add E1000_WUC_PME_EN
to the register contents, leaving the default contents intact.

PR: 208343
Submitted by: Kaho Toshikazu <kaho@elam.kais.kyoto-u.ac.jp>
Reviewed by: jeffrey piper <jeffrey.e.pieper@intel.com>
Approved by: erj@
MFC after: 2 weeks

7 years agoInitialize reserved bytes in struct mq_attr and its 32compat
kib [Mon, 14 Nov 2016 13:20:10 +0000 (13:20 +0000)]
Initialize reserved bytes in struct mq_attr and its 32compat
counterpart, to avoid kernel stack content leak in kmq_setattr(2)
syscall.  Also slightly simplify the checks around copyout()s.

Reported by: Vlad Tsyrklevich <vlad902+spam@gmail.com>
PR: 214488
MFC after: 1 week

7 years agoMove text dump version as it's not an architecture version.
def [Mon, 14 Nov 2016 12:56:18 +0000 (12:56 +0000)]
Move text dump version as it's not an architecture version.

Reported by: jhb
Approved by: pjd (mentor)

7 years agoUse the correct OF_getencprop over OF_getprop + fdt32_to_cpu to read
andrew [Mon, 14 Nov 2016 12:03:08 +0000 (12:03 +0000)]
Use the correct OF_getencprop over OF_getprop + fdt32_to_cpu to read
integer data from the device tree.

Sponsored by: ABT Systems Ltd

7 years agoMove including fdt_pinctrl.h after openfirm.h to get th edefinition of
andrew [Mon, 14 Nov 2016 11:52:22 +0000 (11:52 +0000)]
Move including fdt_pinctrl.h after openfirm.h to get th edefinition of
phandle_t and remove the need for including fdt_common.h.

Sponsored by: ABT Systems Ltd

7 years agoStop including fdt_common.h from the arm code when it's unneeded.
andrew [Mon, 14 Nov 2016 11:41:22 +0000 (11:41 +0000)]
Stop including fdt_common.h from the arm code when it's unneeded.

Sponsored by: ABT Systems Ltd

7 years agoFix function prototypes in usbdi(9) man page, and tweak it a little.
trasz [Mon, 14 Nov 2016 10:41:04 +0000 (10:41 +0000)]
Fix function prototypes in usbdi(9) man page, and tweak it a little.

MFC after: 1 month

7 years agoFix mips 32-bit buildworld.
cy [Mon, 14 Nov 2016 00:33:03 +0000 (00:33 +0000)]
Fix mips 32-bit buildworld.

Reported by: adrian
MFC after: 6 weeks
X-MFC with: r308493

7 years agoProvide simple mutual exclusion between mount point update and unmount.
kib [Sun, 13 Nov 2016 21:49:51 +0000 (21:49 +0000)]
Provide simple mutual exclusion between mount point update and unmount.

Currently mount update keeps vfs_busy(9) reference on the mount point
during MNT_UPDATE VFS_MOUNT() vfsops call.  This already provides the
exclusion, but is problematic for filesystems which need to perform
namei(9) during VFS_MOUNT(MNT_UPDATE) operations, e.g. to refresh
mnt_from path, because namei(9) must not be called while the
vfs_busy(9) reference is owned.

Check for MNT_UPDATE flag before setting MNTK_UNMOUNT, and for
MNTK_UNMOUNT before entering innards of vfs_domount_update(), failing
syscalls with EBUSY if conflict is detected.  Keep vfs_busy(9)
reference around VFS_MOUNT(MNT_UPDATE) calls still to not change VFS
KPI.

In the update path in ffs_mount(), drop vfs_busy() reference around
namei(), which is now safe due to unmount never executing in parallel
with VFS_MOUNT(MNT_UPDATE), and which avoids the deadlock.

Reported and tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

7 years agoMove common cleanup code into helper.
kib [Sun, 13 Nov 2016 21:39:55 +0000 (21:39 +0000)]
Move common cleanup code into helper.

Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

7 years agoFix typo.
tuexen [Sun, 13 Nov 2016 17:55:27 +0000 (17:55 +0000)]
Fix typo.

MFC after: 1 month
Sponsored by: Netflix

7 years agoAttempt to make the parts that people are supposed to change stand out more
brd [Sun, 13 Nov 2016 17:28:32 +0000 (17:28 +0000)]
Attempt to make the parts that people are supposed to change stand out more
by capitalizing them.

Approved by: dteske

7 years agoAllow embeding DRM2 code into kernel.
mmel [Sun, 13 Nov 2016 16:31:23 +0000 (16:31 +0000)]
Allow embeding DRM2 code into kernel.
It's usefull for development (for netboot) and it also helps to boot
FreeBSD on some embeded platforms (where we must boot kernel directly,
without standard boot loader).

MFC after: 3 weeks

7 years agoAllow DRM2 code to be built on platforms without AGP.
mmel [Sun, 13 Nov 2016 13:31:23 +0000 (13:31 +0000)]
Allow DRM2 code to be built on platforms without AGP.
This patch is taken from original drm-3.8 code.

Differential Revision: https://reviews.freebsd.org/D8454
MFC after: 3 weeks

7 years agoRemove spurious space.
trasz [Sun, 13 Nov 2016 12:06:25 +0000 (12:06 +0000)]
Remove spurious space.

MFC after: 1 month

7 years agoUse the new ofw_bus_node_is_compatible function in the mips code.
andrew [Sun, 13 Nov 2016 09:33:41 +0000 (09:33 +0000)]
Use the new ofw_bus_node_is_compatible function in the mips code.

Sponsored by: ABT Systems Ltd

7 years agoRemove bcm2835_common.c from files.arm64, it no longer exists.
andrew [Sun, 13 Nov 2016 08:42:02 +0000 (08:42 +0000)]
Remove bcm2835_common.c from files.arm64, it no longer exists.

Sponsored by: ABT Systems Ltd

7 years agoUse providergone method to cover race between destroy and g_access().
mav [Sun, 13 Nov 2016 03:56:26 +0000 (03:56 +0000)]
Use providergone method to cover race between destroy and g_access().

Reviewed by: markj
MFC after: 2 weeks
Sponsored by: iXsystems, Inc.

7 years agoAdd two new ddb commands: show device/show all devices
jhibbits [Sun, 13 Nov 2016 00:46:11 +0000 (00:46 +0000)]
Add two new ddb commands: show device/show all devices

Shows several useful pieces of information from the device including the softc
and ivars pointers.

7 years agoDIRDEPS_BUILD: Update dependencies.
bdrewery [Sun, 13 Nov 2016 00:11:30 +0000 (00:11 +0000)]
DIRDEPS_BUILD: Update dependencies.

MFC after: 2 weeks
Sponsored by: Dell EMC Isilon

7 years agoDIRDEPS_BUILD: Connect new dependencies.
bdrewery [Sun, 13 Nov 2016 00:11:23 +0000 (00:11 +0000)]
DIRDEPS_BUILD: Connect new dependencies.

MFC after: 2 weeks
Sponsored by: Dell EMC Isilon

7 years agoRemove lingering ELFCOPY_AS_OBJCOPY missed in r306649.
bdrewery [Sun, 13 Nov 2016 00:11:19 +0000 (00:11 +0000)]
Remove lingering ELFCOPY_AS_OBJCOPY missed in r306649.

Sponsored by: Dell EMC Isilon

7 years agoMove libsysdecode-specific hack out of buildworld.
bdrewery [Sun, 13 Nov 2016 00:11:15 +0000 (00:11 +0000)]
Move libsysdecode-specific hack out of buildworld.

This should fix the lib32 build since it was not removing the generated
ioctl.c.  This file is generated by a find(1) call, so cannot use normal
dependency tracking methods.

Reported by: jhb
MFC after: 2 weeks
Sponsored by: Dell EMC Isilon

7 years agoGenerate and use a proper .depend file for tables.h.
bdrewery [Sun, 13 Nov 2016 00:11:12 +0000 (00:11 +0000)]
Generate and use a proper .depend file for tables.h.

Reported by: jhb
MFC after: 2 weeks
Sponsored by: Dell EMC Isilon

7 years agoFix 'rebuild during install' error to only trigger on 'make install'.
bdrewery [Sun, 13 Nov 2016 00:11:09 +0000 (00:11 +0000)]
Fix 'rebuild during install' error to only trigger on 'make install'.

This allows 'make foo install' or 'make all install'.  It is a similar
fix as r304697 did for reading dependency files.

MFC after: 2 weeks
Sponsored by: Dell EMC Isilon