]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
8 years agoPrint more detailed info about the disk and partition chosen for booting.
Ian Lepore [Sun, 22 Nov 2015 20:38:50 +0000 (20:38 +0000)]
Print more detailed info about the disk and partition chosen for booting.
No behavioral changes, just cosmetics.

A partition number of zero is not a wildcard, it's the 'a' partition in
a BSD slice, so don't print it as "<auto>".  (Only slices are 1-based,
unit and partition numbers are 0-based and -1 is their wildcard marker.)

Also, after doing all the probing and choosing, print the final result as
"Booting from <disk spec>" where disk spec has all the wildcards resolved
and looks like familiar BSD slice-and-partition notation (disk0s3a, etc).

8 years agoExplicitly call SEND CHANGE REQUEST for pre-24xx chips in target mode.
Alexander Motin [Sun, 22 Nov 2015 17:03:38 +0000 (17:03 +0000)]
Explicitly call SEND CHANGE REQUEST for pre-24xx chips in target mode.

While later firmware always registers for RSCN requests, older one does
it only in initiator mode.  But in target mode there RSCN can be the only
way to detect gone intiator.

8 years agoGenerate fake ISPASYNC_CHANGE_PDB on fake login on pre-24xx.
Alexander Motin [Sun, 22 Nov 2015 16:55:43 +0000 (16:55 +0000)]
Generate fake ISPASYNC_CHANGE_PDB on fake login on pre-24xx.

This makes port scanner fix absent port ID for added initiator.

8 years agoGracefully stop firmware before resetting chip when changing role.
Alexander Motin [Sun, 22 Nov 2015 15:57:54 +0000 (15:57 +0000)]
Gracefully stop firmware before resetting chip when changing role.

8 years agoAdd some more asynchronous event status codes.
Alexander Motin [Sun, 22 Nov 2015 11:44:30 +0000 (11:44 +0000)]
Add some more asynchronous event status codes.

8 years agoAdd mode mailbox command codes.
Alexander Motin [Sun, 22 Nov 2015 11:13:09 +0000 (11:13 +0000)]
Add mode mailbox command codes.

8 years agoRecord proper commit message for r291157.
Konstantin Belousov [Sun, 22 Nov 2015 09:50:13 +0000 (09:50 +0000)]
Record proper commit message for r291157.

The r289895 revision did not accounted for the block containing the
requested page, when calculating the run of pages.  Include the pages
before/after the requested page, that fit into the reqblock, into the
calculation.

Noted by: glebius
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

8 years agoNoted by: glebius
Konstantin Belousov [Sun, 22 Nov 2015 09:48:03 +0000 (09:48 +0000)]
Noted by: glebius
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

8 years agoIgnore the inbound checksum flags when doing packet forwarding in netvsc driver.
Wei Hu [Sun, 22 Nov 2015 05:26:13 +0000 (05:26 +0000)]
Ignore the inbound checksum flags when doing packet forwarding in netvsc driver.

PR: 20363
Submitted by: whu
Reviewed by: royger, whu
Approved by: royger
MFC after: 1 week
Relnotes: No
Sponsored by: Microsoft OSTC
Differential Revision:  https://reviews.freebsd.org/D4131

8 years agobc: sync with OpenBSD
Pedro F. Giffuni [Sun, 22 Nov 2015 02:43:14 +0000 (02:43 +0000)]
bc: sync with OpenBSD

tty.c Rev. 1.3
Avoid unintended problems with operator precedence when doing an
assignment and comparison.

bc.1, Rev. 1.31, 1.32
'.Ql Quit' -> '.Ql quit' because only the lowercase command is valid.
Clarify sentence about `quit` in BUGS section.

extern.h, Rev. 1.12
whitespace

bc.y, Rev. 1.47
Prefer setvbuf() to setlinebuf() for portability

Obtained from: OpenBSD
MFC after: 2 weeks

8 years ago[mips]: Don't hard-code PHYS_AVAIL_ENTRIES.
Adrian Chadd [Sun, 22 Nov 2015 02:40:19 +0000 (02:40 +0000)]
[mips]: Don't hard-code PHYS_AVAIL_ENTRIES.

8 years agoRemove unneeded includes of opt_kdtrace.h.
Mark Johnston [Sun, 22 Nov 2015 02:01:01 +0000 (02:01 +0000)]
Remove unneeded includes of opt_kdtrace.h.

As of r258541, KDTRACE_HOOKS is defined in opt_global.h, so opt_kdtrace.h
is not needed when defining SDT(9) probes.

8 years agoRemove a debug panic that crept into r291151
Justin Hibbits [Sun, 22 Nov 2015 01:20:36 +0000 (01:20 +0000)]
Remove a debug panic that crept into r291151

8 years agoModernize mpc85xx PCI hostbridge driver.
Justin Hibbits [Sun, 22 Nov 2015 01:16:43 +0000 (01:16 +0000)]
Modernize mpc85xx PCI hostbridge driver.

Summary:
* Take advantage of NEW_PCIB to remove a lot of setup code.
* Fix some bugs related to multiple PCI bridges.

There's still room for more cleanup, and still some bugs leftover, but this
cleans up a lot.

Test Plan: Tested on P5020 board with IDT PCIe switch.

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

8 years agoWhen the nfsd threads are terminated, the NFSv4 server state
Rick Macklem [Sat, 21 Nov 2015 23:55:46 +0000 (23:55 +0000)]
When the nfsd threads are terminated, the NFSv4 server state
(opens, locks, etc) is retained, which I believe is correct behaviour.
However, for NFSv4.1, the server also retained a reference to the xprt
(RPC transport socket structure) for the backchannel. This caused
svcpool_destroy() to not call SVC_DESTROY() for the xprt and allowed
a socket upcall to occur after the mutexes in the svcpool were destroyed,
causing a crash.
This patch fixes the code so that the backchannel xprt structure is
dereferenced just before svcpool_destroy() is called, so the code
does do an SVC_DESTROY() on the xprt, which shuts down the socket upcall.

Tested by: g_amanakis@yahoo.com
PR: 204340
MFC after: 2 weeks

8 years agoUpdate the imx5/imx6 cpu_reset() implementation based on a new understanding
Ian Lepore [Sat, 21 Nov 2015 23:30:47 +0000 (23:30 +0000)]
Update the imx5/imx6 cpu_reset() implementation based on a new understanding
of the SRS (software reset) bit in the watchdog control register.  Despite
what the manual seems to imply, this bit DOES trigger an immediate reset, as
opposed to simply flagging the type of reset as software-triggered.

8 years agoAdd a missing brace to fix vmstat -s output.
Mark Johnston [Sat, 21 Nov 2015 23:04:12 +0000 (23:04 +0000)]
Add a missing brace to fix vmstat -s output.

8 years agoIncrease maximal value of vports tunable to 254.
Alexander Motin [Sat, 21 Nov 2015 21:44:11 +0000 (21:44 +0000)]
Increase maximal value of vports tunable to 254.

I am not sure this value is really viable yet, but that is what chips
officially support in NPIV mode (in loop mode maximum is 125).

8 years agoAdd support for Kana and Eisu keys to the USB keyboard driver.
Hans Petter Selasky [Sat, 21 Nov 2015 21:18:55 +0000 (21:18 +0000)]
Add support for Kana and Eisu keys to the USB keyboard driver.

PR: 204709
Submitted by: naito.yuichiro@gmail.com
MFC after: 3 days

8 years agoFix scancodes for Kana and Eisu keys.
Hans Petter Selasky [Sat, 21 Nov 2015 21:14:16 +0000 (21:14 +0000)]
Fix scancodes for Kana and Eisu keys.

PR: 204709
Submitted by: naito.yuichiro@gmail.com
MFC after: 3 days

8 years agoFix target mode with fabric for pre-24xx chips.
Alexander Motin [Sat, 21 Nov 2015 21:01:00 +0000 (21:01 +0000)]
Fix target mode with fabric for pre-24xx chips.

For those chips we are not receiving login events, adding initiators
based on ATIO requests.  But there is no port ID in that structure, so
in fabric mode we have to explicitly fetch it from firmware to be able
to do normal scan after that.

8 years agoUpdate Qlogic 23XX firmware from 3.03.26 to 3.03.28
Alexander Motin [Sat, 21 Nov 2015 20:52:40 +0000 (20:52 +0000)]
Update Qlogic 23XX firmware from 3.03.26 to 3.03.28

8 years agoFix BUS_DMA_MIN_ALLOC_COMP flag logic. When bus_dmamap_t map is being
Svatopluk Kraus [Sat, 21 Nov 2015 19:55:01 +0000 (19:55 +0000)]
Fix BUS_DMA_MIN_ALLOC_COMP flag logic. When bus_dmamap_t map is being
created for bus_dma_tag_t tag, bounce pages should be allocated
only if needed.

Before the fix, they were allocated always if BUS_DMA_COULD_BOUNCE flag
was set but BUS_DMA_MIN_ALLOC_COMP not. As bounce pages are never freed,
it could cause memory exhaustion when a lot of such tags together with
their maps were created.

Note that there could be more maps in one tag by current design.
However BUS_DMA_MIN_ALLOC_COMP flag is tag's flag. It's set after
bounce pages are allocated. Thus, they are allocated only for first
tag's map which needs them.

Approved by: kib (mentor)

8 years agoFix the handling of IPSec policies in the SCTP stack. At least
Michael Tuexen [Sat, 21 Nov 2015 18:21:16 +0000 (18:21 +0000)]
Fix the handling of IPSec policies in the SCTP stack. At least
make sure they are not leaked...

MFC after:  1 week

8 years agoRevert part of r291137 which seems correct, bit does not fix the
Michael Tuexen [Sat, 21 Nov 2015 16:46:59 +0000 (16:46 +0000)]
Revert part of r291137 which seems correct, bit does not fix the
resource problem I'm currently hunting down.

MFC after: 1 week
X-MFC with: 291137

8 years agoDocument why we use -z nonexecstack in the Makefile since it
Warner Losh [Sat, 21 Nov 2015 16:37:11 +0000 (16:37 +0000)]
Document why we use -z nonexecstack in the Makefile since it
is so unusual. Turn off mis-match warnings for building uathload
because the firmware .o file is produced in a way that we
can't get to match exactly. This fixes the build on mips,
so stop excluding it from the build.

8 years agoClear the so_pcb pointer in case of ipsec_init_policy() fails.
Michael Tuexen [Sat, 21 Nov 2015 16:32:14 +0000 (16:32 +0000)]
Clear the so_pcb pointer in case of ipsec_init_policy() fails.

MFC after: 1 week

8 years agoDon't send SHUTDOWN chunk when the association is in a front state
Michael Tuexen [Sat, 21 Nov 2015 16:25:09 +0000 (16:25 +0000)]
Don't send SHUTDOWN chunk when the association is in a front state
and the applications calls shutdown(..., SHUT_WR) or
shutdown(..., SHUT_RDWR).

MFC after: 1 week.

8 years agoMove hdmi_if.m to files.arm so other kernel configs can use it.
Andrew Turner [Sat, 21 Nov 2015 16:25:03 +0000 (16:25 +0000)]
Move hdmi_if.m to files.arm so other kernel configs can use it.

8 years agoCreate device options for the two common ARM timers.
Andrew Turner [Sat, 21 Nov 2015 16:23:56 +0000 (16:23 +0000)]
Create device options for the two common ARM timers.

Sponsored by: ABT Systems Ltd

8 years agoMove more bus_space_* files to be built by files.arm. This leaves the
Andrew Turner [Sat, 21 Nov 2015 15:30:08 +0000 (15:30 +0000)]
Move more bus_space_* files to be built by files.arm. This leaves the
definition in a file.* file under sys/arm/arm in the few cases we need it
for non-fdt platforms.

Sponsored by: ABT Systems Ltd

8 years agoUpdate firmware for QLogic 22xx from 2.02.06 to 2.02.08.
Alexander Motin [Sat, 21 Nov 2015 14:39:57 +0000 (14:39 +0000)]
Update firmware for QLogic 22xx from 2.02.06 to 2.02.08.

8 years agoLimit arm_base_bs_tag to ARMv4 and ARMv5, we only used it in one place in
Andrew Turner [Sat, 21 Nov 2015 13:02:34 +0000 (13:02 +0000)]
Limit arm_base_bs_tag to ARMv4 and ARMv5, we only used it in one place in
armv6 and that can use fdtbus_bs_tag.

8 years agoFix a logic inversion, we should build dtrace on armv6, not on arm and
Andrew Turner [Sat, 21 Nov 2015 12:53:44 +0000 (12:53 +0000)]
Fix a logic inversion, we should build dtrace on armv6, not on arm and
armeb.

8 years agoRevert a modification that crept in and should not
Baptiste Daroussin [Sat, 21 Nov 2015 11:06:20 +0000 (11:06 +0000)]
Revert a modification that crept in and should not

8 years agoSynchronize m4(1) with OpenBSD
Baptiste Daroussin [Sat, 21 Nov 2015 11:05:38 +0000 (11:05 +0000)]
Synchronize m4(1) with OpenBSD

8 years agocolldef(1) does not need the libc's internal collate.h header anymore
Baptiste Daroussin [Sat, 21 Nov 2015 10:52:32 +0000 (10:52 +0000)]
colldef(1) does not need the libc's internal collate.h header anymore

8 years agoAdd API to obtain primary enclosure name and ID for /dev/sesX devices.
Alexander Motin [Sat, 21 Nov 2015 10:22:01 +0000 (10:22 +0000)]
Add API to obtain primary enclosure name and ID for /dev/sesX devices.

sesX device number may change between reboots, so to properly identify
the instance we need more data.  Name and ID reported here may mach ones
reported by SCSI device, but that is not really required by specs.

MFC after: 1 week
Sponsored by: iXsystems, Inc.

8 years agoMFV r291123:
Xin LI [Sat, 21 Nov 2015 09:09:25 +0000 (09:09 +0000)]
MFV r291123:

xz 5.2.2.

MFC after: 1 month
Relnotes: yes

8 years agoVendor import of xz-5.2.2 (trimmed).
Xin LI [Sat, 21 Nov 2015 06:52:06 +0000 (06:52 +0000)]
Vendor import of xz-5.2.2 (trimmed).

8 years agotrunc_page() goes through unsigned long, which is too short.
Justin Hibbits [Sat, 21 Nov 2015 06:03:46 +0000 (06:03 +0000)]
trunc_page() goes through unsigned long, which is too short.

sizeof(unsigned long) < sizeof(vm_paddr_t) on Book-E, which uses 36-bit
addressing.  With this, a CCSR with a physical address above 4GB successfully
maps.

Sponsored by: Alex Perez/Inertial Computing

8 years agoMerge from r290547:
Marius Strobl [Sat, 21 Nov 2015 02:49:33 +0000 (02:49 +0000)]
Merge from r290547:
Since r289279 bufinit() uses mp_ncpus so adapt to what x86 does and
set this variable already in cpu_mp_setmaxid().
While at it, rename cpu_cpuid_prop() to cpu_portid_prop() as well as
the MD cpuid variable to portid to avoid confusion with the MI use
of "cpuid" and make some variable static/global in order to reduce
stack usage.

PR: 204685

8 years agoAvoid a NULL pointer dereference in bounce_bus_dmamap_unload() when
Marius Strobl [Sat, 21 Nov 2015 02:08:47 +0000 (02:08 +0000)]
Avoid a NULL pointer dereference in bounce_bus_dmamap_unload() when
the map has been created via bounce_bus_dmamem_alloc(). In that case
bus_dmamap_unload(9) typically isn't called during normal operation
but still should be during detach, cleanup from failed attach etc.

Submitted by: yongari
MFC after: 3 days

8 years agoRemove a link to the now defunct "Release Engineering of Third Party Packages".
Brad Davis [Sat, 21 Nov 2015 00:35:40 +0000 (00:35 +0000)]
Remove a link to the now defunct "Release Engineering of Third Party Packages".

PR: 202803
Submitted by: Tobias Kortkamp <tobias.kortkamp@gmail.com>
MFC after: 1 week

8 years agomips: teach the malta platform about extended memory.
Adrian Chadd [Sat, 21 Nov 2015 00:22:47 +0000 (00:22 +0000)]
mips: teach the malta platform about extended memory.

Extended memory here is "physical memory above 256MB".
"memsize" in the environment only grows to 256MB; "ememsize" is the entire
memory range.  Extended memory shows up at physical address 0x90000000.

This allows for malta64 VMs to be created with > 256MB RAM, all the way
up to 2GB RAM.

Tested:

* qemu-devel package; qemu-system-mips64 -m 2048 (and -m 256 to test the
  no-ememsize case.)

TODO:

* testing mips32 with > 256MB RAM.

Reviewed by: imp

8 years agoRevert r283330 since it broke directory caching in the client.
Rick Macklem [Sat, 21 Nov 2015 00:15:41 +0000 (00:15 +0000)]
Revert r283330 since it broke directory caching in the client.
At this time I cannot see a way to fix directory caching when it
has partial blocks in the buffer cache, due to the fact that the
syscall's uio_offset won't stay the same as the lblkno * NFS_DIRBLKSIZ
offset.

Reported by: bde
MFC after: 2 weeks

8 years agoRemove remnants of the old NFS from vnode pager.
Gleb Smirnoff [Fri, 20 Nov 2015 23:52:27 +0000 (23:52 +0000)]
Remove remnants of the old NFS from vnode pager.

Reviewed by: kib
Sponsored by: Netflix

8 years agoReintegrate colldef(1) and mklocale(1)
Baptiste Daroussin [Fri, 20 Nov 2015 23:15:05 +0000 (23:15 +0000)]
Reintegrate colldef(1) and mklocale(1)

While those tools are not needed anymore they are necessary to build FreeBSD 9
and 10. it does not hurt to keep those tools around until both 9 and 10 branch
become EOLed.

Modify colldef(1) to build after the change in the collation header, and ensure
it does produce the same collation definition it used to generate for 9 and 10

Reported by: Oliver Pinter

8 years agopopen() requires check for fdopen() failure
Ravi Pokala [Fri, 20 Nov 2015 22:36:41 +0000 (22:36 +0000)]
popen() requires check for fdopen() failure

Move fdopen() up near other resource allocation like malloc(); do proper
deallocation on failure later on in the function.

Submitted by: Ramachandra Topannavar <rtopannavar@panasas.com>
Reviewed by: jilles
Approved by: jhb (mentor)
MFC after: 2 weeks
Sponsored by: Panasas, Inc.
Differential Revision: https://reviews.freebsd.org/D4126

M    lib/libc/gen/popen.c

8 years agoDisconnect unused kgzldr from sys/boot/i386
Ed Maste [Fri, 20 Nov 2015 21:56:20 +0000 (21:56 +0000)]
Disconnect unused kgzldr from sys/boot/i386

Sponsored by: The FreeBSD Foundation

8 years agoAdd support for passing TARGET_CPUTYPE into the build. It's more
Warner Losh [Fri, 20 Nov 2015 21:54:05 +0000 (21:54 +0000)]
Add support for passing TARGET_CPUTYPE into the build. It's more
important for arm and mips than for the more generic x86 systems.

8 years agoAdd aarch64 support to CPUTYPE
Warner Losh [Fri, 20 Nov 2015 21:49:49 +0000 (21:49 +0000)]
Add aarch64 support to CPUTYPE

8 years agoMakeoption ARM_LITLE_ENDIAN does nothing. Remove it since it isn't
Warner Losh [Fri, 20 Nov 2015 21:49:46 +0000 (21:49 +0000)]
Makeoption ARM_LITLE_ENDIAN does nothing. Remove it since it isn't
consistently used. It was a carry over from NetBSD that FreeBSD
doesn't use.

8 years agoAdd myself (rpokala) and my mentor (jhb)
Ravi Pokala [Fri, 20 Nov 2015 21:03:04 +0000 (21:03 +0000)]
Add myself (rpokala) and my mentor (jhb)

Approved by: jhb (mentor)
Differential Revision: https://reviews.freebsd.org/D4231

8 years agoRemove bus_space_asm_generic.S from the per-SoC files.* files, it's already
Andrew Turner [Fri, 20 Nov 2015 19:48:32 +0000 (19:48 +0000)]
Remove bus_space_asm_generic.S from the per-SoC files.* files, it's already
in files.arm.

Sponsored by: ABT Systems Ltd

8 years agoRemove disconnected boot0ext.
Bryan Drewery [Fri, 20 Nov 2015 18:10:02 +0000 (18:10 +0000)]
Remove disconnected boot0ext.

This was [re-]added in r127458 (apparently with disconnected history as well)
and never connected to the build.

It is no longer relevant for modern systems from the past 20 years.

Discussed with: jhb
Sponsored by: EMC / Isilon Storage Division

8 years agoFix not skipping uathload for mips after r291021.
Bryan Drewery [Fri, 20 Nov 2015 17:52:46 +0000 (17:52 +0000)]
Fix not skipping uathload for mips after r291021.

Sponsored by: EMC / Isilon Storage Division

8 years agoRemove pl310.c from the SoC std.* files, it's in files.arm
Andrew Turner [Fri, 20 Nov 2015 16:43:21 +0000 (16:43 +0000)]
Remove pl310.c from the SoC std.* files, it's in files.arm

Sponsored by: ABT Systems Ltd

8 years agoDTrace is known to work on armv6, enable building it as a module.
Andrew Turner [Fri, 20 Nov 2015 16:18:27 +0000 (16:18 +0000)]
DTrace is known to work on armv6, enable building it as a module.

Reviewed by: imp
Sponsored by: ABT Systems Ltd
Differential Revision: https://reviews.freebsd.org/D4221

8 years agoStop setting {KERN,}PHYSADDR on armv6, it's unneeded.
Andrew Turner [Fri, 20 Nov 2015 16:12:22 +0000 (16:12 +0000)]
Stop setting {KERN,}PHYSADDR on armv6, it's unneeded.

Sponsored by: ABT Systems Ltd

8 years agoSome cosmetics for ancient cards.
Alexander Motin [Fri, 20 Nov 2015 14:20:24 +0000 (14:20 +0000)]
Some cosmetics for ancient cards.

8 years agoThe freebsd4_getfsstat() was broken in r281551 to always return 0 on success.
Edward Tomasz Napierala [Fri, 20 Nov 2015 14:08:12 +0000 (14:08 +0000)]
The freebsd4_getfsstat() was broken in r281551 to always return 0 on success.
All versions of getfsstat(3) are supposed to return the number of [o]statfs
structs in the array that was copied out.

Also fix missing bounds checking and signed comparison of unsigned types.

Submitted by: bde@
MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agoDon't truncate an interface name when -W option is specified.
Hajimu UMEMOTO [Fri, 20 Nov 2015 12:32:49 +0000 (12:32 +0000)]
Don't truncate an interface name when -W option is specified.

Spotted by: Jim Thompson <jim__at__netgate.com>
MFC after: 1 week

8 years agoAvoid core dump when output style is html.
Hajimu UMEMOTO [Fri, 20 Nov 2015 12:15:58 +0000 (12:15 +0000)]
Avoid core dump when output style is html.

8 years agoFix build when KTR is defined but not KTR_TULIP.
Svatopluk Kraus [Fri, 20 Nov 2015 09:37:04 +0000 (09:37 +0000)]
Fix build when KTR is defined but not KTR_TULIP.

Approved by: kib (mentor)

8 years agoAdd usermode variable to KTR output. Fix style.
Svatopluk Kraus [Fri, 20 Nov 2015 09:34:59 +0000 (09:34 +0000)]
Add usermode variable to KTR output. Fix style.

Approved by: kib (mentor)

8 years agoFix style and argument count for KTR.
Svatopluk Kraus [Fri, 20 Nov 2015 09:33:22 +0000 (09:33 +0000)]
Fix style and argument count for KTR.

Approved by: kib (mentor)

8 years agoOptimize SNS_GID_FT request scratch memory usage.
Alexander Motin [Fri, 20 Nov 2015 08:54:19 +0000 (08:54 +0000)]
Optimize SNS_GID_FT request scratch memory usage.

Now with present 4K of scratch we can fetch up to 508 ports (16 more).

8 years agoinstall: do not follow symlinks
Baptiste Daroussin [Fri, 20 Nov 2015 08:45:59 +0000 (08:45 +0000)]
install: do not follow symlinks

In case the target of install is a dead symlink, install(1) used to not
consider it as "existing" because of the usage of stat(2) instead of
lstat(2).  meaning the old file (the symlink) is not removed before the new
file is created. The symlink is being followed and the new file becoming the
target of the symlink instead of the target of install(1)

Reviewed by: jhb, brooks
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D4191

8 years agoConvert vmstat to use libxo.
Craig Rodrigues [Fri, 20 Nov 2015 05:15:34 +0000 (05:15 +0000)]
Convert vmstat to use libxo.

This patch was based on this patch:
https://github.com/Juniper/libxo/blob/master/patches/vmstat.patch

by Phil Shafer at Juniper Networks, but updated to the latest
vmstat code.

Reviewed by:           allanjude
Differential Revision: https://reviews.freebsd.org/D3935

8 years agoCopy README into /usr/tests
Craig Rodrigues [Fri, 20 Nov 2015 03:24:04 +0000 (03:24 +0000)]
Copy README into /usr/tests

Add a few sentences describing how to run the tests.

Reviewed by: ngie
Differential Revision: https://reviews.freebsd.org/D4224

8 years agoAvoid a NULL pointer dereference in bounce_bus_dmamap_sync() when the
Marius Strobl [Fri, 20 Nov 2015 02:23:35 +0000 (02:23 +0000)]
Avoid a NULL pointer dereference in bounce_bus_dmamap_sync() when the
map has been created via bounce_bus_dmamem_alloc(). Even for coherent
DMA - which bus_dmamem_alloc(9) typically is used for -, calling of
bus_dmamap_sync(9) isn't optional.

PR: 188899 (non-original problem)
MFC after: 3 days

8 years agoMETA MODE: Don't stage INTERNALPROGs.
Bryan Drewery [Fri, 20 Nov 2015 00:22:55 +0000 (00:22 +0000)]
META MODE: Don't stage INTERNALPROGs.

This is only for sys/boot.  INTERNALPROG is not a build tool, it is just a way
to generate OBJS from a list of SRCS and use those objects elsewhere.

Sponsored by: EMC / Isilon Storage Division

8 years agoRemove unsupported ia64.
Bryan Drewery [Thu, 19 Nov 2015 22:54:37 +0000 (22:54 +0000)]
Remove unsupported ia64.

Sponsored by: EMC / Isilon Storage Division

8 years agoif_ntb: Initialize if_mtu to the correct MTU
Conrad Meyer [Thu, 19 Nov 2015 19:53:19 +0000 (19:53 +0000)]
if_ntb: Initialize if_mtu to the correct MTU

Lower the payload data (IP) portion of the MTU from 0x10000 to
IP_MAXPACKET (0xFFFF) to avoid panicing the IP stack.

Sponsored by: EMC / Isilon Storage Division

8 years agoif_ntb: Add Xeon link watchdog register writes
Conrad Meyer [Thu, 19 Nov 2015 19:53:09 +0000 (19:53 +0000)]
if_ntb: Add Xeon link watchdog register writes

This feature is disabled by default.  To enable it, tune
hw.if_ntb.enable_xeon_watchdog to non-zero.

If enabled, writes an unused NTB register every second to demonstrate to
a hardware watchdog that the NTB device is still alive.  Most machines
with NTB will not need this -- you know who you are.

Sponsored by: EMC / Isilon Storage Division

8 years agoRename checked-in 'includes' to 'includes.sh' to avoid colliding with share/mk
Bryan Drewery [Thu, 19 Nov 2015 17:57:31 +0000 (17:57 +0000)]
Rename checked-in 'includes' to 'includes.sh' to avoid colliding with share/mk
target 'make includes'.

The file is still installed to /usr/libexec/bsdconfig/includes/includes.

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

8 years agoAnother round of port scanner rewrite.
Alexander Motin [Thu, 19 Nov 2015 17:43:47 +0000 (17:43 +0000)]
Another round of port scanner rewrite.

This change simplifies and unifies port adding/updating for loop and
fabric scanners.  It also fixes problems with scanning restarts due to
concurrent port databases changes.  It also fixes many cosmetic issues.

8 years agoAdd arm CPUTYPE values typically used on FreeBSD.
Warner Losh [Thu, 19 Nov 2015 17:06:12 +0000 (17:06 +0000)]
Add arm CPUTYPE values typically used on FreeBSD.

8 years agoFix a bug where an SCTP association was moved back to SHUTDOWN_SENT
Michael Tuexen [Thu, 19 Nov 2015 16:46:00 +0000 (16:46 +0000)]
Fix a bug where an SCTP association was moved back to SHUTDOWN_SENT
state when the user issued a shutdown() call.

MFC after:  1 week

8 years agoConsistently enforce the restriction against calling malloc/free when in a
Jonathan T. Looney [Thu, 19 Nov 2015 14:04:53 +0000 (14:04 +0000)]
Consistently enforce the restriction against calling malloc/free when in a
critical section.

uma_zalloc_arg()/uma_zalloc_free() may acquire a sleepable lock on the
zone. The malloc() family of functions may call uma_zalloc_arg() or
uma_zalloc_free().

The malloc(9) man page currently claims that free() will never sleep.
It also implies that the malloc() family of functions will not sleep
when called with M_NOWAIT. However, it is more correct to say that
these functions will not sleep indefinitely. Indeed, they may acquire
a sleepable lock. However, a developer may overlook this restriction
because the WITNESS check that catches attempts to call the malloc()
family of functions within a critical section is inconsistenly
applied.

This change clarifies the language of the malloc(9) man page to clarify
the restriction against calling the malloc() family of functions
while in a critical section or holding a spin lock. It also adds
KASSERTs at appropriate points to make the enforcement of this
restriction more consistent.

PR: 204633
Differential Revision: https://reviews.freebsd.org/D4197
Reviewed by: markj
Approved by: gnn (mentor)
Sponsored by: Juniper Networks

8 years agoIf a NIS server has long entries on its database that is bigger than
Marcelo Araujo [Thu, 19 Nov 2015 13:36:53 +0000 (13:36 +0000)]
If a NIS server has long entries on its database that is bigger than
1024 specified on YPMAXRECORD the ypmatch can get in an infinite retry
loop when is requesting the information from the NIS server.

The ypmatch(1) will return an error until the command receives an
kill(1).

To avoid this problem, we check the MAX_RETRIES that is by default set
to 20 and avoid get in infinet loop at the client side.

NOTE: FreeBSD nis(8) server doesn't present this issue.

Submitted by: Ravi Pokala <rpokala@panasas.com>,
Lakshmi N. Sundararajan <lakshmi.n@msystechnologies.com>,
Lewis, Fred <flewis@panasas.com>,
Pushkar Kothavade <pushkar.kothavade@msystechnologies.com>
Approved by: bapt (mentor)
MFC after: 1 month
Differential Revision: D4095

8 years agoAdd the mlx5 and mlx5en modules to the i386 and amd64 kernel builds by
Hans Petter Selasky [Thu, 19 Nov 2015 12:55:43 +0000 (12:55 +0000)]
Add the mlx5 and mlx5en modules to the i386 and amd64 kernel builds by
default and add a manual page for mlx5en. The mlx5 module contains
shared code for both infiniband and ethernet. The mlx5en module
contains specific code for ethernet functionality only. A mlx5ib
module is in the works for infiniband support.

Supported hardware:
- ConnectX-4: 10/20/25/40/50/56/100Gb/s speeds.
- ConnectX-4 LX: 10/25/40/50Gb/s speeds (low power consumption)

Refer to the mlx5en(4) manual page for a comprehensive list.

The team porting the mlx5 driver(s) to FreeBSD:
- Hans Petter Selasky <hselasky@freebsd.org>
- Oded Shanoon <odeds@mellanox.com>
- Meny Yossefi <menyy@mellanox.com>
- Shany Michaely <shanim@mellanox.com>
- Shahar Klein <shahark@mellanox.com>
- Daria Genzel <dariaz@mellanox.com>
- Mark Bloch <markb@mellanox.com>

Differential Revision: https://reviews.freebsd.org/D4163
Submitted by: Mark Block <markb@mellanox.com>
Sponsored by: Mellanox Technologies
Reviewed by: gnn @
MFC after: 3 days

8 years agoFix zfs(8) set options
Steven Hartland [Thu, 19 Nov 2015 12:03:11 +0000 (12:03 +0000)]
Fix zfs(8) set options

Fix zfs(8) not formatting due to wrong macro (Oc) in the syntax for the new
zfs set multiple dataset properties option.

PR: 204631
Submitted by: Thomas Eberhardt
Sponsored by: Multiplay

8 years agoStyle changes, mostly automated.
Hans Petter Selasky [Thu, 19 Nov 2015 10:28:51 +0000 (10:28 +0000)]
Style changes, mostly automated.

Differential Revision: https://reviews.freebsd.org/D4179
Submitted by: Daria Genzel <dariaz@mellanox.com>
Sponsored by: Mellanox Technologies
MFC after: 3 days

8 years agoAccumulate out of RX buffers into a 64-bit value and subtract out of
Hans Petter Selasky [Thu, 19 Nov 2015 10:23:10 +0000 (10:23 +0000)]
Accumulate out of RX buffers into a 64-bit value and subtract out of
RX buffers from number of received packets.

Differential Revision: https://reviews.freebsd.org/D4178
Submitted by: Drew Gallatin <gallatin@freebsd.org>
Sponsored by: Mellanox Technologies
MFC after: 3 days

8 years agoMaintain the "hw_lro" configuration variable correctly.
Hans Petter Selasky [Thu, 19 Nov 2015 10:18:13 +0000 (10:18 +0000)]
Maintain the "hw_lro" configuration variable correctly.

Setting sysctl dev....conf.hw_lro may fail if the net device lro is
turned off. Due to the nature of our sysctl handler we need to set the
values back to 0 and issue an error.

Differential Revision: https://reviews.freebsd.org/D4177
Submitted by: Shahar Klein <shahark@mellanox.com>
Sponsored by: Mellanox Technologies
MFC after: 3 days

8 years agoPrint cable name, if cable type is not recognized.
Hans Petter Selasky [Thu, 19 Nov 2015 10:10:52 +0000 (10:10 +0000)]
Print cable name, if cable type is not recognized.

Differential Revision: https://reviews.freebsd.org/D4180
Submitted by: Mark Bloch <markb@mellanox.com>
Sponsored by: Mellanox Technologies
MFC after: 3 days

8 years agoImprove locking of sg_threadcount.
Alexander Motin [Thu, 19 Nov 2015 08:04:05 +0000 (08:04 +0000)]
Improve locking of sg_threadcount.

MFC after: 1 week

8 years agoRemove a commented-out debug print.
Mark Johnston [Thu, 19 Nov 2015 05:58:51 +0000 (05:58 +0000)]
Remove a commented-out debug print.

MFC after: 1 week

8 years agoAdd support for a configurable output channel to witness(4).
Mark Johnston [Thu, 19 Nov 2015 05:56:59 +0000 (05:56 +0000)]
Add support for a configurable output channel to witness(4).

This is useful in environments where system configuration is performed by
automated interaction with the system console, since unexpected witness
output makes such automation difficult. With this change, the new
debug.witness.output_channel sysctl allows one to specify that witness
output is to be printed to the kernel log (using log(9)) rather than the
console.

Reviewed by: cem, jhb
MFC after: 2 weeks
Relnotes: yes
Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D4183

8 years agoAdd vlog(9).
Mark Johnston [Thu, 19 Nov 2015 05:50:22 +0000 (05:50 +0000)]
Add vlog(9).

Reviewed by: cem, jhb
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D4183

8 years agoFix a bug in the amd64 dtrace_getarg() implementation: when unwinding the
Mark Johnston [Thu, 19 Nov 2015 05:33:15 +0000 (05:33 +0000)]
Fix a bug in the amd64 dtrace_getarg() implementation: when unwinding the
stack, take into account the copy of rsi pushed between the breakpoint
trapframe and the dtrace_invop frame. Prior to r287644, this was covered
by the fact that sizeof(struct amd64_frame) was 24 rather than 16.

Reported by: smh

8 years agoRevert r291009 until rman changes go in.
Justin Hibbits [Thu, 19 Nov 2015 04:41:16 +0000 (04:41 +0000)]
Revert r291009 until rman changes go in.

Pointy-hat to: jhibbits

8 years agoFix missing endif.
Warner Losh [Thu, 19 Nov 2015 03:55:44 +0000 (03:55 +0000)]
Fix missing endif.

8 years agoFix mips CPUTYPE so that we can pass it through to gcc.
Warner Losh [Thu, 19 Nov 2015 03:11:20 +0000 (03:11 +0000)]
Fix mips CPUTYPE so that we can pass it through to gcc.
Keep old CPUTYPEs around for compatibility. Also include
a list of typical values for FreeBSD.

# Split out from other changes in D4155

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

8 years agoRemove clauses 3 and 4 from makefs newfs_extern.h
Ed Maste [Thu, 19 Nov 2015 02:39:46 +0000 (02:39 +0000)]
Remove clauses 3 and 4 from makefs newfs_extern.h

Obtained from: NetBSD

8 years agoMark the mostly redundant kernels that just pull
Warner Losh [Thu, 19 Nov 2015 01:58:12 +0000 (01:58 +0000)]
Mark the mostly redundant kernels that just pull
in something from _BASE as NO_UNIVERSE

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

8 years agoThe Linux kexec boot loader doesn't need a font built in to it. This got
Nathan Whitehorn [Thu, 19 Nov 2015 01:57:23 +0000 (01:57 +0000)]
The Linux kexec boot loader doesn't need a font built in to it. This got
copied-and-pasted from the PS3 loader.

8 years agoDon't leak work if __mlx4_register_vlan(..) fails in
Enji Cooper [Thu, 19 Nov 2015 01:08:16 +0000 (01:08 +0000)]
Don't leak work if __mlx4_register_vlan(..) fails in
mlx4_master_immediate_activate_vlan_qos(..)

MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D4203
Submitted by: Miles Olrich <miles.olrich@isilon.com>
Sponsored by: EMC / Isilon Storage Division