freebsd.git
8 years agoRegenerate
bdrewery [Thu, 14 Apr 2016 22:10:37 +0000 (22:10 +0000)]
Regenerate

8 years agoUpdate the devd.conf man page to describe the new CAM/periph system/subsystem.
scottl [Thu, 14 Apr 2016 22:03:23 +0000 (22:03 +0000)]
Update the devd.conf man page to describe the new CAM/periph system/subsystem.

MFC after: 3 days
Sponsored by: Netflix

8 years agoAdd more content for WITH_META_MODE/WITH_DIRDEPS_BUILD.
bdrewery [Thu, 14 Apr 2016 22:00:49 +0000 (22:00 +0000)]
Add more content for WITH_META_MODE/WITH_DIRDEPS_BUILD.

Sponsored by: EMC / Isilon Storage Division

8 years agoMETA_MODE+filemon: Default -DNO_CLEAN enabled.
bdrewery [Thu, 14 Apr 2016 22:00:33 +0000 (22:00 +0000)]
META_MODE+filemon: Default -DNO_CLEAN enabled.

When using meta mode with filemon, the build is reliably incremental
safe.  Bmake will use the meta files, along with filemon information,
to rebuild targets when their dependencies change, commands change,
or files they generate are missing.

Sponsored by: EMC / Isilon Storage Division

8 years agoRemove a link to the CTM section of the Handbook, which no longer exists.
wblock [Thu, 14 Apr 2016 21:56:36 +0000 (21:56 +0000)]
Remove a link to the CTM section of the Handbook, which no longer exists.

MFC after: 1 week

8 years agoAdd a devctl/devd notification conduit for CAM errors that happen at the
scottl [Thu, 14 Apr 2016 21:55:42 +0000 (21:55 +0000)]
Add a devctl/devd notification conduit for CAM errors that happen at the
periph level.  When a relevant error is reported to the periph, some
amplifying information is gathered, and the error and information are fed
to devctl with the attributes / keys system=CAM, subsystem=periph.  The
'type' key will be either 'error' or 'timeout', and based on this, various
other keys are also populated.

The purpose of this is to provide a concise mechanism for error reporting
that is less noisy than the system console but higher in resolution and
fidelity than simple sysctl counters.  We will be using it at Netflix to
populate a structured log and database to track errors and error trends
across our world-wide population of drives.

Submitted by: imp, scottl
Approved by: kenm
MFC after: 3 days
Sponsored by: Netflix
Differential Revision: D5943

8 years agoChange the type of 'etlv' field in struct named_object to uint16_t.
ae [Thu, 14 Apr 2016 21:52:31 +0000 (21:52 +0000)]
Change the type of 'etlv' field in struct named_object to uint16_t.
It should match with the type field in struct ipfw_obj_tlv.

Obtained from: Yandex LLC
Sponsored by: Yandex LLC

8 years agoNew CAM I/O scheduler for FreeBSD. The default I/O scheduler is the same
imp [Thu, 14 Apr 2016 21:47:58 +0000 (21:47 +0000)]
New CAM I/O scheduler for FreeBSD. The default I/O scheduler is the same
as before. The common scheduling bits have moved from inline code in
each of the CAM periph drivers into a library that implements the
default scheduling.

In addition, a number of rate-limiting and I/O preference options can
be enabled by adding CAM_IOSCHED_NETFLIX to your config file. A number
of extra stats are also maintained. CAM_IOSCHED_NETFLIX isn't on by
default because it uses a separate BIO_READ and BIO_WRITE queue, so
doesn't honor BIO_ORDERED between these two types of operations. We
already didn't honor it for BIO_DELETE, and we don't depend on
BIO_ORDERED between reads and writes anywhere in the system (it is
currently used with BIO_FLUSH in ZFS to make sure some writes are
complete before others start and as a poor-man's soft dependency in
one place in UFS where we won't be issuing READs until after the
operation completes). However, out of an abundance of caution, it
isn't enabled by default.

Plus, this also brings in NCQ TRIM support for those SSDs that support
it. A black list is also provided for known rogues that use NCQ trim
as an excuse to corrupt the drive. It was difficult to separate out
into a separate commit.

This code has run in production at Netflix for over a year now.

Sponsored by: Netflix, Inc
Differential Revision: https://reviews.freebsd.org/D4609

8 years agoAdjust some comments and make ref_opcode_object() static.
ae [Thu, 14 Apr 2016 21:45:18 +0000 (21:45 +0000)]
Adjust some comments and make ref_opcode_object() static.

8 years agoo Teach opcode rewriting framework handle several rewriters for
ae [Thu, 14 Apr 2016 21:31:16 +0000 (21:31 +0000)]
o Teach opcode rewriting framework handle several rewriters for
  the same opcode.

o Reduce number of times classifier callback is called. It is
  redundant to call it just after find_op_rw(), since the last
  does call it already and can have all results.

o Do immediately opcode rewrite in the ref_opcode_object().
  This eliminates additional classifier lookup later on bulk update.
  For unresolved opcodes the behavior still the same, we save information
  from classifier callback in the obj_idx array, then perform automatic
  objects creation, then perform rewriting for opcodes using indeces
  from created objects.

Obtained from: Yandex LLC
Sponsored by: Yandex LLC

8 years agoClean up trailing whitespace in lib/libcam; no functional change
ngie [Thu, 14 Apr 2016 21:10:53 +0000 (21:10 +0000)]
Clean up trailing whitespace in lib/libcam; no functional change

MFC after: 3 weeks
Sponsored by: EMC / Isilon Storage Division

8 years agoMETA_MODE: Pass along the default sysroot in bootstrap-tools to avoid rebuilds later.
bdrewery [Thu, 14 Apr 2016 21:09:03 +0000 (21:09 +0000)]
META_MODE: Pass along the default sysroot in bootstrap-tools to avoid rebuilds later.

Some of the clang libraries build in this phase and the cross-tools
phase.  Later in the cross-tools phase when they build with a default
TOOLS_PREFIX, they see a changed build command in meta mode due to
the changed DEFAULT_SYSROOT.  This is avoided by passing along
TOOLS_PREFIX earlier.

Sponsored by: EMC / Isilon Storage Division

8 years agoMETA_MODE: Don't rebuild build-tools targets during normal build.
bdrewery [Thu, 14 Apr 2016 21:06:10 +0000 (21:06 +0000)]
META_MODE: Don't rebuild build-tools targets during normal build.

This avoids 'build command changed' due to CFLAGS/CC changes during the
normal build.  Without this the build-tools targets end up rebuilding
for the *target* rather than keeping the native versions built in
build-tools.

Sponsored by: EMC / Isilon Storage Division

8 years agoImplement the dependency condition more safely.
bdrewery [Thu, 14 Apr 2016 21:04:49 +0000 (21:04 +0000)]
Implement the dependency condition more safely.

Nested : are not handled well without "".

Sponsored by: EMC / Isilon Storage Division

8 years agoFollow-up r297835: Let the intented default cookie work.
bdrewery [Thu, 14 Apr 2016 21:04:45 +0000 (21:04 +0000)]
Follow-up r297835: Let the intented default cookie work.

This happened to work for not prepending .OBJDIR twice but broke the
other case of prepending it when needed.

Pointyhat to: bdrewery
Sponsored by: EMC / Isilon Storage Division

8 years agoRework META_TARGETS so that it automatically adds META_DEPS to the targets.
bdrewery [Thu, 14 Apr 2016 21:04:42 +0000 (21:04 +0000)]
Rework META_TARGETS so that it automatically adds META_DEPS to the targets.

This will only be done if the target is defined, so if the target is
defined after bsd.sys.mk is included then it needs to manually add
${META_DEPS} still.

Sponsored by: EMC / Isilon Storage Division

8 years agoMark some more .PHONY targets.
bdrewery [Thu, 14 Apr 2016 21:04:37 +0000 (21:04 +0000)]
Mark some more .PHONY targets.

Sponsored by: EMC / Isilon Storage Division

8 years agoMove several functions related to opcode rewriting framework from
ae [Thu, 14 Apr 2016 20:49:27 +0000 (20:49 +0000)]
Move several functions related to opcode rewriting framework from
ip_fw_table.c into ip_fw_sockopt.c and make them static.

Obtained from: Yandex LLC

8 years agoExtract virtual port address from RQSTYPE_RPT_ID_ACQ.
mav [Thu, 14 Apr 2016 20:49:01 +0000 (20:49 +0000)]
Extract virtual port address from RQSTYPE_RPT_ID_ACQ.

This should close the race between request arriving on new target mode
virtual port and its scanner thread finally fetch its address for request
routing.

8 years agoAllow the handling of ICMP messages sent in response to SCTP packets
tuexen [Thu, 14 Apr 2016 19:59:21 +0000 (19:59 +0000)]
Allow the handling of ICMP messages sent in response to SCTP packets
containing an INIT chunk. These need to be handled in case the peer
does not support SCTP and returns an ICMP messages indicating destination
unreachable, protocol unreachable.

MFC after: 1 week

8 years agoWhen delivering an ICMP packet to the ctlinput function, ensure that
tuexen [Thu, 14 Apr 2016 19:51:29 +0000 (19:51 +0000)]
When delivering an ICMP packet to the ctlinput function, ensure that
the outer IP header, the ICMP header, the inner IP header and the
first n bytes are stored in contgous memory. The ctlinput functions
currently rely on this for n = 8. This fixes a bug in case the inner IP
header had options.
While there, remove the options from the outer header and provide a
way to increase n to allow improved ICMP handling for SCTP. This will
be added in another commit.

MFC after: 1 week

8 years agoDefine the *soft targets properly.
bdrewery [Thu, 14 Apr 2016 19:29:35 +0000 (19:29 +0000)]
Define the *soft targets properly.

Sponsored by: EMC / Isilon Storage Division

8 years agoFollow-up r284673: /usr/lib32/libc_pic.a is still installed, just not the profiled...
bdrewery [Thu, 14 Apr 2016 19:26:29 +0000 (19:26 +0000)]
Follow-up r284673: /usr/lib32/libc_pic.a is still installed, just not the profiled libs.

Sponsored by: EMC / Isilon Storage Division

8 years agoUpdate a debugging message in vdev_geom_open_by_guids for consistency with
asomers [Thu, 14 Apr 2016 19:20:31 +0000 (19:20 +0000)]
Update a debugging message in vdev_geom_open_by_guids for consistency with
similar messages elsewhere in the file.

MFC after: 4 weeks
Sponsored by: Spectra Logic Corp

8 years agoDo not overwrite the dchg variable.
loos [Thu, 14 Apr 2016 18:57:30 +0000 (18:57 +0000)]
Do not overwrite the dchg variable.

It does not cause any real issues because the variable is overwritten
only when the packet is forwarded (and the variable is not used anymore).

Obtained from: pfSense
MFC after: 2 weeks
Sponsored by: Rubicon Communications (Netgate)

8 years agoMake pfctl(8) more flexible when parsing bandwidth values.
loos [Thu, 14 Apr 2016 18:37:40 +0000 (18:37 +0000)]
Make pfctl(8) more flexible when parsing bandwidth values.

This is the current behaviour in OpenBSD and a similar patch exist in
pfSense too.

Obtained from: OpenBSD (partly - rev. 1.625)
MFC after: 2 weeks
Sponsored by: Rubicon Communications (Netgate)

8 years agolibpcap: fix for simple NULL pointer dereference.
pfg [Thu, 14 Apr 2016 18:31:45 +0000 (18:31 +0000)]
libpcap: fix for simple NULL pointer dereference.

Found with devel/coccinelle.

8 years agoSet NULL to the ai_next pointer which fix cap_getaddrinfo().
oshogbo [Thu, 14 Apr 2016 18:27:10 +0000 (18:27 +0000)]
Set NULL to the ai_next pointer which fix cap_getaddrinfo().
Add regression test case.

PR: 195551
Submitted by: Mikhail <mp39590@gmail.com>
Approved by: pjd (mentor)

8 years agoFix output formatting of O_UNREACH6 opcode.
ae [Thu, 14 Apr 2016 18:22:08 +0000 (18:22 +0000)]
Fix output formatting of O_UNREACH6 opcode.

Obtained from: Yandex LLC

8 years agoInclude -a in the nextboot(8) usage string.
markj [Thu, 14 Apr 2016 18:03:55 +0000 (18:03 +0000)]
Include -a in the nextboot(8) usage string.

X-MFC-With: r297772

8 years agorisc-v: for pointers replace 0 with NULL.
pfg [Thu, 14 Apr 2016 17:25:50 +0000 (17:25 +0000)]
risc-v: for pointers replace 0 with NULL.

These are mostly cosmetical, no functional change.

Found with devel/coccinelle.

8 years agoisa/pnp: for pointers replace 0 with NULL.
pfg [Thu, 14 Apr 2016 17:20:35 +0000 (17:20 +0000)]
isa/pnp: for pointers replace 0 with NULL.

These are mostly cosmetical, no functional change.

Found with devel/coccinelle.

8 years agoClean up some style(9) violations.
jamie [Thu, 14 Apr 2016 17:07:26 +0000 (17:07 +0000)]
Clean up some style(9) violations.

8 years agoRPC: for pointers replace 0 with NULL.
pfg [Thu, 14 Apr 2016 17:06:37 +0000 (17:06 +0000)]
RPC: for pointers replace 0 with NULL.

These are mostly cosmetical, no functional change.

Found with devel/coccinelle.

8 years agox86: for pointers replace 0 with NULL.
pfg [Thu, 14 Apr 2016 17:04:06 +0000 (17:04 +0000)]
x86: for pointers replace 0 with NULL.

These are mostly cosmetical, no functional change.

Found with devel/coccinelle.

8 years agoarm64 libc: hide .cerror, .curbrk, .minbrk for WITHOUT_SYMVER
emaste [Thu, 14 Apr 2016 16:32:27 +0000 (16:32 +0000)]
arm64 libc: hide .cerror, .curbrk, .minbrk for WITHOUT_SYMVER

When symver is in use these are hidden because they're not listed in
the Symbol.map. Add an explicit .hidden so they are also hidden in the
WITHOUT_SYMVER case.

Reviewed by: andrew
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D5775

8 years agoSort so pic_if.m is in the correct location with the other kern files.
andrew [Thu, 14 Apr 2016 15:52:11 +0000 (15:52 +0000)]
Sort so pic_if.m is in the correct location with the other kern files.

Obtained from: ABT Systems Ltd
Sponsored by: The FreeBSD Foundation

8 years agoUnmagic the thread pointer offset.
br [Thu, 14 Apr 2016 15:31:05 +0000 (15:31 +0000)]
Unmagic the thread pointer offset.

8 years agoFix the types for the start, end, and count arguments to
andrew [Thu, 14 Apr 2016 14:44:23 +0000 (14:44 +0000)]
Fix the types for the start, end, and count arguments to
arm_gic_fdt_alloc_resource. These were the old u_long where they should be
rman_res_t. Both of these are the same size on arm64 so this is just for
correctness, and would not have led to incorrect behaviour.

Obtained from: ABT Systems Ltd
Sponsored by: The FreeBSD Foundation

8 years agoRemove some unused fields.
hselasky [Thu, 14 Apr 2016 14:11:32 +0000 (14:11 +0000)]
Remove some unused fields.

Sponsored by: Mellanox Technologies
MFC after: 1 week

8 years agoEnsure the received IP header gets 32-bits aligned.
hselasky [Thu, 14 Apr 2016 14:10:40 +0000 (14:10 +0000)]
Ensure the received IP header gets 32-bits aligned.

The FreeBSD's TCP/IP stack assumes that the IP-header is 32-bits aligned
when decoding it. Else unaligned 32-bit memory access can happen, which
not all processor architectures support.

Sponsored by: Mellanox Technologies
MFC after: 1 week

8 years agoAdd missing port_up checks.
hselasky [Thu, 14 Apr 2016 14:01:28 +0000 (14:01 +0000)]
Add missing port_up checks.

When downing a mlxen network adapter we need to check the port_up variable
to ensure we don't continue to transmit data or restart timers which can
reside in freed memory.

Sponsored by: Mellanox Technologies
MFC after: 1 week

8 years agoUse NULL instead of 0 for pointers.
araujo [Thu, 14 Apr 2016 12:53:38 +0000 (12:53 +0000)]
Use NULL instead of 0 for pointers.

fopen(3) will return NULL in case it can't open the STREAM.

8 years agoUse NULL instead of 0 for pointers.
araujo [Thu, 14 Apr 2016 12:51:06 +0000 (12:51 +0000)]
Use NULL instead of 0 for pointers.

The malloc will return a pointer to the allocated memory if successful,
otherwise a NULL pointer is returned.

8 years agoRemove watchdog timer stop check.
mav [Thu, 14 Apr 2016 12:50:27 +0000 (12:50 +0000)]
Remove watchdog timer stop check.

There are bunch of reports that this check fails at least on Nuvoton
NCT6776 chips.  I don't see why this check needed there, and Linux does
not have it either.  So far this check only made watchdogd unstopable.

MFC after: 1 month

8 years agoUse NULL instead of 0 for pointers.
araujo [Thu, 14 Apr 2016 12:46:46 +0000 (12:46 +0000)]
Use NULL instead of 0 for pointers.

The strchr(3) returns a NULL if the character does not appears in the string.
The malloc will return NULL if cannot allocate memory.

8 years agoUse NULL instead of 0 for pointers.
araujo [Thu, 14 Apr 2016 12:25:00 +0000 (12:25 +0000)]
Use NULL instead of 0 for pointers.

fopen(3) will return NULL in case it can't open the STREAM.
The malloc will return a pointer to the allocated memory if successful,
otherwise a NULL pointer is returned.

Also add an extra DEBUG1 to print out the error to open a file.

Reviewed by: ed
Differential Revision: https://svnweb.freebsd.org/changeset/base/297959

8 years agoUse NULL instead of 0 for pointers.
araujo [Thu, 14 Apr 2016 11:41:30 +0000 (11:41 +0000)]
Use NULL instead of 0 for pointers.
fopen(3) returns a FILE pointer, otherwise NULL is returned.

MFC after: 2 weeks

8 years agoSet the upper limit of the DMAP region to the limit of RAM as was found in
andrew [Thu, 14 Apr 2016 10:43:28 +0000 (10:43 +0000)]
Set the upper limit of the DMAP region to the limit of RAM as was found in
the physmap. This will reduce the likelihood of an issue where we have
device memory mapped in the DMAP. This can only happen if it is within the
same 1G block of normal memory.

Reviewed by: kib
Obtained from: ABT Systems Ltd
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D5938

8 years agoBump bio_cmd and bio_*flags from 8 bits to 16.
imp [Thu, 14 Apr 2016 05:10:41 +0000 (05:10 +0000)]
Bump bio_cmd and bio_*flags from 8 bits to 16.

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

8 years agoDeprecate using hints.acpi.0.rsdp to communicate the RSDP to the
imp [Thu, 14 Apr 2016 04:59:51 +0000 (04:59 +0000)]
Deprecate using hints.acpi.0.rsdp to communicate the RSDP to the
system. This uses the hints mechnanism. This mostly works today
because when there's no static hints (the default), this value can be
fetched from the hint. When there is a static hints file, the hint
passed from the boot loader to the kernel is ignored, but for the BIOS
case we're able to find it anyway. However, with UEFI, the fallback
doesn't work, so we get a panic instead.

Switch to acpi.rsdp and use TUNABLE_ULONG_FETCH instead. Continue to
generate the old values to allow for transitions. In addition, fall
back to the old method if the new method isn't present.

Add comments about all this.

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

8 years agoDisable fmaxmin_test when compiling it with clang 3.8.0
ngie [Thu, 14 Apr 2016 04:40:31 +0000 (04:40 +0000)]
Disable fmaxmin_test when compiling it with clang 3.8.0

The testcase always fails today due to how C11 7.6.1/2 is interpreted
with clang 3.8.0 when combined with "#pragma STDC FENV_ACCESS ON".

This testcase passes with clang <3.8.0 and gcc, so continue testing it
with those compiler combinations

More intelligent discussion on the issue is in the PR

MFC after: never
PR: 208703
Sponsored by: EMC / Isilon Storage Division

8 years agoAdd comment about where b_iocmd and b_ioflags come from.
imp [Thu, 14 Apr 2016 04:16:31 +0000 (04:16 +0000)]
Add comment about where b_iocmd and b_ioflags come from.

8 years agoRegenerate
bdrewery [Thu, 14 Apr 2016 01:20:00 +0000 (01:20 +0000)]
Regenerate

8 years agoBuild libpam modules in parallel.
bdrewery [Thu, 14 Apr 2016 01:17:37 +0000 (01:17 +0000)]
Build libpam modules in parallel.

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

8 years agoSimplify building libpam and fix libpam.a not containing the modules since r284345.
bdrewery [Thu, 14 Apr 2016 01:17:03 +0000 (01:17 +0000)]
Simplify building libpam and fix libpam.a not containing the modules since r284345.

The change in r284345 moved the creation of openpam_static_modules.o to
lib/libpam/static_modules but never managed to get them into libpam.a.

Move this logic to lib/libpam/static_libpam and have it create a static
library for libpam.a  The main lib/libpam/libpam will only create a
shared library.  No redundancy in compilation or installation exists
in this solution.

This avoids requiring a pass with -D_NO_LIBPAM_SO_YET.

Sponsored by: EMC / Isilon Storage Division

8 years agoSend krping output to the log instead of the tty, as is done upstream.
np [Thu, 14 Apr 2016 00:25:11 +0000 (00:25 +0000)]
Send krping output to the log instead of the tty, as is done upstream.

Reviewed by: hselasky@
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D5931

8 years agoFix UART3 and UART4 clock offsets.
gonzo [Wed, 13 Apr 2016 21:39:45 +0000 (21:39 +0000)]
Fix UART3 and UART4 clock offsets.

Original values were copy-pasted from UART1 and UART2

PR: 197037
Submitted by: Scott Ellis <scott@jumpnowtek.com>

8 years agolibgssapi: avoid NULL pointer dereferences.
pfg [Wed, 13 Apr 2016 21:08:02 +0000 (21:08 +0000)]
libgssapi: avoid NULL pointer dereferences.

While here also use NULL instead of zero for pointers.

Found with coccinelle.

MFC after: 1 week

8 years agoNote the brokenness of WITHOUT_INSTALLLIB.
bdrewery [Wed, 13 Apr 2016 21:01:58 +0000 (21:01 +0000)]
Note the brokenness of WITHOUT_INSTALLLIB.

Sponsored by: EMC / Isilon Storage Division

8 years agoarm64: Avoid null dereference in its_init_cpu
emaste [Wed, 13 Apr 2016 21:00:00 +0000 (21:00 +0000)]
arm64: Avoid null dereference in its_init_cpu

its_init_cpu() is called from gic_v3_init_secondary(), and its_sc will
be NULL if its did not attach.

Sponsored by: The FreeBSD Foundation

8 years agoThe build does work now with WITHOUT_TOOLCHAIN.
bdrewery [Wed, 13 Apr 2016 20:55:05 +0000 (20:55 +0000)]
The build does work now with WITHOUT_TOOLCHAIN.

The bootstrap cross tools are still built in this mode as well.

Sponsored by: EMC / Isilon Storage Division

8 years agoRemove misspelled and redundant MK_INSTALLIB=no.
bdrewery [Wed, 13 Apr 2016 20:43:02 +0000 (20:43 +0000)]
Remove misspelled and redundant MK_INSTALLIB=no.

8 years agosh: Simplify code by removing variable bracketed_name.
jilles [Wed, 13 Apr 2016 20:32:35 +0000 (20:32 +0000)]
sh: Simplify code by removing variable bracketed_name.

8 years agoSeparate POSIX mqueue objects in jails; actually, separate them by the
jamie [Wed, 13 Apr 2016 20:15:49 +0000 (20:15 +0000)]
Separate POSIX mqueue objects in jails; actually, separate them by the
jail's root, so jails that don't have their own filesystem directory
also won't have their own mqueue namespace.

PR: 208082

8 years agoSeparate POSIX sem/shm objects in jails, by prepending the jail's path
jamie [Wed, 13 Apr 2016 20:14:13 +0000 (20:14 +0000)]
Separate POSIX sem/shm objects in jails, by prepending the jail's path
name to the object's "path".  While the objects don't have real path
names, it's a filesystem-like namespace, which allows jails to be
kept to their own space, but still allows the system / jail parent to
access a jail's IPC.

PR: 208082

8 years agoAdd sbuf variants ata_cmd_sbuf() and ata_res_sbuf(), and reimplement the
scottl [Wed, 13 Apr 2016 20:10:06 +0000 (20:10 +0000)]
Add sbuf variants ata_cmd_sbuf() and ata_res_sbuf(), and reimplement the
_string variants on top of this.  This requires a change to the function
signature of ata_res_sbuf().  Its use in the tree seems to be very limited,
and the change makes it more consistent with the rest of the API.

Reviewed by: imp, mav, kenm
Sponsored by: Netflix
Differential Revision: D5940

8 years agoHandle PBA that shares a page with MSI-X table for passthrough devices.
jhb [Wed, 13 Apr 2016 18:39:33 +0000 (18:39 +0000)]
Handle PBA that shares a page with MSI-X table for passthrough devices.

If the PBA shares a page with the MSI-X table, map the shared page via
/dev/mem and emulate accesses to the portion of the PBA in the shared
page by accessing the mapped page.

Reviewed by: grehan
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D5919

8 years agoExpose doreti as a global symbol on amd64 and i386.
jhb [Wed, 13 Apr 2016 17:37:31 +0000 (17:37 +0000)]
Expose doreti as a global symbol on amd64 and i386.

doreti provides the common code path for returning from interrupt
andlers on x86.  Exposing doreti as a global symbol allows kernel
modules to include low-level interrupt handlers instead of requiring
all low-level handlers to be statically compiled into the kernel.

Submitted by: Howard Su <howard0su@gmail.com>
Reviewed by: kib

8 years agoUse scsi_cdb_sbuf() inside of scsi_command_string now that the temporary
scottl [Wed, 13 Apr 2016 15:57:13 +0000 (15:57 +0000)]
Use scsi_cdb_sbuf() inside of scsi_command_string now that the temporary
string storage is no longer needed.

MFC after: 3 days
Sponsored by: Netflix

8 years agoAdd scsi_cdb_sbuf() for handling CDB strings. Reimplement scsi_cdb_string()
scottl [Wed, 13 Apr 2016 15:43:11 +0000 (15:43 +0000)]
Add scsi_cdb_sbuf() for handling CDB strings.  Reimplement scsi_cdb_string()
in terms of it.

Reviewed by: imp, mav, ken
MFC after: 3 days
Sponsored by: Netflix
Differential Revision: D5934

8 years agolibvgl: do not initialize static storage.
pfg [Wed, 13 Apr 2016 14:59:50 +0000 (14:59 +0000)]
libvgl: do not initialize static storage.

The pointer value was being initialized to 0. While it would
have been better to use NULL here, it is static storage so
there is no need to do so.

8 years agoreversed commits r297916 r297909 r297898 due to i386 build failures.
davidcs [Wed, 13 Apr 2016 13:14:18 +0000 (13:14 +0000)]
reversed commits r297916 r297909 r297898 due to i386 build failures.

MFC after:5 days

8 years agoAdd hint.ahci.X.quirks tunable for some odd cases.
mav [Wed, 13 Apr 2016 12:32:58 +0000 (12:32 +0000)]
Add hint.ahci.X.quirks tunable for some odd cases.

MFC after: 2 weeks

8 years agoDocument the memory ranges within the kernel region to help with debugging
andrew [Wed, 13 Apr 2016 11:43:03 +0000 (11:43 +0000)]
Document the memory ranges within the kernel region to help with debugging
to track down which region an address is from.

Obtained from: ABT Systems Ltd
Sponsored by: The FreeBSD Foundation

8 years agoFix compilation error on i386
davidcs [Wed, 13 Apr 2016 11:24:24 +0000 (11:24 +0000)]
Fix compilation error on i386

8 years agoFilter Port Database Changed notifications.
mav [Wed, 13 Apr 2016 10:35:17 +0000 (10:35 +0000)]
Filter Port Database Changed notifications.

For some reason firmware sends Port Database Changed notifications in case
of explicit login requests from the driver when target port is unavailabe.
Those notifications don't give driver any new information, but only cause
infinite scan loop.

8 years agoIncrease the arm64 kernel address space to 512GB, and the DMAP region to
andrew [Wed, 13 Apr 2016 09:44:32 +0000 (09:44 +0000)]
Increase the arm64 kernel address space to 512GB, and the DMAP region to
2TB. The latter can be increased in 512GB chunks by adjusting the lower
address, however more work will be needed to increase the former.

There is still some work needed to only create a DMAP region for the RAM
address space as on ARM architectures all mappings should have the same
memory attributes, and these will be different for device and normal memory.

Reviewed by: kib
Obtained from: ABT Systems Ltd
Relnotes: yes
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D5859

8 years agohyperv: device_get_softc does not return NULL
sephe [Wed, 13 Apr 2016 09:20:29 +0000 (09:20 +0000)]
hyperv: device_get_softc does not return NULL

MFC after: 1 week
Sponsored by: Microsoft OSTC

8 years agoRespect NVRAM topology settings on 24xx and above chips.
mav [Wed, 13 Apr 2016 07:04:04 +0000 (07:04 +0000)]
Respect NVRAM topology settings on 24xx and above chips.

8 years agoMultiple fixes in VCHI audio driver:
gonzo [Wed, 13 Apr 2016 05:28:27 +0000 (05:28 +0000)]
Multiple fixes in VCHI audio driver:

- Pre-buffer audio data to VideoCore so there are no audible glitches when
    driver is too late to provide samples
- Start actual playback when there is some prebuffered audio,
    it fixes audible noisy click in the beginning of playback
- Use #defines instead of hardcoded values where appropriate
- Fix copy-pasted comment

PR: 208678

8 years ago[urtwn] use/track the last good RSSI for a given node, rather than no RSSI.
adrian [Wed, 13 Apr 2016 05:19:16 +0000 (05:19 +0000)]
[urtwn] use/track the last good RSSI for a given node, rather than no RSSI.

Now that we're decap'ing A-MPDU frame, the firmware is only giving us
PHY status information for the whole PPDU, rather than duplicatig it
per frame.

So, we fake it by maintaining the RSSI that we saw in the node struct
and reuse it.

This prevents us from getting some pretty garbage looking default RSSI
values, which shows up as RSSI values of like "3" or "4" when doing
active traffic.

Tested:

* RTL8188EU, STA mode

8 years agoFix build failure on i386. Need to typecast a bunch of variables to (uintmax_t)
davidcs [Wed, 13 Apr 2016 04:13:36 +0000 (04:13 +0000)]
Fix build failure on i386. Need to typecast a bunch of variables to (uintmax_t)

MFC after:5 days

8 years agohyperv/vmbus: Merge duplicated version check for events
sephe [Wed, 13 Apr 2016 03:45:39 +0000 (03:45 +0000)]
hyperv/vmbus: Merge duplicated version check for events

Submitted by: Jun Su <junsu microsoft com>
Reviewed by: sephe
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D5911

8 years agoConvert ypldap_addr list to a tailq(queue(3)).
araujo [Wed, 13 Apr 2016 03:36:34 +0000 (03:36 +0000)]
Convert ypldap_addr list to a tailq(queue(3)).

Obtained from: OpenBSD r1.11, r1.17 and r1.36

8 years agofmt(1): for pointers use NULL instead of 0
pfg [Wed, 13 Apr 2016 01:57:06 +0000 (01:57 +0000)]
fmt(1): for pointers use NULL instead of 0

While here clean excessive not lint comment indentation.

8 years agoApply revisions 1.4 and 1.5 from ldapd's ber.c to ypldap's copy, so it can
araujo [Wed, 13 Apr 2016 01:54:33 +0000 (01:54 +0000)]
Apply revisions 1.4 and 1.5 from ldapd's ber.c to ypldap's copy, so it can
deal with messages that haven't been fully read from the server yet.

Obtained from: OpenBSD r1.11

8 years agoTry harder to find svn
swills [Wed, 13 Apr 2016 01:47:04 +0000 (01:47 +0000)]
Try harder to find svn

While here, elliminate last references to CVS_UPDATE and SUP_UPDATE

Reviewed by: gjb
Approved by: gjb

8 years agofmt(1): reformat with indent(1).
pfg [Wed, 13 Apr 2016 01:46:48 +0000 (01:46 +0000)]
fmt(1): reformat with indent(1).

Failed attempt to get nearer to style(9) and the format from the
original OpenBSD code. At least it should be readable now.

No functional change.

8 years ago1. modify fwdump (a.k.a grcdump) memory is allocated and freed on as needed
davidcs [Wed, 13 Apr 2016 00:53:04 +0000 (00:53 +0000)]
1. modify fwdump (a.k.a grcdump) memory is allocated and freed on as needed
   basis.
2. grcdump can be taken at failure points by invoking bxe_grc_dump() when
   trigger_grcdump sysctl flag is set. When grcdump is taken grcdump_done
   sysctl flag is set.
3. grcdump_done can be monitored by the user to retrieve the grcdump.

Submitted by:vaishali.kulkarni@qlogic.com
Approved by:davidcs@freebsd.org
MFC after:5 days

8 years agoAdd a small tool, resizewin(1), to query terminal for window size
cem [Wed, 13 Apr 2016 00:30:42 +0000 (00:30 +0000)]
Add a small tool, resizewin(1), to query terminal for window size

Submitted by: Daniel O'Connor
Reviewed by: kan, wblock, cem
Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D4438

8 years agoMerge libxo 0.4.6
phil [Tue, 12 Apr 2016 23:30:56 +0000 (23:30 +0000)]
Merge libxo 0.4.6

Reviewed by: sjg
Approved by: sjg (mentor)

8 years agoTag libxo 0.4.6
phil [Tue, 12 Apr 2016 23:03:37 +0000 (23:03 +0000)]
Tag libxo 0.4.6

8 years agoimport libso 0.4.6
phil [Tue, 12 Apr 2016 23:03:01 +0000 (23:03 +0000)]
import libso 0.4.6

8 years agoRemove PS_STRINGS fallback from setproctitle
emaste [Tue, 12 Apr 2016 22:59:20 +0000 (22:59 +0000)]
Remove PS_STRINGS fallback from setproctitle

In r103767 the kern.ps_strings sysctl was added as the preferred way to
locate the ps_strings struct and is available in any FreeBSD release
supported within the last decade.

Reviewed by: kib

8 years agofsck_ffs for pointers replace 0 with NULL.
pfg [Tue, 12 Apr 2016 22:55:47 +0000 (22:55 +0000)]
fsck_ffs for pointers replace 0 with NULL.

Found with devel/coccinelle.

Reviewed by: mckusick

8 years agoImport libxo 0.4.6
phil [Tue, 12 Apr 2016 22:54:19 +0000 (22:54 +0000)]
Import libxo 0.4.6

8 years agoAdd support for Flash Update
davidcs [Tue, 12 Apr 2016 22:31:48 +0000 (22:31 +0000)]
Add support for Flash Update

Submitted by:nrapendra.singh@qlogic.com;vaishali.kulkarni@qlogic.com;davidcs@freebsd.org
Approved by:davidcs@freebsd.org
MFC after:5 days

8 years agocxgbe(4): Always dispatch all work requests that have been written to the
np [Tue, 12 Apr 2016 22:11:29 +0000 (22:11 +0000)]
cxgbe(4): Always dispatch all work requests that have been written to the
descriptor ring before leaving drain_wrq_wr_list.

8 years agoRefactor the handling of ICMP/IPv4 packets for SCTP/IPv4.
tuexen [Tue, 12 Apr 2016 21:40:54 +0000 (21:40 +0000)]
Refactor the handling of ICMP/IPv4 packets for SCTP/IPv4.

This cleansup the code and prepares upcoming handling of ICMP/IPv4 packets
for SCTP/UDP/IPv4 packets. IPv6 changes will follow...

MFC after: 3 days