Commit Graph

218175 Commits

Author SHA1 Message Date
John Baldwin
a1eff92bc8 Don't attach to Host-PCI bridges with a bad bus number.
If the bus number assigned to a Host-PCI bridge doesn't match the first
bus number in the associated producer range from _CRS, print a warning and
fail to attach rather than panicking due to an assertion failure.

At least one single-socket Dell machine leaves a "ghost" Host-PCI bridge
device in the ACPI namespace that seems to correspond to the I/O hub in
the second socket of a two-socket machine.  However, the BIOS doesn't
configure the settings for this "ghost" bridge correctly, nor does it have
any PCI devices behind it.

Tested by:	royger
MFC after:	2 weeks
2016-12-06 00:36:02 +00:00
Martin Matuska
36f3c6516a Update vendor/libarchive to git ddb3954bfdb9a0a98d50fb1c50cbecb603d9adf0
Vendor bugfixes:

libarchive #831:
  Spelling fixes
libarchive #832:
  Relax sanity checks of number fields in tar header even more
OSS-Fuzz #16:
  Fix possible hang in uudecode_filter_read()
OSS-Fuzz #220:
  Reject an 'ar' filename table larger than 1GB or a filename larger
  than 1MB.
2016-12-06 00:35:20 +00:00
Andriy Voskoboinyk
31847d9434 rsu: add hardware crypto support (WEP, TKIP and CCMP).
This change includes firmware commands for key setup +
some additional checking via CAMREAD / CAMWRITE registers.
Nothing (except rsu_delete_key() for pairwise keys) is deferred;
to ensure that things are done in order rsu_set_key() will wait
until key deletion task will be finished.

Tested with Asus USB-N10 (all ciphers).

Differences from initial (reviewed) patch:
- Pause AC queues before disassociation - since CMD_DISCONNECT clears
crypto state all pending frames must be processed / dropped before it.
- Check sc_running flag before trying to set static keys.
- Clear key index from bitmap even when firmware command fails
(it will be invalidated via CAMWRITE anyway).

Reviewed by:	adrian, kevlo
Tested by:	kevlo
Differential Revision:	https://reviews.freebsd.org/D8706
2016-12-06 00:13:49 +00:00
John Baldwin
00aa064f30 Bump Dd for addition of T6.
Pointy hat to:	jhb
2016-12-06 00:05:38 +00:00
John Baldwin
f6e648b896 Document support for Terminator 6 adapters in cxgbe(4) and cxgbev(4).
Approved by:	np
MFC after:	3 days
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D8716
2016-12-06 00:01:53 +00:00
Rick Macklem
a5d19b81b4 Fix the NFSv4.1 server for Open reclaim after a reboot.
The NFSv4.1 server failed to update the nfs-stablerestart file for
a client when the client was issued its first Open. As such, recovery
of Opens after a server reboot failed with NFSERR_NOGRACE.
This patch fixes this.
It also changes the code so that it malloc()'s the 1024 byte array
instead of allocating it on the kernel stack for both NFSv4.0 and NFSv4.1.
Note that this bug only affected NFSv4.1 and only when clients attempted
to reclaim Opens after a server reboot.

MFC after:	2 weeks
2016-12-05 22:36:25 +00:00
Kristof Provost
c3e14afc18 pflog: Correctly initialise subrulenr
subrulenr is considered unset if it's set to -1, not if it's set to 1.
See contrib/tcpdump/print-pflog.c pflog_print() for a user.

This caused incorrect pflog output (tcpdump -n -e -ttt -i pflog0):
  rule 0..16777216(match)
instead of the correct output of
  rule 0/0(match)

PR:		214832
Submitted by:	andywhite@gmail.com
2016-12-05 21:52:10 +00:00
Maxim Sobolev
1fab62b1e1 Refactor the regression test code by splitting huge monolithic C
file into smaller pieces that are hopefully easier to understand
and extend. This is to pave the ground for adding few more
socket timestamp formats that I am working on here.

No functional changes (I hope).
2016-12-05 17:21:04 +00:00
Michal Meloun
65d5084f54 Fix build breakage caused by r309531.
Reported by: andrew
MFC after: 2 weeks
X-MFC with: r309531
2016-12-05 15:55:51 +00:00
Sevan Janiyan
0e922aa308 Fix error in the example section
Adjust formatting highlighted by igor.

PR:		214683
Submitted by:	Anindya Mukherjee <anindya49 AT hotmail DOT com>
Reviewed by:	jilles
Approved by:	bcr (mentor)
MFC after:	5 days
Differential Revision:	https://reviews.freebsd.org/D8591
2016-12-05 13:23:22 +00:00
Konstantin Belousov
3dd3c4503b Release DMAR table after using it.
Reported and tested by:	hps
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2016-12-05 11:42:09 +00:00
Konstantin Belousov
85d99487b8 Rename fast taskqueues used by DMAR to avoid naming conflict of the
sleepable and spin mutexes created by the queues.

Reported and tested by:	hps
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2016-12-05 11:41:09 +00:00
Andrew Turner
7abeae41fb Remove an unneeded header. It was used when we had an arm64 specific GIC
driver, however with INTRNG this has been merged into a common arm driver.

Obtained from:	ABT Systems Ltd
Sponsored by:	The FreeBSD Foundation
2016-12-05 11:40:54 +00:00
Conrad Meyer
714935be5a readelf(1): Add support for extended program header numbers
Add support for extended program header numbers to elftoolchain
'readelf -h'.

Reviewed by:	emaste
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D8702
2016-12-05 03:11:52 +00:00
Justin Hibbits
0a82e6f09a Use trunc_page() instead of rolling my own in pmap_track_page() 2016-12-05 02:27:50 +00:00
Kevin Lo
1c12e0af23 Add Edimax EW-7622UMN to the list of devices supported by rsu(4). 2016-12-05 01:46:45 +00:00
Baptiste Daroussin
e350c46ae5 Import tzdata 2016j
MFC after:	2 days
2016-12-04 23:23:59 +00:00
Baptiste Daroussin
2e0a58c987 Import tzdata 2016j 2016-12-04 23:18:29 +00:00
Andriy Voskoboinyk
c057023b75 rsu: fix RSSI reporting, partially revert r288414.
- Append RCR_APP_PHYSTS bit after firmware loading - otherwise
firmware will reset the register and this modification will be lost.
(without it Rx PHY descriptor section will contain garbage).
- Check if R92S_RXDW0_PHYST bit is set (like it is done in rtwn(4)) -
even if infosz is non-zero the section may not contain anything useful.
- In case, if descriptor is absent (A-MPDU?) use last calibrated RSSI
(rtwn(4) uses RSSI from the previous (sub)frame; probably, this
approach should be used here too).

Tested with Asus USB-N10, STA mode.
2016-12-04 21:40:49 +00:00
Jason Evans
7fa7f12ff8 Update jemalloc to 4.4.0. 2016-12-04 21:13:26 +00:00
Konstantin Belousov
435da98564 Restructure the code to handle reporting of non-exited processes from
wait(2).
- Do not acquire the process spinlock if neither WTRAPPED nor WUNTRACED
  options were passed [1].
- Extract the code to report alive process into a new helper
  report_alive_proc() and use it for trapped, stopped and continued
  childrens.

Note that the process spinlock is required around the WTRAPPED and
WUNTRACED tests, because P_STOPPED_TRACE and P_STOPPED_SIG flags are
set before other threads are stopped at the suspension point, and that
threads increment p_suspcount while owning only the process spinlock,
the process lock is dropped by them.  If the spinlock is not taken for
tests, the syscall thread might miss both p_suspcount increment and
wakeup in wakeup in thread_suspend_switch().

Based on the submission by:	mjg [1]
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2016-12-04 20:44:58 +00:00
Michal Meloun
6f1eb3052e Fixes for NVIDIA Tegra124 clocks:
- EMC clock have standard peripheral clock block. Use it.
 - Implement full frequency set method for PLLD2. This PLL
   is used as HDMI pixel clock so we must be able to set it
   to wide range of frequencies, within 5% tolerance allowed
   by HDMI specification. Due to this, full state space search
   (over m, n, p fields) is necessary.

MFC after: 3 weeks
2016-12-04 16:04:22 +00:00
Michal Meloun
3b29466b94 Clock framework fixes:
- The clk_test_freq() (aka CLK_SET_DRYRUN) doesn't change frequency,
   don't cache it result.
 - Fix busy condition for clk_set_freq().

MFC after: 3 weeks
2016-12-04 16:02:59 +00:00
Andriy Voskoboinyk
7d3a36a88e Do not try to recreate wlan(4) interface if it already exists.
This should fix error messages caused by devd(8) during startup:

Starting Network: lo0 wlan0.
...
Starting devd.
ifconfig: SIOCS80211: Device busy
wpa_supplicant already running?  (pid=323).

MFC after:	2 weeks
2016-12-04 15:58:34 +00:00
Michal Meloun
bea8daa364 Add IDs for HDA codecs found on Nvidia Tegra SoCs.
MFC after: 2 weeks
2016-12-04 15:28:30 +00:00
Michal Meloun
bdbc1b764d Implement fake pmap_mapdev_attr() for ARMv6.
This function is referenced, but never called from DRM2 code. Also,
real behavior of pmap_mapdev_attr() in ARM world is unclear as we don't
have any additional attribute for a device memory type.

MFC after: 2 weeks
2016-12-04 15:27:39 +00:00
Pyun YongHyeon
6861837c7a Fix too low volume on MSI H170 GAMING M3 board by poking vendor
specific COEF.
2016-12-04 05:55:18 +00:00
Pyun YongHyeon
b899778526 Recognize RealTek ALC1150 7.1 channel HD audio codec. 2016-12-04 05:46:30 +00:00
Conrad Meyer
e2a65c0031 ioat(4): Compile on i386
Truncate BUS_SPACE_MAXADDR_40BIT to essentially BUS_SPACE_MAXADDR_32BIT on
platforms with 32-bit bus_addr_t (i.e., i386).

PR:		215034
Reported by:	ngie@
Sponsored by:	Dell EMC Isilon
2016-12-04 04:04:57 +00:00
Conrad Meyer
695349e306 coredump_phnum_test: Make expected pheader count more flexible
Note: this test still requires binutils readelf (from ports) to pass, until a
few issues are resolved in elftoolchain.

PR:		215019
Reported by:	ngie@
Sponsored by:	Dell EMC Isilon
2016-12-04 03:50:57 +00:00
Pedro F. Giffuni
bde60d7544 indent(1): remove unneeded comma.
It is not a good practice to start a newline with a comma anyways.

Discussed with:	 bjk
Differential Revision:	https://reviews.freebsd.org/D8690
2016-12-04 03:10:25 +00:00
Martin Matuska
43d91c021f Relax sanity check of number fields in tar header even more.
This fixes reading tar archives created by older versions of
plexus-archiver (used by maven-assembly-plugin) that fill uid and gid
fields with spaces (PLXCOMP-233).

Vendor issue:
https://github.com/libarchive/libarchive/issues/832

Reported by:	Antoine Brodin <antoine@freebsd.org>
MFC after:	1 week
2016-12-04 02:58:13 +00:00
Justin Hibbits
aa38c69b74 Fix a typo (move parenthesis to correct location in the line).
Before this, it would cause the one consumer of this API in powerpc usage
(dev/dpaa) to set the PTE WIMG flags to empty instead of --M-, making the
cache-enabled buffer portals non-coherent.
2016-12-04 02:15:46 +00:00
Enji Cooper
006aa95c01 Unbreak "make depend" with sys/modules/ioat by adding opt_ddb.h to SRCS
MFC after: 2 weeks
2016-12-04 02:08:40 +00:00
Adrian Chadd
a1fa23910c [camcontrol] init ts=0 to quieten gcc.
It "looks" like ts is set to something on success, and not modified on
error.

Checked on IRC with: cem
2016-12-03 20:35:39 +00:00
Devin Teske
4f38967037 Fix bug preventing limits(1) from being applied
PR:		misc/212493
Differential Revision:	https://reviews.freebsd.org/D8232
Submitted by:	girgen
Reviewed by:	adrian
MFC after:	3 days
X-MFC-to:	stable/11
2016-12-03 19:03:40 +00:00
Ravi Pokala
4d12189b6c Build smbios.ko as a module for amd64 and i386
For whatever reason, smapi, smbios, vpd are all under the "bios" directory.
smapi is only for i386, so the entire "bios" directory is only built for
i386. Break smapi out, and make only it i386-specific. Then, build the
"bios" directory for both amd64 and i386.

Reviewed by:	imp
MFC after:	1 week
Sponsored by:	Panasas
Differential Revision:	https://reviews.freebsd.org/D8609
2016-12-03 17:54:08 +00:00
Pedro F. Giffuni
69718b786d Revert r253678, r253661:
Fix a segfault in ctfmerge(1) due to a bug in GCC.

The change was correct and the bug real, but upstream didn't adopt it
and we want to remain in sync. When/if upstream does something about it
we can bring their version.

The bug in question was fixed in GCC 4.9 which is now the default in
FreeBSD's ports. Our native gcc-4.2, which is still in use in some Tier-2
platforms also has a workaround so no end-user should be harmed by the
revert.
2016-12-03 17:44:43 +00:00
Andriy Voskoboinyk
4786190d2f rtwn: fix bitmap size calculation.
Tested with RTL8188CE, STA mode.
2016-12-03 17:27:10 +00:00
Andriy Voskoboinyk
6127805391 rsu: fix frame processing in the Rx path (similar to r292207).
- Fill in Rx radiotap header correctly (for every packet in a chain;
not once per chain).
- Fix rate / flags fields in Rx radiotap.
- Add debug messages for discarded frames.
- Pass received control (< sizeof(struct ieee80211_frame)) frames
to net80211 (if allowed by device filter; cannot happen yet).

Tested with Asus USB-N10.

Differential Revision:	https://reviews.freebsd.org/D5723
2016-12-03 16:02:53 +00:00
Kevin Lo
3094a376e4 Fix logic error so the R92C_TDECTRL register value is updated correctly.
Reviewed by:	avos
2016-12-03 14:41:53 +00:00
Andriy Voskoboinyk
bcb071810a rsu: remove unused structures / variables. 2016-12-03 14:26:58 +00:00
Bryan Drewery
eba4cc152e DIRDEPS_BUILD: Fix '/' in group names creating a bad cookie.
This is reworking the change in r296585 but to still properly install
the files.  This limits the change to only the DIRDEPS_BUILD logic
for what it considers the name of the staging set, which is what the
cookie name is based off of.

Sponsored by:	Dell EMC Isilon
MFC after:	1 week
2016-12-03 05:29:35 +00:00
Bryan Drewery
d7d0effe49 Revert r296585.
This broke installing dtrace test files.  It was poorly tested.

Reported by:	markj
Pointyhat to:	bdrewery
MFC after:	1 week
2016-12-03 05:29:31 +00:00
Bryan Drewery
34ecf41885 Create the /usr/lib/include symlink as relative.
This ugly code is done to avoid assuming LIBDIR is 2 components
deep.

Reported by:	jhb
2016-12-03 05:29:12 +00:00
Enji Cooper
72a02000d9 Don't build :strvis_locale if VIS_NOLOCALE is undefined
The copy of contrib/libc-vis on ^/stable/10 doesn't contain all of the features
in the ^/stable/11 // ^/head version, including VIS_NOLOCALE. The risk is lower
in conditionally running the test instead of backporting the newer version of
libc-vis

MFC after:	now
2016-12-03 03:56:20 +00:00
Enji Cooper
612a96b4a8 Restore pathing for factor(1), which unnecessarily diverged in r278616
factor lives in /usr/games/, not /usr/bin, in NetBSD.

The correct way to handle this is do on-the-fly manipulation of the test
script via ATF_TESTS_SH_SED_<foo>, not by modify the pathing directly in
the test script.

This is being done to resolve an unnecessary conflict made when pulling
back ^/head@r309469 (contrib/netbsd-tests update) to ^/stable/10.

No functional change

MFC after:	now
2016-12-03 03:13:32 +00:00
Adrian Chadd
707210ff0e [ath] use the correct AMPDU frame limit for the given node, rather than the global config.
This is important in hostap, ibss, (11s at some magical future date, etc)
where different nodes may have smaller limits.

Oops!

MFC after:	1 week
Relnotes:	Yes
2016-12-03 02:47:41 +00:00
Adrian Chadd
4774b99992 [net80211] prepare for 11ac aware NICs that want to know per-vdev channel and centre frequencies.
* ic_freq is the centre of the primary channel, not the centre of the
  HT40/HT80/etc channel.  Add a method to access that.
* Add a method to access the centre of the primary channel, including
  knowing the centre of the 5/10/20/40/80, versus the primary channel.
  Ie, it's the centre of the 40, 80, 160MHz channel.
* Add a method to access the centre frequency of the secondary 80MHz
  channel - we don't support VHT yet, but when we do.
* Add methods to access the current channel and the per-dev desired
  channel.  Ideally drivers that do full offload with a per-vap channel
  configuration should use the vap channel, NOT ic_curchan.
  Non-offload drivers that require net80211 to change the channel should
  be accessing ic_curchan.
2016-12-03 02:45:18 +00:00
Enji Cooper
3d77b88dff Expect 01:main to fail
Changes were made to ZFS in the past year with respect to how ACLs
are handled, causing failures in this test. Mark it TODO so (hopefully)
someone more knowledgeable (like mav or trasz) will fix the code or the
test.

PR:	212323
2016-12-03 02:24:15 +00:00