Commit Graph

207757 Commits

Author SHA1 Message Date
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
Warner Losh
8202ceccea Although not directly modifying a noun, read-only should be hyphenated
in this context (or in any, really).
2016-01-16 00:43:10 +00:00
Warner Losh
a0ea505e1d Read-only is typically hyphenated. Move (read only) to a spot where it
modifies a noun and hyphenate.
2016-01-16 00:39:36 +00:00
Warner Losh
62cb31dc18 Read-only is hyphenated when it modifies a noun. 2016-01-16 00:37:27 +00:00
Baptiste Daroussin
2b774394cc Update mandoc to 20160116 2016-01-15 23:28:12 +00:00
Baptiste Daroussin
49f8bd4a0f Remove config.h imported by accident 2016-01-15 23:16:04 +00:00
Alex Kozlov
2852a34f86 - Add support for zip to lesspipe.sh
Approved by:	des
2016-01-15 23:13:01 +00:00
Baptiste Daroussin
ca0834218a Import mdocml CVS snapshot 20160116 2016-01-15 23:08:59 +00:00
Alex Kozlov
b5acc1891f - Match directory extraction message with Infozip [1]
- Add comment explaining masks in check_binary()

Obtained from:	NetBSD [1]
Approved by:	des
2016-01-15 23:04:36 +00:00
Alex Kozlov
b2a265d3cd - Extract common code from extract()/extract_stdout() to extract2fd()
- Update information about central directory handling

Obtained from:	NetBSD
Approved by:	des
2016-01-15 22:58:23 +00:00
Bryan Drewery
dd076b9354 FAST_DEPEND: Fix incremental builds leading to kernel panics.
This fixes .depend.genassym.o not being included.  genassym.o depends on
all of the system headers and when rebuilt regenerates assym.s which
lists offsets for critial .S files to utilize.  By having a struct in a
system header change its offsets and not have generassym.o be rebuilt,
this would lead to panics.

The flaw in the initial commit was seeing ${OBJS} in ${SYSTEM_OBJS} and
assuming it had all of ${SRCS} in it.  This is not the case though.  The
older mkdep code splits out all of the various SRC lists for generating
the .depend file.  It also includes ${GEN_CFILES}, which had genassym.c
and was the only significant file lacking from ${SYSTEM_OBJS} upon inspection,
since it is not linked in.  Rather than duplicate the likely
soon-to-be-removed mkdep lists, just add genassym.o to the DEPENDOBJS
list.  Using ${SRCS} as bsd.dep.mk does would be nice but there are many
files in the build that are only added to ${OBJS} and not ${SRCS}, such
as bf_enc.o derived from bf_enc.S for i386.

Sponsored by:	EMC / Isilon Storage Division
Reported by:	dhw (several panics on current@)
Pointyhat to:	bdrewery
2016-01-15 22:08:58 +00:00
Bryan Drewery
9f286e8295 FAST_DEPEND: Rework optimization for r290524.
The .MAKEFLAGS check inside of the .for loop is extremely slow for some
reason.  Just moving it out of the loop trimmed -V lookup time from 11
seconds to 1 second in the kernel obj directory.

Sponsored by:	EMC / Isilon Storage Division
2016-01-15 22:08:51 +00:00
Enji Cooper
0e47853e87 - Check for accf_filter before running the tests, otherwise it will always
fail at subtest 9/11
- Use strncpy instead of strcpy with afa.af_name
2016-01-15 21:59:18 +00:00
Dimitry Andric
9516209bf2 MFV r294101: 6527 Possible access beyond end of string in zpool comment
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Dan McDonald <danmcd@omniti.com>
Approved by: Gordon Ross <gwr@nexenta.com>

illumos/illumos-gate@2bd7a8d078

This fixes erroneous double increments of the 'check' variable in a loop
in spa_prop_validate().  I ran into this in the clang380-import branch,
where clang 3.8.0 warns about it.  (It is already fixed there.)

MFC after:	3 days
2016-01-15 21:45:53 +00:00
Svatopluk Kraus
effb4b3c8c Add mmu format info into ARM vmcore.
Fix kvatop translation for 64K pages.

Reviewed by:	jhb
Approved by:	kib (mentor)
Differential Revision:    https://reviews.freebsd.org/D4942
2016-01-15 18:53:06 +00:00
Ian Lepore
765b890b92 Reduce diffs to upstream by adding a couple comment blocks and moving the
parse_boot_param() function to the end of the file.
2016-01-15 18:27:34 +00:00
Bjoern A. Zeeb
8676704962 Unbreak NOIP builds after r294084. 2016-01-15 16:45:36 +00:00
Andrew Rybchenko
6de7c598a4 sfxge: check the RX DMA end padding configuration on Medford
Submitted by:   Mark Spender <mspender at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4952
2016-01-15 15:20:26 +00:00