]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
8 years agoRemove unused variables dtrace_in_probe and dtrace_in_probe_addr.
markj [Thu, 17 Mar 2016 18:55:54 +0000 (18:55 +0000)]
Remove unused variables dtrace_in_probe and dtrace_in_probe_addr.

8 years agoRemove 50% ZFS conditional from bsdinstall/zfsboot
allanjude [Thu, 17 Mar 2016 17:53:38 +0000 (17:53 +0000)]
Remove 50% ZFS conditional from bsdinstall/zfsboot

Remove the requirement that the resulting partition table be atleast 50% ZFS

PR: 208094
Requested by: brooks
Sponsored by: ScaleEngine Inc.

8 years agoAdd missing curly brackets in for loop.
hselasky [Thu, 17 Mar 2016 12:30:21 +0000 (12:30 +0000)]
Add missing curly brackets in for loop.

Sponsored by: Mellanox Technologies
MFC after: 1 week

8 years agoReduce the number of local variables. Remove redundant check that inp
ae [Thu, 17 Mar 2016 11:10:44 +0000 (11:10 +0000)]
Reduce the number of local variables. Remove redundant check that inp
pointer isn't NULL, it is safe, because we are handling IPV6_PKTINFO
socket option in this block of code. Also, use in6ifa_withaddr() instead
of ifa_withaddr().

8 years agoChange in6_selectsrc() to allow usage of non-local IPv6 addresses in
ae [Thu, 17 Mar 2016 10:59:30 +0000 (10:59 +0000)]
Change in6_selectsrc() to allow usage of non-local IPv6 addresses in
IPV6_PKTINFO ancillary data when IPV6_BINDANY socket option is set.

Submitted by: n_hibma
MFC after: 2 weeks

8 years agoAdd paragraph about isp(4) improvements.
mav [Thu, 17 Mar 2016 09:04:07 +0000 (09:04 +0000)]
Add paragraph about isp(4) improvements.

8 years agoA20: Gpiobus can be attached only after full gpio driver initialization.
mmel [Thu, 17 Mar 2016 08:57:41 +0000 (08:57 +0000)]
A20: Gpiobus can be attached only after full gpio driver initialization.
While i'm in, remove now unused global variable.

Submited by: Emmanuel Vadot <manu@bidouilliste.com>

8 years agoMake it an error to build an ARM kernel with COMPAT_FREEBSDn where n < 10.
andrew [Thu, 17 Mar 2016 08:40:58 +0000 (08:40 +0000)]
Make it an error to build an ARM kernel with COMPAT_FREEBSDn where n < 10.
We changed the ABI for ARM in 10, an removed support for the old ABI in 11,
as such binaries from these releases are unable to be run on a head kernel.

Reviewed by: bz, emast
Sponsored by: ABT Systems Ltd
Differential Revision: https://reviews.freebsd.org/D5652

8 years agoFixes a few style(9) issues, remove extra blank lines.
loos [Thu, 17 Mar 2016 06:23:48 +0000 (06:23 +0000)]
Fixes a few style(9) issues, remove extra blank lines.

No functional changes.

Sponsored by: Rubicon Comunications (Netgate)

8 years agoxo_config.h no longer in contrib, so -I's needed
sjg [Thu, 17 Mar 2016 04:21:57 +0000 (04:21 +0000)]
xo_config.h no longer in contrib, so -I's needed

PR: /homes/sjg/commit-logs/freebsd/libxo/xo_config.diff
Reviewed by: jkim

8 years agocxgbe(4): Tidy up PAUSE frame accounting.
np [Thu, 17 Mar 2016 01:15:16 +0000 (01:15 +0000)]
cxgbe(4): Tidy up PAUSE frame accounting.

Figure out if the chip is counting PAUSE frames in the "normal" stats
and take them out if it is.  This fixes a bug in the tx stats because
the default hardware behavior is different for Tx and Rx but the driver
was treating both the same way.  The result was that OPACKETS, OBYTES,
and OMCASTS were under-reported (if tx_pause > 0) before this change.

Note that the mac_stats sysctl still gives you the raw value of these
statistics straight from the device registers.

8 years ago[net80211] Add some more missing IEs.
adrian [Thu, 17 Mar 2016 01:09:21 +0000 (01:09 +0000)]
[net80211] Add some more missing IEs.

There are a /lot/ more missing; I'll chase these down over time.

Obtained from: 802.11-2012 standard

8 years agofail(9): Only gather/print stacks if STACK is enabled
cem [Thu, 17 Mar 2016 01:05:53 +0000 (01:05 +0000)]
fail(9): Only gather/print stacks if STACK is enabled

This is a follow-up fix to the earlier r296927.

Reported by: bz
Sponsored by: EMC / Isilon Storage Division

8 years agoWe need libutil
sjg [Thu, 17 Mar 2016 00:37:04 +0000 (00:37 +0000)]
We need libutil

and make it feasible to at least build the tests in situ

8 years agoBring down 0.4.5 vendor files and other catchups with the distribution tarball.
obrien [Wed, 16 Mar 2016 23:59:29 +0000 (23:59 +0000)]
Bring down 0.4.5 vendor files and other catchups with the distribution tarball.

Reviewed by: phil

8 years agoMove generated file from contrib to build directory.
phil [Wed, 16 Mar 2016 23:50:41 +0000 (23:50 +0000)]
Move generated file from contrib to build directory.

Reviewed by: obrien
Approved by: sjg

8 years agoMore closely match the
obrien [Wed, 16 Mar 2016 23:39:55 +0000 (23:39 +0000)]
More closely match the
https://github.com/Juniper/libxo/releases/download/0.4.5/libxo-0.4.5.tar.gz
tarball.

Reviewed by: phil

8 years agoImplement GELI (AES-XTS and AES-CBC only) in gptboot and gptzfsboot
allanjude [Wed, 16 Mar 2016 23:12:19 +0000 (23:12 +0000)]
Implement GELI (AES-XTS and AES-CBC only) in gptboot and gptzfsboot

Allows booting from a GELI encrypted root file system, via UFS or ZFS

Reviewed by: gnn, smh (previous version), delphij (previous version)
Relnotes: yes
Sponsored by: ScaleEngine Inc.
Differential Revision: https://reviews.freebsd.org/D4593

8 years agoMoving libxo to properly tracked, 3rd-Party imported handling.
obrien [Wed, 16 Mar 2016 23:06:34 +0000 (23:06 +0000)]
Moving libxo to properly tracked, 3rd-Party imported handling.

Reviewed by: phil, sjg

8 years agoDue to invalid use of a signed intermediate value in the bounds checking
glebius [Wed, 16 Mar 2016 22:33:12 +0000 (22:33 +0000)]
Due to invalid use of a signed intermediate value in the bounds checking
during argument validity verification, unbound zero'ing of the process LDT
and adjacent memory can be initiated from usermode.

Submitted by: CORE Security
Patch by: kib
Security: SA-16:15

8 years agocxgbe(4): Enable PFs 0-3, and allow creation of SR-IOV VFs on these PFs
np [Wed, 16 Mar 2016 19:46:22 +0000 (19:46 +0000)]
cxgbe(4): Enable PFs 0-3, and allow creation of SR-IOV VFs on these PFs
in the default configuration files.

8 years agocxgbe(4): Enable additional capabilities in the default configuration
np [Wed, 16 Mar 2016 19:43:44 +0000 (19:43 +0000)]
cxgbe(4): Enable additional capabilities in the default configuration
files.  All features with FreeBSD drivers of some kind are now in the
default configuration.

8 years agocxgbe(4): Update some register settings in the default configuration
np [Wed, 16 Mar 2016 19:41:00 +0000 (19:41 +0000)]
cxgbe(4): Update some register settings in the default configuration
files to match the "uwire" configuration.

8 years agocxgbe(4): Remove a couple of pointless assignments in sysctl_meminfo.
np [Wed, 16 Mar 2016 19:36:11 +0000 (19:36 +0000)]
cxgbe(4): Remove a couple of pointless assignments in sysctl_meminfo.
Do not display range if start = stop (this is a workaround for some
unused regions).

8 years agoRemove armeb FreeBSD 6 compat shim
emaste [Wed, 16 Mar 2016 18:55:17 +0000 (18:55 +0000)]
Remove armeb FreeBSD 6 compat shim

r296861 addressed a build failure due to undefined SYS_freebsd6_lseek
by adding a COMPAT_FREEBSD6 conditional, but we do not support FreeBSD 6
compatibility on armeb anyway so remove it completely.

Reviewed by: andrew, bz
Differential Revision: https://reviews.freebsd.org/D5643

8 years agoRemove incorrect BUGS entry about asserting lock not held.
bdrewery [Wed, 16 Mar 2016 18:39:48 +0000 (18:39 +0000)]
Remove incorrect BUGS entry about asserting lock not held.

For non-WITNESS< assertion support for SA_UNLOCKED was added in r125421 and
made to panic in r126316.

MFC after: 1 week

8 years agoFix debug printf
imp [Wed, 16 Mar 2016 16:56:28 +0000 (16:56 +0000)]
Fix debug printf

8 years agoRemove old COMPAT_FREEBSD options from the ARM kernel configs. We replaced
andrew [Wed, 16 Mar 2016 15:31:09 +0000 (15:31 +0000)]
Remove old COMPAT_FREEBSD options from the ARM kernel configs. We replaced
the ABI in 10.0, and have removed support for the old ABI in 11. As such
any of these options to provide compatibility prior to 10 are unneeded.

Sponsored by: ABT Systems Ltd

8 years agoPacify Coverity in a better way, to avoid write-only variable when building
trasz [Wed, 16 Mar 2016 14:00:45 +0000 (14:00 +0000)]
Pacify Coverity in a better way, to avoid write-only variable when building
without INVARIANTS.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agoImport basic support for Nvidia Jetson TK1 board and tegra124 SoC.
mmel [Wed, 16 Mar 2016 13:01:48 +0000 (13:01 +0000)]
Import basic support for Nvidia Jetson TK1 board and tegra124 SoC.
The following pheripherals are supported: UART, MMC, AHCI, EHCI, PCIe, I2C,
PMIC, GPIO, CPU temperature and clock.

Note: The PCIe driver is pure mash at this moment. It will be reworked
immediately when both D5237 and D2579 enter the current tree.

8 years agoFix kernel build after adding new sysctl asserts in r296933.
hselasky [Wed, 16 Mar 2016 10:42:24 +0000 (10:42 +0000)]
Fix kernel build after adding new sysctl asserts in r296933.

8 years agoFix crash in krping when run as a client due to NULL pointer access.
hselasky [Wed, 16 Mar 2016 08:49:38 +0000 (08:49 +0000)]
Fix crash in krping when run as a client due to NULL pointer access.
Initialize pointer in question which is used only when fast registers
mode is selected.

Sponsored by: Mellanox Technologies
MFC after: 1 week

8 years agoImprove the implementation and documentation of the
hselasky [Wed, 16 Mar 2016 08:37:52 +0000 (08:37 +0000)]
Improve the implementation and documentation of the
SYSCTL_COUNTER_U64_ARRAY() macro.

- Add proper asserts to the SYSCTL_COUNTER_U64_ARRAY() macro that checks
  the size of the first element of the array.
- Add an example to the counter(9) manual page how to use the
  SYSCTL_COUNTER_U64_ARRAY() macro.
- Add some missing symbolic links for counter(9) while at it.

8 years agopf: Improve forwarding detection
kp [Wed, 16 Mar 2016 06:42:15 +0000 (06:42 +0000)]
pf: Improve forwarding detection

When we guess the nature of the outbound packet (output vs. forwarding) we need
to take bridges into account. When bridging the input interface does not match
the output interface, but we're not forwarding. Similarly, it's possible for the
interface to actually be the bridge interface itself (and not a member interface).

PR: 202351
MFC after: 2 weeks

8 years agoDisplay the VHT IE names.
adrian [Wed, 16 Mar 2016 06:27:57 +0000 (06:27 +0000)]
Display the VHT IE names.

This doesn't decode the IEs just yet.

Tested:

* Archer c2 AP:

TP-LINK_D579_5G                  60:e3:27:e1:d5:78   44   54M   26:0     100 EP   SSID<TP-LINK_D579_5G> RATES<B12,18,B24,36,B48,72,96,108> DSPARMS<44> COUNTRY<US  36-48,20> TIM<050400010000> HTCAP<cap 0x6e param 0x16 mcsset[0-7,32] extcap 0x0 txbf 0x0 antenna 0x0> HTINFO<ctl 44, 5,0,0,0 basicmcs[]> VHTCAP<bf0c2000c031feff2401feff2401> VHTOPMODE<c005012a00feff> RSN<v1 mc:AES-CCMP uc:AES-CCMP km:8021X-PSK> WME<qosinfo 0x0 BE[aifsn 3 cwmin 4 cwmax 10 txop 0] BK[aifsn 7 cwmin 4 cwmax 10 txop 0] VO[aifsn 2 cwmin 3 cwmax 4 txop 94] VI[aifsn 2 cwmin 2 cwmax 3 txop 47]> BSSLOAD<0b05000001127a> VEN<dd07000c4300000000>

8 years agoAdd initial VHT IE's and action codes.
adrian [Wed, 16 Mar 2016 06:26:50 +0000 (06:26 +0000)]
Add initial VHT IE's and action codes.

Yes, there's more to 802.11ac than this.

8 years agofail.9: Bump Dd
cem [Wed, 16 Mar 2016 05:05:54 +0000 (05:05 +0000)]
fail.9: Bump Dd

8 years agofail(9): Upstreaming some fail point enhancements
cem [Wed, 16 Mar 2016 04:22:32 +0000 (04:22 +0000)]
fail(9): Upstreaming some fail point enhancements

This is several year's worth of fail point upgrades done at EMC Isilon. They
are interdependent enough that it makes sense to put a single diff up for them.
Primarily, we added:

- Changing all mainline execution paths to be lockless, which lets us use fail
  points in more sleep-sensitive areas, and allows more parallel execution
- A number of additional commands, including 'pause' that lets us do some
  interesting deterministic repros of race conditions
- The ability to dump the stacks of all threads sleeping on a fail point
- A number of other API changes to allow marking up the fail point's context in
  the code, and firing callbacks before and after execution
- A man page update

Submitted by: Matthew Bryan <matthew.bryan@isilon.com>
Reviewed by: cem (earlier version), jhb, kib, pho
With feedback from: bdrewery
Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D5427

8 years agokbdcontrol: add -P path option to add keymap search paths
emaste [Wed, 16 Mar 2016 04:05:02 +0000 (04:05 +0000)]
kbdcontrol: add -P path option to add keymap search paths

PR: 193865
Reviewed by: cem
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D5645

8 years ago[net80211] Begin implementing rate control module stats.
adrian [Wed, 16 Mar 2016 02:07:04 +0000 (02:07 +0000)]
[net80211] Begin implementing rate control module stats.

* Implement a new ratectl method, which defaults to returning nothing;
* Add a top level sysctl (net.wlan.X.rate_stats) to extract it;
* Add ratectl info for the 'amrr' module.

Tested:

* urtwn(4), STA mode

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

8 years agoPrevent invalid ixgbe advertise setting warning
smh [Wed, 16 Mar 2016 01:41:55 +0000 (01:41 +0000)]
Prevent invalid ixgbe advertise setting warning

Prevent ixgbe outputting "Invalid advertised speed" warning on boot with
no customisations by moving test from sysctl handler to set handler.

PR: 208022
MFC after: 3 days
Sponsored by: Multiplay

8 years agoPartially revert r266227 and stop stripping paths in ldscripts.
bdrewery [Tue, 15 Mar 2016 22:27:29 +0000 (22:27 +0000)]
Partially revert r266227 and stop stripping paths in ldscripts.

Specifically this fixes /usr/lib/libc.so stripping the paths to the
libraries.  The reason for this in r266227 was both likely because ld(1) did
not fully respect --sysroot until r291226 and because of the lib32
build.  The lib32 build does not use --sysroot into the /usr/lib32 path,
rather it only uses -L and -B into the /usr/lib32 path and --sysroot
into the normal (64bit) /usr/lib.  The _LDSCRIPTROOT was added with
the ldscript support in bsd.lib.mk so that it builds a 32-bit-sysrooted pathed
ldscript in the object directory and then installs a normal unprefixed
version in installworld.  This commit also fixes the rebuild during
install which was broken in r266227.  This commit would break DIRDEPS_BUILD
build of lib32 but it does not currently have a way to build it anyhow.

For example, before this change we had in /usr/lib/libc.so:
  GROUP ( libc.so.7 libc_nonshared.a libssp_nonshared.a )
Now it is restored to pre-r266227:
  GROUP ( /lib/libc.so.7 /usr/lib/libc_nonshared.a /usr/lib/libssp_nonshared.a )

The motivation for this is in testing of lld.
From emaste:
  lld does not have built-in search paths (e.g. /lib, /usr/lib) and relies on
  -L arguments passed by the caller.  As the linker is nearly always invoked
  from the clang driver this is fine other than the fact that /usr/lib/libc.so
  is an ldscript that refers to libc.so.7 which is in /lib, not /usr/lib.

PR: 207980
Reported by: emaste
Submitted by: emaste (based on)
Differential Revision: https://reviews.freebsd.org/D5637

8 years agovtfontcvt: support .hex fonts with characters beyond the Unicode BMP
emaste [Tue, 15 Mar 2016 21:32:46 +0000 (21:32 +0000)]
vtfontcvt: support .hex fonts with characters beyond the Unicode BMP

This is already supported by the vt(4) vfnt format mapping from code
points to glyphs. Update the .hex font parser to accept up to six hex
digits.

8 years agoFix small memory leak on attempt to access deleted snapshot.
mav [Tue, 15 Mar 2016 21:21:28 +0000 (21:21 +0000)]
Fix small memory leak on attempt to access deleted snapshot.

MFC after: 3 days

8 years agoPacify Coverity.
trasz [Tue, 15 Mar 2016 20:42:36 +0000 (20:42 +0000)]
Pacify Coverity.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agolibc: don't build compat functions if building WITHOUT_SYMVER
emaste [Tue, 15 Mar 2016 19:26:32 +0000 (19:26 +0000)]
libc: don't build compat functions if building WITHOUT_SYMVER

WITHOUT_SYMVER necessarily implies building a system without symver
backwards compatability.

Sponsored by: The FreeBSD Foundation

8 years agoFix copy-n-pasteo in r296899 ukbdmap.h header generation for pc98
emaste [Tue, 15 Mar 2016 17:32:29 +0000 (17:32 +0000)]
Fix copy-n-pasteo in r296899 ukbdmap.h header generation for pc98

The ukbd default is specified by UKBD_DFLT_KEYMAP not ATKBD_DFLT_KEYMAP.

PR: 193865
Submitted by: Harald Schmalzbauer

8 years agoUse hardware computed Toeplitz hash for incoming flowids
hselasky [Tue, 15 Mar 2016 15:53:37 +0000 (15:53 +0000)]
Use hardware computed Toeplitz hash for incoming flowids

Use the Toeplitz hash value as source for the flowid. This makes the
hash value more suitable for so-called hash bucket algorithms which
are used in the FreeBSD's TCP/IP stack when RSS is enabled.

Sponsored by: Mellanox Technologies
MFC after: 1 week

8 years agoFix witness panic in the ipoib_ioctl() function when unloading the
hselasky [Tue, 15 Mar 2016 15:47:26 +0000 (15:47 +0000)]
Fix witness panic in the ipoib_ioctl() function when unloading the
ipoib module.

The bpfdetach() function is trying to turn off promiscious mode on the
network interface it is attached to while holding a mutex. The fix
consists of ignoring any further calls to the ipoib_ioctl() function
when the network interface is going to be detached. The ipoib_ioctl()
function might sleep.

Sponsored by: Mellanox Technologies
MFC after: 1 week

8 years agoThe PKRU state size is 4 bytes, its support makes the XSAVE area size
kib [Tue, 15 Mar 2016 15:42:53 +0000 (15:42 +0000)]
The PKRU state size is 4 bytes, its support makes the XSAVE area size
non-multiple of 64 bytes.  Thereafter, the user state save area is
misaligned, which triggers assertion in the debugging kernels, or
segmentation violation on accesses for non-debugging configs.

Force the desired alignment of the user save area as the fix
(workaround is to disable bit 9 in the hw.xsave_mask loader tunable).
This correction is required for booting on the upcoming Intel' Purley
platform.

Reported and tested by: "Pieper, Jeffrey E" <jeffrey.e.pieper@intel.com>,
jimharris
Sponsored by: The FreeBSD Foundation
MFC after: 3 days

8 years agoAdd phy framework, a next part of new 'extended resources' family of
mmel [Tue, 15 Mar 2016 15:31:17 +0000 (15:31 +0000)]
Add phy framework, a next part of new 'extended resources' family of
support frameworks (i.e. clk/regulators/tsensors/fuses...).

It provides simple unified consumers interface for manipulations with
phy (USB/SATA/PCIe) resources.

8 years agoAdd regulator framework, a next part of new 'extended resources' family of
mmel [Tue, 15 Mar 2016 15:30:17 +0000 (15:30 +0000)]
Add regulator framework, a next part of new 'extended resources' family of
support frameworks(i.e. clk/reset/phy/tsensors/fuses...).

The framework is still far from perfect and probably doesn't have stable
interface yet, but we want to start testing it on more real boards and
different architectures.

8 years agoCLK: Add and use explicit locking for access to clock device registers.
mmel [Tue, 15 Mar 2016 15:28:24 +0000 (15:28 +0000)]
CLK: Add and use explicit locking for access to clock device registers.
Implicit locking (for read/write/modify) is not sufficient for complex
cases.

8 years agoCLK: Add enumerator for 'clocks' OFW node. Add bus device bindings
mmel [Tue, 15 Mar 2016 15:27:15 +0000 (15:27 +0000)]
CLK: Add enumerator for 'clocks' OFW node. Add bus device bindings
for clk_fixed class.

8 years agoCLK: Remove forgotten mutex from clk_fixed class.
mmel [Tue, 15 Mar 2016 15:25:26 +0000 (15:25 +0000)]
CLK: Remove forgotten mutex from clk_fixed class.

8 years agoImprove detection of extended QSFP diagnostics.
hselasky [Tue, 15 Mar 2016 15:24:55 +0000 (15:24 +0000)]
Improve detection of extended QSFP diagnostics.

The standards in the QSFP diagnostics area are not clear when the
additional measurements are present or not. Use a valid temperature
reading as an indicator for the presence of voltage and TX/RX power
measurements.

MFC after: 1 week
Sponsored by: Mellanox Technologies
Tested by: Netflix
Differential Revision: https://reviews.freebsd.org/D5391
Reviewed by: gallatin

8 years agoUse EARLY_DRIVER_MODULE() with BUS_PASS_BUS priority for ofw_gpiobus
mmel [Tue, 15 Mar 2016 15:24:18 +0000 (15:24 +0000)]
Use EARLY_DRIVER_MODULE() with BUS_PASS_BUS priority for ofw_gpiobus
and ofw_iicbus. This causes enumeration of gpiobus/iicbus at the base driver
attach time. Due to this, childern drivers can be also attached early.

8 years agoFix atkbdmap.h generation for sc/vt consoles
emaste [Tue, 15 Mar 2016 13:38:15 +0000 (13:38 +0000)]
Fix atkbdmap.h generation for sc/vt consoles

Keymap header files have historically been generated using the build
host's /usr/sbin/kbdcontrol and using the host's keymap files.

However, that introduces an issue when building a kernel to use vt(4)
on a system using sc(4), or vice versa: kbdcontrol searches for keymap
files in the /usr/share subdirectory appropriate for the host, not the
target.

With this change the build searches both the and sc keymap directories
from the source tree.

PR: 193865
Submitted by: Harald Schmalzbauer

8 years agoMake fail() preserve the errno.
trasz [Tue, 15 Mar 2016 11:10:08 +0000 (11:10 +0000)]
Make fail() preserve the errno.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agoUse the log_errno value passed to the function instead of the errno global
trasz [Tue, 15 Mar 2016 11:03:45 +0000 (11:03 +0000)]
Use the log_errno value passed to the function instead of the errno global
variable.

Suggested by: Daniel Braniss
MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agoRemove redefinitions in ARMADA code
wma [Tue, 15 Mar 2016 06:06:09 +0000 (06:06 +0000)]
Remove redefinitions in ARMADA code

* Rename IRQ_MASK to MPIC_IRQ_MASK not to overlap with
  register name from mvreg.h
* Remove ARM_INTRNG from ARMADA38X, apparently was already
  included.

8 years agoms_abi is supported with gcc 4.5 or newer, so build it with gcc if it
imp [Tue, 15 Mar 2016 05:17:31 +0000 (05:17 +0000)]
ms_abi is supported with gcc 4.5 or newer, so build it with gcc if it
is 4.5 or newer.

8 years agoMake sure we check for CAM_CDB_POINTER for all drivers. Also, for the
imp [Tue, 15 Mar 2016 05:17:29 +0000 (05:17 +0000)]
Make sure we check for CAM_CDB_POINTER for all drivers. Also, for the
drivers I've touched, filter out CAM_CDB_PHYS.

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

8 years agoRemove bare & 0x3; it encodes the values of BIO_READ and
imp [Tue, 15 Mar 2016 04:56:39 +0000 (04:56 +0000)]
Remove bare & 0x3; it encodes the values of BIO_READ and
BIO_WRITE. It's also unnecessary since the only cases in this switch
are those two.

8 years agoJust install ar5523.bin into /usr/share/firmware and stop compiling it
imp [Tue, 15 Mar 2016 04:42:37 +0000 (04:42 +0000)]
Just install ar5523.bin into /usr/share/firmware and stop compiling it
in.

Differential Review: https://reviews.freebsd.org/D5639

8 years agoFix build with HWPMC_HOOKS enabled.
sobomax [Tue, 15 Mar 2016 01:17:38 +0000 (01:17 +0000)]
Fix build with HWPMC_HOOKS enabled.

8 years agoFree the temporary buffer in sysctl_handle_counter_u64_array().
glebius [Tue, 15 Mar 2016 00:21:32 +0000 (00:21 +0000)]
Free the temporary buffer in sysctl_handle_counter_u64_array().

Submitted by: mjg

8 years agoPrint running TCP connection counts with TCP statistics.
glebius [Tue, 15 Mar 2016 00:19:30 +0000 (00:19 +0000)]
Print running TCP connection counts with TCP statistics.

8 years agoRedo r294869. The array of counters for TCP states doesn't belong to
glebius [Tue, 15 Mar 2016 00:15:10 +0000 (00:15 +0000)]
Redo r294869. The array of counters for TCP states doesn't belong to
struct tcpstat, because the structure can be zeroed out by netstat(1) -z,
and of course running connection counts shouldn't be touched.

Place running connection counts into separate array, and provide
separate read-only sysctl oid for it.

8 years agoProvide sysctl(9) macro to deal with array of counter(9).
glebius [Tue, 15 Mar 2016 00:05:00 +0000 (00:05 +0000)]
Provide sysctl(9) macro to deal with array of counter(9).

8 years agoDo not truncate office phones in finger's summary listing
lidl [Mon, 14 Mar 2016 22:20:22 +0000 (22:20 +0000)]
Do not truncate office phones in finger's summary listing

When finger is invoked as as "finger username", it produces the
long listing by default, and phones numbers are pretty-printed
by the prphone() function. When invoked as just "finger", the
same pretty-printing happens, but is truncated at 9 characters.
Given the summary listing is already greater than 80 columns,
making it even wider is of no harm.

Approved by: rpaulo (mentor)
Differential Revision: https://reviews.freebsd.org/D5638

8 years agoRevert r296868. The cast is useful to protect against passing incorrect
glebius [Mon, 14 Mar 2016 20:34:30 +0000 (20:34 +0000)]
Revert r296868. The cast is useful to protect against passing incorrect
argument type to the macro.

Submitted by: rstone

8 years agoRestore accidentaly removed comment line.
trasz [Mon, 14 Mar 2016 18:57:09 +0000 (18:57 +0000)]
Restore accidentaly removed comment line.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agoRemove useless cast in SYSCTL_ADD_COUNTER_U64 macro.
glebius [Mon, 14 Mar 2016 18:07:59 +0000 (18:07 +0000)]
Remove useless cast in SYSCTL_ADD_COUNTER_U64 macro.

8 years agoComment fix: statistics are not read-only.
glebius [Mon, 14 Mar 2016 18:06:59 +0000 (18:06 +0000)]
Comment fix: statistics are not read-only.

8 years agoFix autofs handling of filesystem labels containing plus signs and slashes.
trasz [Mon, 14 Mar 2016 17:45:39 +0000 (17:45 +0000)]
Fix autofs handling of filesystem labels containing plus signs and slashes.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agoClean up repeated "All rights reserved"
rstone [Mon, 14 Mar 2016 17:41:17 +0000 (17:41 +0000)]
Clean up repeated "All rights reserved"

8 years agoclass -> i_class. Thanks C++.
adrian [Mon, 14 Mar 2016 16:52:05 +0000 (16:52 +0000)]
class -> i_class.  Thanks C++.

Noticed by: jbeich@

8 years agoAdd myself to MAINTAINERS.
trasz [Mon, 14 Mar 2016 16:27:43 +0000 (16:27 +0000)]
Add myself to MAINTAINERS.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agoFix the printf for PAE kernels where it'd be long long to unbreak
bz [Mon, 14 Mar 2016 16:19:50 +0000 (16:19 +0000)]
Fix the printf for PAE kernels where it'd be long long to unbreak
the build.

8 years agoOnly check for SYS_freebsd6_lseek if the syscall code is defined.
bz [Mon, 14 Mar 2016 14:55:15 +0000 (14:55 +0000)]
Only check for SYS_freebsd6_lseek if the syscall code is defined.
Whether this is the right or best solution is unclear but it fixes the
build for now.

8 years agoFix typo: nmd->cur_tx_ring should be used in pci_vtnet_netmap_writev()
gnn [Mon, 14 Mar 2016 08:48:16 +0000 (08:48 +0000)]
Fix typo: nmd->cur_tx_ring should be used in pci_vtnet_netmap_writev()
The buffer length should be checked to avoid overflow, but there
is no API to get the slot length, so the hardcoded value is used.
Return the currently-first request chain back to the available
queue if there are no more packets.
Report the link as up if we managed to open vale port.
Use consistent coding style.

Submitted by: btw
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D5595

8 years agopmap arm64: fixing pmap_invalidate_range
wma [Mon, 14 Mar 2016 07:26:38 +0000 (07:26 +0000)]
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

8 years agoAdd xhci_mv.c
wma [Mon, 14 Mar 2016 07:24:08 +0000 (07:24 +0000)]
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

8 years agoAdd support for USB3.0 on Armada38x
wma [Mon, 14 Mar 2016 07:14:34 +0000 (07:14 +0000)]
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

8 years agoMake MPIC compatible with ARM_INTRNG
wma [Mon, 14 Mar 2016 07:05:41 +0000 (07:05 +0000)]
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

8 years agoFix GIC interrupt decoding in INTRNG code
wma [Mon, 14 Mar 2016 06:30:37 +0000 (06:30 +0000)]
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

8 years ago[net80211] handle unlisted information elements.
adrian [Mon, 14 Mar 2016 04:39:35 +0000 (04:39 +0000)]
[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

8 years agoReword SX_NOADAPTIVE description to be clear that adaptive is default.
bdrewery [Mon, 14 Mar 2016 00:51:45 +0000 (00:51 +0000)]
Reword SX_NOADAPTIVE description to be clear that adaptive is default.

The default changed in r193011.

MFC after:  1 week

8 years agolibdtrace: use calloc(3) instead of malloc(3) when it makes sense.
pfg [Mon, 14 Mar 2016 00:34:12 +0000 (00:34 +0000)]
libdtrace: use calloc(3) instead of malloc(3) when it makes sense.

calloc(3) is faster and occasionally safer than malloc(3) + bzero(3).

In one case, pointed out by Mark[1], this also cleans up a calculation.

Reviewed by: markj [1]
MFC after: 1 week

8 years agosh: Fix copying uninitialized field 'special'.
jilles [Sun, 13 Mar 2016 22:54:14 +0000 (22:54 +0000)]
sh: Fix copying uninitialized field 'special'.

This just copied uninitialized data and did not depend on it later, so it
should not be dangerous.

Found by: clang static analyzer

8 years agoRemove duplicate external declaration of tcprexmtthresh making
bz [Sun, 13 Mar 2016 21:26:18 +0000 (21:26 +0000)]
Remove duplicate external declaration of tcprexmtthresh making
gcc compiles barf.

8 years agoIn the de-duplication mode, when found matching md5 checksum also read
sobomax [Sun, 13 Mar 2016 21:09:08 +0000 (21:09 +0000)]
In the de-duplication mode, when found matching md5 checksum also read
back block and compare actual content. Just output original block
instead of back reference in the unlikely event of collision.

8 years agoFollow-up r296700: Fix incorrectly declaring these as .MAIN.
bdrewery [Sun, 13 Mar 2016 20:51:45 +0000 (20:51 +0000)]
Follow-up r296700: Fix incorrectly declaring these as .MAIN.

This broke bootstrap-tools at least for DIRDEPS_BUILD.

Sponsored by: EMC / Isilon Storage Division

8 years agoCheck value returned from ucl_parser_add_file().
jceel [Sun, 13 Mar 2016 19:50:17 +0000 (19:50 +0000)]
Check value returned from ucl_parser_add_file().

Reviewed by: trasz
Approved by: trasz (mentor)
MFC after: 1 month
Sponsored by: iXsystems, Inc.

8 years agoRequire firewall setup before running rc.d/netwait, otherwise the ping
ian [Sun, 13 Mar 2016 19:42:59 +0000 (19:42 +0000)]
Require firewall setup before running rc.d/netwait, otherwise the ping
packets sent by netwait may not get through.

PR: 207916
Submitted by: John.Marshall@riverwillow.com.au (ipfw), ian@ (pf, ipfilter)

8 years agoPut IPSec's anouncement of its successful intialisation under bootverbose:
rwatson [Sun, 13 Mar 2016 19:27:46 +0000 (19:27 +0000)]
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.

8 years agoWe only support GCC 4.8 for these flags.
bdrewery [Sun, 13 Mar 2016 19:17:48 +0000 (19:17 +0000)]
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

8 years agoFix a bug in bsdgrep that caused the program to hang in a tight loop for
ian [Sun, 13 Mar 2016 14:53:12 +0000 (14:53 +0000)]
Fix a bug in bsdgrep that caused the program to hang in a tight loop for
some combinations of command line options and search patterns.  The code was
examining regexec flags looking for a regcomp flag value.  The fix is to
look in the struct field where the decoded regcomp flag was stored when the
regex was compiled.

With this fix, it's possible to build WITHOUT_GNU_GREP_COMPAT and
WITH_BSDGREP and have a usable GPL-free grep (which of course lacks gnugrep
extensions).  It now passes the kyua tests except for one test that requires
the -z/--null-data gnu extension, and one test involving outputting context
lines across multiple files which appears to sometimes output an extra
delimiter line ("--") between matches (a rather obscure failure of a rather
obscure feature, so bsdgrep should be generally usable now).

8 years agoRemove name length limitation from autofs(5). The linear search with
trasz [Sun, 13 Mar 2016 14:17:23 +0000 (14:17 +0000)]
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