Commit Graph

217346 Commits

Author SHA1 Message Date
Andrew Turner
82f8bfcb06 Use the armv6 GENERIC in the qemu nanobsd image.
Sponsored by:	ABT Systems Ltd
2016-11-07 14:07:11 +00:00
Andrew Turner
95d34803f7 Fix the order of includes so machine/asm.h is first.
MFC after:	1 week
Sponsored by:	ABT Systems Ltd
2016-11-07 11:56:18 +00:00
Hans Petter Selasky
6f4cab6cc3 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
2016-11-07 11:39:45 +00:00
Stanislav Galabov
c1bc87b161 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
2016-11-07 11:35:14 +00:00
Hans Petter Selasky
cb02244355 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
2016-11-07 11:28:50 +00:00
Hans Petter Selasky
627ef61aab Query flow table capabilities according to the correct capability bit
for infiniband.

Sponsored by:	Mellanox Technologies
MFC after:	1 week
2016-11-07 11:26:25 +00:00
Hans Petter Selasky
adea303c2a 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
2016-11-07 11:22:50 +00:00
Hans Petter Selasky
91951e3978 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
2016-11-07 11:20:13 +00:00
Hans Petter Selasky
97ac390861 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
2016-11-07 11:15:40 +00:00
Andrew Turner
fe06608404 Include machine/armreg.h after machine/asm.h to ensure __ARM_ARCH is
defined.

MFC after:	1 week
Sponsored by:	ABT Systems Ltd
2016-11-07 11:01:09 +00:00
Konstantin Belousov
9bd4f0a2c6 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
2016-11-07 10:55:56 +00:00
Stanislav Galabov
921081191d 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
2016-11-07 10:54:56 +00:00
Andrew Turner
cb1b0068a1 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
2016-11-07 10:26:44 +00:00
Xin LI
46a30e2e10 Vendor import of file 5.29. 2016-11-07 07:26:06 +00:00
Michal Meloun
ccf5e68e5b Add NVIDIA Tegra XHCI driver and coresponding firmware blob.
MFC after: 3 weeks
Approved by: core@ (NVIDIA license)
2016-11-07 05:37:10 +00:00
Michal Meloun
59b591b1b1 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
2016-11-07 05:34:44 +00:00
Andriy Voskoboinyk
d067ef0f0d 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
2016-11-06 23:13:13 +00:00
Andriy Voskoboinyk
fafbeccf90 Fix device driver name if devd.conf + move it into appropriate place.
Noticed by:	Idwer Vollering <vidwer@gmail.com>
2016-11-06 19:51:01 +00:00
Edward Tomasz Napierala
319f1fd2ea 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
2016-11-06 19:37:22 +00:00
Adrian Chadd
2b668041d1 [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.
2016-11-06 19:18:25 +00:00
Andriy Voskoboinyk
77cbc47958 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.
2016-11-06 19:17:39 +00:00
Adrian Chadd
0cc0288529 [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!
2016-11-06 19:16:46 +00:00
Andriy Voskoboinyk
519e6c0fc2 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.
2016-11-06 18:11:19 +00:00
Andriy Voskoboinyk
1acd7ad907 rtwn: reduce shutdown time for RTL8188CE. 2016-11-06 17:24:16 +00:00
Ed Maste
7f35637063 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
2016-11-06 17:21:26 +00:00
Andriy Voskoboinyk
1318032e9a rtwn: reset watchdog timer on device shutdown. 2016-11-06 17:12:02 +00:00
Dimitry Andric
10652ae062 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
2016-11-06 16:27:09 +00:00
Andrey V. Elsukov
8432fa5fd9 Initialize ip6 pointer before use.
PR:		214169
MFC after:	1 week
2016-11-06 02:33:04 +00:00
Andriy Voskoboinyk
c15d869233 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.
2016-11-05 23:21:30 +00:00
Andriy Voskoboinyk
8361f9cd07 rtwn: pause beacon queue during scanning.
Tested with RTL8821AU, AP + AP mode.
2016-11-05 22:47:09 +00:00
Adrian Chadd
ee9d294b36 [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
2016-11-05 22:41:22 +00:00
Hiroki Sato
374d225e54 Add link-layer address option in RA even for IFT_L2VLAN and IFT_BRIDGE.
Reported by:	philip
MFC after:	3 days
2016-11-05 19:51:13 +00:00
Hiroki Sato
161ab37d24 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
2016-11-05 18:00:36 +00:00
Sean Bruno
b1b6afa587 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
2016-11-05 16:30:42 +00:00
Marcel Moolenaar
4ad8d73326 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
2016-11-05 16:23:33 +00:00
Sean Bruno
4f3a4c0163 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
2016-11-05 16:17:07 +00:00
Eric van Gyzen
17194cd8e4 Fix sorting after r308293, using the ../tools/do_sort script.
Is this a pointy-hat offense?

Reported by:	jhb
2016-11-05 15:01:41 +00:00
Eric van Gyzen
bcad3423b8 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
2016-11-05 14:08:14 +00:00
Edward Tomasz Napierala
a79e9d0fec Value returned by taskqueue_enqueue_timeout(9) is not an error; don't treat
it as such.

MFC after:	1 month
2016-11-05 12:30:10 +00:00
Ed Maste
becf2d11e8 vidcontrol: use calloc where appropriate
Reported by:	kib
2016-11-05 11:19:55 +00:00
Colin Percival
a304ad90e9 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.
2016-11-05 06:33:39 +00:00
Pedro F. Giffuni
b780b03cbe 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
2016-11-04 20:49:59 +00:00
Ed Maste
aba6e41495 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
2016-11-04 20:32:49 +00:00
Emmanuel Vadot
25da7a9dc5 Add AXP221 node in our BananaPi M2 dts. 2016-11-04 20:06:32 +00:00
Emmanuel Vadot
6988dd5e61 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
2016-11-04 20:02:52 +00:00
Ed Maste
c7fbd7722d 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
2016-11-04 19:35:49 +00:00
Emmanuel Vadot
73e62e8c5c Fix r308306 by spelling variable correctly. 2016-11-04 19:23:52 +00:00
Emmanuel Vadot
1ca819f642 Set rst_apb to NULL to avoid panic when release. 2016-11-04 19:21:11 +00:00
Scott Long
694cb8b815 Record the LogInfo field when reporting the IOCStatus. Helps in
debugging errors.

Submitted by:	slm
Obtained from:	Netflix
MFC after:	3 days
2016-11-04 17:25:47 +00:00
Emmanuel Vadot
e3454ae8b3 For AHB clock we need to set the assigned parents for cpufreq(4) to work.
MFC after:	2 weeks
2016-11-04 17:13:47 +00:00