]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
6 years agoIntroduce caph_enter and caph_enter_casper.
Mariusz Zaborski [Mon, 7 May 2018 20:38:09 +0000 (20:38 +0000)]
Introduce caph_enter and caph_enter_casper.

The caph_enter function should made it easier to sandbox application
and not force us to remember that we need to check errno on failure.
Another function is also checking if casper is present.

Reviewed by: emaste, cem (partially)
Differential Revision: https://reviews.freebsd.org/D14557

6 years agoFix an off-by-one error when deciding to request a tx interrupt
Andrew Gallatin [Mon, 7 May 2018 18:11:22 +0000 (18:11 +0000)]
Fix an off-by-one error when deciding to request a tx interrupt

The canonical check for whether or not a ring is drainable is
TXQ_AVAIL() > MAX_TX_DESC() + 2.  Use this same construct here,
in order to avoid a potential off-by-one error where we might otherwise
fail to request an interrupt.

Reviewed by: mmacy
Sponsored by: Netflix

6 years agoamd64: tweak the memmove comment regarding authorship
Mateusz Guzik [Mon, 7 May 2018 17:37:07 +0000 (17:37 +0000)]
amd64: tweak the memmove comment regarding authorship

To make it clear the mentioned author did not write memmove.

6 years agoBoost thread priority while changing CPU frequency
Andrew Gallatin [Mon, 7 May 2018 15:24:03 +0000 (15:24 +0000)]
Boost thread priority while changing CPU frequency

Boost the priority of user-space threads when they set
their affinity to a core to adjust its frequency.   This avoids a situation
where a CPU bound kernel thread with the same affinity is running on a
down-clocked core, and will "block" powerd from up-clocking the core
until the kernel thread yields.   This can lead to poor perfomance,
and to things potentially getting stuck on Giant.

Reviewed by: kib (imp reviewed earlier version)
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D15246

6 years agoamd64: replace libkern's memset and memmove with assembly variants
Mateusz Guzik [Mon, 7 May 2018 15:07:28 +0000 (15:07 +0000)]
amd64: replace libkern's memset and memmove with assembly variants

memmove is repurposed bcopy (arguments swapped, return value added)
The libkern variant is a wrapper around bcopy, so this is a big
improvement.

memset is repurposed memcpy. The librkern variant is doing fishy stuff,
including branching on 0 and calling bzero.

Both functions are rather crude and subject to partial depessimization.

This is a soft prerequisite to adding variants utilizing the
'Enhanced REP MOVSB/STOSB' bit and let the kernel patch at runtime.

6 years agoKeep CARP state as INIT when net.inet.carp.allow=0.
Alexander Motin [Mon, 7 May 2018 14:44:55 +0000 (14:44 +0000)]
Keep CARP state as INIT when net.inet.carp.allow=0.

Currently when net.inet.carp.allow=0 CARP state remains as MASTER, which is
not very useful (if there are other masters -- it can lead to split brain,
if there are none -- it makes no sense).  Having it as INIT makes it clear
that carp packets are disabled.

Submitted by: wg
MFC after: 1 month
Relnotes: yes
Sponsored by: iXsystems, Inc.
Differential Revision: https://reviews.freebsd.org/D14477

6 years agox86 cpususpend_handler: call wbinvd after setting suspend state bits
Andriy Gapon [Mon, 7 May 2018 12:22:25 +0000 (12:22 +0000)]
x86 cpususpend_handler: call wbinvd after setting suspend state bits

Without a subsequent wbinvd the changes to suspended_cpus (and
resuming_cpus) can be lost at least on AMD systems that use MOESI cache
coherency protocol.  That can happen because one of APs ends up as an
Owner of the corresponding cache line(s) and the changes may never reach
the main memory before the AP is reset.

While here, move clearing of suspended_cpus a little bit earlier as the
fact of returning from savectx (with zero return value) means that the
CPU has fully restored it execution context.

Also, rework the comment that describes the need for resuming_cpus.

This change fixed suspend to RAM a previously broken AMD-based system.

Reviewed by: kib
Discussed with: bde
MFC after: 3 weeks
Differential Revision: https://reviews.freebsd.org/D15295

6 years agoclk: clk_set_assigned: Skip frequency of value 0
Emmanuel Vadot [Mon, 7 May 2018 09:42:35 +0000 (09:42 +0000)]
clk: clk_set_assigned: Skip frequency of value 0

A frequency of value 0 mean that we don't want to change the frequency so
skip it.

6 years agoarm64: rockchip: cru: Call clk_set_assigned
Emmanuel Vadot [Mon, 7 May 2018 07:31:25 +0000 (07:31 +0000)]
arm64: rockchip: cru: Call clk_set_assigned

We need to call clk_set_assigned after all the clock have been registered
to set the parents/rates described in the dtb.

6 years agoclk: Add support for assigned-clock-rates
Emmanuel Vadot [Mon, 7 May 2018 07:30:40 +0000 (07:30 +0000)]
clk: Add support for assigned-clock-rates

The properties 'assigned-clocks', 'assigned-clock-parents' and
'assigned-clock-rates' all work together.
'assigned-clocks' holds the list of clock for which we need to either
assign a new parent or a new frequency.
The old code just supported assigning a new parents, add support for
assigning a new frequency too.

6 years agoarm64: rockchip: clk: Add support to reparent to clk_composite
Emmanuel Vadot [Mon, 7 May 2018 07:29:48 +0000 (07:29 +0000)]
arm64: rockchip: clk: Add support to reparent to clk_composite

All clk_composite type have the possibility to reparent (choosing another
parent to find a better frequency), add the support for that.

6 years agoarm64: rk3328: Add pll rates tables
Emmanuel Vadot [Mon, 7 May 2018 07:28:47 +0000 (07:28 +0000)]
arm64: rk3328: Add pll rates tables

Add the known value to be safe for the rk3328 PLLs

6 years agoarm64: rk: Add support for setting pll rate
Emmanuel Vadot [Mon, 7 May 2018 07:28:10 +0000 (07:28 +0000)]
arm64: rk: Add support for setting pll rate

Add support for setting pll rate. On RockChip SoC two kind of plls are
supported, integer mode and fractional mode.
The two modes are intended to support more frequencies for the core plls.
While here change the recalc method as it appears that the datasheet is
wrong on the calculation method.

6 years agoarm64: rockchip: rk3328: Add armclk clock
Emmanuel Vadot [Mon, 7 May 2018 07:26:48 +0000 (07:26 +0000)]
arm64: rockchip: rk3328: Add armclk clock

Add the clock definition for the arm clock.
While here remove the indexes in the clock table as we will need clock
with a 0 index (non-exported clocks).

6 years agomsdosfs: use vfs_timestamp() to generate timestamps instead of getnanotime().
Pedro F. Giffuni [Sun, 6 May 2018 21:29:29 +0000 (21:29 +0000)]
msdosfs: use vfs_timestamp() to generate timestamps instead of getnanotime().

Most filesystems, with the notable exceptions of msdosfs and autofs use
only vfs_timestamp() to read the current time. This has the benefit of
configurable granularity (using the vfs.timestamp_precision sysctl).

For convenience, use it on msdosfs too.

Submitted by: Damjan Jovanovic
Differential Revision: https://reviews.freebsd.org/D15297

6 years agoWith the fall-back hack for lint gone, I have no copyright claim on this file.
Poul-Henning Kamp [Sun, 6 May 2018 21:22:46 +0000 (21:22 +0000)]
With the fall-back hack for lint gone, I have no copyright claim on this file.

6 years agor333175 introduced deferred deletion of multicast addresses in order to permit the...
Matt Macy [Sun, 6 May 2018 20:34:13 +0000 (20:34 +0000)]
r333175 introduced deferred deletion of multicast addresses in order to permit the driver ioctl
to sleep on commands to the NIC when updating multicast filters. More generally this permitted
driver's to use an sx as a softc lock. Unfortunately this change introduced a race whereby a
a multicast update would still be queued for deletion when ifconfig deleted the interface
thus calling down in to _purgemaddrs and synchronously deleting _all_ of the multicast addresses
on the interface.

Synchronously remove all external references to a multicast address before enqueueing for delete.

Reported by: lwhsu
Approved by: sbruno

6 years agoThe ifnet pointer (ifp) in rt_newaddrmsg can be valid without ifp->if_addr being...
Matt Macy [Sun, 6 May 2018 20:32:47 +0000 (20:32 +0000)]
The ifnet pointer (ifp) in rt_newaddrmsg can be valid without ifp->if_addr being set if
if the ifnet is still live by way of a reference but
in line for deletion. Check ifp->if_addr before dereferencing.

Approved by: sbruno

6 years agoCleanup sundry clang warnings for code that is not upstream in illumos.
Sean Bruno [Sun, 6 May 2018 16:22:02 +0000 (16:22 +0000)]
Cleanup sundry clang warnings for code that is not upstream in illumos.
https://github.com/illumos/illumos-gate/edit/master/usr/src/lib/libzfs/common/libzfs_sendrecv.c

Patch our version of it to quiesce warnings until someone decides to sync
up our code:

libzfs_sendrecv.c:2555:30: warning: format specifies type 'unsigned long'
  but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat]
                                sprintf(guidname, "%lu", thisguid);
                                                   ~~~   ^~~~~~~~
                                                   %llu
libzfs_sendrecv.c:2612:29: warning: format specifies type 'unsigned long'
  but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat]
                        sprintf(guidname, "%lu", parent_fromsnap_guid);
                                           ~~~   ^~~~~~~~~~~~~~~~~~~~
                                           %llu
libzfs_sendrecv.c:2645:29: warning: format specifies type 'unsigned long'
  but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat]
                        sprintf(guidname, "%lu", parent_fromsnap_guid);
                                           ~~~   ^~~~~~~~~~~~~~~~~~~~
                                           %llu

Reviewed by: allanjude
Differential Revision: https://reviews.freebsd.org/D15325

6 years agoFix spelling of --output long option in fetch.1
Benjamin Kaduk [Sun, 6 May 2018 15:59:03 +0000 (15:59 +0000)]
Fix spelling of --output long option in fetch.1

PR: 228017
Reported by: rff1917@yahoo.com

6 years agoam335x_prcm: Delay the frequencies read check
Emmanuel Vadot [Sun, 6 May 2018 14:37:11 +0000 (14:37 +0000)]
am335x_prcm: Delay the frequencies read check

With Linux 4.17 dts the compatible for the prcm added 'simplebus' we mean
that the simplebus driver will attach to it at the BUS_PASS_BUS pass.
Change the pass for the prcm driver to be at BUS_PASS_BUS so we will win
the attach.
This introduce a problem as this driver needs the ti_scm one to be already
attached. ti_scm also attach at BUS_PASS_BUS but after the prcm one as it is
after in the dtb and the simplebus driver simpy walk the tree to attach it's
children.
Use the bus_new_pass method to defer the frequencies read at BUS_PASS_TIMER.
This fixes booting on BeagleBone*

Reported by: many

6 years agoEnsure we are not dereferencing a NULL pointer.
Michael Tuexen [Sun, 6 May 2018 14:19:50 +0000 (14:19 +0000)]
Ensure we are not dereferencing a NULL pointer.

This was found by Coverity scanning the usrsctp stack (CID 203808).

MFC after: 3 days

6 years agoUpdate the repository URLs.
Dag-Erling Smørgrav [Sun, 6 May 2018 13:21:44 +0000 (13:21 +0000)]
Update the repository URLs.

6 years agoAdd netdump support to iflib.
Mark Johnston [Sun, 6 May 2018 00:57:52 +0000 (00:57 +0000)]
Add netdump support to iflib.

em(4) and igb(4) were tested by me, and ixgbe(4) and bnxt(4) were
tested by sbruno.

Reviewed by: mmacy, shurd
MFC after: 1 month
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D15262

6 years agoAdd netdump support to vtnet(4).
Mark Johnston [Sun, 6 May 2018 00:53:52 +0000 (00:53 +0000)]
Add netdump support to vtnet(4).

Tested with bhyve.

Reviewed by: bryanv, julian
MFC after: 1 month
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D15261

6 years agoAdd netdump support to re(4).
Mark Johnston [Sun, 6 May 2018 00:52:17 +0000 (00:52 +0000)]
Add netdump support to re(4).

Tested with a RealTek 8101E adapter.

Reviewed by: sbruno
MFC after: 1 month
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D15260

6 years agoAdd netdump support to cxgb(4).
Mark Johnston [Sun, 6 May 2018 00:48:43 +0000 (00:48 +0000)]
Add netdump support to cxgb(4).

Tested with a T320 adapter.

Reviewed by: np
MFC after: 1 month
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D15258

6 years agoAdd netdump support to bxe(4).
Mark Johnston [Sun, 6 May 2018 00:47:39 +0000 (00:47 +0000)]
Add netdump support to bxe(4).

Tested with a NetXtreme II BCM57810 adapter.

Reviewed by: davidcs
MFC after: 1 month
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D15257

6 years agoAdd netdump hooks to bge(4).
Mark Johnston [Sun, 6 May 2018 00:45:41 +0000 (00:45 +0000)]
Add netdump hooks to bge(4).

Tested with a NetXtreme BCM5727 adapter.

Reviewed by: julian
MFC after: 1 month
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D15256

6 years agoAdd netdump hooks to alc(4).
Mark Johnston [Sun, 6 May 2018 00:43:46 +0000 (00:43 +0000)]
Add netdump hooks to alc(4).

Tested with an AR8162.

Reviewed by: julian, sbruno
MFC after: 1 month
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D15255

6 years agoAdd netdump support to dumpon(8).
Mark Johnston [Sun, 6 May 2018 00:42:30 +0000 (00:42 +0000)]
Add netdump support to dumpon(8).

A new usage is added so that parameters for netdump may be specified.
Specifically, one configures an interface for netdump with:

# dumpon -c <client IP> -s <server IP> [-g <gateway IP>] <iface name>

Reviewed by: bdrewery, cem (earlier versions), sbruno
MFC after: 1 month
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D15254

6 years agoImport the netdump client code.
Mark Johnston [Sun, 6 May 2018 00:38:29 +0000 (00:38 +0000)]
Import the netdump client code.

This is a component of a system which lets the kernel dump core to
a remote host after a panic, rather than to a local storage device.
The server component is available in the ports tree. netdump is
particularly useful on diskless systems.

The netdump(4) man page contains some details describing the protocol.
Support for configuring netdump will be added to dumpon(8) in a future
commit. To use netdump, the kernel must have been compiled with the
NETDUMP option.

The initial revision of netdump was written by Darrell Anderson and
was integrated into Sandvine's OS, from which this version was derived.

Reviewed by: bdrewery, cem (earlier versions), julian, sbruno
MFC after: 1 month
X-MFC note: use a spare field in struct ifnet
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D15253

6 years agoRefactor some of the MI kernel dump code in preparation for netdump.
Mark Johnston [Sun, 6 May 2018 00:22:38 +0000 (00:22 +0000)]
Refactor some of the MI kernel dump code in preparation for netdump.

- Add clear_dumper() to complement set_dumper().
- Drain netdump's preallocated mbuf pool when clearing the dumper.
- Don't do bounds checking for dumpers with mediasize 0.
- Add dumper callbacks for initialization for writing out headers.

Reviewed by: sbruno
MFC after: 1 month
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D15252

6 years agoAdd an mbuf allocator for netdump.
Mark Johnston [Sun, 6 May 2018 00:19:48 +0000 (00:19 +0000)]
Add an mbuf allocator for netdump.

The aim is to permit mbuf allocations after a panic without calling into
the page allocator, without imposing any runtime overhead during regular
operation of the system, and without modifying driver code. The approach
taken is to preallocate a number of mbufs and clusters, storing them
in linked lists, and using the lists to back some UMA cache zones. At
panic time, the mbuf and cluster zone pointers are overwritten with
those of the cache zones so that the mbuf allocator returns
preallocated items.

Using this scheme, drivers which cache mbuf zone pointers from
m_getzone() require special handling when implementing netdump support.

Reviewed by: cem (earlier version), julian, sbruno
MFC after: 1 month
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D15251

6 years agoStyle.
Mark Johnston [Sun, 6 May 2018 00:11:30 +0000 (00:11 +0000)]
Style.

MFC after: 3 days

6 years agoRemove a redundant assertion.
Mark Johnston [Sun, 6 May 2018 00:05:03 +0000 (00:05 +0000)]
Remove a redundant assertion.

MFC after: 1 week
Sponsored by: Dell EMC Isilon

6 years agoAvoid dropping the topology lock in gmirror's dumpconf implementation.
Mark Johnston [Sun, 6 May 2018 00:03:24 +0000 (00:03 +0000)]
Avoid dropping the topology lock in gmirror's dumpconf implementation.

Doing so introduces races which can lead to a use-after-free when
grabbing a snapshot of the GEOM mesh.

To ensure that a mirror's disk list remains stable, change its locking
protocol: both the softc lock and the topology lock are now required
to modify the list, so either lock is sufficient for traversal.

Tested by: pho
MFC after: 2 weeks
Sponsored by: Dell EMC Isilon

6 years agoCurrently in_pcbfree will unconditionally wunlock the pcbinfo lock
Matt Macy [Sat, 5 May 2018 22:40:40 +0000 (22:40 +0000)]
Currently in_pcbfree will unconditionally wunlock the pcbinfo lock
to avoid a LOR on the multicast list lock in the freemoptions routines.
As it turns out, tcp_usr_detach can acquire the tcbinfo lock readonly.
Trying to wunlock the pcbinfo lock in that context has caused a number
of reported crashes.

This change unclutters in_pcbfree and moves the handling of wunlock vs
runlock of pcbinfo to the freemoptions routine.

Reported by: mjg@, bde@, o.hartmann at walstatt.org
Approved by: sbruno

6 years agocxgbe(4): Update all firmwares to 1.19.1.0.
Navdeep Parhar [Sat, 5 May 2018 20:16:08 +0000 (20:16 +0000)]
cxgbe(4): Update all firmwares to 1.19.1.0.

These firmwares and the following list of changes are from the public
ChelsioUwire-3.7.1.0 release.

T6 Firmware
================================================================================
Version : 1.19.1.0
Date    : 04/23/2018
================================================================================

Fixes
-----

BASE:
- Fixed traffic stall when rate-limit is modified while running traffic.
- Fixes a firmware crash in FW_ETH_TX_EO_WR handling.
- Fixes host DCB support when FW_PORT_CMD is used.

ETH:
- Exit Auto-Negotiation if we don't receive base page from peer within 10s.
  This fixes some cases where in we keep on restarting auto negotiation without
  ever exiting, resulting in link failure.
- Fixes an issue where VF packets counter were not increasing if VF packets
  coalesced WR is used by driver.

OFLD:
- Kernel and user mode NVMEoF performance enhancements.

FOiSCSI:
- Fixes fw crash when trying to connect to non-existence IPv6 iSNS target.

================================================================================
Version : 1.18.9.0
Date    : 03/27/2018
================================================================================

Fixes
-----

BASE:
- For Ethernet frames less than 64B, pad them with zero bytes as per IEEE spec
  (RFC 894).
- Added a new parameter iqtype to FW_IQ_CMD to identify the ingress NIC or offload
  queues. This fixes an issue where driver was receiving interrupt with no new
  messages in queue.
- FW_PARAMS_CMD processes all the valaid paramaters and returns value 0UL for
  any unknown parameter.

OFLD:
- Fixes connection failure during SRQ reuse.
- Fixes incorrect cqe in case of WRITE with immediate operation.

FOiSCSI:
- Fixes a fw crash when wrong node-id is passed to FW_FOISCSI_CTRL_WR.

FOFCoE:
- Fixes a fw hang while creating NPIV.

Enhancements
------------

ETH:
- A new WR FW_ETH_TX_PKTS_VM_WR added to support VM packet coalescing.

================================================================================
Version : 1.18.4.0
Date    : 02/28/2018
================================================================================

Fixes
-----

BASE:
- Fixed Rate limiting not working for 101Mbps<=rate limit<=163Mbps range.
- Fixed starting more than 32 VMs on PF4 causing firmware hang.

ETH:
- Fixed link failure due to FEC mismatch with optics.
- Fixed link failure with link toggle stress tests.
- Only BaseR FEC is supported for 50G.
- Fixed a bug in next page handling which sometimes causes link down.
- Fixed port down due to failre to read eeprom contents of some modules.
- Fixed a bug causing adapter to fail with spider configuration.

FOiSCSI:
- Fixed a bug causing login failure when connecting to multiple targets.

Enhancements
------------

BASE:
- Added a new firmware API to retrieve the maximum temperaturethreshold for
  the chip (FW_PARAM_DEV_DIAG_MAXTMPTHRESH).

ETH:
- Added support for user to contol pause negotiation during auto negotiation.

FOiSCSI:
- Added a new facility to redirect few fw events to offload rx queue
  (based on driver's configration)
- Driver can ignore providing ipv6 prefix len during ipv6 address configuration.

================================================================================
Version : 1.17.14.0
Date    : 12/27/2017
================================================================================

FIXES
-----

BASE:
- Fixed an FLR failure during simulteneous power up of VM.
- Fixed an issue in vlan acl which was limiting vlan range to 1024.

ETH:
- Enabled RS-FEC for 25G active copper cable and 25GBASE-SR.
- When auto negotiation is enabled, final pause settings are resolved
  based on local and peer pause settings.
- Handle NACK for an I2C access.

OFLD
- Fixed rdma connection cleanup in SO adpater.
- Fixed rdma connections during read invalidate.
- Fixed the crash when invalid BW rate is passed to fw.
- Fixed the traffic hang when BW allocation is changed from switch during traffic.

FOFCoE:
- Fixed an issue where initiator remains logged-in even after LLDP is disabled
  on switch.

ENHANCEMENTS
------------

BASE:
- Added support for 248 VFs.
- Added fw driver periodic calibration for MC.

ETH:
- Added XLAUI port type support.
- Added raw mac entry deletion support (FW_VI_MAC_ID_BASED_FREE).

OFLD:
- Inline IPSec support added (flag F_FW_ULPTX_WR_DATA indicates the inline
  IPSec WR).
- New work request FW_RI_RDMA_WRITE_CMPL_WR (write with completion) added to

T5 Firmware
================================================================================
Version : 1.19.1.0
Date    : 04/23/2018
================================================================================

Fixes
-----

BASE:
- Fixes a firmware crash in FW_ETH_TX_EO_WR handling.
- Fixes host DCB support when FW_PORT_CMD is used.

ETH:
- Fixes an issue where VF packets counter were not increasing if VF packets
  coalesced WR is used by driver.

OFLD:
- Fixes an issue where fw hangs if max traffic rate passed is 0.

FOiSCSI:
-  Fixes fw crash when trying to connect to non-existence IPv6 iSNS target.

================================================================================
Version : 1.18.9.0
Date    : 03/27/2018
================================================================================

Fixes
-----

BASE:
- For Ethernet frames less than 64B, pad them with zero bytes as per IEEE spec
  (RFC 894).
- Added a new parameter iqtype to FW_IQ_CMD to identify the ingress NIC or offload
  queues. This fixes an issue where driver was receiving interrupt with no new
  messages in queue.

ETH:
- Pad the Ethernet packets of size less than 64B with zeros. This fixes the
  incorrect checksum generation of packets less then 64B.

FOiSCSI:
- Fixes a fw crash when wrong node-id is passed to FW_FOISCSI_CTRL_WR.

FOFCoE:
- Fixes a fw hang while creating NPIV.

Enhancements
------------

ETH:
- A new WR FW_ETH_TX_PKTS_VM_WR added to support VM packet coalescing.

================================================================================
Version : 1.18.4.0
Date    : 02/28/2018
================================================================================

Fixes
-----

BASE:
- Fixed starting more than 32 VMs on PF4 causing firmware hang.

FOiSCSI:
- Fixed a bug causing login failure when connecting to multiple targets.

Enhancements
------------

BASE:
- Added a new firmware API to retrieve the maximum temperaturethreshold for
  the chip (FW_PARAM_DEV_DIAG_MAXTMPTHRESH).

ETH:
- Added support for user to contol pause negotiation during auto negotiation.

FOiSCSI:
- Added a new facility to redirect few fw events to offload rx queue
  (based on driver's configration)
- Driver can ignore providing ipv6 prefix len during ipv6 address configuration.

================================================================================
Version : 1.17.14.0
Date    : 12/27/2017
================================================================================

FIXES
-----

BASE:
- Fixed an issue in vlan acl which was limiting vlan range to 1024.

ETH:
- Corrected lane inversion logic.
- Fixed improper LED behavior in T580 cards.
- When auto negotiation is enabled, final pause settings are resolved
  based on local and peer pause settings.
- Handle NACK for an I2C access.

OFLD
- Fixed rdma connections during read invalidate.

FOiSCSI:
- Fixed a connections hang when link is toggled frequently.

FOFCoE:
- Fixed an issue where initiator remains logged-in even after LLDP is disabled
  on switch.

ENHANCEMENTS
------------

BASE:
- Added support for 124 VFs.

ETH:
- Added XLAUI port type support.
- Added raw mac entry deletion support (FW_VI_MAC_ID_BASED_FREE).

OFLD:
- New work request FW_RI_RDMA_WRITE_CMPL_WR (write with completion) added to
  optimize NVMEoF write.

T4 Firmware
================================================================================
Version : 1.19.1.0
Date    : 04/23/2018
================================================================================

Fixes
-----

BASE:
- Fixes a firmware crash in FW_ETH_TX_EO_WR handling.
- Fixes host DCB support when FW_PORT_CMD is used.

FOiSCSI:
-  Fixes fw crash when trying to connect to non-existence IPv6 iSNS target.

================================================================================
Version : 1.18.9.0
Date    : 03/27/2018
================================================================================

Fixes
-----

BASE:
- Added a new paramter iqtype to FW_IQ_CMD to identify the ingress NIC or
  offload queues. This fixes an issue where driver was receiving interrupt with
  no new messages in queue.

FOFCoE:
- Fixes a fw hang while creating NPIV.

Enhancements
------------

ETH:
- A new WR FW_ETH_TX_PKTS_VM_WR added to support VM packet coalescing.

================================================================================
Version : 1.18.4.0
Date    : 02/28/2018
================================================================================

Enhancements
------------

BASE:
- Added a new firmware API to retrieve the maximum temperaturethreshold for
  the chip (FW_PARAM_DEV_DIAG_MAXTMPTHRESH).

================================================================================
Version : 1.17.14.0
Date    : 12/27/2017
================================================================================

FIXES
-----

BASE:
- Fixed an issue in vlan acl which was limiting vlan range to 1024.

MFC after: 3 days
Sponsored by: Chelsio Communications

6 years agoAdd NVMe Namespace Management support to nvmecontrol(8).
Alexander Motin [Sat, 5 May 2018 20:08:03 +0000 (20:08 +0000)]
Add NVMe Namespace Management support to nvmecontrol(8).

This allows create/delete/attach/detach namespaces on new NVMe controllers.
This is only a first user-level part of the bigger change set.  Kernel part
required to detect and handle the configuration changes without reboot is
completely independent and will be added separately.

Submitted by: Matt Williams <mffbsdw@gmail.com> (original version)
Differential Revision: https://reviews.freebsd.org/D11399

6 years agoRemove accidentally committed debug statement that induced the following
Sean Bruno [Sat, 5 May 2018 18:39:54 +0000 (18:39 +0000)]
Remove accidentally committed debug statement that induced the following
warning:

make[3]: "/usr/src/share/mk/bsd.prog.mk" line 274: warning: duplicate
script for target "_scriptsinstall" ignored
make[3]: "/usr/src/share/mk/bsd.prog.mk" line 274: warning: using
previous script for "_scriptsinstall" defined here

Reviewed by: kevans

6 years agoAdd support for powernv POWER9 MMU initialization
Justin Hibbits [Sat, 5 May 2018 16:00:02 +0000 (16:00 +0000)]
Add support for powernv POWER9 MMU initialization

The POWER9 MMU (PowerISA 3.0) is slightly different from current
configurations, using a partition table even for hypervisor mode, and
dropping the SDR1 register.  Key off the newly early-enabled CPU features
flags for the new architecture, and configure the MMU appropriately.

The POWER9 MMU ignores the "PSIZ" field in the PTCR, and expects a 64kB
table.  As we are enabled for powernv (hypervisor mode, no VMs), only
initialize partition table entry 0, and zero out the rest.  The actual
contents of the register are identical to SDR1 from previous architectures.

Along with this, fix a bug in the page table allocation with very large
memory.  The table can be allocated on any 256k boundary.  The
bootstrap_alloc alignment argument is an int, and with large amounts of
memory passing the size of the table as the alignment will overflow an
integer.  Hard-code the alignment at 256k as wider alignment is not
necessary.

Reviewed by: nwhitehorn
Tested by: Breno Leitao
Relnotes: Yes

6 years agoBreak out the cpu_features setup to its own function, to be run earlier
Justin Hibbits [Sat, 5 May 2018 15:48:39 +0000 (15:48 +0000)]
Break out the cpu_features setup to its own function, to be run earlier

The new POWER9 MMU configuration is slightly different from current setups.
Rather than special-casing on POWER9, move the initialization of cpu_features
and cpu_features2 to as early as possible, so that platform and MMU
configuration can be based upon CPU features instead of specific CPUs if at all
possible.

Reviewed by: nwhitehorn

6 years agoAdd POWER9 to the POWER8 bootstrap case blocks
Justin Hibbits [Sat, 5 May 2018 15:42:58 +0000 (15:42 +0000)]
Add POWER9 to the POWER8 bootstrap case blocks

POWER8 and POWER9 have similar configuration requirements for hypervisor setup,
and in the cases here they're identical.  Add the POWER9 constant to the POWER8
list so it's initialized correctly.

Reviewed by: nwhitehorn

6 years ago[skel] Remove dot.rhosts from share/skel
Eitan Adler [Sat, 5 May 2018 08:16:19 +0000 (08:16 +0000)]
[skel] Remove dot.rhosts from share/skel

The rcmds were removed in r324351. Chase that removal.

6 years agoamdsbwd: fix reboot status reporting
Andriy Gapon [Sat, 5 May 2018 05:22:11 +0000 (05:22 +0000)]
amdsbwd: fix reboot status reporting

Originally, I overlooked that PMIO register 0xc0 has a dual personality.
It can either be S5/Reset Status register or Misc. Fix register (aka
debug status register).  The mode is controlled by bit 2 in PMIO
register 0xc4.  Apparently there are register programming requirements
for the second personality, so many BIOSes leave the register, after
programming it, in that mode.  So, we need to switch the register to the
correct mode.

Additionally, AMDSB8_WD_RST_STS was defined incorrectly as bit 13 while
it is actually bit 25 (and the register's width is 32 bits, not 16).

With this change I see the following in dmesg after a reset by the
watchdog:
amdsbwd0: ResetStatus = 0x42000000
amdsbwd0: Previous Reset was caused by Watchdog

MFC after: 2 weeks

6 years agofor bus suspend, detach and shutdown iterate children in reverse order
Andriy Gapon [Sat, 5 May 2018 05:19:32 +0000 (05:19 +0000)]
for bus suspend, detach and shutdown iterate children in reverse order

For most buses all children are equal, so the order does not matter.
Other buses, such as acpi, carefully order their child devices to
express implicit dependencies between them.  For such buses it is safer
to bring down devices in the reverse order.

I believe that this is the reason why hpet_suspend had to be disabled.
Some drivers depend on a working event timer until they are suspended.
But previously we would suspend hpet very early.

I tested this change by makinbg hpet_suspend actually stop HPET timers
and tested that too.

Note that this change is not a complete solution as it does not take
into account bus passes.
A better approach would be to track the actual attach order of the
devices and to use the reverse of that.

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

6 years agotc: bcopy -> memcpy
Mateusz Guzik [Fri, 4 May 2018 22:48:10 +0000 (22:48 +0000)]
tc: bcopy -> memcpy

6 years agoamd64: syscall path bcopy -> memcpy
Mateusz Guzik [Fri, 4 May 2018 22:41:12 +0000 (22:41 +0000)]
amd64: syscall path bcopy -> memcpy

6 years agoAllow the compiler to use __builtin_memcpy
Mateusz Guzik [Fri, 4 May 2018 22:33:54 +0000 (22:33 +0000)]
Allow the compiler to use __builtin_memcpy

In particular this allows the compiler to avoid heavy-handed machinery
if the to be copied buffer is small.

Reviewed by: jhb

6 years agoFix a typo.
Glen Barber [Fri, 4 May 2018 21:17:29 +0000 (21:17 +0000)]
Fix a typo.

Submitted by: lidl
MFC after: 3 days
MFC with: r333262
Sponsored by: The FreeBSD Foundation

6 years agoMake it easier for filesystems to count themselves as jail-enabled,
Jamie Gritton [Fri, 4 May 2018 20:54:27 +0000 (20:54 +0000)]
Make it easier for filesystems to count themselves as jail-enabled,
by doing most of the work in a new function prison_add_vfs in kern_jail.c
Now a jail-enabled filesystem need only mark itself with VFCF_JAIL, and
the rest is taken care of.  This includes adding a jail parameter like
allow.mount.foofs, and a sysctl like security.jail.mount_foofs_allowed.
Both of these used to be a static list of known filesystems, with
predefined permission bits.

Reviewed by: kib
Differential Revision: D14681

6 years agoEnsure the ports and src trees are available on GCE images,
Glen Barber [Fri, 4 May 2018 20:38:26 +0000 (20:38 +0000)]
Ensure the ports and src trees are available on GCE images,
satisfying a requirement to allow FreeBSD to be considered
a top-tier supported OS in Google Compute Engine.

MFC after: 3 days
Sponsored by: The FreeBSD Foundation

6 years ago% WITHOUT_FORMAT_EXTENSIONS= XCC=/usr/local/bin/gcc8 make -j96 buildkernel KERNCONF...
Matt Macy [Fri, 4 May 2018 19:31:28 +0000 (19:31 +0000)]
% WITHOUT_FORMAT_EXTENSIONS=  XCC=/usr/local/bin/gcc8 make -j96 buildkernel KERNCONF=GENERIC-NODEBUG -s >& log
% grep "inlining failed" log | wc
     234    3570   36065
Consensus on those polled is that inlining failure warnings are not useful

Approved by: sbruno

6 years agoProperly support the GPIO_PIN_PRESET_{LOW,HIGH} options when configuring
Ian Lepore [Fri, 4 May 2018 19:28:05 +0000 (19:28 +0000)]
Properly support the GPIO_PIN_PRESET_{LOW,HIGH} options when configuring
a gpio pin.  If neither of the options is specified, pre-set the pin's
output value to the pin's current input value, to achieve glitch-free
transitions to output mode on pins that are pulled up or down at reset
or via fdt pinctrl data.

6 years agofix case where pidx_last might be used uninitialized
Matt Macy [Fri, 4 May 2018 18:59:01 +0000 (18:59 +0000)]
fix case where pidx_last might be used uninitialized

Reviewed by: sbruno

6 years agofix gcc8 warnings
Matt Macy [Fri, 4 May 2018 18:57:05 +0000 (18:57 +0000)]
fix gcc8 warnings

Approved by: sbruno

6 years agofix gcc8 compile
Matt Macy [Fri, 4 May 2018 18:25:07 +0000 (18:25 +0000)]
fix gcc8 compile

Approved by: sbruno

6 years agoFix some races introduced in r332974.
Mark Johnston [Fri, 4 May 2018 17:17:30 +0000 (17:17 +0000)]
Fix some races introduced in r332974.

With r332974, when performing a synchronized access of a page's "queue"
field, one must first check whether the page is logically dequeued. If
so, then the page lock does not prevent the page from being removed
from its page queue. Intoduce vm_page_queue(), which returns the page's
logical queue index. In some cases, direct access to the "queue" field
is still required, but such accesses should be confined to sys/vm.

Reported and tested by: pho
Reviewed by: kib
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D15280

6 years agoMake reading imx6 gpio pins work correctly whether the pin is in open-drain
Ian Lepore [Fri, 4 May 2018 16:23:54 +0000 (16:23 +0000)]
Make reading imx6 gpio pins work correctly whether the pin is in open-drain
mode or not.  An earlier attempt to make this work was done in r320456, by
always reading the pad status register (PSR) instead of the data register.
But it turns out the values in PSR only reflect the electrical level of an
output pin if the pad is configured with the SION (Set Input On) bit in the
pinmux config, and most output gpio pads are not configured that way.

So now a gpio read is done by returning the value from the data register,
which works right whether the pin is configured for input or output, unless
the pin has been set for OPENDRAIN mode, in which case the PSR is read
instead.  For this to work, the pin must also be configured with SION turned
on in the fdt pinmux data, which is a reasonable thing to require for the
unusual case of reading an open-drain output pin.

6 years agoiflib: fix invalid free during queue allocation failure
Stephen Hurd [Fri, 4 May 2018 15:20:34 +0000 (15:20 +0000)]
iflib: fix invalid free during queue allocation failure

In r301567, code was added to cleanup to prevent memory leaks for the
Tx and Rx ring structs. This code carefully tracked txq and rxq, and
made sure to free them properly during cleanup.

Because we assigned the txq and rxq pointers into the ctx->ifc_txqs and
ctx->ifc_rxqs, we carefully reset these pointers to NULL, so that
cleanup code would not accidentally free the memory twice.

This was changed by r304021 ("Update iflib to support more NIC designs"),
which removed this resetting of the pointers to NULL, because it re-used
the txq and rxq pointers as an index into the queue set array.

Unfortunately, the cleanup code was left alone. Thus, if we fail to
allocate DMA or fail to configure the queues using the drivers ifdi
methods, we will attempt to free txq and rxq. These variables would now
incorrectly point to the wrong location, resulting in a page fault.

There are a number of methods to correct this, but ultimately the root
cause was that we reuse the txq and rxq pointers for two different
purposes.

Instead, when allocating, store the returned pointer directly into
ctx->ifc_txqs and ctx->ifc_rxqs. Then, assign this to txq and rxq as
index pointers before starting the loop to allocate each queue.
Drop the cleanup code for txq and rxq, and only use ctx->ifc_txqs and
ctx->ifc_rxqs.

Thus, we no longer need to free txq or rxq under any error flow, and
intsead rely solely on the pointers stored in ctx->ifc_txqs and
ctx->ifc_rxqs. This prevents the invalid free(), and ensures that we
still properly cleanup after ourselves as before when failing to
allocate.

Submitted by: Jacob Keller
Reviewed by: gallatin, sbruno
Sponsored by: Intel Corporation
Differential Revision: https://reviews.freebsd.org/D15285

6 years agoiflib: remove unused brscp pointer from iflib_queues_alloc
Stephen Hurd [Fri, 4 May 2018 15:11:16 +0000 (15:11 +0000)]
iflib: remove unused brscp pointer from iflib_queues_alloc

This pointer was no longer written to as of r315217. Since nothing writes
to the variable, remove it.

Submitted by: Jacob Keller <jacob.e.keller@intel.com>
Reviewed by: gallatin, kmacy, sbruno
Differential Revision: https://reviews.freebsd.org/D15284

6 years agotime(1): use the monotonic clock
Alan Somers [Fri, 4 May 2018 14:39:32 +0000 (14:39 +0000)]
time(1): use the monotonic clock

The monotonic clock is more appropriate than the realtime clock for
measuring durations.

Reviewed by: ken, jilles
Differential Revision: https://reviews.freebsd.org/D14032

6 years agoarm: overlays: Update to new path-based sugar format
Kyle Evans [Fri, 4 May 2018 14:38:48 +0000 (14:38 +0000)]
arm: overlays: Update to new path-based sugar format

6 years agoPoint out that the tzdata 2018e update brings in negative DST for certain time
Philip Paeps [Fri, 4 May 2018 10:52:17 +0000 (10:52 +0000)]
Point out that the tzdata 2018e update brings in negative DST for certain time
zones.  This does not affect the vast majority of users who do not care about
(or even know about) the tm_isdst flag but may be slightly surprising to those
with a more specialised interest in time zone arcana.

MFC after: 3 days

6 years agoImport tzdata 2018e
Philip Paeps [Fri, 4 May 2018 10:17:27 +0000 (10:17 +0000)]
Import tzdata 2018e

Changes: https://github.com/eggert/tz/blob/2018e/NEWS

MFC after: 3 days

6 years agoImport tzdata 2018e
Philip Paeps [Fri, 4 May 2018 10:10:21 +0000 (10:10 +0000)]
Import tzdata 2018e

6 years agoImmediately propagate EACCES error code to application from tcp_output.
Andrey V. Elsukov [Fri, 4 May 2018 09:28:12 +0000 (09:28 +0000)]
Immediately propagate EACCES error code to application from tcp_output.

In r309610 and r315514 the behavior of handling EACCES was changed, and
tcp_output() now returns zero when EACCES happens. The reason of this
change was a hesitation that applications that use TCP-MD5 will be
affected by changes in project/ipsec.

TCP-MD5 code returns EACCES when security assocition for given connection
is not configured. But the same error code can return pfil(9), and this
change has affected connections blocked by pfil(9). E.g. application
doesn't return immediately when SYN segment is blocked, instead it waits
when several tries will be failed.

Actually, for TCP-MD5 application it doesn't matter will it get EACCES
after first SYN, or after several tries. Security associtions must be
configured before initiating TCP connection.

I left the EACCES in the switch() to show that it has special handling.

Reported by: Andreas Longwitz <longwitz at incore dot de>
MFC after: 10 days

6 years agoopensolaris system_taskq does not need to run at maximum priority
Andriy Gapon [Fri, 4 May 2018 07:28:01 +0000 (07:28 +0000)]
opensolaris system_taskq does not need to run at maximum priority

In fact, this taskqueue should use "boring" threads, nothing special
about them.

MFC after: 2 weeks

6 years ago`dup1_processes -t 96 -s 5` on a dual 8160
Matt Macy [Fri, 4 May 2018 06:51:01 +0000 (06:51 +0000)]
`dup1_processes -t 96 -s 5` on a dual 8160

x dup_before
+ dup_after
+------------------------------------------------------------+
|             x                                            + |
|x    x   x   x                                         ++ ++|
|   |____AM___|                                          |AM||
+------------------------------------------------------------+
    N           Min           Max        Median           Avg        Stddev
x   5  1.514954e+08 1.5230351e+08 1.5206157e+08 1.5199371e+08     341205.71
+   5 1.5494336e+08 1.5519569e+08 1.5511982e+08 1.5508323e+08     96232.829
Difference at 95.0% confidence
        3.08952e+06 +/- 365604
        2.03266% +/- 0.245071%
        (Student's t, pooled s = 250681)

Reported by: mjg@
MFC after: 1 week

6 years agoamd64: get rid of the pessimized bcopy in syscall arg copy
Mateusz Guzik [Fri, 4 May 2018 04:05:07 +0000 (04:05 +0000)]
amd64: get rid of the pessimized bcopy in syscall arg copy

The code was unnecessarily conditionally copying either 5 or 6 args.
It can blindly copy 6, which also means the size is known at compilation
time and the operation can be depessimized.

Note the entire syscall handling code is rather slow.

Tested on Skylake, sample result for getppid (calls/s):
without pti: 7310106 -> 10653569
with pti: 3304843 -> 4148306

Some syscalls (like read) did not note any difference, other have typically
very modest wins.

6 years agoAllow __builtin_memmove instead of bcopy for small buffers of known size
Mateusz Guzik [Fri, 4 May 2018 04:00:48 +0000 (04:00 +0000)]
Allow __builtin_memmove instead of bcopy for small buffers of known size

See r323329 for an explanation why this is a good idea.

6 years agomsdosfs: long names of files are created incorrectly.
Pedro F. Giffuni [Fri, 4 May 2018 03:44:12 +0000 (03:44 +0000)]
msdosfs: long names of files are created incorrectly.

This fixes a regression that happened in r120492 (2003) where libkiconv
was introduced and we went from checking unlen to checking for '\0'.

PR: 111843
Patch by: Damjan Jovanovic
MFC after: 1 week

6 years agostyle(9): add some additional useful FILES/xref information
Kyle Evans [Fri, 4 May 2018 03:23:45 +0000 (03:23 +0000)]
style(9): add some additional useful FILES/xref information

Submitted by: 0mp
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D15196

6 years agoRegen src.conf(5) after r333236
Kyle Evans [Fri, 4 May 2018 03:17:44 +0000 (03:17 +0000)]
Regen src.conf(5) after r333236

6 years agobsdgrep: annihilate our in-tree TRE, previously disabled by default
Kyle Evans [Fri, 4 May 2018 03:13:25 +0000 (03:13 +0000)]
bsdgrep: annihilate our in-tree TRE, previously disabled by default

It was an old TRE that had plenty of bugs and no performance gain over
regex(3). I disabled it by default in r323615, and there was some confusion
about what the knob does- likely due to poor naming on my part- to the tune
of "well, it sounds like it should speed things up" (mentioned by multiple
people).

To compound this, I have no intention of maintaining a second regex
implementation. If someone would like to step up and volunteer to maintain a
lean-and-mean implementation for grep, this is OK, but we have very few
volunteers to maintain even our primary regex implementation.

6 years agoAllow arbitrary numbers of columns for VNC server screen resolution.
Peter Grehan [Fri, 4 May 2018 01:36:49 +0000 (01:36 +0000)]
Allow arbitrary numbers of columns for VNC server screen resolution.

The prior code only allowed multiples of 32 for the
numbers of columns. Remove this restriction to allow
a forthcoming UEFI firmware update to allow arbitrary
x,y resolutions.

(the code for handling rows already supported non mult-32 values)

Reviewed by: Leon Dang (original author)
MFC after: 3 weeks
Differential Revision: https://reviews.freebsd.org/D15274

6 years agozfs_ioctl: avoid out-of-bound read
Ed Maste [Fri, 4 May 2018 00:56:41 +0000 (00:56 +0000)]
zfs_ioctl: avoid out-of-bound read

admbugs: 796
Submitted by: Domagoj Stolfa <ds815@cam.ac.uk>
Reported by: Ilja Van Sprundel <ivansprundel@ioactive.com>
Reviewed by: avg
MFC after: 1 day

6 years agogpart: add fat32lba MBR partition type
Ed Maste [Fri, 4 May 2018 00:34:27 +0000 (00:34 +0000)]
gpart: add fat32lba MBR partition type

FAT32 partition with LBA addressing.

Reviewed by: marcel
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D15266

6 years agoAllow PCI VGA devices to be detached.
Peter Grehan [Thu, 3 May 2018 22:51:44 +0000 (22:51 +0000)]
Allow PCI VGA devices to be detached.

GPUs often have a VGA PCI class code and are probed/attached
by the VGA driver. Allow them to be detached so they can
be presented as passthru devices to VM guests.

Submitted by: mmacy
Reviewed by: jhb, imp, rgrimes
MFC after: 3 weeks
Differential Revision: https://reviews.freebsd.org/D15269

6 years agoAdd helper macros to hide some boring repeatable ceremonies to define
Konstantin Belousov [Thu, 3 May 2018 21:45:59 +0000 (21:45 +0000)]
Add helper macros to hide some boring repeatable ceremonies to define
ifuncs on x86.

Also keep helpers to define 'pseudo-ifuncs' which are emulated by the
indirect jmp.

Reviewed by: jhb (previous version, as part of the larger patch)
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Differential revision: https://reviews.freebsd.org/D13838

6 years agoImplement support for ifuncs in the kernel linker.
Konstantin Belousov [Thu, 3 May 2018 21:37:46 +0000 (21:37 +0000)]
Implement support for ifuncs in the kernel linker.

Required MD bits are only provided for x86.

Reviewed by: jhb (previous version, as part of the larger patch)
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Differential revision: https://reviews.freebsd.org/D13838

6 years agoGarbage collect the a83t emac overlays
Kyle Evans [Thu, 3 May 2018 19:49:40 +0000 (19:49 +0000)]
Garbage collect the a83t emac overlays

The 4.16 DTS import brought in emac support for the a83t. Since these
boards' DTS is pulled from /boot and I forgot to hook these up to the build,
they should be fairly safe to go away.

The a83t-sid and h3-sid overlays are still relevant. a83t-sid will likely
come in with 4.18 DTS.

6 years agodtb/allwinner: Add a83t-sid overlay
Kyle Evans [Thu, 3 May 2018 19:45:48 +0000 (19:45 +0000)]
dtb/allwinner: Add a83t-sid overlay

6 years agoRedo r332918 with the ACPICA API and remove debug.acpi.suspend_deep_bounce.
Jung-uk Kim [Thu, 3 May 2018 19:00:50 +0000 (19:00 +0000)]
Redo r332918 with the ACPICA API and remove debug.acpi.suspend_deep_bounce.

AcpiOsEnterSleep() was meant to implement this feature.

Reviewed by: avg

6 years agorsu(4) does not require legal.realtek.license_ack=1
Kyle Evans [Thu, 3 May 2018 18:20:35 +0000 (18:20 +0000)]
rsu(4) does not require legal.realtek.license_ack=1

The rsu firmware license check has been disabled since r292756. Changes
rsu(4) since the license ack is no longer required.

While here, add `device rsufw` hint to the kernel configuration lines and
add/update paths to the installed license file in both rsu(4) and rsufw(4).

Submitted by: Mateusz Piotrowski (0mp)
Reviewed by: bcr (manpages)
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D14966

6 years agoAdd a stub manual page for iflib(9).
Benno Rice [Thu, 3 May 2018 17:52:40 +0000 (17:52 +0000)]
Add a stub manual page for iflib(9).

Currently 'man -k iflib' would find you the right pages for iflib
documentation, namely iflibdd(9) and iflibdi(9) but 'man iflib' would leave
you in the dark. This allows both approaches to find the relevant
documentation.

Reviewed by: kmacy, shurd
Sponsored by: iXsystems, Inc.
Differential Revision: https://reviews.freebsd.org/D15219

6 years agoDocument ifdi_tx_queues_alloc and ifdi_rx_queues_alloc.
Benno Rice [Thu, 3 May 2018 17:49:26 +0000 (17:49 +0000)]
Document ifdi_tx_queues_alloc and ifdi_rx_queues_alloc.

Prior to this change the manual page documented ifdi_queues_alloc which has
been replaced by separate methods for tx and rx queues.

Reviewed by: kmacy, shurd
Sponsored by: iXsystems, Inc.
Differential Revision: https://reviews.freebsd.org/D15218

6 years agoAllow iflib NIC drivers to sleep rather than busy wait
Stephen Hurd [Thu, 3 May 2018 17:02:31 +0000 (17:02 +0000)]
Allow iflib NIC drivers to sleep rather than busy wait

Since the move to SMP NIC driver locking has had to go through serious
contortions using mtx around long running hardware operations. This moves
iflib past that.

Individual drivers may now sleep when appropriate.

Submitted by: Matthew Macy <mmacy@mattmacy.io>
Reviewed by: shurd
Sponsored by: Limelight Networks
Differential Revision: https://reviews.freebsd.org/D14983

6 years agoamdsbwd: add suspend and resume methods
Andriy Gapon [Thu, 3 May 2018 15:33:18 +0000 (15:33 +0000)]
amdsbwd: add suspend and resume methods

Without the suspend method the watchdog may fire in S1 state.  Without
the resume method the watchdog is not re-enabled after returning from S3
state.  I observe this on one of my systems.

Not sure if watchdog(4) should participate in the suspend actions.
Right now everything is up to individual drivers.

MFC after: 2 weeks

6 years agocc_cubic:
Sean Bruno [Thu, 3 May 2018 15:01:27 +0000 (15:01 +0000)]
cc_cubic:
- Update cubic parameters to draft-ietf-tcpm-cubic-04

Submitted by: Matt Macy <mmacy@mattmacy.io>
Reviewed by: lstewart
Differential Revision: https://reviews.freebsd.org/D10556

6 years agonxge(4) deprecation notice
Sean Bruno [Thu, 3 May 2018 14:48:42 +0000 (14:48 +0000)]
nxge(4) deprecation notice

Submitted by: kbowling
Reviewed by: brooks
Sponsored by: Limelight Networks
Differential Revision: https://reviews.freebsd.org/D15277

6 years agohpet: use macros instead of magic values for the timer mode
Andriy Gapon [Thu, 3 May 2018 13:14:31 +0000 (13:14 +0000)]
hpet: use macros instead of magic values for the timer mode

MFC after: 1 week

6 years agoStyle.
Konstantin Belousov [Thu, 3 May 2018 10:17:37 +0000 (10:17 +0000)]
Style.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Differential revision: https://reviews.freebsd.org/D13838

6 years ago- Add us.iso Macbook/Macbook Pro keyboard support
Ruey-Cherng Yu [Thu, 3 May 2018 06:52:47 +0000 (06:52 +0000)]
- Add us.iso Macbook/Macbook Pro keyboard support

Approved by: delphij
Differential Revision: https://reviews.freebsd.org/D14504

6 years agozgrep(1): Note that -r/-R are not currently supported.
Kyle Evans [Thu, 3 May 2018 02:56:13 +0000 (02:56 +0000)]
zgrep(1): Note that -r/-R are not currently supported.

This is better behavior than just silently doing the wrong thing. We do not
currently have plans to support -r/-R with the compression-enabled greps.

Reported by: jilles

6 years agofcntl(2): Vaguely document that ENOTTY is possible, with light examples
Kyle Evans [Thu, 3 May 2018 02:42:13 +0000 (02:42 +0000)]
fcntl(2): Vaguely document that ENOTTY is possible, with light examples

Reported by: vs (2006, FreeBSD 6.1-BETA3)
Reported by: me (2018, angry debugging session)
MFC after: 1 month

6 years agoAdd Marvell ArmadaXP and Armada38X to GENERIC config
Marcin Wojtas [Thu, 3 May 2018 01:23:42 +0000 (01:23 +0000)]
Add Marvell ArmadaXP and Armada38X to GENERIC config

Include source files and drivers for Marvell ArmadaXP and Armada38X
in GENERIC kernel config.

Submitted by: Michal Mazur <mkm@semihalf.com>
              Rafal Kozik <rk@semihalf.com>
Reviewed by: manu
Tested by: manu
Obtained from: Semihalf
Sponsored by: Stormshield

6 years agoFix SoC identification issue on Marvell platforms
Marcin Wojtas [Thu, 3 May 2018 01:10:41 +0000 (01:10 +0000)]
Fix SoC identification issue on Marvell platforms

Marvell SoC identification function was called by SYSINIT on all armv7
platforms, which brakes platforms other than Marvell built with
GENERIC config. Fix this by shifting SoC identifying to Marvell platform
initialization.

Submitted by: Patryk Duda <pdk@semihalf.com>
Reviewed by: manu
Tested by: manu
Obtained from: Semihalf
Sponsored by: Stormshield

6 years ago[etc] Update newsyslog.conf default comment
Eitan Adler [Thu, 3 May 2018 00:57:19 +0000 (00:57 +0000)]
[etc] Update newsyslog.conf default comment

Remove line about allowed flags. It was missing 'pRTY' and is duplicative
of the man page. It didn't describe the flags in any detail to help
remind users of how to configure newsylog.