Commit Graph

207876 Commits

Author SHA1 Message Date
Zbigniew Bodek
107ef92ffe Enable AIO interface on ARM64 platforms
Add VFS_AIO to generic config to allow using of high-performance
asynchronous disk AIO operation.

Reviewed by:   imp
Obtained from: Semihalf
Sponsored by:  The FreeBSD Foundation
Differential revision: https://reviews.freebsd.org/D4979
2016-01-18 14:11:34 +00:00
Zbigniew Bodek
6f675c9d20 Update ThunderX PCIe driver to fit new DTS layout
In recent EFI the DTS entries changed for PCIe controller.
This commit fixes internal PCIe, external is yet TBD.

Submitted by:  Dominik Ermel <der@semihalf.com>
Obtained from: Semihalf
Sponsored by:  The FreeBSD Foundation
Differential revision: https://reviews.freebsd.org/D4976
2016-01-18 13:31:29 +00:00
Steven Hartland
45c5f4a4c9 Fix EFI_DEBUG option
Fix broken DPRINTF and wire up EFI_DEBUG so -DEFI_DEBUG to make works.

MFC after:	2 weeks
X-MFC-With:	r293268
Sponsored by:	Multiplay
2016-01-18 12:02:05 +00:00
Ruslan Bukin
2ca92170c4 Fix compilation on MIPS (typo introduced in r294227). 2016-01-18 09:36:10 +00:00
Xin LI
9123584634 MFV r294260:
Fix a wrong assertion in mandoc by applying OpenBSD
main.c,v 1.170 (florian):

Unbreak reading from stdin after recent parse() restructuring.
OK schwarze@
2016-01-18 08:52:09 +00:00
Xin LI
9927192e4f Fix a wrong assertion in mandoc by applying OpenBSD
main.c,v 1.170 (florian):

Unbreak reading from stdin after recent parse() restructuring.
OK schwarze@
2016-01-18 08:41:03 +00:00
Andrew Rybchenko
e78e1b4ddc sfxge: regenerate EF10 registers definition for Medford
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
2016-01-18 06:59:00 +00:00
Andrew Rybchenko
199852a593 sfxge: fix unused function warning
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
2016-01-18 06:54:15 +00:00
Andrew Rybchenko
e76a641b7a sfxge: regenerate siena_flash.h from FW sources
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
2016-01-18 06:45:45 +00:00
Andrew Rybchenko
3e83cbac2a sfxge: cleanup: remove extra empty lines
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
2016-01-18 06:39:06 +00:00
Andrew Rybchenko
5a59cbc95e sfxge: highlight that descriptor cache sizes are configured using TLV now
Submitted by:   Tom Millington <tmillington at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
2016-01-18 06:38:21 +00:00
Andrew Rybchenko
8b18714db0 sfxge: support RFID-selectable segments of dynamic configuration
tlv_partition_header has field *preset* to support RFID-selectable
segments of dynamic configuration

Submitted by:   Mateusz Wrzesinski <mwrzesinski at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
2016-01-18 06:33:15 +00:00
Andrew Rybchenko
08c5af79d9 sfxge: if supported by firmware, use enhanced SET_MAC command to only configure the MTU
This allows an MTU change to be requested on unpriviliged functions
without also setting all the other parameters supported by MC_CMD_SET_MAC.

The enhanced SET_MAC command was introduced in v4_7 firmware.

Submitted by:   Mark Spender <mspender at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4958
2016-01-18 06:19:28 +00:00
Andrew Rybchenko
6d0b856c80 sfxge: convert nvram set_version method to use partition id
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
2016-01-18 06:18:01 +00:00
Andrew Rybchenko
9218711910 sfxge: convert nvram get_version method to use partition id
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
2016-01-18 06:16:51 +00:00
Andrew Rybchenko
eb9703da94 sfxge: convert nvram rw_finish method to use partition id
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
2016-01-18 06:14:43 +00:00
Andrew Rybchenko
134c4c4a6c sfxge: convert nvram write method to use partition id
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4961
2016-01-18 06:13:09 +00:00
Adrian Chadd
88ecff8b96 [iwm] fix up the rate control setup code to initialise rates in the order
we want to use it.

The rate table was being initialised in low->high, but the link quality
table was being initialised high->low. So, when we did a lookup, we
would get the indexes wrong.

This started by a patch from dragonflybsd which reversed how the ni->in_ridx[]
array is being used; I'd rather it all be consistent.  So, this is consistent.

Inspired by: what I did to iwn(4) a while ago
Inspired by: DragonflyBSD; <imre@vdsz.com>
2016-01-18 05:43:34 +00:00
Andrew Turner
0cd387161a Add extra checks to make sure the size is valid. We may get an integer
underflow when we have small blocks of memory at the start and end of the
32-bit address range.

While here, only insert mappings pointing at a non-zero amount of memory.

Sponsored by:	ABT Systems Ltd
2016-01-18 00:07:04 +00:00
Justin Hibbits
02630b085c Quick exit after setting the clock control register.
Discussed with:	ian
2016-01-17 23:03:21 +00:00
Ian Lepore
5508dc2afe Make PPS ASSERT/CLEAR events match the RS-232 signal levels as per RFC 2783.
Previously the polarity was for TTL levels, which are the reverse of RS-232.

Also add handling of the UART_PPS_INVERT_PULSE option bit in the sysctl
value, the same as was recently added to uart(4), so that people using TTL
level connections can request a logical inverting of the signal.

Use the named constants from the new dev/uart/uart_ppstypes.h for the pps
capture modes and option bits.
2016-01-17 21:19:45 +00:00
Jilles Tjoelker
9ff8318f65 utimensat(2): Correct description of [EINVAL] error.
MFC after:	4 days
2016-01-17 21:14:27 +00:00
Dmitry Chagin
67968b35a0 Prevent double free of control in common sendmsg path as sosend
already freeing it.
2016-01-17 19:28:13 +00:00
Ruslan Bukin
0bfee92849 Bring in initial libc and libstand support for RISC-V.
Reviewed by:	andrew, emaste, kib
Sponsored by:	DARPA, AFRL
Sponsored by:	HEIF5
Differential Revision:	https://reviews.freebsd.org/D4943
2016-01-17 15:21:23 +00:00
Konstantin Belousov
ce958bdefe When cleaning up from failed adv locking and checking for write, do
not call VOP_CLOSE() manually.  Instead, delegate the close to
fo_close() performed as part of the fdrop() on the file failed to
open.  For this, finish constructing file on error, in particular, set
f_vnode and f_ops.

Forcibly resetting f_ops to badfileops disabled additional cleanups
performed by fo_close() for some file types, in this case it was noted
that cdevpriv data was corrupted.  Since fo_close() call must be
enabled for some file types, it makes more sense to enable it for all
files opened through vn_open_cred().

In collaboration with:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
2016-01-17 08:40:51 +00:00
Konstantin Belousov
aeace3c33c Assert that the linkage between struct cdev_privdata and and struct
file is consistent.

Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
2016-01-17 08:34:35 +00:00
Andrew Rybchenko
b60ff8405f sfxge: convert nvram erase method to use partition id
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4957
2016-01-17 05:12:37 +00:00
Ravi Pokala
bc089e5d7d [PR 206224] bv_cnt is sometimes examined without holding the bufobj lock
Add locking around access to bv_cnt which is currently being done unlocked

PR:		206224
Reviewed by:	imp
Approved by:	jhb
MFC after:	1 week
Sponsored by:	Panasas, Inc.
Differential Revision:	https://reviews.freebsd.org/D4931
2016-01-17 01:04:20 +00:00
Dimitry Andric
66817b4bbc Remove leading slashes added to ObsoleteFiles.inc in r294113. 2016-01-17 00:52:28 +00:00
Andriy Voskoboinyk
8a1d6d278d urtwn: add ROM structure for RTL8188EU
- Add the structure with already known fields offsets
  (some of them were taken from this driver,
  some (channel_plan, rf_* fields) - from TP-LINK official driver)
- Fix a typo / dehardcode a constant in RTL8192C ROM structure.

Tested with RTL8188EU, STA mode

Reviewed by:	kevlo
Approved by:	adrian (mentor)
Differential Revision:	https://reviews.freebsd.org/D4274
2016-01-17 00:52:21 +00:00
Justin Hibbits
cdf9344e50 e5500 HWPMC is identical to e500mc, so add support check for it. 2016-01-17 00:14:22 +00:00
Jamie Gritton
5160b6a7e6 Don't bother checking an ip[46].addr netmask/prefixlen. This is already
handled by ifconfig, and it was doing it wrong when the paramater included
extra ifconfig options.

PR:		205926
MFC after:	5 days
2016-01-16 22:32:57 +00:00
Justin Hibbits
6d4bd09012 Partially revert r294055.
This part was a botched revert of a test change.

Spotted by:	alc
2016-01-16 21:24:12 +00:00
Allan Jude
a94af9543d Never 4k align the MBR bootpool because zfsldr can not deal with a gap
If the bootpool does not start at the first sector of the BSD partition
then zfsldr seeks to the wrong offset inside the ZFS vdev label, and is
unable to find zfsboot, so the system does not boot

If 4k alignment is requested, align the BSD partition in the MBR table,
and align the swap and data pool, but the bootpool must start at sector 1

While here, if 4k alignment is requested, disable MBR CHS alignment, as
this results in not-4k aligned partitions.

Reported by:	Alex Wilkinson
MFC after:	5 days
Sponsored by:	ScaleEngine Inc.
2016-01-16 19:25:16 +00:00
Jamie Gritton
fcc43d065a Clear errno before calling getpw*. 2016-01-16 18:13:28 +00:00
Andrew Turner
2aa4a62da3 Use __ARM_ARCH to decide when ARM_TP_ADDRESS needs to be set. This fixes
an issue with clang 3.8.0 where none of the __ARM_ARCH_*__ macros were
defined on some ARMv6 kernel configs.

Sponsored by:	ABT Systems Ltd
2016-01-16 10:12:50 +00:00
Konstantin Belousov
27725229dc Busy the mount point which is the owner of the audit vnode, around
audit_record_write().  This is important so that VFS_STATFS() is not
done on the NULL or freed mp and the check for free space is
consistent with the vnode used for write.

Add vn_start_write() braces around VOP_FSYNC() calls on the audit vnode.

Move repeated code to fsync vnode and panic to the helper
audit_worker_sync_vp().

Reviewed by:	rwatson
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2016-01-16 10:06:33 +00:00
Warner Losh
b9d2b617ca Compile for specific cortex model inside the RPi 2. It's closer to
working, and might actually work...
2016-01-16 05:58:17 +00:00
Warner Losh
8046b4f5b5 We don't need at91_bs_tag. arm_base_bs_tag works now that we have
better dynamic device mapping that didn't exit when we started this
port. Remove it, since everything works w/o it.
2016-01-16 05:47:34 +00:00
Enji Cooper
01bab39427 Bump .Dd for the content changes 2016-01-16 05:35:42 +00:00
Warner Losh
64535e84f6 Move ohci files to their proper place in the tree for atmel.
Fix when it is included (we don't have a at91rm9200 device).
From a similar patch in the PR, with tweaked names.

PR: 206229
2016-01-16 04:47:32 +00:00
Alan Cox
477bffbe4d A fix to r292469: Iterate over the physical segments in descending rather
than ascending order in vm_phys_alloc_contig() so that, for example, a
sequence of contigmalloc(low=0, high=4GB) calls doesn't exhaust the supply
of low physical memory resulting in a later contigmalloc(low=0, high=1MB)
failure.

Reported by:	cy
Tested by:	cy
Sponsored by:	EMC / Isilon Storage Division
2016-01-16 04:41:40 +00:00
Enji Cooper
f4ce06a920 Fix -Wunused warning with clang/gcc
- Get rid of unused argc/argv variables in main
- Bump WARNS to 6

MFC after: 3 days
Sponsored by: EMC / Isilon Storage Division
2016-01-16 02:19:56 +00:00
Enji Cooper
cc67e311d5 Fix warnings with clang/gcc
- Get rid of unused argc/argv variables in main
- Exit on failure with a return code of 1 instead of -1 with err/errx as a
  return code of -1 is implementation dependent
- Bump WARNS to 6

MFC after: 5 days
Sponsored by: EMC / Isilon Storage Division
2016-01-16 02:18:36 +00:00
Enji Cooper
eb1c509ffd Fix warnings with gcc 5.0
reconnect.c:
- Convert the K&R prototype of main to an ANSI prototype to mute a
  warning from gcc 4.2.1
- Close s_sock2 after finishing off the last test to plug a leak and
  mute a warning from gcc 5.0 about a -Wunused-but-set variable

sendfile.c:
- Fix a -Wunused-but-set warning with gcc 5.0 with pagesize in main(..)

MFC after: 5 days
Sponsored by: EMC / Isilon Storage Division
2016-01-16 02:15:13 +00:00
Enji Cooper
c084ac2883 Test for EPROTOTYPE not EPROTONOSUPPORT
- `SOCK_RAW` is the implied supported type parameter for socket(2) per route(4)
- localsw in `sys/kern/uipc_usrreq.c` doesn't have an entry for `SOCK_RAW`, so
  the prototype is invalid (this isn't explicitly documented anywhere I could
  find)

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
2016-01-16 02:02:50 +00:00
Enji Cooper
7c5cecc0f9 Add missing newline to message about requiring root privileges
This will help ensure that scripts/parsers don't get confused when the message
is printed out

MFC after: 3 days
Sponsored by: EMC / Isilon Storage Division
2016-01-16 01:37:17 +00:00
Warner Losh
dce512b671 trim-time? What was I thinking. run-time.
Noticed by: Allan Jude
2016-01-16 01:30:55 +00:00
Warner Losh
21e079b85b Add some clarifications. 2016-01-16 01:13:27 +00:00
Warner Losh
195a8c0316 Improve the sentence flow as well which has the happy benefit of
making read-only modify a noun, a case where it unquestionably should
be hyphenated.
2016-01-16 00:45:48 +00:00