]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
7 years agolibelftc: add elf{32,64}-tradbigmips target emulation names
emaste [Mon, 7 Nov 2016 22:41:52 +0000 (22:41 +0000)]
libelftc: add elf{32,64}-tradbigmips target emulation names

Reported by: theraven
Sponsored by: The FreeBSD Foundation

7 years agoThe igb driver currently requires a VF interface to have a non-zero MAC
sbruno [Mon, 7 Nov 2016 22:24:37 +0000 (22:24 +0000)]
The igb driver currently requires a VF interface to have a non-zero MAC
address, but the associated PF is giving the VF an all zeros MAC address
when one is not administratively assigned. The driver should check for
this case and generate a random address, similar to how the linux igbvf
driver does.

Submitted by: skoumjian@juniper.net (Scott Koumjian)
MFH: 2 weeks
Differential Revision: https://reviews.freebsd.org/D8399

7 years agoRefactor FDT part of gpioled driver
gonzo [Mon, 7 Nov 2016 21:15:39 +0000 (21:15 +0000)]
Refactor FDT part of gpioled driver

- Split driver in two parts: FDT and non-FDT
- Instead of reattach gpioled nodes to GPIO bus use
    gpio_pin_get_by_ofw_idx and add ofwbus and simplebus as parrent buses

Reviewed by: loos
Differential Revision: https://reviews.freebsd.org/D8233

7 years agoFix include order as required post r308415
gonzo [Mon, 7 Nov 2016 20:02:18 +0000 (20:02 +0000)]
Fix include order as required post r308415

7 years agoAdd support for EIIOE flag in Additional Element Status.
mav [Mon, 7 Nov 2016 18:21:53 +0000 (18:21 +0000)]
Add support for EIIOE flag in Additional Element Status.

It was added in SES-3 spec, and its support required to properly link
the Additional Element Status page data to the original elements.

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

7 years agoFix locking in bcm2835_audio driver
gonzo [Mon, 7 Nov 2016 17:38:39 +0000 (17:38 +0000)]
Fix locking in bcm2835_audio driver

- Move all VCHI activity to worker thread: channel methods are called with
    non-sleepable lock held and VCHI uses sleepable lock.

- In worker thread use sx(9) lock instead of mutex(9) for the same reason.

PR: 213801, 205979

7 years agoFix the fallout from r308268 (mpt driver causes endless witness warnings in
scottl [Mon, 7 Nov 2016 17:34:19 +0000 (17:34 +0000)]
Fix the fallout from r308268 (mpt driver causes endless witness warnings in
VMWare and elsewhere) with the precision of a dull, rusty butter knife.

Reported by: tuexen
Obtained from: Netflix

7 years agoMFV r308392: file 5.29.
delphij [Mon, 7 Nov 2016 15:54:47 +0000 (15:54 +0000)]
MFV r308392: file 5.29.

MFC after: 2 weeks

7 years agoUse the armv6 GENERIC in the qemu nanobsd image.
andrew [Mon, 7 Nov 2016 14:07:11 +0000 (14:07 +0000)]
Use the armv6 GENERIC in the qemu nanobsd image.

Sponsored by: ABT Systems Ltd

7 years agoFix the order of includes so machine/asm.h is first.
andrew [Mon, 7 Nov 2016 11:56:18 +0000 (11:56 +0000)]
Fix the order of includes so machine/asm.h is first.

MFC after: 1 week
Sponsored by: ABT Systems Ltd

7 years agoAdd timer to watch the RQ when we are out of mbufs.
hselasky [Mon, 7 Nov 2016 11:39:45 +0000 (11:39 +0000)]
Add timer to watch the RQ when we are out of mbufs.

The firmware/hardware does not generate additional completion
events unless we post new buffers. Use a timer to try to post
more buffers in case we are temporarily out of mbufs. Else
the receive schedule completely stops.

Sponsored by: Mellanox Technologies
MFC after: 1 week

7 years agoGenerate an error if machine/armreg.h is included without sys/cdefs.h
sgalabov [Mon, 7 Nov 2016 11:35:14 +0000 (11:35 +0000)]
Generate an error if machine/armreg.h is included without sys/cdefs.h

machine/armreg.h requires access to the __ARM_ARCH macro, which is not
always properly defined (especially by gcc 4.2.1). We should include
sys/cdefs.h in order to get the definitions in machine/acle-compat.h,
which would properly define the __ARM_ARCH macro in these cases.

So, in cases where machine/armreg.h is included without _SYS_CDEFS_H_
being defined - generate an #error.

Reviewed by: andrew
Sponsored by: Smartcom - Bulgaria AD
Differential Revision: https://reviews.freebsd.org/D8460

7 years agoAdd more firmware related structures and update existing ones in the
hselasky [Mon, 7 Nov 2016 11:28:50 +0000 (11:28 +0000)]
Add more firmware related structures and update existing ones in the
MLX5 core module. Update the set and query diagnostics counter API.

Sponsored by: Mellanox Technologies
MFC after: 1 week

7 years agoQuery flow table capabilities according to the correct capability bit
hselasky [Mon, 7 Nov 2016 11:26:25 +0000 (11:26 +0000)]
Query flow table capabilities according to the correct capability bit
for infiniband.

Sponsored by: Mellanox Technologies
MFC after: 1 week

7 years agoCorrect checksum fields in the "mlx5_mini_cqe8" structure. The fields
hselasky [Mon, 7 Nov 2016 11:22:50 +0000 (11:22 +0000)]
Correct checksum fields in the "mlx5_mini_cqe8" structure. The fields
in question are currently not used.

Sponsored by: Mellanox Technologies
MFC after: 1 week

7 years agoEnsure the firmware is notified of any host memory allocation
hselasky [Mon, 7 Nov 2016 11:20:13 +0000 (11:20 +0000)]
Ensure the firmware is notified of any host memory allocation
failures. Else firmware commands may time out waiting for host
memory.

Sponsored by: Mellanox Technologies
MFC after: 1 week

7 years agoWhen a firmware command times out do not free the command structure to
hselasky [Mon, 7 Nov 2016 11:15:40 +0000 (11:15 +0000)]
When a firmware command times out do not free the command structure to
avoid use after free.

Sponsored by: Mellanox Technologies
MFC after: 1 week

7 years agoInclude machine/armreg.h after machine/asm.h to ensure __ARM_ARCH is
andrew [Mon, 7 Nov 2016 11:01:09 +0000 (11:01 +0000)]
Include machine/armreg.h after machine/asm.h to ensure __ARM_ARCH is
defined.

MFC after: 1 week
Sponsored by: ABT Systems Ltd

7 years agovn_fullpath1() checked VV_ROOT and then unreferenced
kib [Mon, 7 Nov 2016 10:55:56 +0000 (10:55 +0000)]
vn_fullpath1() checked VV_ROOT and then unreferenced
vp->v_mount->mnt_vnodecovered unlocked.  This allowed unmount to race.
Lock vnode after we noticed the VV_ROOT flag.  See comments for
explanation why unlocked check for the flag is considered safe.

Reported and tested by: avg
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

7 years agoOnly include sys/boot.h if LINUX_BOOT_ABI is defined
sgalabov [Mon, 7 Nov 2016 10:54:56 +0000 (10:54 +0000)]
Only include sys/boot.h if LINUX_BOOT_ABI is defined

Only include sys/boot.h if LINUX_BOOT_ABI is defined in
sys/arm/arm/machdep.c

Not doing this prevents kernels that do not define LINUX_BOOT_ABI from
being build with gcc (at least 4.2.1).

Reviewed by: mmel
Sponsored by: Smartcom - Bulgaria AD
Differential Revision: https://reviews.freebsd.org/D8459

7 years agoStart to deorbit the kernel configs in GENERIC by marking them with
andrew [Mon, 7 Nov 2016 10:26:44 +0000 (10:26 +0000)]
Start to deorbit the kernel configs in GENERIC by marking them with
NO_UNIVERSE. This stops them from being built with the universe,
tinderbox, and related targets.

Sponsored by: ABT Systems Ltd

7 years agoVendor import of file 5.29.
delphij [Mon, 7 Nov 2016 07:26:06 +0000 (07:26 +0000)]
Vendor import of file 5.29.

7 years agoAdd NVIDIA Tegra XHCI driver and coresponding firmware blob.
mmel [Mon, 7 Nov 2016 05:37:10 +0000 (05:37 +0000)]
Add NVIDIA Tegra XHCI driver and coresponding firmware blob.

MFC after: 3 weeks
Approved by: core@ (NVIDIA license)

7 years agoRework NVIDIA Tegra124 XUSBPAD driver.
mmel [Mon, 7 Nov 2016 05:34:44 +0000 (05:34 +0000)]
Rework NVIDIA Tegra124 XUSBPAD driver.
 - Adapt it for new, incompatible, DT bindings introduced by r306197.
 - Add support for USB super speed pads/ports.

MFC after: 3 weeks

7 years agortwn: add HOSTAP / IBSS mode support for RTL8188CE.
avos [Sun, 6 Nov 2016 23:13:13 +0000 (23:13 +0000)]
rtwn: add HOSTAP / IBSS mode support for RTL8188CE.

NOTE: some multi-vap configurations (e.g., STA+IBSS) are not stable;
that will be fixed later.

Tested with:
 - RTL8188CE, STA + AP mode;
 - RTL8188CE, IBSS mode;
 - RTL8188CUS, IBSS mode;
 - RTL8188EU, IBSS mode.

Relnotes: yes

7 years agoFix device driver name if devd.conf + move it into appropriate place.
avos [Sun, 6 Nov 2016 19:51:01 +0000 (19:51 +0000)]
Fix device driver name if devd.conf + move it into appropriate place.

Noticed by: Idwer Vollering <vidwer@gmail.com>

7 years agoDocument that getfsstat(2) called with MNT_NOWAIT skips file systems
trasz [Sun, 6 Nov 2016 19:37:22 +0000 (19:37 +0000)]
Document that getfsstat(2) called with MNT_NOWAIT skips file systems
that are in the process of being unmounted.

Reviewed by: des@ (earlier version)
MFC after: 1 month

7 years ago[net80211] extend the net80211 ALQ code to support variable payloads.
adrian [Sun, 6 Nov 2016 19:18:25 +0000 (19:18 +0000)]
[net80211] extend the net80211 ALQ code to support variable payloads.

Also - allow driver specific bits to be added, rather than just net80211.

This still isn't as useful as it should be by default; it needs to
be a standalone struct/instance so it can be done before net80211
registration occurs, and it can log per-device items.

But, it's getting there.

7 years agortwn_pci: omit tx_done() stage if device is not running.
avos [Sun, 6 Nov 2016 19:17:39 +0000 (19:17 +0000)]
rtwn_pci: omit tx_done() stage if device is not running.
rtwn_usb: drain USB transfers during device shutdown; this fixes possible
panic with 'options IEEE80211_SUPPORT_SUPERG' during device detach.

Tested with RTL8188CE, STA mode.

7 years ago[net80211] add a method to also explicitly tear down RX A-MPDU.
adrian [Sun, 6 Nov 2016 19:16:46 +0000 (19:16 +0000)]
[net80211] add a method to also explicitly tear down RX A-MPDU.

The ath10k firmware API doesn't pass up the ADDBA/DELBA frames, only
WMI firmware notifications.

Tested:

* ath10k (QCA9880), doing actual (ha!) 11n!

7 years agortwn: fix Tx ring cleanup.
avos [Sun, 6 Nov 2016 18:11:19 +0000 (18:11 +0000)]
rtwn: fix Tx ring cleanup.

Do not try to clear stale Tx descriptor entries when there are some
running vaps; just free node references - rtwn_pci_tx_done() will free
mbufs without creating holes in the Tx descriptor space.
Also, reset only 2 first entries in the beacon ring - other will not be
used anyway.

Tested with RTL8188CE, STA + STA mode.

7 years agortwn: reduce shutdown time for RTL8188CE.
avos [Sun, 6 Nov 2016 17:24:16 +0000 (17:24 +0000)]
rtwn: reduce shutdown time for RTL8188CE.

7 years agoadd __divdi3 and __udivdi3 to libgcc_s symbol version map
emaste [Sun, 6 Nov 2016 17:21:26 +0000 (17:21 +0000)]
add __divdi3 and __udivdi3 to libgcc_s symbol version map

After r308294 they were missing on i386 (and previously were exported
only accidentally).

Reported by: antoine

7 years agortwn: reset watchdog timer on device shutdown.
avos [Sun, 6 Nov 2016 17:12:02 +0000 (17:12 +0000)]
rtwn: reset watchdog timer on device shutdown.

7 years agoPull in r278002 from upstream llvm trunk (by Silviu Baranga):
dim [Sun, 6 Nov 2016 16:27:09 +0000 (16:27 +0000)]
Pull in r278002 from upstream llvm trunk (by Silviu Baranga):

  [AArch64] PR28877: Don't assume we're running after legalization when
  creating vcvtfp2fxs

  Summary:
  The DAG combine transformation that was generating the
  aarch64_neon_vcvtfp2fxs node was assuming that all inputs where legal
  and wasn't accounting that the input could be a v4f64 if we're trying
  to do the transformation before legalization. We now bail out in this
  case.

  All illegal types besides v4f64 were already rejected.

  Fixes https://llvm.org/bugs/show_bug.cgi?id=28877

  Reviewers: jmolloy

  Subscribers: aemerson, rengolin, llvm-commits

  Differential Revision: https://reviews.llvm.org/D23261

This fixes several ports on AArch64.

Requested by:   andrew
MFC after:      3 days

7 years agoInitialize ip6 pointer before use.
ae [Sun, 6 Nov 2016 02:33:04 +0000 (02:33 +0000)]
Initialize ip6 pointer before use.

PR: 214169
MFC after: 1 week

7 years agortwn: fix Rx filter setup for some multi-vap configuratons.
avos [Sat, 5 Nov 2016 23:21:30 +0000 (23:21 +0000)]
rtwn: fix Rx filter setup for some multi-vap configuratons.

- Correctly refresh Rx filter when AP (IBSS) vap is created after STA vap.
- Block any RCR updates during TSF correction (IBSS mode).
- Set CBSSID* bits during vap creation, not when it was started / stopped.
- Cache current state to prevent unnecessary register reads.

Tested with RTL8188CE, STA + AP mode.

7 years agortwn: pause beacon queue during scanning.
avos [Sat, 5 Nov 2016 22:47:09 +0000 (22:47 +0000)]
rtwn: pause beacon queue during scanning.

Tested with RTL8821AU, AP + AP mode.

7 years ago[net80211] begin fleshing out new hardware crypto offload features.
adrian [Sat, 5 Nov 2016 22:41:22 +0000 (22:41 +0000)]
[net80211] begin fleshing out new hardware crypto offload features.

* extend the keycache flag word to be 32 bits, not 16 bits
* add new key flags for transmit:
  + IEEE80211_KEY_NOIV: Don't insert IV in the payload when transmitting data frames;
  + IEEE80211_KEY_NOIVMGT:  Don't insert IV in the payload when transmitting MIC frames;
  + IEEE80211_KEY_NOMIC: Don't insert MIC in the payload when transmitting data frames;
  + IEEE80211_KEY_NOMICMGT: don't insert MIC in the payload when transmitting management
    frames.

* teach ieee80211_crypto_demic() about hardware decrypted frames:
  + if frames are hardware decrypted and the frame has failed MIC, treat it as a
     michael failure.
  + if frames are hardware decrypted and the frame has stripped MIC, we can't check the
    MIC in the payload - we don't have anything to compare it against.

This is only part of the work required to successfully transmit/receive
hardware crypto frames such as the qualcomm atheros 11ac offload chips.

There will be further work in the transmit and receive path before this
can be done by default.

Reviewed by: avos
Differential Revision: https://reviews.freebsd.org/D8364

7 years agoAdd link-layer address option in RA even for IFT_L2VLAN and IFT_BRIDGE.
hrs [Sat, 5 Nov 2016 19:51:13 +0000 (19:51 +0000)]
Add link-layer address option in RA even for IFT_L2VLAN and IFT_BRIDGE.

Reported by: philip
MFC after: 3 days

7 years agoFix an infinite loop at an non-responding hop when other echo replies
hrs [Sat, 5 Nov 2016 18:00:36 +0000 (18:00 +0000)]
Fix an infinite loop at an non-responding hop when other echo replies
are kept arriving in the waittime time window.

Submitted by: Denny Page
PR: 210286
MFC after: 3 days

7 years agor295133 attempted to deactivate TSO in the 100Mbit link case with this
sbruno [Sat, 5 Nov 2016 16:30:42 +0000 (16:30 +0000)]
r295133 attempted to deactivate TSO in the 100Mbit link case with this
adapter to work around bugs in TSO handling at this speed.

em_init_locked is called during first boot of the adapter and will
see that link_speed is unitialized, effectively turning off tso for
all cards at all speeds, which I believe was *not* the intent.

Move the handling of TSO deactivation to the link handler where we can
more effectively make the decision about what to do.  In addition,
completely purge the TSO capabilities instead of disabling just CSUM_TSO.

Thanks to jhb for explanation of the hw capabilites api.

Thanks to royger and cognet for testing the 100Mbit failure case to
ensure that their adapters do indeed still work.

MFC after: 1 week
Sponsored by: Limelight Networks

7 years agoAssign a random number to di_gen (for FFS), instead of extracting it
marcel [Sat, 5 Nov 2016 16:23:33 +0000 (16:23 +0000)]
Assign a random number to di_gen (for FFS), instead of extracting it
from struct stat.  We don't necessarily have permissions to see the
generation number and the host OS may not have st_gen in struct stat
anyway.  Since the kernel assigns random numbers, there's nothing
meaningful about the generation that requires us to preserve it when
the file system image is created.  With this change, all generation
numbers come from random() and that makes it easier to add support
for reproducible builds at some time in the future (i.e. by adding
an argument to makefs that changes the behaviour of random() so that
it always returns 0 or some predictable sequence).

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

7 years agor266979 missed a call to enable capabilities of the hw leading to an
sbruno [Sat, 5 Nov 2016 16:17:07 +0000 (16:17 +0000)]
r266979 missed a call to enable capabilities of the hw leading to an
inability to enable features of the device.

PR:             213845
Submitted by:   pherman@frenchfries.net
MFC after:      1 week

7 years agoFix sorting after r308293, using the ../tools/do_sort script.
vangyzen [Sat, 5 Nov 2016 15:01:41 +0000 (15:01 +0000)]
Fix sorting after r308293, using the ../tools/do_sort script.

Is this a pointy-hat offense?

Reported by: jhb

7 years agoncal: fix a reference to an out-of-scope stack buffer
vangyzen [Sat, 5 Nov 2016 14:08:14 +0000 (14:08 +0000)]
ncal: fix a reference to an out-of-scope stack buffer

PR: 214237
Submitted by: Jonathan de Boyne Pollard
MFC after: 3 days
Sponsored by: Dell EMC

7 years agoValue returned by taskqueue_enqueue_timeout(9) is not an error; don't treat
trasz [Sat, 5 Nov 2016 12:30:10 +0000 (12:30 +0000)]
Value returned by taskqueue_enqueue_timeout(9) is not an error; don't treat
it as such.

MFC after: 1 month

7 years agovidcontrol: use calloc where appropriate
emaste [Sat, 5 Nov 2016 11:19:55 +0000 (11:19 +0000)]
vidcontrol: use calloc where appropriate

Reported by: kib

7 years agoReduce the bogosity of ministat's % difference calculations.
cperciva [Sat, 5 Nov 2016 06:33:39 +0000 (06:33 +0000)]
Reduce the bogosity of ministat's % difference calculations.

The previous calculation used an approximation which was only valid in
cases where the means being compared were similar; this resulted in very
odd claims being made, e.g. that 0 +/- 0 is a difference of -100% +/- 1%
from 100 +/- 1.

The new calculation scales sample standard deviations by the means, and
yields approximately correct percentage difference bounds providing that
the reference population is bounded away from zero.  (In the case where
the values being compared are not sufficiently bounded away from zero,
the distribution of ratios becomes much harder to calculate, and is not
likely to be useful anyway.)

Note that when ministat is used for its intended purpose of determining
whether two samples are statistically different, this change is unlikely
to have any noticeable effect; in such cases the means will be similar
enough that the correction applied here will be minimal.

7 years agosed(1): add LEGACY_BSDSED_COMPAT compile-time flag.
pfg [Fri, 4 Nov 2016 20:49:59 +0000 (20:49 +0000)]
sed(1): add LEGACY_BSDSED_COMPAT compile-time flag.

In r297602, which included a __FreeBSD_version bump to 1100105, we changed
sed 'i' and 'a' from discarding whitespaces to conform with what GNU and
sysvish sed do.

There are arguments in favor of keeping the old behavior but the new
behavior is also useful for migration purposes. It seems important to at
least consider the case of developers depending on the previous behavior,
so add a CFLAG to enable the old behaviour.

PR: 213474
MFC after: 5 days

7 years agovidcontrol: improve error handling in vt(4) font loading
emaste [Fri, 4 Nov 2016 20:32:49 +0000 (20:32 +0000)]
vidcontrol: improve error handling in vt(4) font loading

PR: 209078
Reported by: ecturt@gmail.com
Reviewed by: Oliver Pinter
Differential Revision: https://reviews.freebsd.org/D8176

7 years agoAdd AXP221 node in our BananaPi M2 dts.
manu [Fri, 4 Nov 2016 20:06:32 +0000 (20:06 +0000)]
Add AXP221 node in our BananaPi M2 dts.

7 years agoAdd support for AXP221 Power Management Unit.
manu [Fri, 4 Nov 2016 20:02:52 +0000 (20:02 +0000)]
Add support for AXP221 Power Management Unit.

AXP221 is used on board with A31/A31S and is mostly compatible with AXP209.
Regulators, GPIO and Sensors are supported.

MFC after: 2 weeks

7 years agoConnect new LLVM-based libgcc_eh & libgcc_s to the build
emaste [Fri, 4 Nov 2016 19:35:49 +0000 (19:35 +0000)]
Connect new LLVM-based libgcc_eh & libgcc_s to the build

Compiler-rt and LLVM's libunwind provide a suitable replacement for
libgcc.a, libgcc_eh.a, and libgcc_s.so.

Remove the now-unused LLVM_LIBUNWIND block from gnu/lib/libgcc.

PR: 213480 [exp-run]
Reviewed by: brooks, ed
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D8189

7 years agoFix r308306 by spelling variable correctly.
manu [Fri, 4 Nov 2016 19:23:52 +0000 (19:23 +0000)]
Fix r308306 by spelling variable correctly.

7 years agoSet rst_apb to NULL to avoid panic when release.
manu [Fri, 4 Nov 2016 19:21:11 +0000 (19:21 +0000)]
Set rst_apb to NULL to avoid panic when release.

7 years agoRecord the LogInfo field when reporting the IOCStatus. Helps in
scottl [Fri, 4 Nov 2016 17:25:47 +0000 (17:25 +0000)]
Record the LogInfo field when reporting the IOCStatus.  Helps in
debugging errors.

Submitted by: slm
Obtained from: Netflix
MFC after: 3 days

7 years agoFor AHB clock we need to set the assigned parents for cpufreq(4) to work.
manu [Fri, 4 Nov 2016 17:13:47 +0000 (17:13 +0000)]
For AHB clock we need to set the assigned parents for cpufreq(4) to work.

MFC after: 2 weeks

7 years agoIf the da periph probe state machine gets an asc=0x44 error, the periph
scottl [Fri, 4 Nov 2016 17:08:52 +0000 (17:08 +0000)]
If the da periph probe state machine gets an asc=0x44 error, the periph
is not going to recover until the system is reset.  Treat it as a special
case and don't allow it to fall through to quasi-success.

Reviewed by: ken, imp
Obtained from: Netflix
MFC after: 3 days

7 years agoAdd clk_set_assigned
manu [Fri, 4 Nov 2016 17:04:45 +0000 (17:04 +0000)]
Add clk_set_assigned

assigned-clock-parents are DT properties used to configure
some default parent clocks on one node.

Reviewed by: mmel
MFC after: 2 weeks

7 years agoUse what(1) instead of strings(1). It's simpler and always available.
des [Fri, 4 Nov 2016 17:02:42 +0000 (17:02 +0000)]
Use what(1) instead of strings(1).  It's simpler and always available.

PR: 213665
Submitted by: Pawel Worach <pawel.worach@gmail.com>
MFC after: 1 week

7 years agoasc/ascq 44/0 is typically a non-transient, permanent error (at least until
scottl [Fri, 4 Nov 2016 16:56:36 +0000 (16:56 +0000)]
asc/ascq 44/0 is typically a non-transient, permanent error (at least until
the components are reset).  Therefore retries are pointless.  This is very
visible in SATL systems, for example an LSI SAS controller and a SATA HDD/SSD.

Reviewed by: ken
Obtained from: Netflix
MFC after: 3 days

7 years ago[gpio] Add GPIO driver for Intel Bay Trail SoC
gonzo [Fri, 4 Nov 2016 16:24:38 +0000 (16:24 +0000)]
[gpio] Add GPIO driver for Intel Bay Trail SoC

Bay Trail has three banks of GPIOs exposed to userland as /dev/gpiocN,
where N is 1, 2, and 3. Pins in each bank are pre-named to match names
on boards schematics: GPIO_S0_SCnn, GPIO_S0_NCnn, and GPIO_S5_nn.

Controller supports edge-triggered and level-triggered interrupts but
current version of the driver does not have interrupts support

7 years agolibgcc_s: make unspecified shlib symbols local
emaste [Fri, 4 Nov 2016 15:44:00 +0000 (15:44 +0000)]
libgcc_s: make unspecified shlib symbols local

We want only symbols explicitly specified in the Version.map.

Sponsored by: The FreeBSD Foundation

7 years agoFix grammar in a fortune.
vangyzen [Fri, 4 Nov 2016 15:11:51 +0000 (15:11 +0000)]
Fix grammar in a fortune.

7 years agoSystem Binary Interface (SBI) page was moved in latest version of
br [Fri, 4 Nov 2016 13:07:54 +0000 (13:07 +0000)]
System Binary Interface (SBI) page was moved in latest version of
Berkeley Boot Loader (BBL) due to code size increase.

We will need to dehardcode this somehow.

Sponsored by: DARPA, AFRL
Sponsored by: HEIF5

7 years agoDo not sleep in vm_wait() if pagedaemon did not yet started. Panic instead.
kib [Fri, 4 Nov 2016 12:58:50 +0000 (12:58 +0000)]
Do not sleep in vm_wait() if pagedaemon did not yet started.  Panic instead.

Requests which cannot be satisfied by allocators at boot time often
have unrealizable parameters.  Waiting for the pagedaemon' start would
hang the boot if done in the thread0 context and just never succeed if
executed from another thread.  In fact, for very early stages, sleep
attempt panics with obscure diagnostic about the scheduler state, and
explicit panic in vm_wait() makes the investigation much shorter by
cut off the examination of the thread and scheduler.

Theoretically, some subsystem might grab a resource to exhaustion, and
free it later in the boot process.  If this unlikely scenario does
appear for real, the way to diagnose the trouble can be revisited.

Reported by: emaste
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Differential revision: https://reviews.freebsd.org/D8421

7 years agoTEGRA: Fix numerous issues in clock code.
mmel [Fri, 4 Nov 2016 11:40:11 +0000 (11:40 +0000)]
TEGRA: Fix numerous issues in clock code.
Define and export clocks related to XUSB driver.

7 years agoTEGRA: Add basic driver for memory controller.
mmel [Fri, 4 Nov 2016 11:39:19 +0000 (11:39 +0000)]
TEGRA: Add basic driver for memory controller.
For now, it only reports memory and SMMU access errors.

7 years agoAdd Allwinner UP SoC support to GENERIC on armv6
manu [Fri, 4 Nov 2016 04:47:08 +0000 (04:47 +0000)]
Add Allwinner UP SoC support to GENERIC on armv6

Relnotes: yes

7 years agohyperv/vmbus: Reset ch_dev, once the child is deleted.
sephe [Fri, 4 Nov 2016 01:14:41 +0000 (01:14 +0000)]
hyperv/vmbus: Reset ch_dev, once the child is deleted.

So it will not be mis-used later on, e.g. in vmbus_chan_printf().

Submitted by: dexuan
Reported by: dexuan
MFC after: 1 week
Sponsored by: Microsoft

7 years agoMFV r308265: Update tzdata to 2016i.
gjb [Thu, 3 Nov 2016 23:34:11 +0000 (23:34 +0000)]
MFV r308265: Update tzdata to 2016i.

Sponsored by: The FreeBSD Foundation

7 years agoAdd support for Allwinner H3 audio codec.
jmcneill [Thu, 3 Nov 2016 23:22:04 +0000 (23:22 +0000)]
Add support for Allwinner H3 audio codec.

The audio controller in the H3 is more or less the same as A10/A20 except
some registers are shuffled around. The mixer interface, however, is
completely different between SoCs. Separate a10_mixer_class and
h3_mixer_class implementations are now made available. This will also make
adding support for other SoCs easier in the future.

Reviewed by: andrew, ganbold
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D8425

7 years agoAdd a witness check to enforce that no non-sleeping locks are held when
adrian [Thu, 3 Nov 2016 23:11:33 +0000 (23:11 +0000)]
Add a witness check to enforce that no non-sleeping locks are held when
they shouldn't be.

I used this during driver bring-up to find that the Linux driver holds a
whole lot of locks whilst doing their equivalent of busdma operations.

If this works out well, it should be added to the other architecture busdma
implementations to aid in similar debugging.

Tested:

* bounce buffer and dmar busdma, Lenovo X230 laptop, all the internal
  hardware
* ath(4) too

Discussed with: jhb

7 years ago[ath] add the MIMO per-chain RSSI and noise floor information.
adrian [Thu, 3 Nov 2016 23:05:39 +0000 (23:05 +0000)]
[ath] add the MIMO per-chain RSSI and noise floor information.

This is a long time coming.  The general pieces have been floating around
in a local repo since circa 2012 when I dropped the net80211 support
into the tree.

This allows the per-chain RSSI and NF to show up in 'ifconfig wlanX list sta'.
I haven't yet implemented the EVM hookups so that'll show up; that'll come
later.

Thanks to Susie Hellings <susie@susie.id.au> who did the original work
on this a looong time ago for a company we both worked at.

7 years agoImport tzdata2016i.
gjb [Thu, 3 Nov 2016 22:50:41 +0000 (22:50 +0000)]
Import tzdata2016i.

Sponsored by: The FreeBSD Foundation

7 years agoReplace basename(3) by a thread-safe implementation.
ed [Thu, 3 Nov 2016 20:21:34 +0000 (20:21 +0000)]
Replace basename(3) by a thread-safe implementation.

Now that the changes to the dirname(3) function had some time to settle,
let's go ahead and use the same approach for replacing basename(3) by a
simple implementation that modifies the input string, thereby making it
thread-safe and guaranteed to succeed.

Unlike dirname(3), this function already had a thread-safe variant
basename_r(3). This function had its own set of problems, like having an
upper bound on the pathname length. Keep this function around for
compatibility, but remove most references from the man page. Make the
man page more similar to that of dirname(3).

As the basename_r(3) function is only provided by FreeBSD (and Bionic),
depending on its use is even more implementation defined than assuming
that basename(3) is thread-safe.

Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D8382

7 years agoUse proper MACHINE_ARCH.
bdrewery [Thu, 3 Nov 2016 19:39:32 +0000 (19:39 +0000)]
Use proper MACHINE_ARCH.

This fixes ports on mips after r308130.

7 years agoIn vm_fault()'s loop over the shadow chain, move a comment describing our
alc [Thu, 3 Nov 2016 16:44:55 +0000 (16:44 +0000)]
In vm_fault()'s loop over the shadow chain, move a comment describing our
invariants to a better place.  Also, add two comments concerning the
relationship between the map and vnode locks.

Reviewed by: kib
MFC after: 3 days

7 years agoo Add support for long double.
br [Thu, 3 Nov 2016 13:06:17 +0000 (13:06 +0000)]
o Add support for long double.
o Add support for latest RISC-V GNU toolchain.

Sponsored by: DARPA, AFRL
Sponsored by: HEIF5

7 years agoCheck for lengths being <= 0. Note that this interface can only
trasz [Thu, 3 Nov 2016 10:11:59 +0000 (10:11 +0000)]
Check for lengths being <= 0.  Note that this interface can only
be accessed by root.  It uses unsigned ints instead of size_t
to preserve the ABI.

PR: 207627
Submitted by: ryan@ryanday.net (with slight tweaks)
MFC after: 1 month

7 years agoMFV r308222: 6051 lzc_receive: allow the caller to read the begin record
avg [Thu, 3 Nov 2016 09:24:27 +0000 (09:24 +0000)]
MFV r308222: 6051 lzc_receive: allow the caller to read the begin record

illumos/illumos-gate@620f322510b2d6433f7f6af60fa52380c07756ad
https://github.com/illumos/illumos-gate/commit/620f322510b2d6433f7f6af60fa52380c07756ad

https://www.illumos.org/issues/6051
  Currently lzc_receive() requires that its snapname argument is a snapshot name
  (contains '@').
  zfs receive allows to specify just a dataset name and would try to deduce the
  snapshot name from the stream.
  I propose to allow lzc_receive() to do the same.
  That seems to be quite easy to implement, it requires only a small amount of
  logic, it does not require any additional system calls or any additional data
  from the stream.
  The benefit is that the new behavior would allow to keep the snapshot names the
  same between the sender and receiver at zero cost, without a need to pass the
  names out of band.

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Paul Dagnelie <pcd@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Andriy Gapon <avg@icyb.net.ua>
MFC after: 2 weeks

7 years agosmbus: remove smbus_trans / SMB_TRANS
avg [Thu, 3 Nov 2016 07:40:52 +0000 (07:40 +0000)]
smbus: remove smbus_trans / SMB_TRANS

This change reverts most of r281985.

The method did not map to anything defined by SMBus protocol and could
not be implemented for SMBus controllers.

This change is obviously not backwards compatible, but I have good
reasons to believe that there have never been any users of SMB_TRANS.

Discussed with: grembo, jhb
MFC after: 6 weeks

7 years ago[evdev] Add evdev support to atkbd(4) driver
gonzo [Thu, 3 Nov 2016 00:56:59 +0000 (00:56 +0000)]
[evdev] Add evdev support to atkbd(4) driver

To enable event sourcing from atkbd kern.evdev.rcpt_mask value
should have bit 3 set.

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

7 years agoRemove the mbuf tag after use (for reinjected packets).
loos [Thu, 3 Nov 2016 00:26:58 +0000 (00:26 +0000)]
Remove the mbuf tag after use (for reinjected packets).

Fixes the packet processing in dummynet l2 rules.

Obtained from: pfSense
MFC after: 2 weeks
Sponsored by: Rubicon Communications, LLC (Netgate)

7 years agoAdd support for the integrated DMA controller found in the Allwinner A31,
jmcneill [Wed, 2 Nov 2016 23:58:10 +0000 (23:58 +0000)]
Add support for the integrated DMA controller found in the Allwinner A31,
A64, A83T, and H3 SoCs.

Relnotes: yes

7 years agoRegister the device's xref handle at attach time.
jmcneill [Wed, 2 Nov 2016 23:53:47 +0000 (23:53 +0000)]
Register the device's xref handle at attach time.

7 years agoAdd support for H3 PLL2 (PLL_Audio).
jmcneill [Wed, 2 Nov 2016 23:49:57 +0000 (23:49 +0000)]
Add support for H3 PLL2 (PLL_Audio).

7 years agoThe DTS may report fewer than 4 parents for a module clock. Avoid setting
jmcneill [Wed, 2 Nov 2016 23:46:23 +0000 (23:46 +0000)]
The DTS may report fewer than 4 parents for a module clock. Avoid setting
the module clock parent to an out-of-range index in these cases.

7 years agoSince it's no longer accessing a powerpc-specific register, drop the #ifdef.
jhibbits [Wed, 2 Nov 2016 23:44:30 +0000 (23:44 +0000)]
Since it's no longer accessing a powerpc-specific register, drop the #ifdef.

7 years agoFix the build. protctl is only used on powerpc.
jhibbits [Wed, 2 Nov 2016 23:43:18 +0000 (23:43 +0000)]
Fix the build.  protctl is only used on powerpc.

While here, remove the need to check the SVR SPR, as others may be compatible
with the p1022-esdhc type.

7 years agoioat(4): Read CHANSTS register for suspended/halted checks
cem [Wed, 2 Nov 2016 23:18:16 +0000 (23:18 +0000)]
ioat(4): Read CHANSTS register for suspended/halted checks

The device doesn't accurately update the CHANCMP address with the device state
when the device is suspended or halted.  So, read the CHANSTS register to check
for those states.

We still need to read the CHANCMP address for the last completed descriptor.

Sponsored by: Dell EMC Isilon

7 years agosh: Add simple test for 'set -C' (noclobber).
jilles [Wed, 2 Nov 2016 22:33:37 +0000 (22:33 +0000)]
sh: Add simple test for 'set -C' (noclobber).

To ensure fast test runs, race conditions are not tested.

7 years agoRemove remnants of the recursive sleep support. Instead assert that
kib [Wed, 2 Nov 2016 20:57:20 +0000 (20:57 +0000)]
Remove remnants of the recursive sleep support.  Instead assert that
we never try to sleep while the thread is on a sleepqueue.

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

7 years agodev/cpuctl: put debug output under CPUCTL_DEBUG rather than DEBUG
avg [Wed, 2 Nov 2016 17:47:19 +0000 (17:47 +0000)]
dev/cpuctl: put debug output under CPUCTL_DEBUG rather than DEBUG

DEBUG is a well-known flag.
It doesn't imply that there is a particular interest in cpuctl.

MFC after: 1 week

7 years agofix typo in a comment
avg [Wed, 2 Nov 2016 17:12:15 +0000 (17:12 +0000)]
fix typo in a comment

MFC after: 5 weeks
X-MFC with: r308219

7 years agosmbus: remove the potentially very dangerous slave probing code
avg [Wed, 2 Nov 2016 17:07:18 +0000 (17:07 +0000)]
smbus: remove the potentially very dangerous slave probing code

MFC after: 5 weeks

7 years agoichiic/ig4: completely disengage from smbus
avg [Wed, 2 Nov 2016 17:04:00 +0000 (17:04 +0000)]
ichiic/ig4: completely disengage from smbus

MFC after: 5 weeks

7 years agoAdd support for microcode update on newer AMD CPUs (10h+)
avg [Wed, 2 Nov 2016 16:15:49 +0000 (16:15 +0000)]
Add support for microcode update on newer AMD CPUs (10h+)

This includes new code for parsing microcode files as well as
the kernel-side change to apply the update on all processors
at the same time.

Developed with help from Borislav Petkov, formerly bp@amd64.org.

Tested using Athlon II X2 processor on a system where BIOS does
not have the latest microcode version:
/boot/firmware/microcode_amd.bin: updating cpu /dev/cpuctl0 to revision 0x10000c7... done.

The microcode file is taken from here:
https://web.archive.org/web/20160528230514/http://www.amd64.org/microcode.html
(note that the original site seems to be down at the moment)
It can also be found here:
https://git.kernel.org/cgit/linux/kernel/git/firmware/linux-firmware.git/tree/amd-ucode

Reviewed by: kib, stas
MFC after: 2 weeks
Relnotes: maybe
Differential Revision: https://reviews.freebsd.org/D8384

7 years agoAdd a fallback to the device mapper logic. We've seen systems in the field
scottl [Wed, 2 Nov 2016 15:13:25 +0000 (15:13 +0000)]
Add a fallback to the device mapper logic.  We've seen systems in the field
that are apparently misconfigured by the manufacturer and cause the mapping
logic to fail.  The fallback allows drive numbers to be assigned based on the
PHY number that they're attached to.  Add sysctls and tunables to overrid
this new behavior, but they should be considered only necessary for debugging.

Reviewed by:  imp, smh
Obtained from: Netflix
MFC after: 3 days
Sponsored by: D8403