Commit Graph

211382 Commits

Author SHA1 Message Date
Enji Cooper
79ccc589d2 Default NO_INSTALLEXTRAKERNELS to yes, not no
The old (^/stable/9) default was yes, not no ("no" was the new default
introduced recently that broke POLA). Restore it to keep POLA like
glebius intended in r299077

MFC after: 3 days
X-MFC with: r299086
Pointyhat to: ngie (research before assuming and committing next time)
Sponsored by: EMC / Isilon Storage Division
2016-05-04 21:15:28 +00:00
Alan Somers
79e29f957a Fix "getextattr -x" with non-ascii attribute values
extattr/rmextattr.c
	When printing hex output, treat all attribute values as unsigned
	char arrays instead of sign extending them to 32 bit values.

extattr/tests/extattr_test.sh
	Add a regression test

PR:		209039
MFC after:	4 weeks
Sponsored by:	Spectra Logic Corp
2016-05-04 21:07:30 +00:00
Enji Cooper
c0fd425526 Default NO_INSTALLEXTRAKERNELS to "no" to unbreak the build
MFC after: soon (was insta-MFCed -_-..)
Pointyhat to: glebius
Sponsored by: EMC / Isilon Storage Division
2016-05-04 21:00:41 +00:00
Alan Somers
c29930cfd6 Allow setextattr(8) to take attribute values from stdin
Add the -i option to setextattr. This option allow extended attribute data
to be provided via stdin. Add a -qq option to getextattr, which omits the
trailing newline. Together these options can be used to work with extended
attributes whose values are large and/or binary.

usr.sbin/extattr/Makefile:
	Link against libsbuf which is used for processing stdin data.

usr.sbin/extattr/rmextattr.8:
	Document setextattr's -i option, getextattr's -qq option, and remove
	the BUG about setextattr only being useful for strings.

usr.sbin/extattr/rmextattr.c:
	For setextattr operations, buffer attribute data in an sbuf. If -i
	is specified, pull the data from stdin, otherwise from the
	appropriate argurment.

	Update usage text and argument validation code for setextattr's -i
	option.

usr.sbin/extattr/tests/extattr_test.sh
	Add tests for -q and -i.

Reviewed by:	wblock (manpage)
MFC after:	4 weeks
Sponsored by:	Spectra Logic Corp
Differential Revision:	https://reviews.freebsd.org/D6090
2016-05-04 20:20:55 +00:00
Jared McNeill
d3810ff91c Add driver for Allwinner A83T/H3/A64 Gigabit Ethernet.
The datasheets refer to this controller as EMAC, not to be confused with
the fast ethernet controller (also named EMAC) found in A10/A20 SoCs.

Tested on a BananaPi M3 (A83T), which uses an external RGMII PHY (RTL8211E).

Reviewed by:		adrian
Differential Revision:	https://reviews.freebsd.org/D6169
2016-05-04 20:06:20 +00:00
Andriy Voskoboinyk
4772b8701c wi: fix a comment (0x1fff has 13 bits set). 2016-05-04 18:08:38 +00:00
Alan Cox
cdbf6d8a05 Explain why pmap_copy(), pmap_enter_pde(), and pmap_enter_quick_locked()
call pmap_invalidate_page() even though they are not destroying a leaf-
level page table entry.

Eliminate some bogus white-space characters in a comment.

Reviewed by:	kib
2016-05-04 17:54:13 +00:00
Pedro F. Giffuni
4a00a65162 dev/pms: minor spelling fixes for the FreeBSD-specific part. 2016-05-04 17:52:53 +00:00
Pedro F. Giffuni
86673463b5 tools: minor spelling fix in locales template.
No functional change.
2016-05-04 17:29:07 +00:00
Andriy Voskoboinyk
b134c5824b net80211: do not hardcode size of ic_modecaps field. 2016-05-04 17:22:35 +00:00
Gleb Smirnoff
f4ae78bd4e Make it possible to override NO_INSTALLEXTRAKERNELS.
Reviewed by:	gjb
2016-05-04 17:21:34 +00:00
Adrian Chadd
ced0a8950a [net80211] add extra debugging around negotiated A-MPDU parameters. 2016-05-04 16:42:53 +00:00
Bjoern A. Zeeb
e94f204a32 While gem5 is not qemu, we treat it as "simulators" or "virtual environments".
Add the needed hardcoded gem5 attachments for the UART there, re-using all
the other bits.

In collaboration with:	andrew
Sponsored by:		DARPA/AFRL
Reviewed by:		andrew
MFC after:		2 weeks
Differential Revision:	https://reviews.freebsd.org/D6204
2016-05-04 16:24:12 +00:00
Bjoern A. Zeeb
ab257e40e6 The virtual timer is optional on ARM64. Properly handle that condition. [1]
In case we do not have an interrupt assignment for the virtual timer,
force the physical timer.
Also skip resource allocation for any timer we do not have an interrupt
assignment for.

In collaboration with:	andrew
Submitted by:		br ([1] from his gem5 arm64 work)
Sponsored by:		DARPA/AFRL
Reviewed by:		andrew
MFC after:		2 weeks
Differential Revision:	https://reviews.freebsd.org/D6203
2016-05-04 16:15:39 +00:00
Bjoern A. Zeeb
83655449f5 The ARM generic timer keeps ticking even if disabled or it expired.
In case of updating it with a very low value it might expire again
after writing the tval but before updating ctrl. In that case we do
lose the status bit saying that the timer expired and we will consequently
not get an interrupt for it, leaving the timer in a "dead" state.

In order to solve this increase the minimum period with what the timer
can be loaded to something higher.

Found & analysed with:	gem5
Debugged with:		andrew
Sponsored by:		DARPA/AFRL
Reviewed by:		andrew
MFC after:		2 weeks
Differential Revision:	https://reviews.freebsd.org/D6202
2016-05-04 16:09:51 +00:00
Pedro F. Giffuni
730ba5a1aa sys/sparc64: minor spelling fixes.
Only affects comments: no functional change.
2016-05-04 15:52:40 +00:00
Pedro F. Giffuni
255eff3b0d sys/arm: Minor spelling fixes.
Only affects comments: no functional change.
2016-05-04 15:48:59 +00:00
Roger Pau Monné
2ed46a6f7d xen/pvclock: set the correct resolution for the Xen PV clock
The Xen PV clock has a resolution of 1ns, so set the resolution to the
highest one that FreeBSD supports, which is 1us.

MFC after:	2 weeks
Sponsored by:	Citrix Systems R&D
2016-05-04 13:49:59 +00:00
Roger Pau Monné
731c90b713 rtc: fix inverted resolution check
The current code in clock_register checks if the newly added clock has a
resolution value higher than the current one in order to make it the
default, which is wrong. Clocks with a lower resolution value should be
better than ones with a higher resolution value, in fact with the current
code FreeBSD is always selecting the worse clock.

Reviewed by:		kib jhb jkim
Sponsored by:		Citrix Systems R&D
MFC after:		2 weeks
Differential revision:	https://reviews.freebsd.org/D6185
2016-05-04 13:48:59 +00:00
Andriy Voskoboinyk
a7d1e7a9ec iwn: fix device reset after watchdog timeout.
Simple device reset (stop/start) is not enough here;
post-init state changes must be applied too.
2016-05-04 12:51:27 +00:00
Hans Petter Selasky
869df73304 Extend the UQ_NO_STRINGS quirk to also cover the USB language string
descriptor. This fixes enumeration of some older Samsung Galaxy S3
phones.

MFC after:	1 week
2016-05-04 08:57:40 +00:00
Adrian Chadd
a8cd039341 s/struct device */device_t/g
Submitted by:	kmacy
2016-05-04 06:26:27 +00:00
Adrian Chadd
cde57cac55 s/struct device */device_t/g
Submitted by:	kmacy
2016-05-04 06:25:12 +00:00
Adrian Chadd
ade965c38b s/struct device */device_t/g
Submitted by:	kmacy
2016-05-04 06:24:51 +00:00
Adrian Chadd
d19677ddd7 s/struct device */device_t/g
Submitted by:	kmacy
2016-05-04 06:24:10 +00:00
Adrian Chadd
748cd4c30d s/struct device */device_t/g
Submitted by:	kmacy
2016-05-04 06:23:49 +00:00
Jung-uk Kim
12b204a61b Fix build without "options PCI_IOV". 2016-05-04 06:22:41 +00:00
Bryan Drewery
0252c68ba4 DIRDEPS_BUILD: Update dependencies.
Sponsored by:	EMC / Isilon Storage Division
2016-05-04 03:14:34 +00:00
Bryan Drewery
a0c640c2a0 DIRDEPS_BUILD: Exclude secure/lib* libraries for host builds.
Sponsored by:	EMC / Isilon Storage Division
2016-05-04 03:13:48 +00:00
Sepherosa Ziehau
d5f0ea7ca2 kern: Factor out function to convert hash flags to malloc(9) flags
Suggested by:	jhb
Reviewed by:	jhb, kib
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D6184
2016-05-04 03:07:52 +00:00
Adrian Chadd
d191ae19a2 [bwn] fix rate control feedback.
* Add a debug print for the xmit completion status fields.
  Yes, I like staring at a stream of DWORDS.

* Set the retrycnt to the number of full frame retries for now;
  I'll figure out how to factor rts/cts failures into it when
  I figure out what the difference is.

  It's -1 because it's not "retries", it's "tries".

It now passes the youtube test.

Tested:

* BCM4312, STA mode
2016-05-04 02:11:45 +00:00
Eric van Gyzen
8e3543eebc sh: Handle empty hostname and $PWD when building prompt
If the hostname is empty and \h is used in $PS1,
the remainder of the prompt following \h will be empty.
Likewise for $PWD and \w.  Fix it.

Reviewed by:	jilles
MFC after:	1 week
Sponsored by:	Dell Inc.
Differential Revision:	https://reviews.freebsd.org/D6188
2016-05-04 02:06:46 +00:00
Alexander Kabaev
cdd2592ffd Fix nvram2env after bus_space_fdt removal.
The generic bus space does the mapping now, no need to pre-translate
phys addresses to KSEG1 anymore.

Submitted by: Hiroki Mori
2016-05-04 01:56:37 +00:00
Marcelo Araujo
b3956646bf Use imin() macro from sys/libkern.h.
MFC after:	2 weeks.
2016-05-04 01:43:07 +00:00
Adrian Chadd
e1e8b05256 [bwn] accurately(ish) account transmit/recieve failures for rate control.
I noticed that it'd associate fine, but it'd quickly stop exchanging traffic.
Receive was okay, but transmit just failed.

Then I went "wlandebug +rate".  I discovered it started at 36M OFDM, and then
quickly rose to 54M, which then showed 0% transmit success.

Then, I dug into how the completion path works.  We are reading 'ack=0'
in the TX status side, so .. then I discovered we were only processing the
TX completion status /if/ ack=1.  So, we'd only ever count successes;
we'd never count failures, and thus the rate control code thought
everything was a-ok.

We also have to set retrycnt to something non-zero so it indeed does
bring the rate down upon failure.

So:

* Delete the rate control completion code from the tx completion
  routine, it's just duplicate and never worked.  Putting it behind
  'if (status->ack) was pointless.

* Move it to the PIO and DMA completion routines which actually
  do free the node reference and mbuf.  We know at that point
  what the status is, so do it there.

* Fake a retrycnt of 1 for now, so we at least count failures.

Also:

* Start adding comments about weird stuff I find with rate selection.
  In this instance, we shouldn't be selecting a fallback rate that
  doesn't match the currently configured mode (11a, 11b, 11g, etc.)

This isn't perfect - AMRR does try 54mbit and takes a few packets
before it figures out it's a bad idea - but it's better than nothing.

This makes the bwn(4) driver actually useful for the first time since
I've tried using it - and that dates back to 2011.  I've resisted
successfully until now.

Tested:

* Broadcom BCM4312 802.11b/g Wireless, STA mode
  WLAN (chipid 0x4312 rev 15) PHY (analog 6 type 5 rev 1) RADIO (manuf 0x17f ver 0x2062 rev 2)

TODO:

* See if the fallback rate actually /is/ working
* Question my own sanity over touching this driver in the first place.
2016-05-04 01:36:19 +00:00
Adrian Chadd
b0436c3acf [bwn] ensure the fallback rate stays in the same PHY mode.
Falling back from 6MB OFDM to 5MB CCK (a) may not work well in the
11bg PHYs, (b) won't work at all if you're 11g only, and (c) plainly
won't work for the 11a PHY.

So, don't do that!

Tested:

* BCM4312 802.11b/g Wireless, STA mode
  WLAN (chipid 0x4312 rev 15) PHY (analog 6 type 5 rev 1) RADIO (manuf 0x17f ver 0x2062 rev 2)
2016-05-04 01:29:00 +00:00
Enji Cooper
aa853cb461 Use DEVMETHOD_END ({ NULL, NULL }) instead of hardcoding { 0, 0 }
Sponsored by: EMC / Isilon Storage Division
2016-05-03 23:56:52 +00:00
Pedro F. Giffuni
989531dc9f pmcstudy.8: minor "efficiency" fix.
No functional change.
2016-05-03 22:20:55 +00:00
Pedro F. Giffuni
edafb5a327 sys/amd64: Small spelling fixes.
No functional change.
2016-05-03 22:13:04 +00:00
Pedro F. Giffuni
500eb14ae8 vmm(4): Small spelling fixes.
Reviewed by:	grehan
2016-05-03 22:07:18 +00:00
Pedro F. Giffuni
696efc839c kgssapi: insignificant spelling fix.
No functional change.
2016-05-03 22:05:03 +00:00
Pedro F. Giffuni
a1ff7af013 Misc. build: minor spelling fixes.
No functional change.
2016-05-03 22:01:48 +00:00
Pedro F. Giffuni
55b0545890 sys/isa: minor spelling fixes.
No functional change.
2016-05-03 21:51:52 +00:00
Baptiste Daroussin
eebea334c4 Print the fchmodat mode in human readable fashion
MFC after:	1 week
2016-05-03 21:27:17 +00:00
Eric van Gyzen
2db0699d88 Work around (ignore) broken SRAT tables
Instead of panicking when parsing an invalid ACPI SRAT table,
just ignore it, effectively disabling NUMA.

https://lists.freebsd.org/pipermail/freebsd-current/2016-May/060984.html

Reported and tested by:	 Bill O'Hanlon (bill.ohanlon at gmail.com)
Reviewed by:	jhb
MFC after:	1 week
Relnotes:	If dmesg shows "SRAT: Duplicate local APIC ID",
                try updating your BIOS to fix NUMA support.
Sponsored by:	Dell Inc.
2016-05-03 20:14:04 +00:00
John Baldwin
e402d55c84 Save and restore SRIOV-related config registers.
Save the value of the IOV control and page size registers and restore
them (along with the VF count) in pci_cfg_save/pci_cfg_restore.  This
ensures ARI remains enabled if a PF driver resets itself during the
PCI_IOV_INIT callback.  This might also properly restore SRIOV state
across suspend/resume.

Reviewed by:	rstone, vangyzen
Differential Revision:	https://reviews.freebsd.org/D6192
2016-05-03 19:45:24 +00:00
John Baldwin
b83c5d07c1 Use the correct location of the SRIOV capability when enabling ARI.
While here, check if ARI was enabled by re-reading the config register
after writing it and return an error if the write fails.

Reviewed by:	rstone, vangyzen
2016-05-03 19:37:25 +00:00
Jung-uk Kim
b8721c1643 Merge OpenSSL 1.0.2h.
Relnotes:	yes
2016-05-03 18:50:10 +00:00
John Baldwin
cf05aafc7e Add a debug dir for /boot/modules.
This provides a place for standalone modules to store debug symbols.

Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D6190
2016-05-03 18:26:07 +00:00
Dimitry Andric
747872f83f Re-sync the FreeBSD-specific Subversion template with the one from
ports.

MFC after:	11 days
X-MFC-With:	r298845
2016-05-03 18:06:42 +00:00