Adrian Chadd [Wed, 1 Jun 2016 03:27:33 +0000 (03:27 +0000)]
[ath_hal] add MCI bits from ath9k for QCA9565
* Add extra debugging - the weights debugging is really useful to ensure
things are programmed into the wlan coexistence table. The weights are
what traffic priority each of the various modes get (tx, tx-high-priority,
rx-beacon, etc) if they're all zero, things work very poorly.
* Add in coex init routines from ath9k for AR9462 and QCA9565 1ANT and 2ANT.
This control things like beacon stomping, ACK handling, antennas, PA/LNA
shared, etc.
* Some ancillary bits.
TODO:
* There's some conditional stuff around MCI_ANT_ARCH_PA_LNA_SHARED() in ath9k
which doesn't always enable force-on LNA. That'll have to be examined
and merged in as appropriate.
Adrian Chadd [Wed, 1 Jun 2016 03:20:55 +0000 (03:20 +0000)]
[ath_hal] add QCA9565 bluteooth antenna control.
This configures the LNA antenna diversity control, which should be on
if wlan owns the LNA for bluetooth coexistence. Otherwise, make sure
it's off.
I think this is eventually intended to allow 1-antenna bluetooth +
wifi setups for QCA9565, but I'm not sure where that's actually configured
in ath9k.
Mark Johnston [Wed, 1 Jun 2016 02:30:06 +0000 (02:30 +0000)]
mkimg: Indicate that input file pages are unlikely to be reused.
mkimg(1) uses a swap file to back input file chunks. When the output file
is being written out, blocks of the swap file are mapped and their contents
copied. This causes the backing VM pages to enter the active queue, and when
the output file is large relative to system memory (as is generally the
case), can result in a shortfall of inactive memory. This causes the
pagedaemon to aggressively scan the active queue and swap out process
memory in an attempt to meet the shortfall. Because mkimg's input files
are typically the intermediate result of some build process, there's no
need to push them all through the active queue. Use madvise(2) to indicate
that the backing pages may be reclaimed in preference to active pages. In
the case of the swap file, these pages will be freed as soon as mkimg
exits anyway.
When using mkimg on a desktop-class system with large amounts of dirty
process memory, this change substantially improves mkimg runtime and
reduces swap usage.
Bryan Drewery [Tue, 31 May 2016 22:37:11 +0000 (22:37 +0000)]
WITH_META_MODE: Require filemon(4) be loaded.
Since META_MODE is being sold and used as a working incremental build, it won't
make much sense if filemon data is excluded. There is no way to recover
from that in a subsequent build.
Ed Schouten [Tue, 31 May 2016 19:05:41 +0000 (19:05 +0000)]
Improve POSIX conformance of <signal.h>.
- This header file has always depended on pthread_t, pthread_attr_t,
struct timespec, size_t and uid_t. Only as of POSIX 2008, these
dependencies have been states explicitly. They should now be defined.
- In our implementation, struct sigevent::sigev_notify_attributes has
type "void *" instead of "pthread_attr_t *". My guess is that this was
done to prevent pulling in the pthread types, but this can easily be
avoided by using the underlying structure types.
Andrew Turner [Tue, 31 May 2016 18:45:52 +0000 (18:45 +0000)]
Allow the kernel to boot on a CPU where the devicetree has numbered it with
a non-zero ID. To do this we increment the cpuid of any CPUs with a smaller
devicetree ID by one to stop them conflicting with the boot CPU.
Obtained from: ABT Systems Ltd
Sponsored by: The FreeBSD Foundation
Allan Jude [Tue, 31 May 2016 17:30:08 +0000 (17:30 +0000)]
ifconfig(8) now supports some output formatting options
specified by the -f flag or IFCONFIG_FORMAT environment variable, the user
can request that inet4 subnet masks be printed in CIDR or dotted-quad
notation, in addition to the traditional hex output.
inet6 prefixes can be printed in CIDR as well.
For more documentation see the ifconfig(8) man page.
Add support for simplex USB MIDI devices, which only provide BULK or
INTERRUPT endpoints for moving data in one direction, like the KeyRig
49 from M-Audio.
Requested by: Ivan Klymenko <fidaj@ukr.net>
MFC after: 1 week
Ed Schouten [Tue, 31 May 2016 13:32:33 +0000 (13:32 +0000)]
Make CMSG_*() work without having NULL available.
The <sys/socket.h> is not supposed to declare NULL, according to POSIX.
Our implementation complies with that, meaning that we need to make sure
that CMSG_*() doesn't use it.
Ed Schouten [Tue, 31 May 2016 13:31:19 +0000 (13:31 +0000)]
Implement _ALIGN() using internal integer types.
The existing version depends on register_t and uintptr_t, which are only
available when including headers such as <sys/types.h>. As this macro is
used by <sys/socket.h>, for example, it should be written in such a way
that it doesn't depend on those types.
Add "iscsictl -e". Among other things, it makes it possible to perform
discovery without attaching to the targets ("iscsictl -Ad ... -e off"),
and then attach to selected ones ("iscsictl -Mi ... -e on").
PR: 204129
MFC after: 1 month
Relnotes: yes
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D6633
Andrew Turner [Tue, 31 May 2016 09:15:21 +0000 (09:15 +0000)]
Mark the ThunderX and generic PCI drivers as cache-coherent when we know
this to be the case. This will mean we don't try and handle the cache in
bus_dmamap_sync when it is not needed.
Obtained from: ABT Systems Ltd
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D6605
Ed Schouten [Tue, 31 May 2016 08:38:24 +0000 (08:38 +0000)]
Add missing dependency on <machine/_limits.h>.
In r227474, this header file was changed to define SIG_ATOMIC_{MIN,MAX}
in terms of LONG_{MIN,MAX}. Unlike all of the definitions in this header
file, LONG_{MIN,MAX} is provided by <limits.h>. Remove the dependency on
<limits.h> by using __LONG_{MIN,MAX} instead and including
<machine/_limits.h>.
This change is needed to make SIG_ATOMIC_{MIN,MAX} work without
including any other header files.
Ed Schouten [Tue, 31 May 2016 08:36:39 +0000 (08:36 +0000)]
Add missing dependency on <machine/_limits.h>.
This header uses __INT_MIN and __INT_MAX, which is provided by
<machine/_limits.h>. This is needed to make <stdint.h>'s WCHAR_MIN and
WCHAR_MAX work without including other headers as well.
Ed Schouten [Tue, 31 May 2016 08:07:40 +0000 (08:07 +0000)]
Let <sched.h> define struct timespec.
POSIX 2004 doesn't require that this header defines struct timespec, but
does allow it. For FreeBSD, we would at least need a forward declaration
for sched_rr_get_interval().
POSIX 2008 is a bit more demanding, as it now requires that it is
declared. Remove the old forward declaration and include the _timespec.h
header. This should conform to both POSIX 2004 and 2008 now.
Ed Schouten [Tue, 31 May 2016 06:45:19 +0000 (06:45 +0000)]
Stop using the non-standard basename_r() function.
This change makes the code use the POSIX basename() function. It has the
advantage that (if implemented correctly), it also imposes no restrict
on the pathname length.
Notice that I haven't added any error handling to the strdup() call. It
looks like none of the other calls to strdup() and malloc() performed by
this utility do it either.
Allan Jude [Tue, 31 May 2016 04:12:14 +0000 (04:12 +0000)]
Connect the SHA-512t256 and Skein hashing algorithms to ZFS
Support for the new hashing algorithms in ZFS was introduced in r289422
However it was disconnected because FreeBSD lacked implementations of
SHA-512 (truncated to 256 bits), and Skein.
These implementations were introduced in r300921 and r300966 respectively
This commit connects them to ZFS and enabled these new checksum algorithms
This new algorithms are not supported by the boot blocks, so do not use them
on your root dataset if you boot from ZFS.
Ed Maste [Mon, 30 May 2016 20:51:51 +0000 (20:51 +0000)]
Add and correct MIPS relocation types
The correct names for R_MIPS_GOT_HI16 and R_MIPS_GOT_LO16 have a _
after GOT. The nonstandard names (R_MIPS_GOTHI16, R_MIPS_GOTLO16) in the
FreeBSD elf_common.h header also had incorrect values and were not used
in the tree, so just remove them.
Add other MIPS relocation types found in FreeBSD/mips64 object files.
Pedro F. Giffuni [Mon, 30 May 2016 20:41:55 +0000 (20:41 +0000)]
keyserv(1): drop useless comparison.
Comparing a character array against NULL serves no purpose. In any case
we are always asigning a value just before using the value so obviate
the comparison altogether.
Enji Cooper [Mon, 30 May 2016 19:59:51 +0000 (19:59 +0000)]
Fix circular dependency created after r287197 between ldconfig and mountcritremote
ldconfig is already required by mountcritremote indirectly, as noted by rcorder:
> rcorder: Circular dependency on provision `mountcritremote' in file `ldconfig'.
Having mountcritremote REQUIRE ldconfig breaks dependency ordering.
Making the ldconfig hints be conditionally regenerated from mountcritremote when
remote filesystems are mounted is done after this change, similar to cleanvar
being conditionally called after the change.
Ed Schouten [Mon, 30 May 2016 16:52:23 +0000 (16:52 +0000)]
Let dbm's datum::dptr use the right type.
According to POSIX, it should use void *, not char *. Unfortunately, the
dsize field also has the wrong type. It should be size_t. I'm not going
to change that, as that will break the ABI.
Ed Schouten [Mon, 30 May 2016 13:51:27 +0000 (13:51 +0000)]
Fix the signature of the psignal() function.
POSIX 2008 added the psignal() function which has already been part of
the BSDs for a long time. The only difference is, the POSIX version uses
an 'int' for the signal number, unlike our version which uses an
'unsigned int'. Fix up the function to use an 'int'. This should not
affect the ABI.
Ed Schouten [Mon, 30 May 2016 13:37:11 +0000 (13:37 +0000)]
Add missing types and constants to <netdb.h>.
According to POSIX, the netdb.h header must also provide in_addr_t and
in_port_t. It should also provide IPPORT_RESERVED. Copy over the
necessary bits from <netinet/in.h> to achieve that.
Michael Gmelin [Mon, 30 May 2016 09:05:24 +0000 (09:05 +0000)]
Fix ig4 operation for certain machines
Some machine BIOSes use the I2C bus and leave it in a state that causes
interrupts to not work properly due to a pending interrupt having been
latched.
Refactor the code a bit to clear pending interrupts when I2C is enabled.
This fixes the primary problem.
Also fix a possible race condition in the interrupt handler where the
interrupt was being cleared after reading the status instead of before.