]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
8 years agoUse MIN/MAX macros from sys/param.h.
araujo [Mon, 2 May 2016 01:28:21 +0000 (01:28 +0000)]
Use MIN/MAX macros from sys/param.h.

MFC after: 2 weeks.

8 years agoUse MIN()/MAX() macros from sys/param.h.
araujo [Mon, 2 May 2016 00:45:46 +0000 (00:45 +0000)]
Use MIN()/MAX() macros from sys/param.h.

Reviewed by: trasz
MFC after: 2 weeks.
Differential Revision: https://reviews.freebsd.org/D6118

8 years agoUse MIN() macro from sys/param.h.
araujo [Mon, 2 May 2016 00:44:19 +0000 (00:44 +0000)]
Use MIN() macro from sys/param.h.

Reviewed by: trasz
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D6119

8 years agoSpelling fixes supplied by pfg@, detected with codespell, plus
wblock [Sun, 1 May 2016 22:00:41 +0000 (22:00 +0000)]
Spelling fixes supplied by pfg@, detected with codespell, plus
additional misspellings detected by igor.

MFC after: 1 week

8 years agoiwn: switch to ieee80211_add_channel*()
avos [Sun, 1 May 2016 22:00:40 +0000 (22:00 +0000)]
iwn: switch to ieee80211_add_channel*()

Switch to add_channel / add_channel_ht40 + pass channel's TX power
for the last.

Tested by: dhw
Reviewed by: adrian
Differential Revision: https://reviews.freebsd.org/D6141

8 years agoWhen a client uses UDP encapsulation and lists IP addresses in the INIT
tuexen [Sun, 1 May 2016 21:48:55 +0000 (21:48 +0000)]
When a client uses UDP encapsulation and lists IP addresses in the INIT
chunk, enable UDP encapsulation for all those addresses.
This helps clients using a userland stack to support multihoming if
they are not behind a NAT.

MFC after: 1 week

8 years agorestore: promote some getfiles() parameters to size_t.
pfg [Sun, 1 May 2016 21:17:30 +0000 (21:17 +0000)]
restore: promote some getfiles() parameters to size_t.

This is based on a change from OpenBSD:

"Fix restore so that it can actually restore files larger than 4GB by
changing the type of "size" to off_t in getfiles() plus little dependent
type cleanup, from Daniel Lucq."

It is an important for machines with 32 bit longs.
While here unsign the flags, also from OpenBSD.

Obtained from: OpenBSD (through bitrig, I hate CVS)
MFC after: 2 weeks

8 years agobcache read ahead may attempt to read past end of disk
allanjude [Sun, 1 May 2016 21:06:59 +0000 (21:06 +0000)]
bcache read ahead may attempt to read past end of disk

The new bcache code does not know the size of the disk, and therefore may attempt to read past the end of the disk while trying to fill its read-ahead cache.

This is usually not an issue, it fails gracefully on all of my machines, but some BIOSes seem to retry the reads for up to 30 seconds each, resulting in a long stall during boot

Submitted by: Toomas Soome <tsoome@me.com>
Reviewed by: jhb, np
Differential Revision: https://reviews.freebsd.org/D6109

8 years agonet80211: calculate IEEE80211_MODE_BYTES / IEEE80211_CHAN_BYTES
avos [Sun, 1 May 2016 20:57:10 +0000 (20:57 +0000)]
net80211: calculate IEEE80211_MODE_BYTES / IEEE80211_CHAN_BYTES
instead of hardcoding it.

Suggested by: adrian

8 years agoAs a reader service, explain NOTE_LINK reporting for the directories.
kib [Sun, 1 May 2016 20:54:29 +0000 (20:54 +0000)]
As a reader service, explain NOTE_LINK reporting for the directories.

Submitted by: Vladimir Kondratyev <wulf@cicgroup.ru>
MFC after: 1 week

8 years agolibexec: minor spelling fixes in comments.
pfg [Sun, 1 May 2016 19:39:23 +0000 (19:39 +0000)]
libexec: minor spelling fixes in comments.

No functional change.

8 years agolib: minor spelling fixes in comments.
pfg [Sun, 1 May 2016 19:37:33 +0000 (19:37 +0000)]
lib: minor spelling fixes in comments.

No functional change.

8 years agorum: switch to ieee80211_add_channel_list_*()
avos [Sun, 1 May 2016 18:53:12 +0000 (18:53 +0000)]
rum: switch to ieee80211_add_channel_list_*()

- Use device's channel list instead of default one
(from ieee80211_init_channels()).
- Add ic_getradiocaps() method.

Added channels:
2GHz band: 12, 13 and 14.
5Ghz band: 34, 38, 42, 46 and 165.

Tested with WUSB54GC, STA / MONITOR modes.

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

8 years agootus: switch to ieee80211_add_channel_list_*()
avos [Sun, 1 May 2016 18:15:40 +0000 (18:15 +0000)]
otus: switch to ieee80211_add_channel_list_*()

- Use device's channel list instead of default one
(from ieee80211_init_channels()).
- Sort channels (ieee80211_add_channel_list_* requirement).
- Add ic_getradiocaps() method.

Added channels:
2GHz band: 12, 13 and 14.
5GHz band: 34, 38, 42, 46 and 165.

Reviewed by: adrian
Differential Revision: https://reviews.freebsd.org/D6145

8 years agoProvide an example to the kqueue man page, showing
bcr [Sun, 1 May 2016 18:09:34 +0000 (18:09 +0000)]
Provide an example to the kqueue man page, showing
a basic usage example.  Although it is an
untypical example for the use of kqueue, it is
better than nothing and should get people started.

PR: 196844
Submitted by: fernando.apesteguia@gmail.com
Reviewed by: kib
Approved by: kib
MFC after: 5 days
Differential Revision: https://reviews.freebsd.org/D6082

8 years agoAdd a manual page for pkt-gen.
gnn [Sun, 1 May 2016 17:55:45 +0000 (17:55 +0000)]
Add a manual page for pkt-gen.

Sponsored by: EMC / Isilon Storage Division

8 years agoAvoid duplicated calls to pmap_page_get_memattr().
kib [Sun, 1 May 2016 17:48:43 +0000 (17:48 +0000)]
Avoid duplicated calls to pmap_page_get_memattr().

Avoid logging inconsistency for the /dev/mem device at all. The driver
leaves memattr intact, and the corrective action in the device pager
handles it right.

In the logged warning, name the driver we blame, and show memory
attributes values.

Reported and tested by: pho
Reviewed by: alc
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D6149

8 years agoMake it explicit that D_MEM cdevsw d_flag is to signify that the
kib [Sun, 1 May 2016 17:46:56 +0000 (17:46 +0000)]
Make it explicit that D_MEM cdevsw d_flag is to signify that the
driver is (or behaves identically to) /dev/mem.  Remove the D_MEM flag
from random drivers.

Note that currently the D_MEM flag does not affect any behaviour, but
this going to change in the next commit.

Noted and reviewed by: alc
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
X-Differential revision: https://reviews.freebsd.org/D6149

8 years agotypo
jamie [Sun, 1 May 2016 16:48:03 +0000 (16:48 +0000)]
typo

Submitted by: Jimmy Olgeni

8 years agoetc: minor spelling fixes.
pfg [Sun, 1 May 2016 16:43:22 +0000 (16:43 +0000)]
etc: minor spelling fixes.

Mostly comments but these tend to be user-visible.

MFC after: 2 weeks

8 years agousr.sbin: minor spelling fixes on comments.
pfg [Sun, 1 May 2016 16:41:25 +0000 (16:41 +0000)]
usr.sbin: minor spelling fixes on comments.

No functional change.

8 years agopmcstat: minor spelling fixes.
pfg [Sun, 1 May 2016 16:40:56 +0000 (16:40 +0000)]
pmcstat: minor spelling fixes.

Mostly comments bur also a user-visible string.

MFC after: 2 weeks

8 years agousr.sbin/bsdconfig: minor spelling fixes on comments.
pfg [Sun, 1 May 2016 16:38:12 +0000 (16:38 +0000)]
usr.sbin/bsdconfig: minor spelling fixes on comments.

No functional change.

8 years agobluetooth: minor spelling fixes.
pfg [Sun, 1 May 2016 16:36:14 +0000 (16:36 +0000)]
bluetooth: minor spelling fixes.

User-visible strings.

MFC after: 2 weeks

8 years agoshare: minor spelling fixes.
pfg [Sun, 1 May 2016 16:29:02 +0000 (16:29 +0000)]
share: minor spelling fixes.

Mostly comments but these tend to be user-visible.

MFC after: 2 weeks

8 years agotools: minor spelling fixes.
pfg [Sun, 1 May 2016 16:20:14 +0000 (16:20 +0000)]
tools: minor spelling fixes.

Mostly comments but also some user-visible strings.

MFC after: 2 weeks

8 years agopicobsd: minor spelling fixes.
pfg [Sun, 1 May 2016 16:16:11 +0000 (16:16 +0000)]
picobsd: minor spelling fixes.

8 years agousr.bin: minor spelling fixes on comments.
pfg [Sun, 1 May 2016 16:13:05 +0000 (16:13 +0000)]
usr.bin: minor spelling fixes on comments.

No functional change.

8 years agolocaledef(1): minor spelling fixes on comments.
pfg [Sun, 1 May 2016 16:10:56 +0000 (16:10 +0000)]
localedef(1): minor spelling fixes on comments.

No functional change.

8 years agoiwm: switch to ieee80211_add_channel()
avos [Sun, 1 May 2016 14:27:27 +0000 (14:27 +0000)]
iwm: switch to ieee80211_add_channel()

- Switch to ieee80211_add_channel().
- Parse/set more channel flags (DFS, NOADHOC).
- Add ic_getradiocaps() method.

Reviewed by: adrian
Differential Revision: https://reviews.freebsd.org/D6150

8 years agoRemove useless calls to basename().
ed [Sun, 1 May 2016 08:22:11 +0000 (08:22 +0000)]
Remove useless calls to basename().

There are a couple of places in the source three where we call
basename() on constant strings. This is bad, because the prototype
standardized by POSIX allows the implementation to use its argument as a
storage buffer.

This change eliminates some of these unportable calls to basename() in
cases where it was only added for cosmetical reasons, namely to trim
argv[0]. There's nothing wrong with setting argv[0] to the full path.

Reviewed by: jilles
Differential Revision: https://reviews.freebsd.org/D6093

8 years ago[iwn] fill in the TX command rate info flags consistently.
adrian [Sun, 1 May 2016 05:01:10 +0000 (05:01 +0000)]
[iwn] fill in the TX command rate info flags consistently.

The Linux driver sets the rate_n_flags regardless of whether it's being
sent using firmware rate control or local rate control.  This includes
the antenna configuration.

Thanks to Kyle Evans <kevans91@ksu.edu> for pointing this out to me
and doing some investigation/testing on his end.

Tested:

* Intel 7260 STA, 2G and 5G networks

8 years agorestore: fix resource handle leak.
pfg [Sun, 1 May 2016 02:39:39 +0000 (02:39 +0000)]
restore: fix resource handle leak.

CID: 1007784
MFC after: 5 days

8 years agorestore: drop casts for calloc().
pfg [Sun, 1 May 2016 02:31:22 +0000 (02:31 +0000)]
restore: drop casts for calloc().

8 years agosbin: ake use of our rounddown() macro when sys/param.h is available.
pfg [Sun, 1 May 2016 02:24:05 +0000 (02:24 +0000)]
sbin: ake use of our rounddown() macro when sys/param.h is available.

No functional change.

8 years agosbin: use our howmany() macro when available through <sys/param.h>.
pfg [Sun, 1 May 2016 02:19:49 +0000 (02:19 +0000)]
sbin: use our howmany() macro when available through <sys/param.h>.

8 years agorestore: fix memory leak.
pfg [Sat, 30 Apr 2016 22:51:09 +0000 (22:51 +0000)]
restore: fix memory leak.

CID: 272297
MFC after: 5 days

8 years agoAllow FILESGROUPS to be specified more than once by pruning out duplicates
ngie [Sat, 30 Apr 2016 21:32:29 +0000 (21:32 +0000)]
Allow FILESGROUPS to be specified more than once by pruning out duplicates

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

8 years agoClarify when happens when there is a "depend" parameter in jail.conf,
jamie [Sat, 30 Apr 2016 21:27:41 +0000 (21:27 +0000)]
Clarify when happens when there is a "depend" parameter in jail.conf,
and how this affects the "jail_list" option in rc.conf.

8 years agorestore: use our howmany() instead of reinventing the macro.
pfg [Sat, 30 Apr 2016 20:05:23 +0000 (20:05 +0000)]
restore: use our howmany() instead of reinventing the macro.

8 years agofdisk: drop unused macro and make use of roundup()/rounddown().
pfg [Sat, 30 Apr 2016 19:58:54 +0000 (19:58 +0000)]
fdisk: drop unused macro and make use of roundup()/rounddown().

8 years agopowerpc: Replace rounddown() from r298856 with roundup().
pfg [Sat, 30 Apr 2016 19:50:59 +0000 (19:50 +0000)]
powerpc: Replace rounddown() from r298856 with roundup().

Both are equivalent but roundup is more logical for this case.
Catch another case while here.

Pointed out by: jhibbits

8 years agoWhen attempting to satisfy mmap() requests for superpage alignment on
rwatson [Sat, 30 Apr 2016 19:29:03 +0000 (19:29 +0000)]
When attempting to satisfy mmap() requests for superpage alignment on
64-bit MIPS, use superpage rather than physical-segment constants, or
we may improperly fail to apply suitable alignment -- yet still allow
mmap() to appear to succeed.

Reviewed by: sson
MFC after: 1 week
Sponsored by: DARPA, AFRL

8 years agosbin: minor spelling fixes.
pfg [Sat, 30 Apr 2016 19:04:59 +0000 (19:04 +0000)]
sbin: minor spelling fixes.

No functional change.

8 years agoFix incorrect permissions for /etc/rc.d/sendmail in fallout from
peter [Sat, 30 Apr 2016 19:01:51 +0000 (19:01 +0000)]
Fix incorrect permissions for /etc/rc.d/sendmail in fallout from
release-pkg merge.

8 years agopowerpc: Make use of our rounddown() macro when sys/param.h is available.
pfg [Sat, 30 Apr 2016 18:56:35 +0000 (18:56 +0000)]
powerpc: Make use of our rounddown() macro when sys/param.h is available.

No functional change.

8 years agoACK the interrupt after disabling it, this avoid an interrupt storm.
manu [Sat, 30 Apr 2016 18:07:13 +0000 (18:07 +0000)]
ACK the interrupt after disabling it, this avoid an interrupt storm.

Approved by: andrew (mentor)

8 years agoAdd a MULTIDELAY option to allow the ARM kernel to have multiple DELAY
andrew [Sat, 30 Apr 2016 17:27:33 +0000 (17:27 +0000)]
Add a MULTIDELAY option to allow the ARM kernel to have multiple DELAY
implementations. Early in the boot the kernel will use an approximate,
however after the timer has been probed it will switch to a more accurate
implementation.

Reviewed by: manu
Sponsored by: ABT Systems Ltd
Differential Revision: https://reviews.freebsd.org/D5762

8 years agoRationalize license numbering in fdescfs(5)
emaste [Sat, 30 Apr 2016 16:01:37 +0000 (16:01 +0000)]
Rationalize license numbering in fdescfs(5)

8 years agoWhen checking for binary file, check if ch is not EOF only ch actually got
bapt [Sat, 30 Apr 2016 14:48:30 +0000 (14:48 +0000)]
When checking for binary file, check if ch is not EOF only ch actually got
a value assigned

Reported by: pfg

8 years agoinclude: minor spelling fixes.
pfg [Sat, 30 Apr 2016 14:43:42 +0000 (14:43 +0000)]
include: minor spelling fixes.

No functional change.

8 years agosys: Make use of our rounddown() macro when sys/param.h is available.
pfg [Sat, 30 Apr 2016 14:41:18 +0000 (14:41 +0000)]
sys: Make use of our rounddown() macro when sys/param.h is available.

No functional change.

8 years agoAdd the UDP encaps port as a parameter to sctp_add_remote_addr().
tuexen [Sat, 30 Apr 2016 14:25:00 +0000 (14:25 +0000)]
Add the UDP encaps port as a parameter to sctp_add_remote_addr().

This is currently only a code change without any functional
change. But this allows to set the remote encapsulation port
in a more detailed way, which will be provided in a follow-up
commit.

MFC after: 1 week

8 years agoANSIfy fdescfs(5)
emaste [Sat, 30 Apr 2016 12:44:03 +0000 (12:44 +0000)]
ANSIfy fdescfs(5)

8 years agoUpdate from subversion 1.9.2 to 1.9.4.
dim [Sat, 30 Apr 2016 10:35:42 +0000 (10:35 +0000)]
Update from subversion 1.9.2 to 1.9.4.

This contains only bug fixes, no new features.  The repository format is
also unchanged from 1.9.2.  Full list of changes between 1.9.4 and
earlier versions:

  https://svn.apache.org/repos/asf/subversion/tags/1.9.4/CHANGES

Note that the two security issues fixed in 1.9.4 (CVE-2016-2167 and
CVE-2016-2168) do not affect the version of Subversion in the FreeBSD
base system, since neither SASL nor Apache modules are enabled.

Relnotes: yes
MFC after: 2 weeks

8 years agoMake SERVERS REQUIRE clean when MK_KERBEROS==no
ngie [Sat, 30 Apr 2016 09:50:08 +0000 (09:50 +0000)]
Make SERVERS REQUIRE clean when MK_KERBEROS==no

Make kdc run BEFORE SERVERS instead of being REQUIREd by SERVERS,
so systems that pedantically check REQUIREs function after r270782

MFC after: 1 week
X-MFC with: r270782
Sponsored by: EMC / Isilon Storage Division

8 years agoDon't leak PML4 in _amd64_initvtop(..) if kvm_read2(..) fails
ngie [Sat, 30 Apr 2016 09:32:19 +0000 (09:32 +0000)]
Don't leak PML4 in _amd64_initvtop(..) if kvm_read2(..) fails

MFC after: 1 week
Reported by: Coverity
CID: 1341474
Sponsored by: EMC / Isilon Storage Division

8 years agoRemove a -Wunused-but-set-variable variable -- `pa`
ngie [Sat, 30 Apr 2016 09:31:01 +0000 (09:31 +0000)]
Remove a -Wunused-but-set-variable variable -- `pa`

Reported by: gcc 5.x
Sponsored by: EMC / Isilon Storage Division

8 years agoRemove kvm_getfiles(3)
ngie [Sat, 30 Apr 2016 09:21:13 +0000 (09:21 +0000)]
Remove kvm_getfiles(3)

This libcall has been broken since (at least) r174989/8.0-RELEASE.

Bump SHLIB_MAJOR for the change

Differential Revision: https://reviews.freebsd.org/D6052
Relnotes: yes
Reviewed by: jhb, markj
Sponsored by: EMC / Isilon Storage Division

8 years agoFix memory allocation edgecases in kvm_argv(..)
ngie [Sat, 30 Apr 2016 09:13:26 +0000 (09:13 +0000)]
Fix memory allocation edgecases in kvm_argv(..)

- Don't leak nbufp on realloc failure in kvm_argv
- Catch malloc errors with bufp
- Set buflen last in the "buflen == 0" case to ensure that
  bufp/nbufp is properly reallocated on the next go around

Differential Revision: https://reviews.freebsd.org/D6051
MFC after: 1 week
Reviewed by: jhb, markj
Reported by: cppcheck
Sponsored by: EMC / Isilon Storage Division

8 years agoRevert AccessWidth/BitOffset support for AcpiHwWrite() and AcpiHwRead() for
jkim [Sat, 30 Apr 2016 06:48:48 +0000 (06:48 +0000)]
Revert AccessWidth/BitOffset support for AcpiHwWrite() and AcpiHwRead() for
now.  The following upstream commits are reverted from hwregs.c:

https://github.com/acpica/acpica/commit/96ece05
https://github.com/acpica/acpica/commit/3d8583a
https://github.com/acpica/acpica/commit/48eea5e
https://github.com/acpica/acpica/commit/0a212c3
https://github.com/acpica/acpica/commit/41f6aef
https://github.com/acpica/acpica/commit/26434b9
https://github.com/acpica/acpica/commit/c23034a
https://github.com/acpica/acpica/commit/c49a751

Note this commit will be reverted when the upstream fixes the code properly.

8 years agoAdd sdiff test directory to the tests mtree
bapt [Sat, 30 Apr 2016 06:37:32 +0000 (06:37 +0000)]
Add sdiff test directory to the tests mtree

8 years agoboot/forth: spelling fixes.
pfg [Sat, 30 Apr 2016 02:47:41 +0000 (02:47 +0000)]
boot/forth: spelling fixes.

Reviewed by: dteske
MFC after: 2 weeks

8 years agolibc: spelling fixes.
pfg [Sat, 30 Apr 2016 01:24:24 +0000 (01:24 +0000)]
libc: spelling fixes.

Mostly on comments.

8 years agosys/compat/linux*: spelling fixes.
pfg [Sat, 30 Apr 2016 00:53:10 +0000 (00:53 +0000)]
sys/compat/linux*: spelling fixes.

Mostly on comments but there are some user-visible messages as well.

MFC after: 2 weeks

8 years agondis: spelling fixes in comments.
pfg [Sat, 30 Apr 2016 00:35:46 +0000 (00:35 +0000)]
ndis: spelling fixes in comments.

No functional change.

8 years agox86bios: spelling fix in a comment.
pfg [Sat, 30 Apr 2016 00:34:04 +0000 (00:34 +0000)]
x86bios: spelling fix in a comment.

No functional change.

8 years agosys/boot: spelling fixes in comments.
pfg [Sat, 30 Apr 2016 00:26:38 +0000 (00:26 +0000)]
sys/boot: spelling fixes in comments.

No functional change.

8 years agoAdd PCI_IOV to NOTES.
jhb [Fri, 29 Apr 2016 23:55:22 +0000 (23:55 +0000)]
Add PCI_IOV to NOTES.

8 years agoMove 'device pci' for the PCI bus driver to the MI NOTES file.
jhb [Fri, 29 Apr 2016 23:53:55 +0000 (23:53 +0000)]
Move 'device pci' for the PCI bus driver to the MI NOTES file.

The PCI bus was already listed in all of the MD NOTES files and the
driver should at least compile on all platforms.

8 years agoimport sdiff(1) from GSoC 2012
bapt [Fri, 29 Apr 2016 23:27:15 +0000 (23:27 +0000)]
import sdiff(1) from GSoC 2012

Import sdiff(1) from the diff version written by Raymond Lai,
improved during GSoC 2012 by Jesse Hagewood.

Compared to the version done in during that summer of code:
- Remove the zlib frontend: zsdiff
- Compatible output (column size and separators) with GNU sdiff

Compared to GNU sdiff in ports:
- The only difference is padding using spaces vs tabs

Compared to OpenBSD and NetBSD import:
- Implement missing options (including long options) from GNU sdiff
- Improved support for the edition mode (signal handling)
- Output visually compatible with GNU sdiff: size of columns

While here import regression tests from NetBSD adapted to fit the output as
expected by GNU sdiff

Reviewed by: emaste (in part)
Obtained from: OpenBSD, NetBSD, GSoC 2012
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D5981
Differential Revision: https://reviews.freebsd.org/D6032 (diff with NetBSD version)
Differential Revision: https://reviews.freebsd.org/D6033 (diff with OpenBSD version)

8 years agowpi: convert to ieee80211_add_channel() (mostly noop).
avos [Fri, 29 Apr 2016 22:43:11 +0000 (22:43 +0000)]
wpi: convert to ieee80211_add_channel() (mostly noop).

Tested with Intel 3945BG, STA / HOSTAP modes.

8 years agoAdd FDT overlays support to ubldr
gonzo [Fri, 29 Apr 2016 22:42:59 +0000 (22:42 +0000)]
Add FDT overlays support to ubldr

FDT overlays is de-facto standard for describing expansion boards like
Beaglebone capes or Raspberry Pi shields. The ides is to have basic
DTB for base board and overlays DTB for shields/capes and to construct
final DTB either using human-readable configuration or some
self-discovery mechanism. I believe this approach can also be expanded
to support dynamically loadable FPGA bitstreams on systems like
Zedboard/Zybo.

Overlaying process is simmilar to executable link process for
binaries: each DTB has "exported" symbols and "undefined" symbols, the
latter are resolved using information for the former obtained from
base DTB or one of the overlays applied earlier (more rare case).

This symbols information is not generated by standard dtc that FreeBSD
has in base system, patched[1] version required to produces
overlay-compatible blobs. So although DTB files generated by
buildkernel do not support overlays there are enough
vendor/community-provided DTB blobs ciruclating around to justify
committing this change to ubldr.

This commit introduces handler for "fdt_overlays" variable that can be
defined either as a loader env variable or U-Boot env variable.
fdt_overlays is comma-separated list of .dtbo files located in
/boot/dtb/ directory along with base .dtb. ubldr loads files and
applies them one-by-one to base .dtb and then passes result blob to
the kernel.

[1] https://github.com/RobertCNelson/dtc/commit/dd6a0533e846e8d5e690a618fa35cc15a6103efb

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

8 years agoRemove vestiges of IEEE-488/GPIB drivers removed in r276214.
jhb [Fri, 29 Apr 2016 22:29:33 +0000 (22:29 +0000)]
Remove vestiges of IEEE-488/GPIB drivers removed in r276214.

8 years agosys/kern: spelling fixes in comments.
pfg [Fri, 29 Apr 2016 22:15:33 +0000 (22:15 +0000)]
sys/kern: spelling fixes in comments.

No functional change.

8 years agonet80211 + drivers: hide size of 'bands' array behind a macro.
avos [Fri, 29 Apr 2016 22:14:11 +0000 (22:14 +0000)]
net80211 + drivers: hide size of 'bands' array behind a macro.

Auto-replace 'howmany(IEEE80211_MODE_MAX, 8)' with 'IEEE80211_MODE_BYTES'.
No functional changes.

8 years agosys/kern: spelling fixes.
pfg [Fri, 29 Apr 2016 21:54:28 +0000 (21:54 +0000)]
sys/kern: spelling fixes.

Mostly on comments but affects some debug messages.

MFC after: 2 weeks

8 years agoSet txbuf_map array size to TX_DESC_COUNT instead of RX_DESC_COUNT.
jmcneill [Fri, 29 Apr 2016 21:46:43 +0000 (21:46 +0000)]
Set txbuf_map array size to TX_DESC_COUNT instead of RX_DESC_COUNT.

8 years agowpi: remove unused variable.
avos [Fri, 29 Apr 2016 21:38:36 +0000 (21:38 +0000)]
wpi: remove unused variable.

8 years agoFix a use-after-free when "zpool import" fails
asomers [Fri, 29 Apr 2016 21:29:37 +0000 (21:29 +0000)]
Fix a use-after-free when "zpool import" fails

clear vd->vdev_tsd in vdev_geom_close_locked instead of vdev_geom_detach.
In the latter function, it would fail to happen in certain circumstances
where cp->private was unset.  Ideally, the latter should never happen, but
it can happen when vdev open fails, or where spares are involved.

MFC after: 4 weeks
X-MFC-With: 298786
Sponsored by: Spectra Logic Corp

8 years agosys/netgraph: spelling fixes in comments.
pfg [Fri, 29 Apr 2016 21:25:05 +0000 (21:25 +0000)]
sys/netgraph: spelling fixes in comments.

No functional change.

8 years agonet80211: provide a set of ieee80211_add_channel*() functions
avos [Fri, 29 Apr 2016 21:18:14 +0000 (21:18 +0000)]
net80211: provide a set of ieee80211_add_channel*() functions

This change adds few methods for net80211 channel table setup:

- ieee80211_add_channel()
- ieee80211_add_channel_ht40()
(primarily for drivers, that parse EEPROM to get channel list -
they will allow to hide implementation details).

- ieee80211_add_channel_list_2ghz()
- ieee80211_add_channel_list_5ghz()
(mostly as a replacement for ieee80211_init_channels() - they will allow
to specify non-default channel list; may be used in ic_getradiocaps()).

Tested with wpi(4) (add_channel) and rum(4) (add_channel_list_2ghz).

Reviewed by: adrian
Differential Revision: https://reviews.freebsd.org/D6124

8 years agoAutomate the subr_unit test.
asomers [Fri, 29 Apr 2016 21:11:31 +0000 (21:11 +0000)]
Automate the subr_unit test.

Build and install the subr_unit test program originally written by phk, and
run it with the other ATF tests.

tests/sys/kern/Makefile
* Build and install the subr_unit test as a plain test

sys/kern/subr_unit.c
* Reduce the default number of repetitions from 100 to 1, and add a
  command-line parser to override it.
* Don't be so noisy by default
* Fix an include problem for the test build

Reviewed by: ngie
MFC after: 4 weeks
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D6038

8 years agosys/cam: spelling fixes in comments.
pfg [Fri, 29 Apr 2016 21:05:48 +0000 (21:05 +0000)]
sys/cam: spelling fixes in comments.

No functional change.

8 years agosys/cam: spelling fixes.
pfg [Fri, 29 Apr 2016 21:04:06 +0000 (21:04 +0000)]
sys/cam: spelling fixes.

Affects a debug message.

MFC after: 2 weeks

8 years agosys/geom: spelling fixes in comments.
pfg [Fri, 29 Apr 2016 20:56:58 +0000 (20:56 +0000)]
sys/geom: spelling fixes in comments.

No functional change.

8 years agosys/ddb: spelling fixes in comments.
pfg [Fri, 29 Apr 2016 20:53:39 +0000 (20:53 +0000)]
sys/ddb: spelling fixes in comments.

No functional change.

8 years agosys/fs: spelling fixes in comments.
pfg [Fri, 29 Apr 2016 20:51:24 +0000 (20:51 +0000)]
sys/fs: spelling fixes in comments.

No functional change.

8 years agofs/ext2fs: spelling fixes on comment.
pfg [Fri, 29 Apr 2016 20:45:50 +0000 (20:45 +0000)]
fs/ext2fs: spelling fixes on comment.

No functional change.

8 years agoUFS: spelling fixes on comments.
pfg [Fri, 29 Apr 2016 20:43:51 +0000 (20:43 +0000)]
UFS: spelling fixes on comments.

No functional change.

8 years agoDon't assign, just compare...
tuexen [Fri, 29 Apr 2016 20:33:20 +0000 (20:33 +0000)]
Don't assign, just compare...

8 years agoAdd driver for AM33xx SoC touchscreen
gonzo [Fri, 29 Apr 2016 20:31:49 +0000 (20:31 +0000)]
Add driver for AM33xx SoC touchscreen

Split ADC driver in two halves: ADC(analog ot digital) and
TSC(touchscreen). Touchscreen driver is fully functional
up to the point of reporting samples. This part will be added
once FreeBSD has API for touchscreen.

Tested on: Beaglebone Black + 4DCAPE-43T
Reviewed by: loos
Differential Revision: https://reviews.freebsd.org/D5847

8 years agox86bios_alloc(): Unsign a counter.
pfg [Fri, 29 Apr 2016 20:22:10 +0000 (20:22 +0000)]
x86bios_alloc(): Unsign a counter.

The value can't even be signed so we can avoid the signed vs. unsigned
comparison.

Reviewed by: jkim

8 years agoAdd support for handling ICMP and ICMP6 messages sent in response
tuexen [Fri, 29 Apr 2016 20:22:01 +0000 (20:22 +0000)]
Add support for handling ICMP and ICMP6 messages sent in response
to SCTP/UDP/IP and SCTP/UDP/IPv6 packets.

8 years agoUse correct order of source and destination address and port.
tuexen [Fri, 29 Apr 2016 20:13:35 +0000 (20:13 +0000)]
Use correct order of source and destination address and port.

8 years agoExpose soaio_enqueue().
jhb [Fri, 29 Apr 2016 20:12:45 +0000 (20:12 +0000)]
Expose soaio_enqueue().

This can be used by protocol-specific AIO handlers to queue work to the
socket AIO daemon pool.

Sponsored by: Chelsio Communications

8 years agoIntroduce a new protocol hook pru_aio_queue.
jhb [Fri, 29 Apr 2016 20:11:09 +0000 (20:11 +0000)]
Introduce a new protocol hook pru_aio_queue.

This allows a protocol to claim individual AIO requests instead of using
the default socket AIO handling.

Sponsored by: Chelsio Communications

8 years agoThe iwm_nic_error() defined if IWM_DEBUG is defined.
dchagin [Fri, 29 Apr 2016 19:10:22 +0000 (19:10 +0000)]
The iwm_nic_error() defined if IWM_DEBUG is defined.

8 years ago[ath] initialise do_ldpc to 0.
adrian [Fri, 29 Apr 2016 18:53:16 +0000 (18:53 +0000)]
[ath] initialise do_ldpc to 0.

I .. can't believe I missed this.

This showed up because the AP was TX'ing LDPC to an iwm(4) chipset,
which didn't advertise LDPC and doesn't /accept/ LDPC.  Amusingly, all
the two other FreeBSD 11n parts I had tested with (AR9380, Intel 7260)
and I completely forgot to test on ye olde hardware.

That'll teach me.

Tested:

* AR9580 (AP) - Intel 7260 (STA), AR9380 (STA), Intel 6205 (STA)

8 years agoPRINT_BUF_FLAGS: Remove removed DIRTY/PERSIST flags
cem [Fri, 29 Apr 2016 17:56:16 +0000 (17:56 +0000)]
PRINT_BUF_FLAGS: Remove removed DIRTY/PERSIST flags

This is a follow-up to r298789, which removed the B_DIRTY and B_PERSISTENT
flags.  This changeset removes them from the associated %b bit description
string as well.

Reviewed by: pfg
Sponsored by: EMC / Isilon Storage Division