bapt [Sat, 4 Jun 2016 14:57:25 +0000 (14:57 +0000)]
Import libucl snapshot
20160604
It replaces xxhash with mumhash
It fixes issues with msgpack on non x86
bapt [Sat, 4 Jun 2016 14:50:12 +0000 (14:50 +0000)]
Update libucl to
20160604 snapshot
arybchik [Sat, 4 Jun 2016 09:20:46 +0000 (09:20 +0000)]
sfxge(4): always be ready to receive batched events
When the low-latency firmware variant is running, it is reported as not
being capable of batching RX events, but it can still do so if the
FORCE_EV_MERGING flag is set on an RXQ. Therefore we need to handle
batched RX events even if the capability isn't set.
If this bug is fixed in the firmware such that the capability is set
even when running the low-latency firmware variant, it will almost
always be reported so I don't think we lose much by removing the check.
Submitted by: Mark Spender <mspender at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D6705
arybchik [Sat, 4 Jun 2016 09:17:45 +0000 (09:17 +0000)]
sfxge(4): add helper to compute timer quantum
This also adjusts the timer values used to match the Linux net
driver implementation:
a) non-zero time intervals should result in at least one quantum
b) timer load/reload values are only zero biased for Falcon/Siena
Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D6704
adrian [Sat, 4 Jun 2016 08:56:30 +0000 (08:56 +0000)]
[ath] remove now unused parameters.
These will move to being part of the driver btcoex stuff I'm working
on, since the HAL doesn't know what to do with them.
andrew [Sat, 4 Jun 2016 08:47:45 +0000 (08:47 +0000)]
Use the UEFI event timer to update the time on arm and arm64. The current
code uses the GetTime function from the Runtime Service, however this has
been shown to not return a useable time on many arm64 UEFI implementations.
Reviewed by: jhb, smh
Sponsored by: ABT Systems Ltd
Differential Revision: https://reviews.freebsd.org/D6709
adrian [Sat, 4 Jun 2016 07:29:10 +0000 (07:29 +0000)]
[ath_hal] add STOMP_AUDIO for AR9462/QCA9565.
Obtained from: Linux ath9k
adrian [Sat, 4 Jun 2016 07:28:36 +0000 (07:28 +0000)]
[ath_hal] add placeholders for AUDIO stomp for Kite/Kiwi.
It just stomps all; which is enough for some testing.
adrian [Sat, 4 Jun 2016 07:28:09 +0000 (07:28 +0000)]
[ath_hal] add BTCOEX_STOMP_AUDIO; delete unused methods.
adrian [Sat, 4 Jun 2016 07:18:39 +0000 (07:18 +0000)]
[run] fix TSF locking in RX radiotap.
Submitted by: Imre Vadasz <imre@vdsz.com>
cem [Sat, 4 Jun 2016 04:14:06 +0000 (04:14 +0000)]
ioat(4): Always log capabilities on attach
Different, relatively recent Intel Xeon hardware support radically different
features. E.g., BDX support CRC32 while BDX-DE does not.
Reviewed by: rpokala (spiritually)
Sponsored by: EMC / Isilon Storage Division
cem [Sat, 4 Jun 2016 03:54:30 +0000 (03:54 +0000)]
ioat(4): Export the number of available channels
Sponsored by: EMC / Isilon Storage Division
cem [Sat, 4 Jun 2016 03:52:19 +0000 (03:52 +0000)]
ioat(4): Make channel indices unsigned
Sponsored by: EMC / Isilon Storage Division
cy [Sat, 4 Jun 2016 01:01:46 +0000 (01:01 +0000)]
Enable daily_ntpd_leapfile_enable by default. Otherwise an expired
leapfile will be ignored and ntpd will behave as if it has no
leapfile.
While here, remove an extraneous blank line.
Suggested by: ache
MFC after: 1 week
mav [Sat, 4 Jun 2016 00:18:59 +0000 (00:18 +0000)]
When negotiating NTB_SB01BASE_LOCKUP workaround, don't try to limit the
BAR size to 1MB. According to Xeon v3 specifications and my tests, that
size register is write-once and so not writeable after BIOS written it.
Instead of that, make the code work with BAR of any sufficient size,
properly calculating offset within its base. It also simplifies the code.
Discussed with: cem
MFC after: 2 weeks
Sponsored by: iXsystems, Inc.
mav [Sat, 4 Jun 2016 00:08:37 +0000 (00:08 +0000)]
When negotiating MSIX parameters, give other head time to see our
NTB_MSIX_RECEIVED status, before making upper layers overwrite it.
This is not completely perfect, but now it works better then before.
MFC after: 2 weeks
Sponsored by: iXsystems, Inc.
pfg [Fri, 3 Jun 2016 21:37:24 +0000 (21:37 +0000)]
libiberty: prevent integer overflow.
Take care of very old bug leading to heap-buffer overflow by
processing certain file headers via bfd binary.
PR: 200888
Obtained from: OpenBSD
MFC after: 2 weeks
bdrewery [Fri, 3 Jun 2016 21:35:19 +0000 (21:35 +0000)]
WITH_META_MODE: Avoid "building" .depend if there is nothing to do.
This avoids 'Building /path/.depend' when it will not actually produce a
file.
Sponsored by: EMC / Isilon Storage Division
pfg [Fri, 3 Jun 2016 21:23:11 +0000 (21:23 +0000)]
MFV r300961:
one-true-awk: replace 0 with NULL for pointers
Also remove a redundant semicolon.
pfg [Fri, 3 Jun 2016 21:11:34 +0000 (21:11 +0000)]
tegra124: use roundup/rounddown macros from <sys/param.h>.
bdrewery [Fri, 3 Jun 2016 20:49:49 +0000 (20:49 +0000)]
WITHOUT_CROSS_COMPILER: Fix installworld.
Since no WORLDTMP/usr/bin/cc is created, cc cannot be found
during installworld time since /usr/bin is not in the PATH.
Pass along the known compiler metadata to allow installworld
to work. The same fix was used for WITH_SYSTEM_COMPILER.
A better route would be to store a cookie in buildworld
containing this compiler metadata and then using that
at install time, rather than rerunning cc.
Reported by: Mark Millard
Sponsored by: EMC / Isilon Storage Division
bdrewery [Fri, 3 Jun 2016 19:25:45 +0000 (19:25 +0000)]
WITH_CCACHE_BUILD + WITH_META_MODE: Ignore ccache changes.
Ccache will not affect the output of the objects, so just ignore it for
meta mode handling. This avoids having everything rebuild if ccache is
updated.
Sponsored by: EMC / Isilon Storage Division
bdrewery [Fri, 3 Jun 2016 19:25:41 +0000 (19:25 +0000)]
WITH_META_MODE: Don't expect meta files for side-effect generated files.
The first file in these lists will generate everything else so only
it should be getting a .meta file. With bmake's missing=yes meta
feature these would otherwise cause a rebuild without the
.NOMETA hint.
Sponsored by: EMC / Isilon Storage Division
bdrewery [Fri, 3 Jun 2016 19:25:36 +0000 (19:25 +0000)]
Revert r301079.
This breaks cross-building with WITH_META_MODE since it will rebuild
'build-tools' during the 'everything' phase.
A more proper fix is coming to bmake to implicitly require .META unless
.NOMETA (and other restrictions) are in place.
bdrewery [Fri, 3 Jun 2016 19:25:30 +0000 (19:25 +0000)]
DIRDEPS_BUILD: Connect new directories and update dependencies.
Sponsored by: EMC / Isilon Storage Division
zbb [Fri, 3 Jun 2016 18:54:16 +0000 (18:54 +0000)]
Use proper interface for FDT parsing and memory mapping in CESA
Improvements after r301220.
Bus space methods are not called so simple pmap_mapdev will suffice.
Use OF_getencprop to get buffer with already converted endianess.
Pointed out by: ian
Submitted by: Michal Stanek <mst@semihalf.com>
Obtained from: Semihalf
zbb [Fri, 3 Jun 2016 18:52:57 +0000 (18:52 +0000)]
Use nitems() macro instead of re-inventing it
Fixed after r301221.
Pointed out by: oshogbo
Submitted by: Michal Stanek <mst@semihalf.com>
Obtained from: Semihalf
garga [Fri, 3 Jun 2016 18:37:56 +0000 (18:37 +0000)]
One of the already implemented options in release/Makefile is NOSRC. When
it's defined, installation image is shipped without source distribution
(src.txz)
Add the hability of defining NOSRC in release.conf and pass it to
'make release' argument
Approved by: gjb
Sponsored by: Rubicon Communications (Netgate)
Differential Revision: https://reviews.freebsd.org/D6710
kib [Fri, 3 Jun 2016 18:23:45 +0000 (18:23 +0000)]
Trim some spaces to record correct commit message for the r301278.
Reduce number of iterations used for calibrating ICR read loop. The
new number of iteration still gives the same ICR latency as before,
tested on Intel SandyBridge and Haswell machines, and on AMD. But it
significantly reduces the unneeded pause on boot in some VMs, from ~10
secs to less then 1 sec. It was reported to occur in bhyve on AMD
host.
Reported and tested by: avg
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
kib [Fri, 3 Jun 2016 18:05:18 +0000 (18:05 +0000)]
diff --git a/sys/x86/x86/local_apic.c b/sys/x86/x86/local_apic.c
index d8bda77..bb15df0 100644
--- a/sys/x86/x86/local_apic.c
+++ b/sys/x86/x86/local_apic.c
@@ -511,7 +511,7 @@ native_lapic_init(vm_paddr_t addr)
}
#ifdef SMP
-#define LOOPS 1000000
+#define LOOPS 100000
/*
* Calibrate the busy loop waiting for IPI ack in xAPIC mode.
* lapic_ipi_wait_mult contains the number of iterations which
dim [Fri, 3 Jun 2016 16:17:36 +0000 (16:17 +0000)]
For clang, move the definition of FREEBSD_CC_VERSION into its own header
file, lib/clang/freebsd_cc_version.h, instead of reusing Version.inc.
The header is only included from one .cpp file in the clang tree.
This minimizes the number of .cpp files that need to be rebuilt if the
version is bumped.
Discussed with: bdrewery
pfg [Fri, 3 Jun 2016 15:33:21 +0000 (15:33 +0000)]
nxge(4): Remove useless self-assignment.
Apparently the original implementation brought a self-assignment
to work around some bogus lint issue that is not relevant anymore.
CID: 1347070
avg [Fri, 3 Jun 2016 14:37:18 +0000 (14:37 +0000)]
zfs: set VROOT / VV_ROOT consistently and in a single place
This is a followup to r300131.
A filesystem's root vnode can be reached not only through VSF_ROOT, but
by other means as well. For example, via a dot-dot lookup.
Also, a root vnode can get reclaimed and then re-created. For these
reasons it was insufficient to clear VV_ROOT flag from a root vnode of a
snapshot mounted under .zfs in zfsctl_snapdir_lookup().
So, now we set the flag in zfs_znode_sa_init() only if a vnode
represent a root of a filesystem or a standalone snapshot.
That is, the flag is not set for snapshots mounted under .zfs.
MFC after: 2 weeks
vangyzen [Fri, 3 Jun 2016 14:30:32 +0000 (14:30 +0000)]
Improve errno documentation in pthread_create(3) and thr_new(2)
Add some missing errno values to thr_new(2) and pthread_create(3).
In particular, EDEADLK was not documented in the latter.
While I'm here, improve some English and cross-references.
Reviewed by: kib
Sponsored by: Dell Inc.
Differential Revision: https://reviews.freebsd.org/D6663
avg [Fri, 3 Jun 2016 14:22:12 +0000 (14:22 +0000)]
zfs_root: fix a potential root vnode reference leak
It could happen in an unlikely case that we fail to lock the root vnode
with requested flags (which appear to never include LK_NOWAIT).
MFC after: 1 week
avg [Fri, 3 Jun 2016 14:09:38 +0000 (14:09 +0000)]
openssl: change SHLIB_VERSION_NUMBER to reflect the reality
Some consumers actually use this definition.
We probably need some procedure to ensure that SHLIB_VERSION_NUMBER
is updated whenever we change the library version in
secure/lib/libssl/Makefile.
bz [Fri, 3 Jun 2016 13:57:10 +0000 (13:57 +0000)]
Introduce a per-VNET flag to enable/disable netisr prcessing on that VNET.
Add accessor functions to toggle the state per VNET.
The base system (vnet0) will always enable itself with the normal
registration. We will share the registered protocol handlers in all
VNETs minimising duplication and management.
Upon disabling netisr processing for a VNET drain the netisr queue from
packets for that VNET.
Update netisr consumers to (de)register on a per-VNET start/teardown using
VNET_SYS(UN)INIT functionality.
The change should be transparent for non-VIMAGE kernels.
Reviewed by: gnn (, hiren)
Obtained from: projects/vnet
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D6691
royger [Fri, 3 Jun 2016 11:39:35 +0000 (11:39 +0000)]
xen-blkback: fix error path on failed attach
The current error path in case of failure during attach/initialization is
not correct and leaves blkback in a stuck state. This is due to blkback
waiting for blkfront to switch to state XenbusStateClosed, but if blkfront
never attached (because the guest is not even started) it cannot possibly
make it to that state.
Instead just wait for the frontend to be in a state different than
XenbusStateConnected in order to proceed with the shutdown. Also, it is
wrong to call xbb_detach directly because it destroys the lock which can
still be used by xbb_frontend_changed.
Sponsored by: Citrix Systems R&D
royger [Fri, 3 Jun 2016 11:38:52 +0000 (11:38 +0000)]
blkback: add support for hotplug scripts
Hotplug scripts are needed in order to use fancy disk configurations in xl,
like iSCSI disks. The job of hotplug scripts is to locally attach the disk
and present it to blkback as a block device or a regular file.
This change introduces a new xenstore node in the blkback hierarchy, called
"physical-device-path". This is a straigh replacement for the "params" node,
which was used before.
Hotplug scripts will need to read the "params" node, perform whatever
actions are necessary and then write the "physical-device-path" node. The
hotplug script is also in charge of detaching the disk once the domain has
been shutdown.
Sponsored by: Citrix Systems R&D
skra [Fri, 3 Jun 2016 11:18:30 +0000 (11:18 +0000)]
Define irq variable only in the block where used.
skra [Fri, 3 Jun 2016 11:05:55 +0000 (11:05 +0000)]
Postpone allocation of IRQ resource to the time when interrupt
controller devices are attached. This has already been done for
bus_setup_intr().
There was no doubt that if someone wants to setup an interrupt,
corresponding interrupt controller device must already be attached.
However, the same must be valid for allocation of an interrupt resource
unless the allocation is done blindly, without any information that
such interrupt even exists. While it was done this blind way before,
it won't be possible after next INTRNG change.
andrew [Fri, 3 Jun 2016 10:28:06 +0000 (10:28 +0000)]
Add the GICv3 ITS intrng driver. As the interface to the interrupt
framework has significantly changed the driver has moved to a new file.
While it shares some code with the existing driver this has been modified
to work better with the intrng framework.
This has been tested on the ThunderX servers in the netperf cluster and has
been used to boot them for other testing, including DTrace and hwpmc.
With this we can use intrng on all supported arm64 platforms I was able to
test on. It is expected we will move to intrng soon, and disable the old
arm64 interrupt framework.
Obtained from: ABT Systems Ltd
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D6437
andrew [Fri, 3 Jun 2016 10:13:18 +0000 (10:13 +0000)]
Add an interface to handle interrupt controllers that have a contiguous
range of interrupts they pass to a second controller driver to handle.
The parent driver is expected to detect when one of these interrupts has
been triggered and call intr_child_irq_handler to pass the interrupt to
a child. The children controllers are then expected to manage the range
by allocating interrupts as needed.
This will initially be used by the ARM GICv3 driver, but is is expected to
be useful for other driver where this type of allocation applies.
Obtained from: ABT Systems Ltd
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D6436
hselasky [Fri, 3 Jun 2016 08:35:07 +0000 (08:35 +0000)]
Use insertion sort instead of bubble sort in TCP LRO.
Replacing the bubble sort with insertion sort gives an 80% reduction
in runtime on average, with randomized keys, for small partitions.
If the keys are pre-sorted, insertion sort runs in linear time, and
even if the keys are reversed, insertion sort is faster than bubble
sort, although not by much.
Update comment describing "tcp_lro_sort()" while at it.
Differential Revision: https://reviews.freebsd.org/D6619
Sponsored by: Mellanox Technologies
Tested by: Netflix
Suggested by: Pieter de Goeje <pieter@degoeje.nl>
Reviewed by: ed, gallatin, gnn, transport
delphij [Fri, 3 Jun 2016 08:19:47 +0000 (08:19 +0000)]
Chase NTP update.
delphij [Fri, 3 Jun 2016 08:00:22 +0000 (08:00 +0000)]
MFV r301238:
ntp 4.2.8p8.
Security: CVE-2016-4957, CVE-2016-4953, CVE-2016-4954
Security: CVE-2016-4955, CVE-2016-4956
Security: FreeBSD-SA-16:24.ntp
With hat: so
tuexen [Fri, 3 Jun 2016 07:43:04 +0000 (07:43 +0000)]
Get struct sctp_net_route in-sync with struct route again.
tuexen [Fri, 3 Jun 2016 07:24:41 +0000 (07:24 +0000)]
Store the peers vtag in host byte order in the cookie, since all
consumers expect it that way.
This fixes the vtag when sending en ERROR chunk.
MFC after: 1 week
lidl [Fri, 3 Jun 2016 07:00:28 +0000 (07:00 +0000)]
Add blacklist support to fingerd
Reviewed by: rpaulo
Approved by: rpaulo
Relnotes: YES
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D5916
lidl [Fri, 3 Jun 2016 06:58:20 +0000 (06:58 +0000)]
Add blacklist support to rshd
Reviewed by: rpaulo
Approved by: rpaulo
Relnotes: YES
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D6594
lidl [Fri, 3 Jun 2016 06:24:03 +0000 (06:24 +0000)]
Add blacklist support to ftpd
Reviewed by: rpaulo
Approved by: rpaulo
Relnotes: YES
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D6703
lidl [Fri, 3 Jun 2016 06:15:52 +0000 (06:15 +0000)]
Add blacklistd.conf manpage
Install the blacklistd.conf man page, missed in the original commit.
Submitted by: Herbert J. Skuhra ( herbert at mailbox.org )
Reviewed by: rpaulo
Approved by: rpaulo
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D6702
delphij [Fri, 3 Jun 2016 05:55:24 +0000 (05:55 +0000)]
Vendor import of ntp-4.2.8p8.
arybchik [Fri, 3 Jun 2016 05:27:34 +0000 (05:27 +0000)]
sfxge(4): support EVQ timer workaround via MCDI
Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/6675
adrian [Fri, 3 Jun 2016 05:01:35 +0000 (05:01 +0000)]
[drm] fix up hex_dump_to_buffer to not overflow linebuf.
That check wasn't enough to handle appending a two byte character
following it.
This prevented my T400 (Intel Core 2 Duo P8400) from attaching;
it would panic from a stack overflow detection.
pfg [Fri, 3 Jun 2016 03:40:39 +0000 (03:40 +0000)]
dhclient(1): correct obvious mismatch in get_char().
Correct switch between current and previous line buffers when
encountering a carriage return in the input.
CID: 1305719
Obtained from: OpenBSD (CVS rev. 1.30)
MFC after: 3 days
gjb [Fri, 3 Jun 2016 00:06:24 +0000 (00:06 +0000)]
Update to ALPHA2 in preparation of a new set of snapshot builds.
Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation
gnn [Thu, 2 Jun 2016 20:53:43 +0000 (20:53 +0000)]
Fix up the Infiniband code to handle the new arpresolve.
bdrewery [Thu, 2 Jun 2016 20:31:02 +0000 (20:31 +0000)]
Remove libstdc++ again.
This was mis-merged in r298107 which missed r289389.
dim [Thu, 2 Jun 2016 19:54:38 +0000 (19:54 +0000)]
Pull in r271548 from upstream llvm trunk (by me):
Only attempt to detect AVG if SSE2 is available
Summary:
In PR29973 Sanjay Patel reported an assertion failure when a certain
loop was optimized, for a target without SSE2 support. It turned out
this was because of the AVG pattern detection introduced in rL253952.
Prevent the assertion failure by bailing out early in
`detectAVGPattern()`, if the target does not support SSE2.
Also add a minimized test case.
Reviewers: congh, eli.friedman, spatel
Subscribers: emaste, llvm-commits
Differential Revision: http://reviews.llvm.org/D20905
This should fix assertion failures ("Requires at least SSE2!") when
building the games/0ad port with CPUTYPE=pentium3.
Reported by: madpilot
lidl [Thu, 2 Jun 2016 19:06:04 +0000 (19:06 +0000)]
Add basic blacklist build support
Reviewed by: rpaulo
Approved by: rpaulo
Relnotes: YES
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D5913
zbb [Thu, 2 Jun 2016 18:41:33 +0000 (18:41 +0000)]
Add support for CESA on Armada38x
Changes:
- added new SoC ID in CESA attach
- allowed crypto driver IDs other than 0
- added CESA nodes to Armada38x .dts files
- enabled required devices in kernconf
Submitted by: Michal Stanek <mst@semihalf.com>
Obtained from: Semihalf
Sponsored by: Stormshield
Differential revision: https://reviews.freebsd.org/D6220
zbb [Thu, 2 Jun 2016 18:39:33 +0000 (18:39 +0000)]
Add HMAC-SHA256 support in CESA
Only HMAC-SHA256 is added as it is the only SHA-2 variant supported by
cryptodev. It is not possible to register hardware support for other
algorithms in the family including regular non-keyed SHA256.
Submitted by: Michal Stanek <mst@semihalf.com>
Obtained from: Semihalf
Sponsored by: Stormshield
Differential revision: https://reviews.freebsd.org/D6219
zbb [Thu, 2 Jun 2016 18:37:50 +0000 (18:37 +0000)]
Truncate HMAC output only if requested by the client
The output of HMAC was previously truncated to 12 bytes. This was only
correct in case of one particular crypto client - the new version of IPSEC.
Fix by taking into account the cri_mlen field in cryptoini session request
filled in by the client.
Submitted by: Michal Stanek <mst@semihalf.com>
Obtained from: Semihalf
Sponsored by: Stormshield
Differential revision: https://reviews.freebsd.org/D6218
zbb [Thu, 2 Jun 2016 18:35:35 +0000 (18:35 +0000)]
Split CESA memory resource into TDMA and CESA regs
TDMA and CESA registers are placed in different ranges of memory. Split
memory resource in DTS to reflect that. This change is needed to support
multiple CESA nodes as otherwise the ranges of different nodes would
overlap.
In consequence, CESA_WRITE and CESA_READ macros have been split depending
on which range of registers is accessed. Offsets for CESA registers have
been modified as the base address has changed.
Submitted by: Michal Stanek <mst@semihalf.com>
Obtained from: Semihalf
Sponsored by: Stormshield
Differential revision: https://reviews.freebsd.org/D6217
zbb [Thu, 2 Jun 2016 18:33:26 +0000 (18:33 +0000)]
Configure CPU window to second CESA SRAM
Check if there is a second CESA SRAM node in FDT and add a CPU window
for it. Define A38X specific macro for setting device attribute for
each node.
Submitted by: Michal Stanek <mst@semihalf.com>
Obtained from: Semihalf
Sponsored by: Stormshield
Differential revision: https://reviews.freebsd.org/D6216
zbb [Thu, 2 Jun 2016 18:31:36 +0000 (18:31 +0000)]
Map CESA SRAM memory in driver attach for Armada38x
On other platforms with CESA accelerator the SRAM memory is mapped in
early init before driver is attached. This method only works correctly
with mappings no smaller than L1 section size (1MB). There may be more
SRAM blocks and they may have smaller sizes than 1MB as is the case
for Armada38x. Instead, map SRAM memory with bus_space_map() in CESA
driver attach. Note that we can no longer assume that VA == PA for the
SRAM.
Submitted by: Michal Stanek <mst@semihalf.com
Obtained from: Semihalf
Sponsored by: Stormshield
Differential revision: https://reviews.freebsd.org/D6215
lidl [Thu, 2 Jun 2016 18:25:32 +0000 (18:25 +0000)]
Fixup path in NetBSD supplied documentation for FreeBSD
NetBSD installs the blacklist-helper script in /libexec, and
it goes into /usr/libexec on FreeBSD. Update the docs to
match FreeBSD's installation location.
Reviewed by: rpaulo
Approved by: rpaulo
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D6592
zbb [Thu, 2 Jun 2016 18:24:00 +0000 (18:24 +0000)]
Revert part of r294418 ("Correct ranges...")
Commit was temporary fix due to rman_res_t defined as 32-bit u_long.
After redefining it as 64-bit variable workaround is not needed and
was removed.
Submitted by: Bartosz Szczepanek <bsz@semihalf.com>
Obtained from: Semihalf
Sponsored by: Stormshield
Differential revision: https://reviews.freebsd.org/D6214
gnn [Thu, 2 Jun 2016 17:51:29 +0000 (17:51 +0000)]
This change re-adds L2 caching for TCP and UDP, as originally added in D4306
but removed due to other changes in the system. Restore the llentry pointer
to the "struct route", and use it to cache the L2 lookup (ARP or ND6) as
appropriate.
Submitted by: Mike Karels
Differential Revision: https://reviews.freebsd.org/D6262
tuexen [Thu, 2 Jun 2016 17:31:37 +0000 (17:31 +0000)]
Fix two types which resulted in setting the address long wrong
for IPv6 addresses.
Reported by: pfg@
CID: 1347086
MFC after: 1 week
pfg [Thu, 2 Jun 2016 17:28:39 +0000 (17:28 +0000)]
citrus: Remove redundant code in _citrus_esdb_get_list().
It appears "sorted" may have not been implemented. Sorted or not,
we always follow the same action so simplify the code.
Leave a note for future generations.
CID: 1347084
markj [Thu, 2 Jun 2016 17:21:57 +0000 (17:21 +0000)]
Exploit r301213 to fix in6 ifaddr locking in pfxlist_onlink_check().
Reviewed by: ae, hrs
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D6639
markj [Thu, 2 Jun 2016 17:17:15 +0000 (17:17 +0000)]
Always start IPv6 DAD asynchronously.
Otherwise we transmit the first neighbour solicitation in the context of the
caller of nd6_dad_start(), which can easily result in lock recursion. When
DAD is to be started after some delay, we send the first NS from the DAD
callout handler, so just change the implementation to do this in the
non-delayed case as well.
Reviewed by: ae, hrs
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D6639
markj [Thu, 2 Jun 2016 17:11:24 +0000 (17:11 +0000)]
Reset the page busy lock state after failing to insert into the object.
Freeing a shared-busy page is not permitted.
Reviewed by: kib
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D6670
markj [Thu, 2 Jun 2016 16:58:47 +0000 (16:58 +0000)]
Don't preserve the page's object linkage in vm_page_insert_after().
Per the KASSERT at the beginning of the function, we expect that the page
does not belong to any object, so its object and pindex fields are
meaningless. Reset them in the rare case that vm_radix_insert() fails.
Reviewed by: kib
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D6669
mjg [Thu, 2 Jun 2016 15:52:34 +0000 (15:52 +0000)]
taskqueue: plug a leak in _taskqueue_create
While here make some style fixes and postpone the sprintf so that it is
only done when the function can no longer fail.
CID: 1356041
asomers [Thu, 2 Jun 2016 15:31:24 +0000 (15:31 +0000)]
Fix exit status of "service routing start <af> <iface>"
etc/rc.d/routing
Ignore the exit status of options_{inet,inet6,atm}. It's
meaningless.
Reviewed by: hrs
MFC after: 4 weeks
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D6687
pfg [Thu, 2 Jun 2016 15:30:58 +0000 (15:30 +0000)]
usb/uhso: Don't bail out on first USB error.
CID: 1305680
Submitted by: hselasky
MFC after: 3 days
br [Thu, 2 Jun 2016 15:14:40 +0000 (15:14 +0000)]
Fix typos.
royger [Thu, 2 Jun 2016 14:25:10 +0000 (14:25 +0000)]
xen-netfront: use callout_reset_curcpu instead of callout_reset
This should help distribute the load of the callbacks.
Suggested by: hps
Sponsored by: Citrix Systems R&D
kadesai [Thu, 2 Jun 2016 12:26:55 +0000 (12:26 +0000)]
Added support for Avago/Broadcom Cutlass(12 Gbps- 16 port count) controllers.
Submitted by: Sumit Saxena <Sumit.Saxena@broadcom.com>
Reviewed by: Kashyap Desai <Kashyap.Desai@broadcom.com>
MFC after: 3 days
Sponsored by: AVAGO/BROADCOM Limited
avos [Thu, 2 Jun 2016 12:01:58 +0000 (12:01 +0000)]
urtw: fix unused variable assignments.
Append CWmax and retry limitation to tp->maxretry instead of rewriting it
(will restore pre-r198194 behavior).
Noticed by: pfg, hps
Reported by: Coverity
CID: 1304937, 1304920
royger [Thu, 2 Jun 2016 11:21:00 +0000 (11:21 +0000)]
xen-netfront: perform an interface reset when changing options
The PV backend will only pick the new options when the interface is detached
and reattached again, so perform a full reset when changing options. This is
very fast, and should not be noticeable by the user.
Reviewed by: Wei Liu <wei.liu2@citrix.com>
Sponsored by: Citrix Systems R&D
Differential revision: https://reviews.freebsd.org/D6658
royger [Thu, 2 Jun 2016 11:19:16 +0000 (11:19 +0000)]
xen-netfront: release grant references used for the shared rings
Just calling gnttab_end_foreign_access_ref doesn't free the references,
instead call gnttab_end_foreign_access with a NULL page argument in order to
have the grant references freed. The code that maps the ring
(xenbus_map_ring) already uses gnttab_grant_foreign_access which takes care
of allocating a grant reference.
Reviewed by: Wei Liu <wei.liu2@citrix.com>
Sponsored by: Citrix Systems R&D
Differential revision: https://reviews.freebsd.org/D6608
royger [Thu, 2 Jun 2016 11:18:02 +0000 (11:18 +0000)]
xen-netfront: fix two hotplug related issues
This patch fixes two issues seen on hot-unplug. The first one is a panic
caused by calling ether_ifdetach after freeing the internal netfront queue
structures. ether_ifdetach will call xn_qflush, and this needs to be done
before freeing the queues. This prevents the following panic:
Fatal trap 9: general protection fault while in kernel mode
cpuid = 2; apic id = 04
instruction pointer = 0x20:0xffffffff80b1687f
stack pointer = 0x28:0xfffffe009239e770
frame pointer = 0x28:0xfffffe009239e780
code segment = base 0x0, limit 0xfffff, type 0x1b
= DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags = interrupt enabled, resume, IOPL = 0
current process = 0 (thread taskq)
[ thread pid 0 tid 100015 ]
Stopped at strlen+0x1f: movq (%rcx),%rax
db> bt
Tracing pid 0 tid 100015 td 0xfffff800038a6000
strlen() at strlen+0x1f/frame 0xfffffe009239e780
kvprintf() at kvprintf+0xfa0/frame 0xfffffe009239e890
vsnprintf() at vsnprintf+0x31/frame 0xfffffe009239e8b0
kassert_panic() at kassert_panic+0x5a/frame 0xfffffe009239e920
__mtx_lock_flags() at __mtx_lock_flags+0x164/frame 0xfffffe009239e970
xn_qflush() at xn_qflush+0x59/frame 0xfffffe009239e9b0
if_detach() at if_detach+0x17e/frame 0xfffffe009239ea10
netif_free() at netif_free+0x97/frame 0xfffffe009239ea30
netfront_detach() at netfront_detach+0x11/frame 0xfffffe009239ea40
[...]
Another panic can be triggered by hot-plugging a NIC:
Fatal trap 18: integer divide fault while in kernel mode
cpuid = 0; apic id = 00
instruction pointer = 0x20:0xffffffff80902203
stack pointer = 0x28:0xfffffe00508d3660
frame pointer = 0x28:0xfffffe00508d36a0
code segment = base 0x0, limit 0xfffff, type 0x1b
= DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags = interrupt enabled, resume, IOPL = 0
current process = 2960 (ifconfig)
[ thread pid 2960 tid 100088 ]
Stopped at xn_txq_mq_start+0x33: divl %esi,%eax
db> bt
Tracing pid 2960 tid 100088 td 0xfffff8000850aa00
xn_txq_mq_start() at xn_txq_mq_start+0x33/frame 0xfffffe00508d36a0
ether_output() at ether_output+0x570/frame 0xfffffe00508d3720
arprequest() at arprequest+0x433/frame 0xfffffe00508d3820
arp_ifinit() at arp_ifinit+0x49/frame 0xfffffe00508d3850
xn_ioctl() at xn_ioctl+0x1a2/frame 0xfffffe00508d3890
in_control() at in_control+0x882/frame 0xfffffe00508d3910
ifioctl() at ifioctl+0xda1/frame 0xfffffe00508d39a0
kern_ioctl() at kern_ioctl+0x246/frame 0xfffffe00508d3a00
sys_ioctl() at sys_ioctl+0x171/frame 0xfffffe00508d3ae0
amd64_syscall() at amd64_syscall+0x2db/frame 0xfffffe00508d3bf0
Xfast_syscall() at Xfast_syscall+0xfb/frame 0xfffffe00508d3bf0
--- syscall (54, FreeBSD ELF64, sys_ioctl), rip = 0x8011e185a, rsp =
0x7fffffffe478, rbp = 0x7fffffffe4c0 ---
This is caused by marking the driver as active before it's fully
initialized, and thus calling xn_txq_mq_start with num_queues set to 0.
Reviewed by: Wei Liu <wei.liu2@citrix.com>
Sponsored by: Citrix Systems R&D
Differential revision: https://reviews.freebsd.org/D6646
royger [Thu, 2 Jun 2016 11:16:35 +0000 (11:16 +0000)]
xen-netfront: switch to using an interrupt handler
In order to use custom taskqueues we would have to mask the interrupt, which
is basically what is already done for an interrupt handler, or else we risk
loosing interrupts. This switches netfront to the same interrupt handling
that was done before multiqueue support was added.
Reviewed by: Wei Liu <wei.liu2@citrix.com>
Sponsored by: Citrix Systems R&D
royger [Thu, 2 Jun 2016 11:14:26 +0000 (11:14 +0000)]
xen-netfront: always keep the Rx ring full of requests
This is based on Linux commit
1f3c2eba1e2d866ef99bb9b10ade4096e3d7607c from
David Vrabel:
A full Rx ring only requires 1 MiB of memory. This is not enough memory
that it is useful to dynamically scale the number of Rx requests in the ring
based on traffic rates, because:
a) Even the full 1 MiB is a tiny fraction of a typically modern Linux
VM (for example, the AWS micro instance still has 1 GiB of memory).
b) Netfront would have used up to 1 MiB already even with moderate
data rates (there was no adjustment of target based on memory
pressure).
c) Small VMs are going to typically have one VCPU and hence only one
queue.
Keeping the ring full of Rx requests handles bursty traffic better than
trying to converge on an optimal number of requests to keep filled.
Reviewed by: Wei Liu <wei.liu2@citrix.com>
Sponsored by: Citrix Systems R&D
royger [Thu, 2 Jun 2016 11:12:11 +0000 (11:12 +0000)]
xen-netfront: fix receiving TSO packets
Currently FreeBSD is not properly fetching the TSO information from the Xen
PV ring, and thus the received packets didn't have all the necessary
information, like the segment size or even the TSO flag set.
Sponsored by: Citrix Systems R&D
royger [Thu, 2 Jun 2016 07:45:01 +0000 (07:45 +0000)]
xen: rewrite Xen error translation
Using the public Xen error code header.
Submitted by: Akshay Jaggi <akshay1994.leo@gmail.com>
Reviewed by: royger
royger [Thu, 2 Jun 2016 07:43:02 +0000 (07:43 +0000)]
xen: add missing #define in include guard.
Submitted by: Akshay Jaggi <akshay1994.leo@gmail.com>
Reviewed by: royger
adrian [Thu, 2 Jun 2016 06:22:59 +0000 (06:22 +0000)]
[iwm] valid_{tx,rx}_ant from radio_cfg is only needed for 8000 family.
* The "if (!data->valid_tx_ant || !data->valid_rx_ant) {" check was getting
triggered with a 3165 chipset.
Submitted by: Imre Vadasz <imre@vdsz.com>
Obtained from: DragonflyBSD
3655dfb6fc311fc83e5ce8370dd91b4cd4a37991
adrian [Thu, 2 Jun 2016 05:43:16 +0000 (05:43 +0000)]
[iwm] Fix several nitpicks in iwm(4).
Move some declarations to if_iwmreg.h.
Remove iwm_fw_alive(); just call iwm_post_alive() directly.
Simplify iwm_mvm_add_sta().
Return timeout error from iwm_apm_init().
Print a message when init (i.e. boot) firmware fails to load.
Remove some commented-out code which wouldn't compile anyway.
Move iwm_mvm_tx_fifo to if_iwmreg.h to match better where Linux puts it.
Taken-From: OpenBSD (if_iwm.c r1.80 and if_iwmreg.h r1.11)
Submitted by: Imre Vadasz <imre@vdsz.com>
Obtained from: DragonflyBSD
29fcb331e5620ae145a6ab9cdda830e22fff626a
adrian [Thu, 2 Jun 2016 05:00:52 +0000 (05:00 +0000)]
[iwm] Add bit-polling in Rx-DMA init code path.
Taken-From: OpenBSD (if_iwm.c r1.80)
Submitted by: Imre Vadasz <imre@vdsz.com>
Obtained from: DragonflyBSD
ed35558754288911048cb607e57c688273ebd8d4
adrian [Thu, 2 Jun 2016 04:54:56 +0000 (04:54 +0000)]
[iwm] Clean up iwm(4) scanning logic a bit.
Submitted by: Imre Vadasz <imre@vdsz.com>
Obtained from: DragonflyBSD
8f3ffab9136e33263d424275ec28f57ad2096437
adrian [Thu, 2 Jun 2016 04:53:28 +0000 (04:53 +0000)]
[iwm] Use IWM_MAX_CMD_PAYLOAD_SIZE to improve command length checks.
Taken-From: OpenBSD (parts of if_iwm.c r1.57 and if_iwmreg.h r1.10)
Obtained from: DragonflyBSD
b70c1eaad06257c5c7f4d8110d21642ebec14f42
adrian [Thu, 2 Jun 2016 04:42:45 +0000 (04:42 +0000)]
[iwm] add if_iwm_led.c into the build.
adrian [Thu, 2 Jun 2016 04:42:28 +0000 (04:42 +0000)]
[iwm] add LED blinking for iwm hardware that supports it.
Submitted by: Imre Vadasz <imre@vdsz.com>
Obtained from: DragonflyBSD, Linux iwlwifi/mvm
adrian [Thu, 2 Jun 2016 04:25:54 +0000 (04:25 +0000)]
[ath] correctly shift the QCA9565 LNA config into the mci config variable.
Tested:
* QCA9565, STA + BT mode
allanjude [Thu, 2 Jun 2016 03:16:02 +0000 (03:16 +0000)]
Address feedback from hrs@ re: r301059 (ifconfig subnet mask)
- Use NI_MAXHOST to size buffers for getnameinfo()
- remove non-standard 'full' inet6 address printing
- remove 'no scope' option
- use strchr(3) to optimize replacing separator character in lladdrs
Reviewed by: gnn, jhb
Differential Revision: https://reviews.freebsd.org/D2856