Commit Graph

109198 Commits

Author SHA1 Message Date
Wojciech Macek
f54153bb08 pmap arm64: fixing pmap_invalidate_range
It seems that if range within one page is given this page will not be
invalidated at all. Clean it up.

Submitted by:          Dominik Ermel <der@semihalf.com>
Obtained from:         Semihalf
Sponsored by:          Cavium
Reviewed by:           wma, zbb
Approved by:           cognet (mentor)
Differential Revision: https://reviews.freebsd.org/D5569
2016-03-14 07:26:38 +00:00
Wojciech Macek
9147c9b8b2 Add xhci_mv.c
Add missing xhci driver for Marvell systems.

Submitted by:          Bartosz Szczepanek <bsz@semihalf.com>
Obtained from:         Semihalf
Sponsored by:          Stormshield
Reviewed by:           hselasky
Approved by:           cognet (mentor)
Differential Revision: https://reviews.freebsd.org/D5031
2016-03-14 07:24:08 +00:00
Wojciech Macek
34a3d2c6e7 Add support for USB3.0 on Armada38x
This commit provides attachment of xhci-platform for A38X boards, making
it possible to mount FreeBSD world from USB3.0 flash. 'xhci' device was
added to files.mv (as optional) and kernconf of Armada38x was enhanced.

It was also necessary to open programmable memory windows of USB3.0.
fdt_win_setup needed improvement so it's able to traverse through
children of internal-regs node.

Submitted by:          Bartosz Szczepanek <bsz@semihalf.com>
Obtained from:         Semihalf
Sponsored by:          Stormshield
Reviewed by:           hselasky
Approved by:           cognet (mentor)
Differential Revision: https://reviews.freebsd.org/D5031
2016-03-14 07:14:34 +00:00
Wojciech Macek
ca8e20784a Make MPIC compatible with ARM_INTRNG
After ARM_INTRNG introduction, MPIC code needed several modifications:
- IRQ resource and its handler added
-  several DEVMETHODs of INTRNG interface implemented
-  defines enhanced to ensure code compiles as well for AXP as for A38X
- added dummy MSI_IRQ, ERR_IRQ defines for Armada38x
- MPIC driver was added to files.armada38x, ARM_INTRNG option enabled in
  kernconf file and regs of MPIC corrected in dts file.

Instead of modifying Armada38X DTS, offsets to CPU registers defined in
driver were changed. That required restoring 'reg' property of mpic node
in ArmadaXP to state compliant with Linux DTS.

Additionally, required ARM_INTRNG definitions were added to mv_common.c.

Submitted by:          Bartosz Szczepanek <bsz@semihalf.com>
Obtained from:         Semihalf
Sponsored by:          Stormshield
Reviewed by:           adrian, andrew, ian, skra
Approved by:           cognet (mentor)
Differential Revision: https://reviews.freebsd.org/D5030
2016-03-14 07:05:41 +00:00
Wojciech Macek
64f7e6aeee Fix GIC interrupt decoding in INTRNG code
Bug was already fixed in not-INTRNG code, it needs to be corrected
   here as well.  Source: https://reviews.freebsd.org/rS294422

Submitted by:          Bartosz Szczepanek <bsz@semihalf.com>
Obtained from:         Semihalf
Sponsored by:          Stormshield
Reviewed by:           cognet, wma
Approved by:           cognet (mentor)
Differential Revision: https://reviews.freebsd.org/D5029
2016-03-14 06:30:37 +00:00
Adrian Chadd
523210fbaf [net80211] handle unlisted information elements.
This displays the IE names in ifconfig but it doesn't yet decode things.

Submitted by: Idwer Vollering <vidwer@gmail.com>
Differential Revision:	https://reviews.freebsd.org/D3782
2016-03-14 04:39:35 +00:00
Bjoern A. Zeeb
19edab1711 Remove duplicate external declaration of tcprexmtthresh making
gcc compiles barf.
2016-03-13 21:26:18 +00:00
Robert Watson
bc84fc89be Put IPSec's anouncement of its successful intialisation under bootverbose:
now that it's a default kernel option, we don't really need to tell the
world about it on every boot, especially as it won't be used by most users.
2016-03-13 19:27:46 +00:00
Bryan Drewery
1270146286 We only support GCC 4.8 for these flags.
- 4.7 introduced maybe-uninitialized
- 4.8 introduced aggressive-loop-optimizations

Sponsored by:	EMC / Isilon Storage Division
2016-03-13 19:17:48 +00:00
Edward Tomasz Napierala
49d8ebfe0e Remove name length limitation from autofs(5). The linear search with
strlens is somewhat suboptimal, but it's a temporary measure that will
be replaced with red-black trees later on.

PR:		204417
Reviewed by:	kib@
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D5266
2016-03-13 14:17:23 +00:00
Jared McNeill
e9a37ecaab Add HDMI device nodes to Banana Pi dts.
PR:		207912
Approved by:	gonzo (mentor)
2016-03-13 01:49:36 +00:00
Jared McNeill
f7f2f3a975 Fix display output for non-HDMI display devices.
Only set the display to HDMI mode if a CEA-861 extension block was found
on the connected display.

PR:		207912
Approved by:	gonzo (mentor)
2016-03-13 01:47:42 +00:00
Justin T. Gibbs
5405e7e2ee Provide high precision conversion from ns,us,ms -> sbintime in kevent
In timer2sbintime(), calculate the second and fractional second portions of
the sbintime separately. When calculating the the fractional second portion,
use a 64bit multiply to prevent excess truncation. This avoids the ~7% error
in the original conversion for ns, and smaller errors of the same type for us
and ms.

PR: 198139
Reviewed by: jhb
MFC after: 1 week
Differential Revision:    https://reviews.freebsd.org/D5397
2016-03-12 23:02:53 +00:00
John Baldwin
823590d40e Regen. 2016-03-12 22:55:07 +00:00
John Baldwin
f479b2ac89 Do not include system call wrappers in libc for old FreeBSD system calls.
The base system libc is only used to run binaries built on FreeBSD 7.0 and
later.  It does not need to include system call wrappers for system calls
only used by FreeBSD binaries built on versions older than 7.0.  This was
already true for "COMPAT" system calls, but now wrappers for system calls
used on FreeBSD 4 and 6 are excluded as well.

Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D5597
2016-03-12 22:53:46 +00:00
Bryan Drewery
1329d41cb6 Enable FAST_DEPEND by default.
Missed in r296668.

Discussed on:	arch
Sponsored by:	EMC / Isilon Storage Division
2016-03-12 22:25:10 +00:00
Bryan Drewery
ec4047ade2 Reduce duplicated logic from r291744.
Sponsored by:	EMC / Isilon Storage Division
2016-03-12 22:21:14 +00:00
Bryan Drewery
ebf5587eca Stop looking up these values in every subdir on install.
This was slowing down installkernel since it was rerunning this in
every module directory.

Sponsored by:	EMC / Isilon Storage Division
2016-03-12 22:21:02 +00:00
Ed Maste
6d51bbb52a boot/efi: Prefer nm to objdump
Both objdump and nm are equally capable of reporting undefined symbols.

This gets us a step closer to building without binutils as we have an nm
implementation from ELF Tool Chain.

Reviewed by:	bdrewery
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D5613
2016-03-12 21:44:33 +00:00
Jean-Sébastien Pédron
33a4a11703 drm/i915: Import Linux commit 168f83660211b9e059e3bc0638daaa01e9ea0b71
This makes sure the default context of each ring is cleaned up with the
ring itself and fixes a memory leak.

Author: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Date:   Fri May 3 16:29:08 2013 +0300

    drm/i915: unreference default context on module unload

    Before module unload is called, gpu_idle() will switch
    to default context. This will increment ref count of base
    object as the default context is 'running' on module unload
    time. Unreference the drm object so that when context
    is freed, base object is freed as well.

    v2: added comment to explain the refcounts (Ben Widawsky)

    Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
    Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
    Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>

Obtained from:	Linux
2016-03-12 20:05:23 +00:00
Ed Maste
65d641e6bb Bump __FreeBSD_version for libelf cross-endian fix in r296685 2016-03-12 19:05:41 +00:00
Dimitry Andric
353cae4976 Fix the following gcc warnings on sparc64, when TCP_OFFLOAD is not
defined:

    sys/dev/cxgbe/t4_main.c:7474: warning: 'sysctl_tp_tick' defined but not used
    sys/dev/cxgbe/t4_main.c:7505: warning: 'sysctl_tp_dack_timer' defined but not used
    sys/dev/cxgbe/t4_main.c:7519: warning: 'sysctl_tp_timer' defined but not used

This just adds a bunch of #ifdef TCP_OFFLOAD in the right places.

Reviewed by:	np
Differential Revision: https://reviews.freebsd.org/D5620
2016-03-12 18:38:51 +00:00
Jean-Sébastien Pédron
77e6a4072b drm/i915: Call i915_gem_gtt_fini() when the device is detached
This fixes several memory leaks. Apparently, this problem exists in
Linux 3.8 but the code changed in Linux 3.9 so it may be fixed upstream
already. Still, this is something we need to pay attention to.
2016-03-12 11:57:32 +00:00
Jean-Sébastien Pédron
538cf7be5e drm/i915: Fix page fault handler failure
... when __wait_seqno() is interrupted by a signal. In this case,
__wait_seqno() returns -ERESTARTSYS. Like we already do in drm_ioctl(),
we need to convert this error to a common code such as -EINTR, so the
page fault handler is restarted.

Reported by:	Frederic Chardon <chardon.frederic@gmail.com>
Tested by:	Frederic Chardon <chardon.frederic@gmail.com>
2016-03-12 11:54:58 +00:00
Jean-Sébastien Pédron
85a60a7756 agp: Do not attach to Intel GEN6+
The i915 video driver doesn't depend on agp(4) anymore for Sandybridge
and later GPUs. Therefore, there is no need to attach agp(4) to those
devices.

While here, fix `agp_i965_res_spec` to include the aperture base for
GEN4 and GEN5.

Reviewed by:	kib
Approved by:	kib
Differential Revision:	https://reviews.freebsd.org/D5586
2016-03-12 09:44:23 +00:00
Edward Tomasz Napierala
7571d31339 Use S_BLKSIZE instead of magic constant.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2016-03-12 09:33:26 +00:00
Edward Tomasz Napierala
2a5a08cb38 Refactor the way we restore cn_lkflags; no functional changes.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2016-03-12 09:05:43 +00:00
Edward Tomasz Napierala
f69db55151 Remove cn_consume from 'struct componentname'. It was never set to anything
other than 0.

Reviewed by:	kib@
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D5611
2016-03-12 08:50:38 +00:00
Edward Tomasz Napierala
213ed83855 Fix autofs triggering problem. Assume you have an NFS server,
192.168.1.1, with share "share". This commit fixes a problem
where "mkdir /net/192.168.1.1/share/meh" would return spurious
error instead of creating the directory if the target filesystem
wasn't mounted yet; subsequent attempts would work correctly.

The failure scenario is kind of complicated to explain, but it all
boils down to calling VOP_MKDIR() for the target filesystem (NFS)
with wrong dvp - the autofs vnode instead of the filesystem root
mounted over it.

Reviewed by:	kib@
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D5442
2016-03-12 07:54:42 +00:00
Andrew Turner
cc91c4c7b4 Print the correct size of loader.efi when failing to load it into memory.
Obtained from:	AsiaBSDCon
Sponsored by:	ABT Systems Ltd
2016-03-12 06:50:16 +00:00
Navdeep Parhar
537e5f9a74 cxgbe(4): Fix typo in previous commit. 2016-03-12 03:02:33 +00:00
Navdeep Parhar
0f2f53efd2 cxgbe(4): Catch up with the latest list of card capabilities as reported
by the firmware.
2016-03-12 02:54:55 +00:00
Bryan Drewery
a09f4b4d12 Add more .NOMETA missed in r291320
Sponsored by:	EMC / Isilon Storage Division
2016-03-11 23:45:51 +00:00
Bryan Drewery
1a17ca5f2a Revert r269030. CLEANFILES is already added to .NOPATH since r241298.
Sponsored by:	EMC / Isilon Storage Division
2016-03-11 23:45:45 +00:00
Navdeep Parhar
959824daba cxgbe(4): sysctls to display the TOE's TCP timers.
cask:~# sysctl -d dev.t5nex.0.toe
dev.t5nex.0.toe.finwait2_timer: FINWAIT2 timer (us)
dev.t5nex.0.toe.initial_srtt: Initial SRTT (us)
dev.t5nex.0.toe.keepalive_intvl: Keepidle interval (us)
dev.t5nex.0.toe.keepalive_idle: Keepidle idle timer (us)
dev.t5nex.0.toe.persist_max: Persist timer max (us)
dev.t5nex.0.toe.persist_min: Persist timer min (us)
dev.t5nex.0.toe.rexmt_max: Retransmit max (us)
dev.t5nex.0.toe.rexmt_min: Retransmit min (us)
dev.t5nex.0.toe.dack_timer: DACK timer (us)
dev.t5nex.0.toe.dack_tick: DACK tick (us)
dev.t5nex.0.toe.timestamp_tick: TCP timestamp tick (us)
dev.t5nex.0.toe.timer_tick: TP timer tick (us)
...

cask:~# sysctl dev.t5nex.0.toe
dev.t5nex.0.toe.finwait2_timer: 9765440
dev.t5nex.0.toe.initial_srtt: 244128
dev.t5nex.0.toe.keepalive_intvl: 73240800
dev.t5nex.0.toe.keepalive_idle: 7031116800
dev.t5nex.0.toe.persist_max: 9765440
dev.t5nex.0.toe.persist_min: 976544
dev.t5nex.0.toe.rexmt_max: 9765440
dev.t5nex.0.toe.rexmt_min: 244128
dev.t5nex.0.toe.dack_timer: 19520
dev.t5nex.0.toe.dack_tick: 32.768
dev.t5nex.0.toe.timestamp_tick: 1048.576
dev.t5nex.0.toe.timer_tick: 32.768
...
2016-03-11 23:24:04 +00:00
John Baldwin
47cedcbd72 Use SI_SUB_LAST instead of SI_SUB_SMP as the "catch-all" subsystem.
Reviewed by:	kib
Sponsored by:	Netflix
Differential Revision:	https://reviews.freebsd.org/D5515
2016-03-11 23:18:06 +00:00
Jean-Sébastien Pédron
645e6cf5cc drm/i915: Fix malloc type in i915_gem_object_bind_to_gtt()
drm_mm.c expects DRM_MEM_MM, not DRM_I915_GEM.
2016-03-11 21:00:14 +00:00
Jean-Sébastien Pédron
85cfd0daea drm: Fix dev->ioctl_count references leak
This fixes the following error:
kernel: error: [drm:pid1167:drm_release] *ERROR* Device busy: 2

Because of that, drm_lastclose() was not called, leading to a few memory
leaks once the driver was unloaded.

MFC after:	1 week
2016-03-11 18:59:15 +00:00
Konstantin Belousov
ffc161df9f Do not perform unneccessary shared recursion on the allproc_lock in
pfs_visible().  The recursion does not cause deadlock because the sx
implementation does not prefer exclusive waiters over the shared, but
this is an implementation detail.

Reported by:	pho, Matthew Bryan <matthew.bryan@isilon.com>
Reviewed by:	jhb
Tested by:	pho
Approved by:	des (pseudofs maintainer)
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
2016-03-11 11:51:38 +00:00
Bryan Drewery
e32a2cbe39 FAST_DEPEND: Use .dinclude to enable full .depend logic in bmake.
The inclusion of .MAKE.DEPENDFILE (.depend) has special logic in make
to ignore stale/missing dependencies.  bmake 20160220 added a '.dinclude'
directive that uses the special logic for .depend when including the file.

This fixes a build error when a file is moved or deleted that exists in a
.depend.OBJ file.  This happened in r292782 when sha512c.c "moved" and an
incremental build of lib/libmd would fail with:
  make: don't know how to make /usr/src/lib/libcrypt/../libmd/sha512c.c. Stop

Now this will just be seen as a stale dependency and cause a rebuild:
  make: /usr/obj/usr/src/lib/libmd/.depend.sha512c.o, 13: ignoring stale .depend for /usr/src/lib/libcrypt/../libmd/sha512c.c
  --- sha512c.o ---
  ...
This rebuild will only be done once since the .depend.sha512c.o will
be updated on the build with the -MF flags.

This also removes -MP being passed for the .depend.OBJ generation (which
would create fake targets for system headers) since the logic is no
longer needed to protect from missing files.

Sponsored by:	EMC / Isilon Storage Division
2016-03-11 04:09:56 +00:00
Navdeep Parhar
9945ceb857 cxgbe(4): Add sysctls to display the TP microcode version and the
expansion rom version (if there's one).

trantor:~# sysctl dev.t4nex dev.t5nex | grep _version
dev.t4nex.0.firmware_version: 1.15.28.0
dev.t4nex.0.tp_version: 0.1.9.4
dev.t5nex.0.firmware_version: 1.15.28.0
dev.t5nex.0.exprom_version: 1.0.0.68
dev.t5nex.0.tp_version: 0.1.4.9
2016-03-11 03:15:17 +00:00
Navdeep Parhar
5849e3bbcd cxgbe(4): Add a sysctl for the event capture mask of the TP block's
logic analyzer.

dev.t5nex.<n>.misc.tp_la_mask
dev.t4nex.<n>.misc.tp_la_mask
2016-03-11 01:54:43 +00:00
Navdeep Parhar
98790d33c6 cxgbe(4): Improvements to the code that deals with the firmware's log.
- Query the location of the log very early during attach.  Refresh the
  location later after establishing contact with the firmware.
- Save the log's location as a flat address in devlog_params.
- Use a memory window instead of backdoor access to the EDC/MC to read
  the log.
2016-03-10 23:17:26 +00:00
Navdeep Parhar
30d816a7b5 cxgbe(4): Fix bug in r296603. The memory window needs to be
repositioned if the start address isn't in the window already.  One
of the bounds check used the end address instead.
2016-03-10 20:36:32 +00:00
Alexander Motin
ee7f4d8187 Revert r292074 (by smh): Limit stripesize reported from nvd(4) to 4K
I believe that this patch handled the problem from the wrong side.
Instead of making ZFS properly handle large stripe sizes, it made
unrelated driver to lie in reported parameters to workaround that.

Alternative solution for this problem from ZFS side was committed at
r296615.

Discussed with:	smh
2016-03-10 17:13:10 +00:00
Alexander Motin
5db0866658 Make ZFS ignore stripe sizes above SPA_MAXASHIFT (8KB).
If device has stripe size bigger then maximal sector size supported by
ZFS, there is nothing can be done to avoid read-modify-write cycles.
Taking that stripe size into account will only reduce space efficiency
and pointlessly bother user with warnings that can not be fixed.

Discussed with:	smh
2016-03-10 16:39:46 +00:00
Ruslan Bukin
d52d6d7ca7 Add support for ddb(4).
Sponsored by:	DARPA, AFRL
Sponsored by:	HEIF5
2016-03-10 15:51:43 +00:00
Alexander Motin
eef192d85c Make ZFS more picky to GEOM stripe sizes and offsets.
Use of misaligned or non-power-of-2 stripes is not really useful for ZFS,
since increased ashift won't help to avoid read-modify-write cycles, and
only reduce pool space efficiency and compression rates.
2016-03-10 14:18:14 +00:00
Navdeep Parhar
a079d3866a cxgb(4): Remove redundant part of an assertion.
PR:		207858
Submitted by:	David Binderman
2016-03-10 14:17:24 +00:00
Alexander Motin
a151f3a7ef MFV r296609: 6370 ZFS send fails to transmit some holes
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Chris Williamson <chris.williamson@delphix.com>
Reviewed by: Stefan Ring <stefanrin@gmail.com>
Reviewed by: Steven Burgess <sburgess@datto.com>
Reviewed by: Arne Jansen <sensille@gmx.net>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Paul Dagnelie <pcd@delphix.com>

In certain circumstances, "zfs send -i" (incremental send) can produce a
stream which will result in incorrect sparse file contents on the
target.

The problem manifests as regions of the received file that should be
sparse (and read a zero-filled) actually contain data from a file that
was deleted (and which happened to share this file's object ID).

Note: this can happen only with filesystems (not zvols, because they do
not free (and thus can not reuse) object IDs).

Note: This can happen only if, since the incremental source (FromSnap),
a file was deleted and then another file was created, and the new file
is sparse (i.e. has areas that were never written to and should be
implicitly zero-filled).

We suspect that this was introduced by 4370 (applies only if hole_birth
feature is enabled), and made worse by 5243 (applies if hole_birth
feature is disabled, and we never send any holes).

The bug is caused by the hole birth feature. When an object is deleted
and replaced, all the holes in the object have birth time zero. However,
zfs send cannot tell that the holes are new since the file was replaced,
so it doesn't send them in an incremental. As a result, you can end up
with invalid data when you receive incremental send streams. As a
short-term fix, we can always send holes with birth time 0 (unless it's
a zvol or a dataset where we can guarantee that no objects have been
reused).

Closes #37

openzfs/openzfs@adef853162
2016-03-10 09:01:19 +00:00
Warner Losh
3cb6be927b Don't assume that bio_cmd is a bitfield.
Differential Revision: https://reviews.freebsd.org/D5591
2016-03-10 06:25:47 +00:00
Warner Losh
ca19dfe480 Don't assume that bio_cmd is a bit mask.
Differential Revision: https://reviews.freebsd.org/D5592
2016-03-10 06:25:39 +00:00
Warner Losh
8076d204da Don't assume that bio_cmd is bit mask.
Differential Revision: https://reviews.freebsd.org/D5593
2016-03-10 06:25:31 +00:00
Warner Losh
a2531862b8 Move to new value for XPT_GET_SIM_KNOB to avoid clash with XPT_ATA_IO. 2016-03-10 06:25:05 +00:00
Navdeep Parhar
c912289045 cxgbe(4): Add general purpose routines that offer safe access to the
chip's memory windows.  Convert existing users of these windows to the
new routines.
2016-03-10 06:15:31 +00:00
Zbigniew Bodek
6cac5eb749 Fix bug in VNIC causing phony number of available TX descriptors
TSO packets will signal segments TX completion in the separate CQ
descriptors. Each CQ descriptor for HW TSO will point to the same
SQ entry.
Do not invoke nicvf_put_sq_desc() for secondary segments to avoid
free_cnt corruption and eventually integer overflow that will result
in the negative free_cnt value and hence impossibility of further
transmission.

Reviewed by:   wma
Obtained from: Semihalf
Sponsored by:  Cavium
Differential Revision: https://reviews.freebsd.org/D5535
2016-03-10 05:45:24 +00:00
Zbigniew Bodek
0196c2e86e Fix "received NULL mbuf" bug in VNIC
Do not modify NIC_QSET_CQ_0_7_HEAD manually, especially
in non-atomic context.
It doesn't seem to be necessary to recreate CQ head after
interrupt clearing too.

Reviewed by:   wma
Obtained from: Semihalf
Sponsored by:  Cavium
Differential Revision: https://reviews.freebsd.org/D5533
2016-03-10 05:23:46 +00:00
Navdeep Parhar
f808381742 cxgbe(4): Allow the addr/len pair that is being validated in
validate_mem_range to span multiple memory types.  Update
validate_mt_off_len to use validate_mem_range.
2016-03-10 02:43:10 +00:00
Sepherosa Ziehau
f9fbf67e74 hyperv/hn: Make the # of TX rings configurable.
Rename the tunables to avoid confusion.

MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D5578
2016-03-10 02:37:47 +00:00
Sepherosa Ziehau
9e76da0054 hyperv/hn: Factor out hn_channel_attach
MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D5577
2016-03-10 02:28:01 +00:00
Sepherosa Ziehau
431b98ddc3 hyperv/hn: Move if_initname to an earlier place
So that functions shared w/ attach path could use if_printf().

While I'm here, remove unnecessary if_dunit and if_dname assignment.

MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D5576
2016-03-10 02:13:42 +00:00
Warner Losh
34d4518209 Don't assume that bio_cmd is a bitfield.
Differential revision: https://reviews.freebsd.org/D5590
2016-03-10 00:36:52 +00:00
Warner Losh
beb09e42a3 Don't assume bio_cmd is a bit field.
Differential Revision: https://reviews.freebsd.org/D5594
2016-03-10 00:36:45 +00:00
Warner Losh
c1a6d28a5b Add raw RX-50 support. These are 400k single sided disks with 80
tracks and 10 sectors per track. More exotic RX-50 types not
supported, nor is there support for de-interleaving the first two
tracks where the physical sectors are 0 1 2 3 4 5 6 7 8 9, but they
should be interpreted as 0 5 1 6 2 7 3 8 4 9. This is purely to read
the media with dd. The FAT that's on these disks won't work with
msdosfs anyway.
2016-03-10 00:36:38 +00:00
Warner Losh
80139618c9 Stop assuming that bio_cmd is a bit field.
Differential Revision: https://reviews.freebsd.org/D5587
2016-03-10 00:33:06 +00:00
Michael Tuexen
1fabc43e9f Actually send a asconf chunk, not only queue one.
MFC after: 3 days
2016-03-10 00:27:10 +00:00
David C Somayajulu
988f26f9ff Fix code so that buf_ring allocation for Tx Queues and their mutexes
is done during during bxe_attach() and freed during bxe_detach()

MFC after: 5 days
2016-03-09 21:12:26 +00:00
Bryan Drewery
044fd54366 FILEMON_SET_FD: Disallow changing the fd.
MFC after:	1 week
Suggested by:	mjg
Sponsored by:	EMC / Isilon Storage Division
2016-03-09 19:50:35 +00:00
Maxim Sobolev
c3d1c73fa9 For the MD_ROOT option don't inject /dev/md0 as root dev when ROOTDEVNAME
is defined explicitly. It's kinda pointless and results in extra step in
boot sequence which is not really needed, i.e.:

md0: Embedded image 1331200 bytes at 0x8038b7b4
Trying to mount root from ufs:/dev/md0 []...
Mounting from ufs:/dev/md0 failed with error 22.
Trying to mount root from ufs:md0.uzip []...
warning: no time-of-day clock registered, system time will not be set accurately
start_init: trying /sbin/init
2016-03-09 19:36:25 +00:00
John Baldwin
8d91aced32 Regen. 2016-03-09 19:06:46 +00:00
John Baldwin
399e8c1773 Simplify AIO initialization now that it is standard.
- Mark AIO system calls as STD and remove the helpers to dynamically
  register them.
- Use COMPAT6 for the old system calls with the older sigevent instead of
  an 'o' prefix.
- Simplify the POSIX configuration to note that AIO is always available.
- Handle AIO in the default VOP_PATHCONF instead of special casing it in
  the pathconf() system call.  fpathconf() is still hackish.
- Remove freebsd32_aio_cancel() as it just called the native one directly.

Reviewed by:	kib
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D5589
2016-03-09 19:05:11 +00:00
John Baldwin
6fc8053f1a Fix reporting of the CloudABI ABI in kdump.
- Advertise the word size for CloudABI ABIs via the SV_LP64 flag.  All of
  the other ABIs include either SV_ILP32 or SV_LP64.
- Fix kdump to not assume a 32-bit ABI if the ABI flags field is non-zero
  but SV_LP64 isn't set.  Instead, only assume a 32-bit ABI if SV_ILP32 is
  set and fallback to the unknown value of "00" if neither SV_LP64 nor
  SV_ILP32 is set.

Reviewed by:	kib, ed
Differential Revision:	https://reviews.freebsd.org/D5560
2016-03-09 18:38:30 +00:00
Maxim Sobolev
47d306bf35 Second argument of the mips_timer_init_params() is boolean, so
pass in "1" for true consistently.
2016-03-09 18:38:03 +00:00
Stanislav Galabov
08190ef7de Improve U-Boot API detection
Until now, ubldr has been trying to locate the U-Boot API using a hint
address (U-Boot's current stack pointer), aligning it to 1MiB and going
over a 3MiB (or 1MiB in case of MIPS) memory region searching for a
valid API signature.

This change introduces an alternative way of doing this, namely the
following:
- both U-Boot's bootelf and go commands actually pass argc and argv to
  the entry point (e.g., ubldr's start function, but they should also
  be passed over to main() transparently)
- so, instead of trying to go and look for a valid API signature, we
  look at the parameters passed to main()
- if there's an option '-a' with argument, which is a valid hexadecimal
  unsigned  long number (x), we try to verify whether we have a valid
  API signature at address x. If so - we use it. If not - we fallback
  to the original way of locating the API signature.

The U-Boot change, which causes the API structure address to be
exported as an environment variable, was committed to mainline U-Boot
as commit 22aa61f707574dd569296f521fcfc46a05f51c48

Reviewed by:	andrew, adrian
Approved by:	adrian (mentor)
Sponsored by:	Smartcom - Bulgaria AD
Differential Revision:	https://reviews.freebsd.org/D5492
2016-03-09 11:45:48 +00:00
Alexander Motin
7370229e8d Add new IOCTL compat shims for ABI breakage caused by r296510:
MFV r296505: 6531 Provide mechanism to artificially limit disk performance
2016-03-09 11:16:15 +00:00
Andrey V. Elsukov
86a9058b01 Add support for IPPROTO_IPV6 socket layer for getsockopt/setsockopt calls.
Also add mapping for several options from RFC 3493 and 3542.

Reviewed by:	dchagin
Tested by:	Joe Love <joe at getsomwhere dot net>
MFC after:	2 weeks
2016-03-09 09:12:40 +00:00
Navdeep Parhar
4d131308f3 cxgbe(4): Rename regwin_lock to reg_lock. It is used to protect access
to indirect registers only.
2016-03-08 22:23:30 +00:00
Jean-Sébastien Pédron
740be6d755 drm/i915: Update to match Linux 3.8.13
This update brings initial support for Haswell GPUs.

Tested by:	Many users of FreeBSD, PC-BSD and HardenedBSD
Relnotes:	yes
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D5554
2016-03-08 20:33:02 +00:00
Dmitry Chagin
a87488d1e4 Better english.
Submitted by:	Kevin P. Neal
MFC after:	1 week
2016-03-08 19:40:01 +00:00
Navdeep Parhar
40f1f5c6c4 cxgbe(4): Reshuffle and rototill t4_hw.c, solely to reduce diffs with
the internal shared code.

Obtained from:	Chelsio Communications
2016-03-08 19:34:56 +00:00
Dmitry Chagin
649ca5e9dc Put a commit message from r296502 about Linux alarm() system call
behaviour to the source.

Suggested by:	emaste@

MFC after:	1 week
2016-03-08 19:20:57 +00:00
Alexander Motin
8d0e2eb06b MFV r296529:
6672 arc_reclaim_thread() should use gethrtime() instead of ddi_get_lbolt()
6673 want a macro to convert seconds to nanoseconds and vice-versa

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
Reviewed by: Robert Mustacchi <rm@joyent.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Eli Rosenthal <eli.rosenthal@delphix.com>

illumos/illumos-gate@a8f6344fa0
2016-03-08 18:28:24 +00:00
Alexander Motin
468bca03ef MFV r296527: 6659 nvlist_free(NULL) is a no-op
Reviewed by: Toomas Soome <tsoome@me.com>
Reviewed by: Marcel Telka <marcel@telka.sk>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>

illumos/illumos-gate@aab83bb83b
2016-03-08 18:11:38 +00:00
Alexander Motin
26802705d3 MFV r296522: 6541 Pool feature-flag check defeated if "verify" is included
in the dedup property value

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Richard Laager <rlaager@wiktel.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: ilovezfs <ilovezfs@icloud.com>

illumos/illumos-gate@971640e6aa
2016-03-08 17:58:02 +00:00
Alexander Motin
178f2c2b8e MFV r296520: 6562 Refquota on receive doesn't account for overage
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
Reviewed by: Toomas Soome <tsoome@me.com>
Approved by: Gordon Ross <gwr@nexenta.com>
Author: Dan McDonald <danmcd@omniti.com>

illumos/illumos-gate@5f7a8e6d75
2016-03-08 17:53:42 +00:00
Alexander Motin
7a90077752 MFV r296518: 5027 zfs large block support (add copyright)
Author: Matthew Ahrens <matt@mahrens.org>

illumos/illumos-gate@c3d26abc9e
2016-03-08 17:51:09 +00:00
Ed Maste
91ca23befa boot1.efi: use += to append to LDFLAGS
This is for consistency with loader.efi's Makefile and simplifies some
out-of-tree experimentation.
2016-03-08 17:45:56 +00:00
Alexander Motin
c892984b84 MFV r296515: 6536 zfs send: want a way to disable setting of
DRR_FLAG_FREERECORDS

Reviewed by: Anil Vijarnia <avijarnia@racktopsystems.com>
Reviewed by: Kim Shrier <kshrier@racktopsystems.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Andrew Stormont <astormont@racktopsystems.com>

illumos/illumos-gate@880094b606
2016-03-08 17:43:21 +00:00
Alexander Motin
253159febf MFV r296513: 6450 scrub/resilver unnecessarily traverses snapshots created
after the scrub started

Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Richard Elling <Richard.Elling@RichardElling.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
Author: Matthew Ahrens <mahrens@delphix.com>

illumos/illumos-gate@38d6103674
2016-03-08 17:34:58 +00:00
Alexander Motin
4427252c14 MFV r296511: 6537 Panic on zpool scrub with DEBUG kernel
Reviewed by: Steve Gonczi <gonczi@comcast.net>
Reviewed by: Dan McDonald <danmcd@omniti.com>
Reviewed by: Igor Kozhukhov <ikozhukhov@gmail.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Matthew Ahrens <mahrens@delphix.com>
Author: Gary Mills <gary_mills@fastmail.fm>

illumos/illumos-gate@8c04a1fa3f
2016-03-08 17:32:24 +00:00
Alexander Motin
1b63fd68f4 MFV r296505: 6531 Provide mechanism to artificially limit disk performance
Reviewed by: Paul Dagnelie <pcd@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Prakash Surya <prakash.surya@delphix.com>

illumos/illumos-gate@97e8130957
2016-03-08 17:27:13 +00:00
Dmitry Chagin
91f514e413 Does not leak fp. While here remove bogus cast of fp->f_data.
MFC after:	1 week
2016-03-08 15:55:43 +00:00
Dmitry Chagin
fc4b98fb88 Linux accept() system call return EOPNOTSUPP errno instead of EINVAL
for UDP sockets.

MFC after:	1 week
2016-03-08 15:15:34 +00:00
Dmitry Chagin
15c3b371e2 According to POSIX and Linux implementation the alarm() system call
is always successfull.
So, ignore any errors and return 0 as a Linux do.

XXX. Unlike POSIX, Linux in case when the invalid seconds value specified
always return 0, so in that case Linux does not return proper remining time.

MFC after:	1 week
2016-03-08 15:12:49 +00:00
Dmitry Chagin
9f4e66afb9 Link the newly created process to the corresponding parent as
if CLONE_PARENT is set, then the parent of the new process will
be the same as that of the calling process.

MFC after:	1 week
2016-03-08 15:08:22 +00:00
Navdeep Parhar
fa6d184d93 cxgbe(4): Minor updates to the shared routines that deal with firmware images. 2016-03-08 10:07:40 +00:00
Navdeep Parhar
89308a40ba cxgbe(4): Fix t4_tp_get_rdma_stats. 2016-03-08 09:40:45 +00:00
Navdeep Parhar
a5eff82112 cxgbe(4): Many new functions in the shared code, unused at this time.
Obtained from:	Chelsio Communications
2016-03-08 09:34:56 +00:00
Navdeep Parhar
f799998f84 cxgbe(4): Use t4_link_down_rc_str in shared code to decode the reason
the link is down, instead of doing it in OS specific code.
2016-03-08 08:59:34 +00:00
Stanislav Galabov
448f746eb6 Add MIPS_INTRNG to sys/conf/options.mips
This was somehow missed in the commit of
https://reviews.freebsd.org/D5182
although it was in the original diff submitted for review.

Approved by:	adrian (mentor)
Differential Revision:	https://reviews.freebsd.org/D5568
2016-03-08 08:57:53 +00:00
Navdeep Parhar
9b6d39a019 cxgbe(4): Updates to shared routines that get/set various parameters via
the firmware.

Obtained from:	Chelsio Communications
2016-03-08 08:39:53 +00:00
Navdeep Parhar
05e2c36c20 cxgbe(4): Remove __devinit and SPEED_<foo> as part of catch up with
internal shared code.

Obtained from:	Chelsio Communications
2016-03-08 08:13:37 +00:00
Navdeep Parhar
b3500921c4 cxgbe(4): Updates to the shared routines that deal with the serial EEPROM,
flash, and VPD.

Obtained from:	Chelsio Communications
2016-03-08 07:48:55 +00:00
Navdeep Parhar
948d0ec074 cxgbe(4): Updates to mailbox routines in the shared code.
Obtained from:	Chelsio Communications
2016-03-08 06:27:47 +00:00
Navdeep Parhar
207d9fea78 cxgbe(4): Update the interrupt handlers for hardware errors.
Obtained from:	Chelsio Communications
2016-03-08 02:44:32 +00:00
Navdeep Parhar
700cfba72d cxgbe(4): Overhaul the shared code that deals with the chip's TP block,
which is responsible for filtering and RSS.

Add the ability to use filters that match on PF/VF (aka "VNIC id") while
here.  This is mutually exclusive with filtering on outer VLAN tag with
Q-in-Q.

Sponsored by:	Chelsio Communications
2016-03-08 02:04:05 +00:00
Mark Johnston
9610c89750 Fix a couple of silly mistakes in r291962.
- Handle the case where no DOF helper is provided. This occurs with the
  currently-unused DTRACEHIOC_ADD ioctl.
- Fix some checks that prevented the loading DOF in the (non-default)
  lazyload mode.
2016-03-08 00:46:03 +00:00
Mark Johnston
380344a7af Fix fasttrap tracepoint locking.
Upstream, tracepoints are protected by per-CPU mutexes. An unlinked
tracepoint may be freed once all the tracepoint mutexes have been acquired
and released - this is done in fasttrap_mod_barrier(). This mechanism was
not properly ported: in some places, the proc lock is used in place of a
tracepoint lock, and in others the locking is omitted entirely. This change
implements tracepoint locking with an rmlock, where the read lock is used
in fasttrap probe context. As a side effect, this fixes a recursion on the
proc lock when the raise action is used from a userland probe.

MFC after:	1 month
2016-03-08 00:43:03 +00:00
Navdeep Parhar
90e7434a6d cxgbe(4): Add a struct sge_params to store per-adapter SGE parameters.
Move the code that reads all the parameters to t4_init_sge_params in the
shared code.  Use these per-adapter values instead of globals.

Sponsored by:	Chelsio Communications
2016-03-08 00:23:56 +00:00
Mark Johnston
6b1bddce00 Remove the fasttrap implementation for sparc.
Other machine-dependent code required for DTrace on sparc is not present in
the tree, so there's no point to keeping the fasttrap code.
2016-03-08 00:18:46 +00:00
Randall Stewart
ec64c84ddc Fix a sneaky bug where we were missing an extern
to get the rxt threshold.. and thus created our own defaulted to 0 :-(

Sponsored by:	Netflix Inc
2016-03-08 00:16:34 +00:00
Mark Johnston
acaa855f6e MFV r296306: 6604 harden DIF bounds checking
Reviewed by: Alex Wilson <alex.wilson@joyent.com>
Reviewed by: Patrick Mooney <patrick.mooney@joyent.com>
Reviewed by: Dan McDonald <danmcd@omniti.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Bryan Cantrill <bryan@joyent.com>

illumos/illumos-gate@1c0cef67db

MFC after:	2 weeks
2016-03-08 00:14:14 +00:00
Bryan Drewery
1e35cdf678 Add missing break for r296472.
This was lost in git rebasing, though it has no functional change.

X-MFC-With:	r296472
MFC after:	1 week
2016-03-07 21:45:24 +00:00
Bryan Drewery
4039c53163 Require kldunload -f to unload.
Code may still be executing from the wrappers at unload time and thus is
not generally safe to unload.  Converting the wrappers to use
EVENTHANDLER(9) will allow this to safely drain on active threads in
hooks.  More work on EVENTHANDLER(9) is needed first.

MFC after:	1 week
Sponsored by:	EMC / Isilon Storage Division
2016-03-07 21:39:29 +00:00
Navdeep Parhar
4f8a1fd8cd cxgbe(4): Updated register dumps.
- Get the list of registers to read during a regdump from the shared
  code instead of the OS specific code.  This follows a similar move
  internally.  The shared code includes the list for T6.

- Update cxgbetool to be able to decode T5 VF, T6, and T6 VF register
  dumps (and catch up with some updates to T4 and T5 register decode).

Obtained from:	Chelsio Communications
Sponsored by:	Chelsio Communications
2016-03-07 21:11:35 +00:00
Bryan Drewery
8a81693ad5 Only call bwillwrite() for logging to vnodes, as other fo_write() calls do.
MFC after:	1 week
Sponsored by:	EMC / Isilon Storage Division
2016-03-07 21:10:19 +00:00
Konstantin Belousov
3cfce8e4df Convert all panics from the link_elf_obj kernel linker for object
files format into printfs and errors to caller.  Some leaks of
resources are there, but the same leaks are present in other error
pathes.  With the change, the kernel at least boots even when module
with unexpected or corrupted ELF structure is preloaded.

Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
2016-03-07 18:44:06 +00:00
Jonathan T. Looney
737d4f6c93 As reported on the transport@ and current@ mailing lists, the FreeBSD TCP
stack is not compliant with RFC 7323, which requires that TCP stacks send
a timestamp option on all packets (except, optionally, RSTs) after the
session is established.

This patch adds that support. It also adds a TCP signature option to the
packet, if appropriate.

PR:		206047
Differential Revision:	https://reviews.freebsd.org/D4808
Reviewed by:	hiren
MFC after:	2 weeks
Sponsored by:	Juniper Networks
2016-03-07 15:00:34 +00:00
Jonathan T. Looney
9cbade8feb Some cleanup in tcp_respond() in preparation for another change:
- Reorder variables by size
- Move initializer closer to where it is used
- Remove unneeded variable

Differential Revision:	https://reviews.freebsd.org/D4808
Reviewed by:	hiren
MFC after:	2 weeks
Sponsored by:	Juniper Networks
2016-03-07 14:59:49 +00:00
Hans Petter Selasky
cb19abd277 Run the LinuxKPI PCI shutdown handler free of the Giant mutex.
MFC after:	1 week
Sponsored by:	Mellanox Technologies
2016-03-07 14:35:31 +00:00
Dimitry Andric
20893a44b7 Since kernel modules can now contain sections of type SHT_AMD64_UNWIND,
the boot loader should not skip over these anymore while loading images.
Otherwise the kernel can still panic when it doesn't find the .eh_frame
section belonging to the .rela.eh_frame section.

Unfortunately this will require installing boot loaders from sys/boot
before attempting to boot with a new kernel.

Reviewed by:	kib
MFC after:	2 weeks
X-MFC-With:	r296419
2016-03-06 15:57:43 +00:00
Andrew Turner
f4df324224 Add SMP support for the Allwinner A31 and A31s. This updated the existing
code for the A20 to use the new PLATFORM_SMP interface, and extends it to
add support for the new SoCs allowing for both to coexist within the same
kernel.

Submitted by:	Emmanuel Vadot <manu@bidouilliste.com>
Reviewed by:	jmcneill
Differential Revision:	https://reviews.freebsd.org/D5342
2016-03-06 11:41:08 +00:00
Konstantin Belousov
13f28d969a In the link_elf_obj.c, handle sections of type SHT_AMD64_UNWIND same
as SHT_PROGBITS.  This is needed after the clang 3.8 import, which
generates that type for .eh_frame section, which had SHT_PROGBITS type
before.

Reported by:	 Nikolai Lifanov <lifanov@mail.lifanov.com>
PR:	207729
Tested by:	dim (previous version)
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
2016-03-06 00:31:11 +00:00
Dimitry Andric
e74e149f78 Upgrade our copies of clang, llvm, lldb and compiler-rt to 3.8.0
release.

Please note that from 3.5.0 onwards, clang, llvm and lldb require C++11
support to build; see UPDATING for more information.

Release notes for llvm and clang will soon be available here:
<http://llvm.org/releases/3.8.0/docs/ReleaseNotes.html>
<http://llvm.org/releases/3.8.0/tools/clang/docs/ReleaseNotes.html>

Thanks to Ed Maste, Roman Divacky, Davide Italiano and Antoine Brodin
for their help.

Relnotes:	yes
2016-03-05 20:24:31 +00:00
Dimitry Andric
a36b180a7f Merge ^/head r296369 through r296409. 2016-03-05 15:34:54 +00:00
Andrew Turner
c794871343 Add support to enable/disable both the EHCI and OHCI Allwinner clocks. This
adds a lock to ensure only a single device is accessing the hardware. A
reference count is added to only enable when we start to use the clock,
and to disable after we have finished needing the clock.

This was extracted from a larger review to add OHCI support to the
Allwinner SoCs.

Submitted by:	Emmanuel Vadot <manu@bidouilliste.com>
Reviewed by:	jmcneill
X-Differential Revision:	https://reviews.freebsd.org/D5481
2016-03-05 13:17:53 +00:00
Andriy Voskoboinyk
5a6b5f3c69 net80211: fix possible overflow in IEEE80211_TU_TO_TICKS()
For hz=1000 any number, greater than 4194 causes integer overflow;
this change casts the number to uint64_t before operating with it.

Approved by:	adrian (mentor)
Differential Revision:	https://reviews.freebsd.org/D5268
2016-03-04 21:22:11 +00:00
Alexander Motin
1a686265ee Set bhsdi_target_transfer_tag to reserved value, which is 0xffffffff.
This should be a purely cosmetic change.
2016-03-04 19:57:11 +00:00
Konstantin Belousov
f36aa2b792 Pass MNTK_NO_IOPF and MNTK_UNMAPPED_BUFS flags from the lower
filesystem to the nullfs mount.

MNTK_NO_IOPF must be present on the nullfs struct mount so that struct
file fo_read and fo_write fops operate in the mode requested by the
lower mount.

MNTK_UNMAPPED_BUFS allows VOP_GETPAGES() to use unmapped buffers.  It
does not matter for VOP_GETPAGES() calls from vm_fault() since handle
of the vm_object always points to the lower vnode.  But it may be
useful for other situations where VOP_GETPAGES() is used.

Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
2016-03-04 17:24:28 +00:00
Sean Bruno
7bfed09e02 The register read/write mphy functions have misleading whitespace around
the locked check. This cleanup merely preserves the existing functionality
while improving the ready check.

Submitted by:	Jim Thompson
Reviewed by:	gnn erj
Obtained from:	Netgate
MFC after:	2 weeks
Sponsored by:	Netgate
Differential Revision:	https://reviews.freebsd.org/D5448
2016-03-04 14:23:34 +00:00
Navdeep Parhar
d1205d093d cxgbe(4): Very basic T6 awareness. This is part of ongoing work to
update to the latest internal shared code.

- Add a chip_params structure to keep track of hardware constants for
  all generations of Terminators handled by cxgbe.
- Update t4_hw_pci_read_cfg4 to work with T6.
- Update the hardware debug sysctls (hidden within dev.<tNnex>.<n>.misc.*) to
  work with T6.  Most of the changes are in the decoders for the CIM
  logic analyzer and the MPS TCAM.
- Acquire the regwin lock around indirect register accesses.

Obtained from:	Chelsio Communications
Sponsored by:	Chelsio Communications
2016-03-04 13:11:13 +00:00
Hans Petter Selasky
96608f1ff4 Whitespace fixes.
MFC after:	1 week
Sponsored by:	Mellanox Technologies
2016-03-04 09:07:30 +00:00
Sepherosa Ziehau
05c0884ee1 hyperv/hn: Add per-TX ring stats for # of transmitted packets
MFC after:	2 weeks
Sponsored by:	Microsoft OSTC
2016-03-04 07:07:42 +00:00
Sepherosa Ziehau
7dda664075 hyperv/hn: Pass channel to send done callbacks.
Mainly to strigent the data packet send done check.

MFC after:	2 weeks
Sponsored by:	Microsoft OSTC
2016-03-04 07:00:37 +00:00
Sepherosa Ziehau
21640df213 hyperv/hn: Add multiple channel support, a.k.a. vRSS
Each channel contains one RX ring and one TX ring.  And we
try to distribute the channels to different evenly.

Note: Currently we don't have enough information to extract
the RSS type and RSS hash value from the received packets.

This greatly improves the TX/RX performance for 8 virtual CPU
Hyper-V over 10Ge: it can max out 10Ge for TCP when multiple
RX/TX rings are enabled.

This almost doubles the TX/RX performance for locally connected
Hyper-Vs: was 6Gbps w/ 128 TCP streams, now 11Gbps w/ multiple
RX/TX rings enabled.

It is not enabled by default; it will be switched on after more
tests.

Collaborated with:	Hongjiang Zhang <honzhan microsoft com>
MFC after:	2 week
Sponsored by:	Microsoft OSTC
2016-03-04 06:52:11 +00:00
Stanislav Galabov
7345458d37 Fix ubldr build failure on mipsn32 and mipsn32el targets.
Approved by:	adrian (mentor)
2016-03-04 05:36:53 +00:00
Justin Hibbits
e8cf8358d0 Remove default initializations for rman, a'la r296331 2016-03-04 01:25:45 +00:00
Dimitry Andric
82aa34e6fa Merge ^/head r296007 through r296368. 2016-03-03 23:15:46 +00:00
Jared McNeill
d7acb49aee Add support for resetting the PHY via GPIO.
Submitted by:		Emmanuel Vadot <manu@bidouilliste.com>
Reviewed by:		andrew, jmcneill
Approved by:		adrian (mentor)
Differential Revision:	https://reviews.freebsd.org/D5505
2016-03-03 22:26:36 +00:00
Jared McNeill
7bf46e12dd Add support for Allwinner A31 RTC controller.
Very similar to the A10 RTC controller with a few register offsets changed
and a different location for the LOSC switch status.

Submitted by:		Emmanuel Vadot <manu@bidouilliste.com>
Reviewed by:		jmcneill
Approved by:		adrian (mentor)
Differential Revision:	https://reviews.freebsd.org/D5500
2016-03-03 22:19:39 +00:00
Andriy Voskoboinyk
ae132f1122 zyd, run, ural: do not corrupt MAC address
Do not use ic_macaddr as a storage for current BSSID;
it may be reused in vap creation procedure;
similar to r288619.

Approved by:	adrian (mentor)
Differential Revision:	https://reviews.freebsd.org/D5513
2016-03-03 20:06:16 +00:00
Andriy Voskoboinyk
467f437b43 net80211: drop <smth> -> INIT state transition warning (STA mode only)
This warning is irrelevant, since user can execute
'ifconfig wlan0 down' (or turn off card via rfkill switch) at any time.

Approved by:	adrian (mentor)
Differential Revision:	https://reviews.freebsd.org/D5511
2016-03-03 19:53:46 +00:00
Steven Hartland
eb4cd7cb9a Fix ixl with RSS
Fix compilation of ixl when RSS option is set, broken by r295946

MFC after:	3 weeks
X-MFC-With:	r295946
Sponsored by:	Multiplay
Differential Revision:	https://reviews.freebsd.org/D5428
2016-03-03 19:49:37 +00:00
George V. Neville-Neil
e79cb051d5 Fix dtrace probes (introduced in 287759): debug__input was used
for output and drop; connect didn't always fire a user probe
some probes were missing in fastpath

Submitted by:	Hannes Mehnert
Sponsored by:	REMS, EPSRC
Differential Revision:	https://reviews.freebsd.org/D5525
2016-03-03 17:46:38 +00:00
Andrey V. Elsukov
657592fd65 Use correct size for malloc.
Obtained from:	Yandex LLC
MFC after:	1 week
2016-03-03 13:07:59 +00:00
Hans Petter Selasky
510ebed7be Add more functions to the LinuxKPI.
Define strnicmp as a function macro instead of a regular macro while
at it.

MFC after:	1 week
Sponsored by:	Mellanox Technologies
2016-03-03 09:56:04 +00:00
Hans Petter Selasky
24fe42dcdd Allow for overlapping quirk device ranges. Prior to this patch only
the first device entry matching the USB vendor, product and revision
would be searched for quirks. After this patch all device entries will
be searched for quirks.

MFC after:	1 week
2016-03-03 08:47:27 +00:00
Justin Hibbits
534ccd7bbf Replace all resource occurrences of '0UL/~0UL' with '0/~0'.
Summary:
The idea behind this is '~0ul' is well-defined, and casting to uintmax_t, on a
32-bit platform, will leave the upper 32 bits as 0.  The maximum range of a
resource is 0xFFF.... (all bits of the full type set).  By dropping the 'ul'
suffix, C type promotion rules apply, and the sign extension of ~0 on 32 bit
platforms gets it to a type-independent 'unsigned max'.

Reviewed By: cem
Sponsored by:	Alex Perez/Inertial Computing
Differential Revision: https://reviews.freebsd.org/D5255
2016-03-03 05:07:35 +00:00
Navdeep Parhar
ecdff8fa76 cxgbe(4): First of many changes to reduce diffs with internal shared
code:

- Rename some CamelCase variables.
- s/t4_link_start/t4_link_l1cfg/g
- Pull in t4_get_port_type_description.
- Move t4_wait_op_done to t4_hw.c.
- Flip the order of the RDMA stats.
- Remove unsused function t4_iq_start_stop.
- Move t4_wait_op_done and t4_wait_op_done_val to t4_hw.c

Obtained from:	Chelsio Communications
2016-03-03 01:41:53 +00:00
Justin Hibbits
11fd20b526 Let rman_init() initialize the default rman range.
If rm_start and rm_end are both 0 on input to rman_init(), rman_init()
pre-initializes them to the default range.  No need to set it before.
2016-03-03 01:12:13 +00:00
Justin Hibbits
1adf06a308 Another convert to bus_alloc_resource_anywhere().
Depending on how cbus hands out resources, this could actually be
bus_alloc_resource_any() instead.
2016-03-03 01:09:00 +00:00
Justin Hibbits
6c3e542b3d Allocate the PCI BAR resource with bus_alloc_resource_any()
We don't support allocating any other range with PCI BARs.
2016-03-03 01:07:17 +00:00
Bryan Drewery
88fe1f7ab3 Add guessed dependencies to OBJS after bsd.dep.mk in case of it adding to SRCS.
This was a regression in r295985.

bsd.dep.mk adds to SRCS for dtrace probes, yacc grammars and some
others.

The code that is moving is planned to be removed once FAST_DEPEND is
default (and the only option) though since FAST_DEPEND doesn't use this.

Pointyhat to:	bdrewery
Sponsored by:	EMC / Isilon Storage Division
2016-03-02 21:03:42 +00:00
Konstantin Belousov
5db9ed8062 If callout_stop_safe() noted that the callout is currently executing,
but next invocation is cancelled while migrating,
sleepq_check_timeout() needs to be informed that the callout is
stopped.  Otherwise the thread switches off CPU and never become
runnable, since running callout could have already raced with us,
while the migrating and cancelled callout could be one which is
expected to set TDP_TIMOFAIL flag for us.  This contradicts with the
expected behaviour of callout_stop() for other callers, which
e.g. decrement references from the callout callbacks.

Add a new flag CS_MIGRBLOCK requesting report of the situation as
'successfully stopped'.

Reviewed by:	jhb (previous version)
Tested by:	cognet, pho
PR:	200992
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
Differential revision:	https://reviews.freebsd.org/D5221
2016-03-02 18:46:17 +00:00
Bjoern A. Zeeb
788c03c3d8 Add gem5 support, so we attach there as well.
Fix the boundary limit to end at the end of the region and not one beyond (1).

Diagnosed by:		andrew (1)
Reviewed by:		andrew, br
Sponsored by:		DARPA/AFRL
Differential Revision:	https://reviews.freebsd.org/D5493
2016-03-02 15:26:55 +00:00
Bjoern A. Zeeb
3d9ac4ecfc Force re-routing PCI interrupts (this is for legacy INTx not MSI).
Need this for gem5, but was not needed on real hadrware (yet) as it
was always MSI.

Reviewed by:		andrew, jhb
Discovered by:		andrew
Sponsored by:		DARPA/AFRL
Differential Revision:	https://reviews.freebsd.org/D5494
2016-03-02 15:20:42 +00:00
Andrew Turner
39c44571c0 The cpu_reset_needs_v4_MMU_disable variable is only used in locore-v4.S,
only define it when building for ARMv5 or prior.

Sponsored by:	ABT Systems Ltd
2016-03-02 14:33:46 +00:00
Wojciech Macek
4d185754cf Support for Enhanced Allocation in PCI
On some platforms, BAR entries are hardcoded and must not be accessed
    using standard method. Add functionality to identify this situation
    and configure the bus based on Enhanced Allocation structure.

Obtained from:         Semihalf
Sponsored by:          Cavium
Approved by:           cognet (mentor)
Reviewed by:           jhb
Differential revision: https://reviews.freebsd.org/D5242
2016-03-02 09:54:58 +00:00
Wojciech Macek
52ea10af69 Improve ThunderX PEM driver to work on pass2 revision
Things changed:
    * do not allocate 4GB of SLI space, because it's the waste of
      system resources. Allocate only small portions when needed.
    * provide own implementation of activate_resource which performs
      address translation between PCI bus and host PA address space.
      This is temporary solution, should be replaced by bus_map_resource
      once implemented.

Obtained from:         Semihalf
Sponsored by:          Cavium
Approved by:           cognet (mentor)
Reviewed by:           jhb
Differential revision: https://reviews.freebsd.org/D5294
2016-03-02 08:39:59 +00:00
Sepherosa Ziehau
3951eba165 hyperv/hn: Make # of rings configurable
And since the host may not being able to allocate the # of rings
requested by us, save the # of rings allocated by the host in the
ring_inuse counters; use ring_inuse counters for run time operation.

This paves the way for the upcoming vRSS support.

MFC after:	1 week
Sponsored by:	Microsoft OSTC
2016-03-02 05:24:55 +00:00
Mark Johnston
925bcbd658 Use m_catpkt(9) to ensure that pkthdr fields are updated properly.
Reviewed by:	glebius
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D5497
2016-03-02 05:05:02 +00:00
Mark Johnston
3543e138e5 Set tres to NULL to avoid a double free if the m_pullup() below fails.
Reviewed by:	glebius
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D5497
2016-03-02 05:04:04 +00:00
Mark Johnston
f6ed0a3918 Use m_catpkt(9) to avoid a possible use-after-free in ieee80211_defrag().
m is not guaranteed to be valid after m_cat() returns. The effects of this
are most noticeable when INVARIANTS is enabled, since m's header length
field is given a value of 0xdeadc0de by the trash dtor.

Reviewed by:	glebius
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D5497
2016-03-02 05:01:58 +00:00
Cy Schubert
39dade169b Remove redundant NULL pointer comparison.
Reported  by:		PVS-Studio (V595) in D5245
Differential Revision:	D5245
2016-03-02 03:28:57 +00:00
Justin Hibbits
82ed3cb0e4 Replace some more default range checks with RMAN_IS_DEFAULT_RANGE().
This is a follow-on to r295832.
2016-03-02 03:26:56 +00:00
Sepherosa Ziehau
33c6a6670f hyperv/hn: Fix typo in comment
MFC after:	1 week
Sponsored by:	Microsoft OSTC
2016-03-02 03:19:59 +00:00
Sepherosa Ziehau
6c03f94bb3 hyperv/hn: Make read buffer per-channel
Submitted by:	Hongjiang Zhang <honzhan microsoft com>
Reorganized by:	sephe
MFC after:	1 week
Sponsored by:	Microsoft OSTC
2016-03-02 03:07:31 +00:00
Justin Hibbits
5670e3473f Use the m_extadd() function instead of deprecated MEXTADD().
Suggested by:	glebius
2016-03-02 02:29:35 +00:00
Justin Hibbits
9324dcb395 Remove some debug printfs 2016-03-02 02:27:53 +00:00
Sepherosa Ziehau
2ad2701c2a hyperv/hn: Pass channel to hv_nv_on_receive_completion()
While I'm here, staticize this function.

Submitted by:	Hongjiang Zhang <honzhan microsoft com>
Modified by:	sephe
MFC after:	1 week
Sponsored by:	Microsoft OSTC
2016-03-02 02:27:13 +00:00
Gleb Smirnoff
0ea37a86ba Fix regression in r296242 affecting several drivers. For EXT_NET_DRV,
EXT_MOD_TYPE, EXT_DISPOSABLE types we should first execute the free
callback, then free the mbuf, otherwise we will derefernce memory that
was just freed.

Reported and tested:	jhibbits
2016-03-02 02:12:01 +00:00
Sepherosa Ziehau
9e5c6042f9 hyperv/chan: Factor out the vcpu setting
And use it for cpu0 assignment; it does not sound right to assume that
cpu0 maps to vcpu0.  And this factored out function will be exposed to
drivers, if driver specific CPU binding is needed, e.g. hn(4).

Move default cpu select after saving channel offer message. This makes
sure that all useful information of the channel has been setup.

MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D5504
2016-03-02 01:40:47 +00:00
Sepherosa Ziehau
990aae810b hyperv/chan: Function renaming; no functional change
The renamed function create a sysctl tree for channel, and many
non-statistics nodes exists, so don't claim it only adds sysctl
nodes for statistics.

MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D5503
2016-03-02 01:33:30 +00:00
Sepherosa Ziehau
87d697796a hyperv/chan: Add sysctl node to check whether monitor is allocated or not
MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D5502
2016-03-02 01:26:05 +00:00
Justin Hibbits
8bc8506e91 Fix 2 bugs in the mpc85xx local bus controller driver.
1) Include opt_platform.h to get QORIQ_DPAA.  Otherwise the definition of
OCP85XX_TGTIF_LBC is incorrect.
2) The child resources are already allocated, just activate them, instead of
incorrectly remapping the memory regions (resource lists for lbc consist of the
virtual address of the child's resources, not the physical address).

Sponsored by:	Alex Perez/Inertial Computing
2016-03-02 00:18:05 +00:00
Bryan Drewery
e0dae8f1c0 Remove filemon->lock wrappers.
MFC after:	1 week
Sponsored by:	EMC / Isilon Storage Division
2016-03-02 00:13:13 +00:00
Bryan Drewery
3b77ac5f9e Correct a comment. 2016-03-01 23:58:53 +00:00
Jared McNeill
1b4bd0235e Add support for Allwinner A31/A31s EHCI controller and USB PHY.
Reviewed by:		andrew, Emmanuel Vadot <manu@bidouilliste.com>
Approved by:		gonzo (mentor)
Differential Revision:	https://reviews.freebsd.org/D5467
2016-03-01 22:54:30 +00:00
John Baldwin
7b8cfe26a0 Use SCHEDULER_STOPPED() in cv_*wait*() instead of checking panicstr.
Reviewed by:	kib
MFC after:	1 month
Sponsored by:	Netflix
Differential Revision:	https://reviews.freebsd.org/D5516
2016-03-01 22:51:44 +00:00
John Baldwin
f3215338ef Refactor the AIO subsystem to permit file-type-specific handling and
improve cancellation robustness.

Introduce a new file operation, fo_aio_queue, which is responsible for
queueing and completing an asynchronous I/O request for a given file.
The AIO subystem now exports library of routines to manipulate AIO
requests as well as the ability to run a handler function in the
"default" pool of AIO daemons to service a request.

A default implementation for file types which do not include an
fo_aio_queue method queues requests to the "default" pool invoking the
fo_read or fo_write methods as before.

The AIO subsystem permits file types to install a private "cancel"
routine when a request is queued to permit safe dequeueing and cleanup
of cancelled requests.

Sockets now use their own pool of AIO daemons and service per-socket
requests in FIFO order.  Socket requests will not block indefinitely
permitting timely cancellation of all requests.

Due to the now-tight coupling of the AIO subsystem with file types,
the AIO subsystem is now a standard part of all kernels.  The VFS_AIO
kernel option and aio.ko module are gone.

Many file types may block indefinitely in their fo_read or fo_write
callbacks resulting in a hung AIO daemon.  This can result in hung
user processes (when processes attempt to cancel all outstanding
requests during exit) or a hung system.  To protect against this, AIO
requests are only permitted for known "safe" files by default.  AIO
requests for all file types can be enabled by setting the new
vfs.aio.enable_usafe sysctl to a non-zero value.  The AIO tests have
been updated to skip operations on unsafe file types if the sysctl is
zero.

Currently, AIO requests on sockets and raw disks are considered safe
and are enabled by default.  aio_mlock() is also enabled by default.

Reviewed by:	cem, jilles
Discussed with:	kib (earlier version)
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D5289
2016-03-01 18:12:14 +00:00
John Baldwin
cbc4d2db75 Remove taskqueue_enqueue_fast().
taskqueue_enqueue() was changed to support both fast and non-fast
taskqueues 10 years ago in r154167.  It has been a compat shim ever
since.  It's time for the compat shim to go.

Submitted by:	Howard Su <howard0su@gmail.com>
Reviewed by:	sephe
Differential Revision:	https://reviews.freebsd.org/D5131
2016-03-01 17:47:32 +00:00
Michal Meloun
8a4ba03859 OFW_GPIOBUS: Add utility functions for easier handling of OFW GPIO pins.
Reviewed by: ian, loos (paritaly)
2016-03-01 16:10:15 +00:00
Wojciech Macek
a5d461a398 Get memory ranges from FDT if no EFI API is available on ARM64
Obtained from:         Semihalf
Submitted by:          Michal Stanek <mst@semihalf.com>
Sponsored by:          Annapurna Labs
Approved by:           cognet (mentor)
Reviewed by:           andrew, wma
Differential revision: https://reviews.freebsd.org/D5408
2016-03-01 12:50:24 +00:00
Andrew Turner
9636600cf2 Make the memory size returned from fdt_get_mem_regions a 64-bit type. This
is the physical memory size so may be larger than a u_long can hold, e.g.
on ARM with LPAE we could see an address space of up to 40 bits. On ARM
u_long is only 32 bits so the memory size will be truncated, possibly to
zero.

Reported by:	bz
Sponsored by:	ABT Systems Ltd
2016-03-01 11:39:07 +00:00
Svatopluk Kraus
32d001e479 Remove an alternative way for dealing with root interrupt controller
which is not complete. Likely, it was forgotten and not removed before
committing.
2016-03-01 11:27:58 +00:00
Svatopluk Kraus
169e6abd8f Mark other parts of interrupt framework as INTR_SOLO option specific.
Note that isrc_arg member of struct intr_irqsrc is used only for
INTR_SOLO and IPI filter. This should be remembered if IPI filters
and their arguments will be stored on another place.

This option could be unusable very soon, if interrupt controllers
implementations will not be implemented considering it.
2016-03-01 10:57:29 +00:00
Andrew Turner
344060d2e7 Stop setting the memory size in the arm EFI and FDT code, we don't use it.
Sponsored by:	ABT Systems Ltd
2016-03-01 09:51:36 +00:00
Andrew Turner
a43760692b Make the fdt_get_mem_regions memsize argument optional. It's only used in
by a few callers.

Sponsored by:	ABT Systems Ltd
2016-03-01 09:45:27 +00:00
Wojciech Macek
b2552c46b6 Enable SRE_EL2 on ARM64
Enable system register access for EL2. Alpine-V2 is
the first device requiring this to be enabled.
It is also in-sync with Linux initialization code,
and compatible with Alpine-V2 uboot requirements.

Obtained from:         Semihalf
Submitted by:          Michal Stanek <mst@semihalf.com>
Sponsored by:          Annapurna Labs
Approved by:           cognet (mentor)
Reviewed by:           wma
Differential revision: https://reviews.freebsd.org/D5394
2016-03-01 08:15:00 +00:00
Wojciech Macek
30d9287468 Add uart 8250 device to GENERIC arm64 configuration
Obtained from:         Semihalf
Submitted by:          Michal Stanek <mst@semihalf.com>
Sponsored by:          Annapurna Labs
Approved by:           cognet (mentor)
Reviewed by:           zbb, wma
Differential revision: https://reviews.freebsd.org/D5406
2016-03-01 07:06:36 +00:00
Andriy Voskoboinyk
1ffa8d7ef1 net80211: eliminate copy-paste nearby ieee80211_check_rxseq()
Approved by:	adrian (mentor)
Differential Revision:	https://reviews.freebsd.org/D4043
2016-03-01 06:47:21 +00:00
Sepherosa Ziehau
b431335d25 hyperv/channel: Nuke useless stack variable
MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D5499
2016-03-01 05:15:26 +00:00
Sepherosa Ziehau
4663ccd32e hyperv/hn: Set hash per-packet-info for each packet transmission
So that the host could dispatch the TX done back to this TX ring's
owner channel

MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D5498
2016-03-01 04:59:18 +00:00
Justin Hibbits
a49d0aa92a Add another compatibility check for QorIQ GPIO driver.
Some MPC85xx GPIO controllers are compatible with QorIQ.

It may make more sense in the future to rename this and mpc85xx_gpio.c, as
mpc85xx_gpio.c appears to only be compatible with a few mpc85xx SoCs.  All other
MPC85xx SoCs use the same controller as QorIQ.
2016-03-01 03:41:48 +00:00
Justin Hibbits
e665eafb25 Correct the memory rman ranges to be to BUS_SPACE_MAXADDR
Summary:
As part of the migration of rman_res_t to be typed to uintmax_t, memory ranges
must be clamped appropriately for the bus, to prevent completely bogus addresses
from being used.

This is extracted from D4544.

Reviewed By: cem
Sponsored by:	Alex Perez/Inertial Computing
Differential Revision: https://reviews.freebsd.org/D5134
2016-03-01 02:59:06 +00:00
Navdeep Parhar
dd991bd5a1 cxgbe(4): Update T5 and T4 firmwares to 1.15.28.0.
These firmwares were obtained from the beta "Chelsio T5/T4 Unified Wire
v2.12.0.2 for Linux" release.  Changes since last release are listed in the
"Release Notes" accompanying the beta release and are copy-pasted here as well.

The plan is to have only GA'd firmwares in any -STABLE FreeBSD branch so I'll
MFC this (after 2 months) only if it ends up in a GA release.

================================================================================
================================================================================

22.1. T5 Firmware
+++++++++++++++++++++++++++++++++

Version : 1.15.28.0
Date    : 02/29/2016
================================================================================

FIXES
-----

BASE:
 - Fixed an issue in FW_RSS_VI_CONFIG_CMD handling where the default ingress
   queue was ignored.
 - Fixed an issue where adapter failed to load fw by adjusting DRAM frequency.
 - Fixed an issue in watchdog which was causing VM bring-up failure after
   reboot.
 - Fixed 40G link failures with some switches when auto-negotiation enabled.
 - Fixed to improve on link bring-up time.
 - Per port buffer groups size doubled to improve performance.
 - Fixed an issue where bogus d3hot bits were set causing traffic stall.
 - Fixed an issue where sometimes adapter was not seen after reboot.
 - Fixed an issue where iWARP was crashing in conjunction with traffic
   management.
 - Fixed an issue where link failed to come up after removing twinax cable and
   inserting optical module.

OFLD
 - Fixed a potential iSCSI data corruption issue by disabling RxFragEn flag.

FOiSCSI
 - Fixed an issue in recovery path where connection was getting closed before
   recovery processing was done.
 - Fixed an issue in TCP port reuse.
 - Fixed an issue in recovery path when large number (>64) of iSCSI connections
   were in use.
 - Returned ENETUNREACH if IP was not been provisioned yet and driver tried to
   use given inerface.

ENHANCEMENTS
------------

BASE:
 - Added new interface to program DCA settings in SGE contexts; allow 32-byte
   IQE size
 - Added PTP interface fw_ptp_ts to support PTP Frequeny and Offset adjustment.
 - Added MPS raw interface.

ETH:
 - New mailbox command FW_DCB_IEEE_CMD api added for IEEE dcbx.

OFLD:
 - WR opcode is returned to host in cqe error response.

================================================================================
================================================================================

22.2. T4 Firmware
+++++++++++++++++

Version : 1.15.28.0
Date    : 02/29/2016
================================================================================

FIXES
-----

BASE:
 - Fixed an issue in FW_RSS_VI_CONFIG_CMD handling where default ingress queue
   was ignored.
 - Fixed an issue in watchdog which was causing VM bring-up failure after
   reboot.
 - Per port buffer groups size doubled to improve performance.
 - Fixed an issue where iWARP was crashing in conjunction with traffic
   management.

FOiSCSI:
 - Fixed an issue in recovery path where connection was getting closed before
   recovery processing was done.
 - Fixed an issue in TCP port reuse.
 - Fixed an issue in recovery path when large number (>64) of iSCSI connections
   were in use.
 - Returned ENETUNREACH if IP had not been provisioned yet and driver tried to
   use given inerface.

ENHANCEMENTS
------------

BASE:
 - Added MPS raw interface.

ETH:
 - New mailbox command FW_DCB_IEEE_CMD api added for IEEE dcbx.

================================================================================

Obtained from:	Chelsio Communications
MFC after:	2 months
Sponsored by:	Chelsio Communications
2016-03-01 02:36:50 +00:00
Justin Hibbits
54ac2713d5 Add VM_MEMATTR_CACHEABLE support for AIM, for parity with Book-E.
Not used right now, but may be in the future anyway.
2016-03-01 00:50:39 +00:00
Gleb Smirnoff
cfcae3f86f Remove UMA_ZONE_REFCNT feature, now unused.
Blessed by:	jeff
2016-03-01 00:33:32 +00:00
Gleb Smirnoff
56a5f52e80 New way to manage reference counting of mbuf external storage.
The m_ext.ext_cnt pointer becomes a union. It can now hold the refcount
value itself. To tell that m_ext.ext_flags flag EXT_FLAG_EMBREF is used.
The first mbuf to attach a cluster stores the refcount. The further mbufs
to reference the cluster point at refcount in the first mbuf. The first
mbuf is freed only when the last reference is freed.

The benefit over refcounts stored in separate slabs is that now refcounts
of different, unrelated mbufs do not share a cache line.

For EXT_EXTREF mbufs the zone_ext_refcnt is no longer needed, and m_extadd()
becomes void, making widely used M_EXTADD macro safe.

For EXT_SFBUF mbufs the sf_ext_ref() is removed, which was an optimization
exactly against the cache aliasing problem with regular refcounting.

Discussed with:		rrs, rwatson, gnn, hiren, sbruno, np
Reviewed by:		rrs
Differential Revision:	https://reviews.freebsd.org/D5396
Sponsored by:		Netflix
2016-03-01 00:17:14 +00:00
Gleb Smirnoff
e7c563ed4a Fix !IEEE80211_DEBUG build. 2016-02-29 23:09:31 +00:00
Andriy Voskoboinyk
13fe5bad1f net80211: do not enforce promiscuous mode for AP scan
Drivers should set their own filters via ic_scan_start()/ic_scan_end()
callbacks; and we don't need frames other than beacons or probe responses.

(Note: this was a noop since r287197 due to promiscuous mode with bridge
workaround)

Tested with Intel 3945BG, RTL8188EU and WUSB54GC in HOSTAP mode.

Approved by:	adrian (mentor)
Differential Revision:	https://reviews.freebsd.org/D5474
2016-02-29 21:17:39 +00:00
Bryan Drewery
e9508dc293 FAST_DEPEND: Prefer .OBJDIR depend files.
Sponsored by:	EMC / Isilon Storage Division
2016-02-29 21:10:47 +00:00
Andriy Voskoboinyk
d13806f4a9 net80211: fix scanning after D5145 (PR 197498 related)
- In case, when we are doing <smth> -> INIT (FEXT_REINIT) -> <smth2>
state transition, cancel_scan() may be called in the first transition.
Reenqueue second state transition, so things will be executed in order.
- Discard any AUTH+ state transition request when INIT -> SCAN
transition is not done.
- Allow to track discarded state transitions via 'state' debugging
category.

Tested with:
 * RTL8188EU, HOSTAP mode.
 * RTL8188CUS, STA mode.
 * Intel 3945BG, IBSS and STA modes.

PR:		197498
Approved by:	adrian (mentor)
Differential Revision:	https://reviews.freebsd.org/D5482
2016-02-29 21:09:09 +00:00
Andriy Voskoboinyk
61ffca6c0a net80211: cleanup ieee80211_scan_sw.c
Make it look more consistently.
No functional changes.

Approved by:	adrian (mentor)
Differential Revision:	https://reviews.freebsd.org/D5152
2016-02-29 21:03:54 +00:00
Andriy Voskoboinyk
f4f4f6a197 net80211: refactor scan_signal()
- Pass scan state and additional internal flags as a parameters.
- Add locked version.

Tested with:
 * Intel 3945BG, STA mode.
 * RTL8188EU, STA mode.

Approved by:	adrian (mentor)
Differential Revision:	https://reviews.freebsd.org/D5148
2016-02-29 21:00:10 +00:00
Andriy Voskoboinyk
9f82bedaa1 net80211: wakeup scan_start() task when null data frame was actually
transmitted

- Use M_TXCB mechanism to report about null data frame transmission.
- Increase timeout from 1 to 10 ms (the previous one may be not enough
for non-empty queue).

Tested with:
 * Intel 3945BG, STA mode.
 * RTL8188CUS, STA mode.

Approved by:	adrian (mentor)
Differential Revision:	https://reviews.freebsd.org/D5147
2016-02-29 20:56:02 +00:00
Andriy Voskoboinyk
551f27f37a net80211: split scan_task() (#3) (into scan_start() and
scan_curchan_task() functions)

(This part should fix the problem, described in
https://lists.freebsd.org/pipermail/freebsd-wireless/2016-January/006420.html)

- Rename ss_scan_task into ss_scan_start (better describes it's
current purpose)
- Utilize taskqueue_*_timeout() functions instead of current mechanism:
 * reschedule scan_curchan_task() via taskqueue_enqueue_timeout()
for every 'maxdwell' msecs (will replace infinite loop + sleeping
for 'maxdwell' period via cv_wait());
 * rerun the task immediately when an external event occurs
(instead of waking it up via cv_signal())

Also, use mtx_sleep() to wait for null frame transmission
(allows to drop conditional variable).

Tested with:
 * Intel 3945BG, STA mode;
 * RTL8188EU, STA mode.

Approved by:	adrian (mentor)
Differential Revision:	https://reviews.freebsd.org/D5145
2016-02-29 20:53:27 +00:00
Andriy Voskoboinyk
01606a7103 net80211: split scan_task() (#2) (add scan_end() function)
Tested with:
 * Intel 3945BG, STA mode.
 * RTL8188EU, IBSS mode.

Approved by:	adrian (mentor)
Differential Revision:	https://reviews.freebsd.org/D5143
2016-02-29 20:47:07 +00:00
Andriy Voskoboinyk
2113f707fa net80211: split scan_task() (#1) (replace 'done' label with scan_done()
function)

Tested with:
 * Intel 3945BG, STA mode.
 * RTL8188EU, IBSS mode.

Approved by:	adrian (mentor)
Differential Revision:	https://reviews.freebsd.org/D5142
2016-02-29 20:44:59 +00:00
Andriy Voskoboinyk
53f521ef1c net80211: utilize ss_scanend variable from scan_state structure
Approved by:	adrian (mentor)
Differential Revision:	https://reviews.freebsd.org/D5140
2016-02-29 20:41:10 +00:00
Andriy Voskoboinyk
cafdaf03d9 net80211: reduce code verbosity in scan_task() (ieee80211_scan_sw.c)
Add local *ss_priv variable (no functional changes)

Approved by:	adrian (mentor)
Differential Revision:	https://reviews.freebsd.org/D5139
2016-02-29 20:39:04 +00:00
Andriy Voskoboinyk
04f91953f3 net80211: reduce code duplication between ieee80211_swscan_cancel_scan()
and ieee80211_swscan_cancel_anyscan()

Tested with:
 * Intel 3945BG, STA mode.
 * RTL8188EU, HOSTAP mode.

Approved by:	adrian (mentor)
Differential Revision:	https://reviews.freebsd.org/D5133
2016-02-29 20:36:00 +00:00
Ed Maste
fa078c432f userboot: use MK_CTF=no to disable CTF
The NO_ form (e.g. NO_CTF) is deprecated.
2016-02-29 17:54:55 +00:00
Andrew Turner
980b589dda Add riscv to the list of architectures for cscope. 2016-02-29 16:39:27 +00:00
Wojciech Macek
e571e15cb0 Fix fdt_get_mem_regions() to work with 64-bit addresses
Use u_long instead of uint32_t variables to avoid overflow
    in case of PA space bigger than 32-bit.

Obtained from:         Semihalf
Submitted by:          Michal Stanek <mst@semihalf.com>
Sponsored by:          Annapurna Labs
Approved by:           cognet (mentor)
Reviewed by:           andrew, br, wma
Differential revision: https://reviews.freebsd.org/D5393
2016-02-29 09:22:39 +00:00
Sepherosa Ziehau
6512e69278 hyperv/channel: Add sysctl node for channel owner cpu
And add sysctl node for sub-channel's channel id.

MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D5489
2016-02-29 09:14:55 +00:00
Sepherosa Ziehau
bd2f53618c hyperv/hn: Utilize mbuf flowid
MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D5488
2016-02-29 09:05:33 +00:00
Stanislav Galabov
55d11ce3bd Fix build failure introduced by r296182
Approved by:	adrian (mentor)
2016-02-29 09:03:07 +00:00
Sepherosa Ziehau
f4e778c14d hyperv/hn: Put LRO aggregation limit settings under FreeBSD version check
This simplifies MFC to 10-stable

MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D5487
2016-02-29 08:53:53 +00:00
Sepherosa Ziehau
27a185fc4a hyperv/hn: Switch to if_transmit by default after r296178
MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D5485
2016-02-29 08:45:07 +00:00
Stanislav Galabov
a1b701d82b This review aims at introducing ubldr (loader with U-Boot interface) for MIPS
(32 and 64-bit, LE and BE).
The changes were tested with QEMU's 'mips' target.

Most of the implementation was lifted from the ARM version, the appropriate
MIPS-specific things were implemented.

With these changes I am able to go all the way through the u-boot->ubldr->kernel
boot chain in QEMU on all combinations of bit-ness and endian-ness.

For the tests I've used FAT32 disk images (as FAT32 is supported by U-boot),
which include /boot/kernel/kernel and /boot/kernel/ubldr.bin

In U-boot I do:
fatload ide 0 <LOAD_ADDR> /boot/kernel/ubldr.bin; go <LOAD_ADDR>
where LOAD_ADDR is 80800000 for 32-bit and ffffffff80800000 for 64-bit

Then it's the usual ubldr that takes over and loads and starts a kernel.

Approved by:	adrian (mentor)
Sponsored by:	Smartcom - Bulgaria AD
Differential Revision:	https://reviews.freebsd.org/D5313
2016-02-29 07:47:04 +00:00
Stanislav Galabov
b981b8bd86 These changes attempt to put things in order before the introduction of MIPS
ubldr.

The changes are mostly dealing with removing unnecessary casts from the U-Boot
API (we're passing only pointers, no obvious reason to cast them to uint32_t),
cleaning up some compiler warnings and using the proper printf format
specifiers in order to be able to compile cleanly for both 32-bit and 64-bit
MIPS targets.

Reviewed by:	imp
Approved by:	adrian (mentor)
Sponsored by:	Smartcom - Bulgaria AD
Differential Revision:	https://reviews.freebsd.org/D5312
2016-02-29 07:27:49 +00:00
Sepherosa Ziehau
77394b18ab hyperv/channel: Add debug sysctl nodes for channel indices
It would serve as a debug tool, if the shared buffer ring's indices
stopped updating.

Submitted by:	HongJiang Zhang <honzhan microsoft com>
Reviewed by:	sephe, Jun Su <junsu microsoft com>
Modified by:	sephe
MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D5402
2016-02-29 05:24:29 +00:00
Sepherosa Ziehau
5fa2e9dd39 hyperv: Use proper fence function to keep store-load order for msgs
sfence only makes sure about the store-store order, which is not
sufficient here.  Use atomic_thread_fence_seq_cst() as suggested
jhb and kib (a locked op in the nutshell, which should have the

Reviewed by:	jhb, kib, Jun Su <junsu microsoft com>
MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D5436
2016-02-29 04:58:40 +00:00
Sepherosa Ziehau
1321c5029e buf_ring/drbr: Add buf_ring_peek_clear_sc and use it in drbr_peek
Unlike buf_ring_peek, it only supports single consumer mode, and it
clears the cons_head if DEBUG_BUFRING/INVARIANTS is defined.

The normal use case of drbr_peek for network drivers is:

m = drbr_peek(br);
err = hw_spec_encap(&m); /* could m_defrag/m_collapse */
(*)
if (err) {
    if (m == NULL)
        drbr_advance(br);
    else
        drbr_putback(br, m);
    /* break the loop */
}
drbr_advance(br);

The race is:
If hw_spec_encap() m_defrag or m_collapse the mbuf, i.e. the old mbuf
was freed, or like the Hyper-V's network driver, that transmission-
done does not even require the TX lock; then on the other CPU at the
(*) time, the freed mbuf could be recycled and being drbr_enqueue even
before the current CPU had the chance to call drbr_{advance,putback}.
This triggers a panic in drbr_enqueue duplicated element check, if
DEBUG_BUFRING/INVARIANTS is defined.

Use buf_ring_peek_clear_sc() in drbr_peek() to fix the above race.

This change is a NO-OP, if neither DEBUG_BUFRING nor INVARIANTS are
defined.

MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D5416
2016-02-29 03:54:51 +00:00
Justin Hibbits
0aeed3e993 Add support for the Freescale dTSEC DPAA-based ethernet controller.
Freescale's QorIQ line includes a new ethernet controller, based on their
Datapath Acceleration Architecture (DPAA).  This uses a combination of a Frame
manager, Buffer manager, and Queue manager to improve performance across all
interfaces by being able to pass data directly between hardware acceleration
interfaces.

As part of this import, Freescale's Netcomm Software (ncsw) driver is imported.
This was an attempt by Freescale to create an OS-agnostic sub-driver for
managing the hardware, using shims to interface to the OS-specific APIs.  This
work was abandoned, and Freescale's primary work is in the Linux driver (dual
BSD/GPL license).  Hence, this was imported directly to sys/contrib, rather than
going through the vendor area.  Going forward, FreeBSD-specific changes may be
made to the ncsw code, diverging from the upstream in potentially incompatible
ways.  An alternative could be to import the Linux driver itself, using the
linuxKPI layer, as that would maintain parity with the vendor-maintained driver.
However, the Linux driver has not been evaluated for reliability yet, and may
have issues with the import, whereas the ncsw-based driver in this commit was
completed by Semihalf 4 years ago, and is very stable.

Other SoC modules based on DPAA, which could be added in the future:
* Security and Encryption engine (SEC4.x, SEC5.x)
* RAID engine

Additional work to be done:
* Implement polling mode
* Test vlan support
* Add support for the Pattern Matching Engine, which can do regular expression
  matching on packets.

This driver has been tested on the P5020 QorIQ SoC.  Others listed in the
dtsec(4) manual page are expected to work as the same DPAA engine is included in
all.

Obtained from:	Semihalf
Relnotes:	Yes
Sponsored by:	Alex Perez/Inertial Computing
2016-02-29 03:38:00 +00:00
Adrian Chadd
b258556759 Fix up the ath(4) device names for QCA chipsets.
Submitted by:	Tobias Kortkamp <t@tobik.me>
2016-02-29 02:40:58 +00:00
Andriy Voskoboinyk
067a92f8f4 urtwn: do not filter beacon frames in HOSTAP mode while scanning
urtwn_set_rx_bssid_all() will allow to receive beacons only
when they are not denied by filter.

Revealed by D5474.

Tested with RTL8188CUS, HOSTAP mode.

Reviewed by:	kevlo
Approved by:	adrian (mentor)
Differential Revision:	https://reviews.freebsd.org/D5477
2016-02-29 00:05:37 +00:00
Andriy Voskoboinyk
f10bbaa78c net80211: fix a comment for TX lock
Approved by:	adrian (mentor)
Differential Revision:	https://reviews.freebsd.org/D5476
2016-02-28 23:52:33 +00:00
Andriy Voskoboinyk
c6427be92b net80211: remove redundant locking.
All callers of ieee80211_promisc()/ieee80211_allmulti()
(ieee80211_vap_detach(), ieee80211_ioctl(), ap_start() and ap_end())
already hold the com_lock while calling them.

Tested with RTL8188EU, STA mode.

Approved by:	adrian (mentor)
Differential Revision:	https://reviews.freebsd.org/D5475
2016-02-28 23:48:34 +00:00
Andriy Voskoboinyk
60d75eb64c net80211: fix 'taskqueue_drain with non-sleepable locks held' warning
Do not run ieee80211_waitfor_parent() when it's not needed.

Approved by:	adrian (mentor)
Differential Revision:	https://reviews.freebsd.org/D5446
2016-02-28 23:35:03 +00:00
Oleksandr Tymoshenko
d28956b489 Fix typo in device description
Spotted by: jmcneill
2016-02-28 19:39:00 +00:00
Konstantin Belousov
1bdbd70599 Implement process-shared locks support for libthr.so.3, without
breaking the ABI.  Special value is stored in the lock pointer to
indicate shared lock, and offline page in the shared memory is
allocated to store the actual lock.

Reviewed by:	vangyzen (previous version)
Discussed with:	deischen, emaste, jhb, rwatson,
	Martin Simmons <martin@lispworks.com>
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
2016-02-28 17:52:33 +00:00
Jared McNeill
3f3af790f9 Add Allwinner A10/A20 RTC driver.
Submitted by:		Vladimir Belian <fate10@gmail.com>
Reviewed by:		andrew, imp, jmcneill
Approved by:		gonzo (mentor)
Differential Revision:	https://reviews.freebsd.org/D5414
2016-02-28 17:42:27 +00:00
Andrew Turner
a19c0b37e9 Add SMP support to the ARM PLATFORM code. This will allow us to have
different methods to start the secondary cores in a kernel built for
multiple SoCs, e.g. with the Allwinner A20 and A31.

Sponsored by:	ABT systems Ltd
Differential Revision:	https://reviews.freebsd.org/D5466
2016-02-28 13:43:58 +00:00
Andrew Turner
8d88b09320 Build ofw_cpu.c on all ARM configs using FDT. As we mve towards using the
Linux dts files these are more likely to have cpu nodes we can attach to.

Sponsored by:	ABT Systems Ltd
2016-02-28 09:35:37 +00:00
Jared McNeill
ce6507d3d9 Fix PIO mode on A31 and later SoCs.
Newer Allwinner MMC implementations use a different FIFO register offset
(0x200 instead of 0x100). Since the FDT uses the same compat string for
both cases, base the decision on which FIFO offset to use on the Allwinner
SoC family.

Reviewed by:		Emmanuel Vadot <manu@bidouilliste.com>
Approved by:		gonzo (mentor)
Differential Revision:	https://reviews.freebsd.org/D5468
2016-02-27 22:26:05 +00:00
Bryan Drewery
5b83ad4bb4 Remove old compatibility checks.
MFC after:	3 days
Sponsored by:	EMC / Isilon Storage Division
2016-02-27 21:08:27 +00:00
Justin Hibbits
0f7aeab0e7 Implement pmap_change_attr() for PowerPC (Book-E only for now)
Summary:
Some drivers need special memory requirements.  X86 solves this with a
pmap_change_attr() API, which DRM uses for changing the mapping of the GART and
other memory regions.  Implement the same function for PowerPC.  AIM currently
does not need this, but will in the future for DRM, so a default is added for
that, for business as usual.  Book-E has some drivers coming down that do
require non-default memory coherency.  In this case, the Datapath Acceleration
Architecture (DPAA) based ethernet controller has 2 regions for the buffer
portals: cache-inhibited, and cache-enabled.  By default, device memory is
cache-inhibited.  If the cache-enabled memory regions are mapped
cache-inhibited, an alignment exception is thrown on access.

Test Plan:
Tested with a new driver to be added after this (DPAA dTSEC ethernet driver).
No alignment exceptions thrown, driver works as expected with this.

Reviewed By:	nwhitehorn
Sponsored by:	Alex Perez/Inertial Computing
Differential Revision: https://reviews.freebsd.org/D5471
2016-02-27 20:39:36 +00:00
Justin Hibbits
f7dc5935d3 Move another range check to use RMAN_IS_DEFAULT_RANGE(). 2016-02-27 16:27:48 +00:00
Svatopluk Kraus
5b70c08cdf Move IPI related parts back to (ARM) machine specific file now, when
the interrupt framework is also going to be used by another (MIPS)
architecture. IPI implementations may vary much across different
architectures.

An IPI implementation should still define INTR_IPI_COUNT and use
intr_ipi_setup_counters() to setup IPI counters which are inside of
intrcnt[] and intrnames[] arrays. Those are used for sysctl and ddb.
Then, intr_ipi_increment_count() should be used to increment obtained
counter.

Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D5459
2016-02-27 12:03:07 +00:00
Justin Hibbits
c47476d7e6 Migrate many bus_alloc_resource() calls to bus_alloc_resource_anywhere().
Most calls to bus_alloc_resource() use "anywhere" as the range, with a given
count.  Migrate these to use the new bus_alloc_resource_anywhere() API.

Reviewed by:	jhb
Differential Revision:	https://reviews.freebsd.org/D5370
2016-02-27 03:38:01 +00:00
Justin Hibbits
ac6c1372f4 Add the bus_alloc_resource_anywhere() convenience function.
Summary:
Many instances of bus_alloc_resource() simply use 0 and ~0 for start and end to
denote 'anywhere' with a given count.  To clean this up, introduce a
bus_alloc_resource_anywhere() convenience function.

Bump __FreeBSD_version for the new API.

Reviewed By: jhb
Differential Revision: https://reviews.freebsd.org/D5370
2016-02-27 03:35:28 +00:00
Justin Hibbits
eff83876b6 Replace several bus_alloc_resource() calls with bus_alloc_resource_any()
Most of these are BARs, and we allocate them in their entirety.  The one outlier
in this is amdsbwd, which calls bus_set_resource() prior.

Reviewed by:	jhb
Differential Revision:	https://reviews.freebsd.org/D5370 (partial)
2016-02-27 03:34:01 +00:00
Bryan Drewery
aae63957af Import bsd.clang-analyze.mk based on NetBSD's version.
This allows 'make analyze' or 'make OBJ.clang-analyzer' to run the
Clang static analyzer and present results on stdout.

Obtained from:	NetBSD (CVS Rev. 1.3)
Sponsored by:	EMC / Isilon Storage Division
Differential Revision:	https://reviews.freebsd.org/D5449
2016-02-26 22:14:00 +00:00
Bryan Drewery
4e47b95cc9 Remove more references to targets we've never had.
Sponsored by:	EMC / Isilon Storage Division
2016-02-26 22:13:35 +00:00
Andriy Voskoboinyk
f09a089ee6 net80211: fix 'uma_zalloc_arg: zone "32" with non-sleepable locks held'
when 'sysctl net.wlan.devices' is executed.

PR:		207497
Submitted by:	glebius
Approved by:	adrian (mentor)
2016-02-26 20:47:08 +00:00
Jared McNeill
81e802c14b Fix inverted test for lock status while waiting for PLL to become stable.
Reviewed by:	andrew
Approved by:	adrian (mentor)
2016-02-26 20:33:32 +00:00
Andrew Turner
aa8a1ea56f Make the CUBIEBOARD config include the A10 config with a few needed
additions. This is used by the release scripts so we need to keep it
around for now.

Sponsored by:	ABT Systems Ltd
2016-02-26 18:54:26 +00:00
Marcel Moolenaar
6bcf245ebc Bump VM_MAX_MEMSEGS from 2 to 3 to match the number of VM segment
identifiers present in vmmapi.h. In particular, it's now possible
to create a VM_FRAMEBUFFER segment.
2016-02-26 16:18:47 +00:00