]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
7 years agoFix VNET - DAD detected duplicate IPv6 address
Warner Losh [Wed, 1 Mar 2017 04:47:22 +0000 (04:47 +0000)]
Fix VNET - DAD detected duplicate IPv6 address

Assign a hopefully unique, locally administered etheraddr. - for
epairNa & epairNb

Submitted by: Catalin <sslevil@users.noreply.github.com>
Pull Request: https://github.com/freebsd/freebsd/pull/92

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
Enji Cooper [Wed, 1 Mar 2017 04:41:59 +0000 (04:41 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This simplifies pathing in make/displayed output.

MFC after: 1 week
Sponsored by: Dell EMC Isilon

7 years agoUpdate tw_cl_share.h to allow 255 LUNs
Warner Losh [Wed, 1 Mar 2017 04:40:57 +0000 (04:40 +0000)]
Update tw_cl_share.h to allow 255 LUNs

TW_CL_MAX_NUM_LUNS should not be 16 but I presume 255. I have a 3ware
controller with more than 16 volumes (LUN's) and otherwise all LUN's
above the 16'th are not working.

Submitted by: jcatrysse <j.catrysse@proximedia.be>
Pull Request: https://github.com/freebsd/freebsd/pull/100

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
Enji Cooper [Wed, 1 Mar 2017 04:35:21 +0000 (04:35 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

Also, use :H where possible/sensical to manipulate .CURDIR-relative paths

This simplifies pathing in make/displayed output.

MFC after: 1 week
Sponsored by: Dell EMC Isilon

7 years agoMake wsp process a single touchpad tap and interpret it as a
Warner Losh [Wed, 1 Mar 2017 04:27:58 +0000 (04:27 +0000)]
Make wsp process a single touchpad tap and interpret it as a
left-click event.  It can be disabled setting the new
hw.usb.wsp.enable_single_tap_clicks sysctl to 0.

Submitted by: K Staring <qdk@quickdekay.net>
Pull Request: https://github.com/freebsd/freebsd/pull/97

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
Enji Cooper [Wed, 1 Mar 2017 04:24:56 +0000 (04:24 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This simplifies pathing in make/displayed output.

MFC after: 1 week
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
Enji Cooper [Wed, 1 Mar 2017 04:24:24 +0000 (04:24 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This simplifies pathing in make/displayed output.

MFC after: 1 week
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
Enji Cooper [Wed, 1 Mar 2017 04:23:53 +0000 (04:23 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This simplifies pathing in make/displayed output.

MFC after: 1 week
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
Enji Cooper [Wed, 1 Mar 2017 04:22:23 +0000 (04:22 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

The SRCTOP conversion simplifies pathing in make/displayed output.

Also, while here, change a hardcoded path to ${RPCDIR}/ypxfrd.x in
the make targets with ${.ALLSRC} .

MFC after: 1 week
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
Enji Cooper [Wed, 1 Mar 2017 04:19:04 +0000 (04:19 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This simplifies pathing in make/displayed output.

MFC after: 1 week
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
Enji Cooper [Wed, 1 Mar 2017 04:18:28 +0000 (04:18 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This simplifies pathing in make/displayed output.

MFC after: 1 week
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
Enji Cooper [Wed, 1 Mar 2017 04:17:59 +0000 (04:17 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This simplifies pathing in make/displayed output.

MFC after: 1 week
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
Enji Cooper [Wed, 1 Mar 2017 04:17:18 +0000 (04:17 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This simplifies pathing in make/displayed output.

MFC after: 1 week
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
Enji Cooper [Wed, 1 Mar 2017 04:16:40 +0000 (04:16 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

The SRCTOP conversion simplifies pathing in make/displayed output.

Also, while here, change a hardcoded path to ${RPCDIR}/ypupdate_prot.x in
the make targets with ${.ALLSRC} .

MFC after: 1 week
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
Enji Cooper [Wed, 1 Mar 2017 04:14:41 +0000 (04:14 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This simplifies pathing in make/displayed output.

MFC after: 1 week
Sponsored by: Dell EMC Isilon

7 years agoUse .ALLSRC instead of RPCSRC
Enji Cooper [Wed, 1 Mar 2017 04:13:31 +0000 (04:13 +0000)]
Use .ALLSRC instead of RPCSRC

This is a trivial simplification in the Makefile, meant to serve as
a good example for what to do with rules like this.

MFC after: 1 week
Sponsored by: Dell EMC Isilon

7 years agoUse .ALLSRC instead of RPCSRC
Enji Cooper [Wed, 1 Mar 2017 04:12:24 +0000 (04:12 +0000)]
Use .ALLSRC instead of RPCSRC

This is a trivial simplification in the Makefile, meant to serve as
a good example for what to do with rules like this.

MFC after: 1 week
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
Enji Cooper [Wed, 1 Mar 2017 04:02:36 +0000 (04:02 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

MFC after: 1 week
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
Enji Cooper [Wed, 1 Mar 2017 04:00:17 +0000 (04:00 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

MFC after: 1 week
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
Enji Cooper [Wed, 1 Mar 2017 03:59:18 +0000 (03:59 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

The SRCTOP conversion simplifies pathing in make/displayed output.

Also, while here, change a hardcoded path to ar5523.bin.uu in the make target
with ${.ALLSRC} .

MFC after: 1 week
Sponsored by: Dell EMC Isilon

7 years agoAdd additional __FreeBSD_version guards around the hsearch_r testcases
Enji Cooper [Wed, 1 Mar 2017 03:31:12 +0000 (03:31 +0000)]
Add additional __FreeBSD_version guards around the hsearch_r testcases

The reasoning for this is the same as r276046: to ease MFCing the tests
to ^/stable/10 .

This was accidentally missed in r313439

MFC after: 1 week
X-MFC with: r313439
Sponsored by: Dell EMC Isilon

7 years agoRevert prior commit to restore the files mangled by my "fixing" merge
Warner Losh [Wed, 1 Mar 2017 02:10:40 +0000 (02:10 +0000)]
Revert prior commit to restore the files mangled by my "fixing" merge
conflicts for a git rebase I tried to do.

7 years agostrstr.c was inadvertently blasted with a copy of isa_nmi.c. Revert
Warner Losh [Wed, 1 Mar 2017 02:07:51 +0000 (02:07 +0000)]
strstr.c was inadvertently blasted with a copy of isa_nmi.c. Revert
and remove clause 3 while I'm here.

7 years agoiwn: fix data rate parsing for Rx radiotap header.
Andriy Voskoboinyk [Wed, 1 Mar 2017 00:42:38 +0000 (00:42 +0000)]
iwn: fix data rate parsing for Rx radiotap header.

Tested with Intel 6205, MONITOR mode + RTL8188EU, STA mode.

7 years agoAdd an ATF test for IPv6 SLAAC with multiple fibs
Alan Somers [Wed, 1 Mar 2017 00:28:04 +0000 (00:28 +0000)]
Add an ATF test for IPv6 SLAAC with multiple fibs

Tests that an interface can get a SLAAC address and that it inserts its
routes into the correct fib. Does not test anything to do with NDP.

PR: 196361
Reviewed by: Erick Turnquist <jhujhiti@adjectivism.org>
MFC after: 3 weeks
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D9776

7 years agoFix spelling mistake in comment, firmwrae -> firmware
Gavin Atkinson [Tue, 28 Feb 2017 23:55:03 +0000 (23:55 +0000)]
Fix spelling mistake in comment, firmwrae -> firmware

7 years agoRenumber copyright clause 4
Warner Losh [Tue, 28 Feb 2017 23:42:47 +0000 (23:42 +0000)]
Renumber copyright clause 4

Renumber cluase 4 to 3, per what everybody else did when BSD granted
them permission to remove clause 3. My insistance on keeping the same
numbering for legal reasons is too pedantic, so give up on that point.

Submitted by: Jan Schaumann <jschauma@stevens.edu>
Pull Request: https://github.com/freebsd/freebsd/pull/96

7 years agoMerge CK as of commit 24d26965d1a28039062ba3bcf9433b623f3d2c5e, to get
Olivier Houchard [Tue, 28 Feb 2017 23:30:14 +0000 (23:30 +0000)]
Merge CK as of commit 24d26965d1a28039062ba3bcf9433b623f3d2c5e, to get
a fix in ck_epoch.

7 years agoImport CK as of commit 24d26965d1a28039062ba3bcf9433b623f3d2c5e, to get
Olivier Houchard [Tue, 28 Feb 2017 23:24:08 +0000 (23:24 +0000)]
Import CK as of commit 24d26965d1a28039062ba3bcf9433b623f3d2c5e, to get
a fix in ck_epoch

7 years agoWhen IPv6 fragments reassembly is complete, update mbuf's csum_data
Andrey V. Elsukov [Tue, 28 Feb 2017 22:58:19 +0000 (22:58 +0000)]
When IPv6 fragments reassembly is complete, update mbuf's csum_data
and csum_flags using information from all fragments. This fixes
dropping of reassembled packets due to wrong checksum when the IPv6
checksum offloading is enabled on a network card.

Obtained from: Yandex LLC
MFC after: 1 week
Sponsored by: Yandex LLC

7 years agoInitialize pcb_save for thread0.
Konstantin Belousov [Tue, 28 Feb 2017 22:54:52 +0000 (22:54 +0000)]
Initialize pcb_save for thread0.

Otherwise kernel traps on NULL dereference if fpu_kern(9) is used from the
thread0 context.

Reported by: cem
Reviewed by: cem, jhb
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

7 years agoAdd Ubiquiti Rocket M support
Warner Losh [Tue, 28 Feb 2017 22:49:45 +0000 (22:49 +0000)]
Add Ubiquiti Rocket M support

Updated to use geom_uzip

Submitted by:   Michael Vale <m.vale@live.com.au>
Pull Request:   https://github.com/freebsd/freebsd/pull/16

7 years agoThis should have been K3771_INIT.
Warner Losh [Tue, 28 Feb 2017 22:22:53 +0000 (22:22 +0000)]
This should have been K3771_INIT.

Pointy Hat to: imp@

7 years agoSort declaration of sem_clockwait_np
Eric van Gyzen [Tue, 28 Feb 2017 21:47:00 +0000 (21:47 +0000)]
Sort declaration of sem_clockwait_np

Also mention <time.h> in sem_timedwait(3), because POSIX does,
and because the user will need it for clockid_t, struct timespec,
and TIMER_ABSTIME.

Reported by: bde
MFC after: 9 days
X-MFC with: r314179
Sponsored by: Dell EMC

7 years agoFix arge0 mdio bus
Warner Losh [Tue, 28 Feb 2017 21:39:08 +0000 (21:39 +0000)]
Fix arge0 mdio bus

This makes arge0 phy's attach.

Submitted by: Michael Vale <m.vale@live.com.au>
Pull Request: https://github.com/freebsd/freebsd/pull/16

7 years agoUpdate PICOSTATION_M2HP
Warner Losh [Tue, 28 Feb 2017 21:39:00 +0000 (21:39 +0000)]
Update PICOSTATION_M2HP

Make the random number generator work so we can do WPA encryption on the AP's.

Submitted by: Michael Vale <m.vale@live.com.au>
Pull Request: https://github.com/freebsd/freebsd/pull/16

7 years agoProvide a comment on why stdio.h needs to be included.
Scott Long [Tue, 28 Feb 2017 21:27:51 +0000 (21:27 +0000)]
Provide a comment on why stdio.h needs to be included.

7 years agoInclude stdio.h to fix libsbuf build.
Jung-uk Kim [Tue, 28 Feb 2017 21:18:45 +0000 (21:18 +0000)]
Include stdio.h to fix libsbuf build.

Reviewed by: scottl

7 years agoThe kern.geom.part.auto_resize should be tunable.
Mariusz Zaborski [Tue, 28 Feb 2017 20:51:20 +0000 (20:51 +0000)]
The kern.geom.part.auto_resize should be tunable.

7 years agodc(1): Introduce e command, equivalent to p, but writes to stderr
Pedro F. Giffuni [Tue, 28 Feb 2017 20:50:49 +0000 (20:50 +0000)]
dc(1): Introduce e command, equivalent to p, but writes to stderr

Obtained from: OpenBSD
MFC after: 2 weeks

7 years agoFix include/arpa/nameser_compat.h by adding T_DNAME definition.
Warner Losh [Tue, 28 Feb 2017 20:34:25 +0000 (20:34 +0000)]
Fix include/arpa/nameser_compat.h by adding T_DNAME definition.
Fixes Apache trafficserver

Submitted by: John J. Rushford <https://github.com/jrushford>
Pull Request: https://github.com/freebsd/freebsd/pull/104

7 years agoAdd support for Vodafone/Huawei K3771.
Warner Losh [Tue, 28 Feb 2017 20:25:45 +0000 (20:25 +0000)]
Add support for Vodafone/Huawei K3771.
See also http://www.draisberghof.de/usb_modeswitch/device_reference.txt

Submitted by: Dean Hamstead <https://github.com/djzort>
Pull Request: https://github.com/freebsd/freebsd/pull/76

7 years agoLinux epoll return EEXIST on case when op is EPOLL_CTL_ADD, and the supplied
Dmitry Chagin [Tue, 28 Feb 2017 19:55:16 +0000 (19:55 +0000)]
Linux epoll return EEXIST on case when op is EPOLL_CTL_ADD, and the supplied
file descriptor fd is already registered with this epoll instance.

MFC after: 1 month

7 years agoLinux epoll return ENOENT error in case when op is EPOLL_CTL_MOD or
Dmitry Chagin [Tue, 28 Feb 2017 19:54:22 +0000 (19:54 +0000)]
Linux epoll return ENOENT error in case when op is EPOLL_CTL_MOD or
EPOLL_CTL_DEL, and fd is not registered with this epoll instance.

MFC after: 1 month

7 years agoFreeBSD does not have analgue for epill EPOLLPRI event type.
Dmitry Chagin [Tue, 28 Feb 2017 19:49:21 +0000 (19:49 +0000)]
FreeBSD does not have analgue for epill EPOLLPRI event type.
So, do not set EPOLLPRI event acidently.
Also, do not set EPOLLWRNORM and EPOLLRDNORM events as epoll
do not set this events.

MFC after: 1 month

7 years agoDon't remove ofwdump.8 on FreeBSD/mips.
John Baldwin [Tue, 28 Feb 2017 19:32:45 +0000 (19:32 +0000)]
Don't remove ofwdump.8 on FreeBSD/mips.

FreeBSD/mips has installed ofwdump by default since r288232.

Sponsored by: DARPA / AFRL

7 years agocxgbe/iw_cxgbe: fix various double-close panics with iWARP sockets.
Navdeep Parhar [Tue, 28 Feb 2017 19:27:41 +0000 (19:27 +0000)]
cxgbe/iw_cxgbe: fix various double-close panics with iWARP sockets.

Sockets representing the TCP endpoints for iWARP connections are
allocated by the ibcore module.  Before this revision they were closed
either by the ibcore module or the iw_cxgbe hardware driver depending on
the state transitions during connection teardown.  This is error prone
and there were cases where both iw_cxgbe and ibcore closed the socket
leading to double-free panics.  The fix is to let ibcore close the
sockets it creates and never do it in the driver.

- Use sodisconnect instead of soclose (preceded by solinger = 0) in the
  driver to tear down an RDMA connection abruptly.  This does what's
  intended without releasing the socket's fd reference.

- Close the socket in ibcore when the iWARP iw_cm_id is destroyed.  This
  works for all kinds of sockets: clients that initiate connections,
  listeners, and sockets accepted off of listeners.

Reviewed by: Steve Wise @ Open Grid Computing, hselasky@
MFC after: 3 days
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D9796

7 years agoAdd prototype for sbuf_putbuf()
Scott Long [Tue, 28 Feb 2017 19:01:59 +0000 (19:01 +0000)]
Add prototype for sbuf_putbuf()

Sponsored by: Netflix

7 years agoLocal APIC: add support for extended LVT entries found in AMD processors
Andriy Gapon [Tue, 28 Feb 2017 18:48:12 +0000 (18:48 +0000)]
Local APIC: add support for extended LVT entries found in AMD processors

The extended LVT entries can be used to configure interrupt delivery
for various events that are internal to a processor and can use this
feature.

All current processors that support the feature have four of such entries.
The entries are all masked upon the processor reset, but it's possible
that firmware may use some of them.

BIOS and Kernel Developer's Guides for some processor models do not assign
any particular names to the extended LVTs, while other BKDGs provide names
and suggested usage for them.
However, there is no fixed mapping between the LVTs and the processor
events in any processor model that supports the feature.  Any entry can be
assigned to any event.  The assignment is done by programming an offset
of an entry into configuration bits corresponding to an event.

This change does not expose the flexibility that the feature offers.
The change adds just a single method to configure a hardcoded extended LVT
entry to deliver APIC_CMC_INT.  The method is designed to be used with
Machine Check Error Thresholding mechanism on supported processor models.

For references please see BKDGs for families 10h - 16h and specifically
descriptions of APIC30, APIC400, APIC[530:500] registers.
For a description of the Error Thresholding mechanism see, for example,
BKDG for family 10h, section 2.12.1.6.
http://developer.amd.com/resources/developer-guides-manuals/

Thanks to jhb and kib for their suggestions.

Reviewed by: kib
Discussed with: jhb
MFC after: 5 weeks
Relnotes: maybe
Differential Revision: https://reviews.freebsd.org/D9612

7 years agoImplement sbuf_prf(), which takes an sbuf and outputs it
Scott Long [Tue, 28 Feb 2017 18:25:06 +0000 (18:25 +0000)]
Implement sbuf_prf(), which takes an sbuf and outputs it
to stdout in the non-kernel case and to the console+log
in the kernel case.  For the kernel case it hooks the
putbuf() machinery underneath printf(9) so that the buffer
is written completely atomically and without a copy into
another temporary buffer.  This is useful for fixing
compound console/log messages that become broken and
interleaved when multiple threads are competing for the
console.

Reviewed by: ken, imp
Sponsored by: Netflix

7 years agoProperly indent a default: label and avoid crashing when running
Bjoern A. Zeeb [Tue, 28 Feb 2017 18:10:03 +0000 (18:10 +0000)]
Properly indent a default: label and avoid crashing when running
under -v but cannot connect due to trying to print an int as %s [1].

Reported by: andrew [1]
MFC after: 3 days

7 years agoAdd SOC_ALTERA_* kernel options per each SoC and use it to
Ruslan Bukin [Tue, 28 Feb 2017 16:20:33 +0000 (16:20 +0000)]
Add SOC_ALTERA_* kernel options per each SoC and use it to
conditionally compile the code.

Reviewed by: andrew
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D9836

7 years agoallwinner: A31: Add ccung driver
Emmanuel Vadot [Tue, 28 Feb 2017 15:44:21 +0000 (15:44 +0000)]
allwinner: A31: Add ccung driver

This adds clocks support for the aw_ccung on the A31 SoC.
Newer DTS files require this.
All the clocks except two CSI are defined and exported on the clock domain.

7 years agoallwinner: nkmp: Add MUX capability
Emmanuel Vadot [Tue, 28 Feb 2017 15:11:33 +0000 (15:11 +0000)]
allwinner: nkmp: Add MUX capability

Some NKMP clocks have a mux options.
Add the capability to aw_clk_nkmp.

7 years agoAdd compatible string.
Ruslan Bukin [Tue, 28 Feb 2017 14:42:57 +0000 (14:42 +0000)]
Add compatible string.

This restores USB attaching on SOCKIT board after reusing
standard DTS files.

Sponsored by: DARPA, AFRL

7 years agoAdd support for Intel Arria 10 SoC Development Kit.
Ruslan Bukin [Tue, 28 Feb 2017 14:02:16 +0000 (14:02 +0000)]
Add support for Intel Arria 10 SoC Development Kit.
Use standard DTS files for SOCKIT and SOCDK.

Sponsored by: DARPA, AFRL

7 years agoMake ctl_queue_sense() not sleep.
Alexander Motin [Tue, 28 Feb 2017 11:56:17 +0000 (11:56 +0000)]
Make ctl_queue_sense() not sleep.

It may be called in non-sleepable frontend context.

MFC after: 2 weeks

7 years agoallwinner: NKMP clock: add update bit
Emmanuel Vadot [Tue, 28 Feb 2017 11:38:11 +0000 (11:38 +0000)]
allwinner: NKMP clock: add update bit

The PLL_DDR clock have an update bit which need to be set after changing
the value, add the possibility to define one for NKMP clocks.

This allow us to add the missing clocks.
We now have the full list of clocks created under the clock domain.

7 years agoallwinner: NM clock: Add value for fixed factor.
Emmanuel Vadot [Tue, 28 Feb 2017 11:05:45 +0000 (11:05 +0000)]
allwinner: NM clock: Add value for fixed factor.

The register func for aw_clk_nm didn't copy the value needed for the fixed
factor, resulting in all fixed factor not working on NM clocks.

7 years agohyperv/hn: Simplify RNDIS packet data offset calculation.
Sepherosa Ziehau [Tue, 28 Feb 2017 09:50:34 +0000 (09:50 +0000)]
hyperv/hn: Simplify RNDIS packet data offset calculation.

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D9699

7 years agoRemove some locking not needed for modern CAM.
Alexander Motin [Tue, 28 Feb 2017 05:24:06 +0000 (05:24 +0000)]
Remove some locking not needed for modern CAM.

This driver is full of LORs.  This change allows to reduce deadlock chance
from 100% to level that allows some tests to be done.

MFC after: 2 weeks

7 years agoAdd safety check against too long CDB.
Alexander Motin [Tue, 28 Feb 2017 05:17:50 +0000 (05:17 +0000)]
Add safety check against too long CDB.

SBP-2 specification defined maximum CDB length as 12 bytes.  Newer SBP-3
specification allows CDB of any size, but this driver is too old.  Proper
solution would be to look on maximal ORB size supported by the target.

MFC after: 1 week

7 years agoRemove SVR4 (System V Release 4) binary compatibility support.
Gleb Smirnoff [Tue, 28 Feb 2017 05:14:42 +0000 (05:14 +0000)]
Remove SVR4 (System V Release 4) binary compatibility support.

UNIX System V Release 4 is operating system released in 1988. It ceased
to exist in early 2000-s.

7 years agoUse "build" instead of "all" when building ports modules
Enji Cooper [Tue, 28 Feb 2017 04:48:30 +0000 (04:48 +0000)]
Use "build" instead of "all" when building ports modules

"all" in ports currently means "stage the ports", which requires root today,
and brings to light other potential issues, like ENAMETOOLONG with staged
directories (bug 161481, etc).

This fixes buildkernel for me when run as a non-root user, assuming all
of the prerequisites have been installed beforehand and are up-to-date.

MFC after: 1 month
Discussed with: swills (IRC)
Sponsored by: Dell EMC Isilon

7 years agoMake kernel breakpoints work for book-e
Justin Hibbits [Tue, 28 Feb 2017 04:31:28 +0000 (04:31 +0000)]
Make kernel breakpoints work for book-e

Add the necessary bits to enable kernel breakpoints for Book-E.  The entrypoint
for program exception is very trivial, so rather than expand it to be similar to
AIM, add it into the standard trap handler.

This wasn't blocked out as Book-E specific because it is only a minor redundancy
over AIM, which should have already called db_trap_glue() at this point.  If
it's going to panic with a fatal trap anywya, it doesn't matter if it goes
through this path again.

7 years agoUnbreak kernel breakpoints, broken for ~4 years now
Justin Hibbits [Tue, 28 Feb 2017 04:13:20 +0000 (04:13 +0000)]
Unbreak kernel breakpoints, broken for ~4 years now

When committing DTrace in 2012/2013 era I inadvertently broke breakpoints, by
setting EXC_DTRACE to the same value as BKPT_INST.  Change EXC_DTRACE to a
different, yet logically identical, trap (tw <all>,31,31).

MFC after: 2 weeks

7 years agobnxt: propagate RSS hash type to the network stack.
Stephen Hurd [Tue, 28 Feb 2017 02:27:51 +0000 (02:27 +0000)]
bnxt: propagate RSS hash type to the network stack.

RSS hash type will be used to identify the CPU on to which, a receive packet
will be queued.  This patch extracts the "RSS hash type" from the receive
completion and sends it to the stack.

Submitted by: Venkatkumar Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed by: shurd
Approved by: sbruno
MFC after: 1 week
Sponsored by: Broadcom Limited
Differential Revision: https://reviews.freebsd.org/D9685

7 years ago1. state checks in bxe_tx_mq_start_locked() and bxe_tx_mq_start() to sync threads...
David C Somayajulu [Mon, 27 Feb 2017 23:38:51 +0000 (23:38 +0000)]
1. state checks in bxe_tx_mq_start_locked() and bxe_tx_mq_start() to sync threads during interface down or detach.
2. add sysctl to set pause frame parameters
3. increase max segs for TSO packets to BXE_TSO_MAX_SEGMENTS (32)
4. add debug messages for PHY
5. HW LRO support restricted to FreeBSD versions 8.x and above.

Submitted by:Vaishali.Kulkarni@cavium.com
MFC after:5 days

7 years agoAllow setting access-width for UART registers.
Ruslan Bukin [Mon, 27 Feb 2017 20:08:42 +0000 (20:08 +0000)]
Allow setting access-width for UART registers.

This is required for FDT's standard "reg-io-width" property
(similar to "reg-shift" property) found in many DTS files.

This fixes operation on Altera Arria 10 SOC Development Kit,
where standard ns8250 uart allows 4-byte access only.

Reviewed by: kan, marcel
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D9785

7 years agoRevert r314212 as it break Allwinner boards.
Ruslan Bukin [Mon, 27 Feb 2017 19:46:27 +0000 (19:46 +0000)]
Revert r314212 as it break Allwinner boards.

Reported by: manu

7 years agoAdd sysctl to control auto resize of the GEOM metadata.
Mariusz Zaborski [Mon, 27 Feb 2017 17:54:01 +0000 (17:54 +0000)]
Add sysctl to control auto resize of the GEOM metadata.

Reviewed by: AllanJude
Differential Revision: https://reviews.freebsd.org/D9603

7 years agoAnnounce that sbp_targ(4) does not support initiator mode.
Alexander Motin [Mon, 27 Feb 2017 17:50:38 +0000 (17:50 +0000)]
Announce that sbp_targ(4) does not support initiator mode.

MFC after: 1 week

7 years agofix lvt_mode: edge-triggered interrupt mode is set by clearing APIC_LVT_TM
Andriy Gapon [Mon, 27 Feb 2017 17:36:31 +0000 (17:36 +0000)]
fix lvt_mode: edge-triggered interrupt mode is set by clearing APIC_LVT_TM

The fixed is used only to fix up buggy MPTable information and the
trigger mode is probably ignored for the relevant interrupt types
anyway.  Still, it's better to be standards compliant and have the code
do what it says it does.

Discussed with: jhb
MFC after: 5 days

7 years agoallwinner: Correct some clocks name for H3 CCU.
Emmanuel Vadot [Mon, 27 Feb 2017 17:12:17 +0000 (17:12 +0000)]
allwinner: Correct some clocks name for H3 CCU.

7 years agoAdd ID for NEC uPD720202 xHCI controller.
Bruce M Simpson [Mon, 27 Feb 2017 17:04:35 +0000 (17:04 +0000)]
Add ID for NEC uPD720202 xHCI controller.

MFC after: 1 month

7 years agoReturn EINVAL when an invalid file descriptor specified.
Dmitry Chagin [Mon, 27 Feb 2017 16:55:09 +0000 (16:55 +0000)]
Return EINVAL when an invalid file descriptor specified.

MFC after: 1 month

7 years agoUnify eventfd ioctl method and use it for other similar interfaces.
Dmitry Chagin [Mon, 27 Feb 2017 16:53:52 +0000 (16:53 +0000)]
Unify eventfd ioctl method and use it for other similar interfaces.

MFC after: 1 month

7 years agobhyve: document virtio-console in the manpage
Roman Bogorodskiy [Mon, 27 Feb 2017 15:37:38 +0000 (15:37 +0000)]
bhyve: document virtio-console in the manpage

Reviewed by: bcr, wblock, jceel
Approved by: grehan
Differential Revision: https://reviews.freebsd.org/D9564

7 years agoUpdate devd.conf for ports change 421360
Alan Somers [Mon, 27 Feb 2017 15:32:56 +0000 (15:32 +0000)]
Update devd.conf for ports change 421360

Ports change 421360 changed the name and UID of the postgres user

Reviewed by: trasz, imp, girgen
MFC after: 3 weeks
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D9746

7 years agoxen/gntdev: prevent unsynchronized accesses to the map entry
Roger Pau Monné [Mon, 27 Feb 2017 15:31:15 +0000 (15:31 +0000)]
xen/gntdev: prevent unsynchronized accesses to the map entry

vm_map_lookup_done should only be called when the gntdev has finished poking at
the entry.

Reported by: alc
Reviewed by: alc
MFC after: 1 week
Sponsored by: Citrix Systems R&D

7 years agoDocument that the size of AH ICV for HMAC-SHA2-NNN should be half of
Andrey V. Elsukov [Mon, 27 Feb 2017 15:30:27 +0000 (15:30 +0000)]
Document that the size of AH ICV for HMAC-SHA2-NNN should be half of
NNN bits as described in RFC4868.

PR: 215978

7 years agoPolish handling of different reset flavours.
Alexander Motin [Mon, 27 Feb 2017 14:59:00 +0000 (14:59 +0000)]
Polish handling of different reset flavours.

The biggest change is that ctl_remove_initiator() now generates I_T NEXUS
LOSS event, cleaning part of LUs state related to the initiator.

MFC after: 2 weeks

7 years agoImplement more bit operation functions in the LinuxKPI.
Hans Petter Selasky [Mon, 27 Feb 2017 14:38:17 +0000 (14:38 +0000)]
Implement more bit operation functions in the LinuxKPI.
Some minor whitespace nits while at it.

Obtained from: kmacy @
MFC after: 1 week
Sponsored by: Mellanox Technologies

7 years agoDefine __sum16 type in the LinuxKPI.
Hans Petter Selasky [Mon, 27 Feb 2017 13:59:02 +0000 (13:59 +0000)]
Define __sum16 type in the LinuxKPI.

MFC after: 1 week
Sponsored by: Mellanox Technologies

7 years agoallwinner: Order clocks by offset rather than by type for H3 ccu.
Emmanuel Vadot [Mon, 27 Feb 2017 11:10:36 +0000 (11:10 +0000)]
allwinner: Order clocks by offset rather than by type for H3 ccu.

Also add a few more supported gates and add comments for which clocks
are missing.

7 years agoallwinner: Add support for lock and fractional mode on NM clock
Emmanuel Vadot [Mon, 27 Feb 2017 08:58:27 +0000 (08:58 +0000)]
allwinner: Add support for lock and fractional mode on NM clock

Some PLL have a fractional mode and a lock bit.
Add support for it on the NM clock and export the clocks in the clkdom.

7 years agoFix startup race initialising ACPI CM battery structures on MacBookPro.
Hans Petter Selasky [Mon, 27 Feb 2017 08:36:51 +0000 (08:36 +0000)]
Fix startup race initialising ACPI CM battery structures on MacBookPro.

During acpi_cmbat_attach() the acpi_cmbat_init_battery() notification
handler is registered. It has been observed this notification handler
can be called instantly, before the attach routine has returned. In
the notification handler there is a call to device_is_attached() which
returns false. Because the softc is set we know an attach is in
progress and the fix is simply to wait and try again in this case.

Reviewed by: avg @
MFC after: 1 week

7 years agoSend TERMINATE to firmware when aborting active ATIO.
Alexander Motin [Mon, 27 Feb 2017 08:20:28 +0000 (08:20 +0000)]
Send TERMINATE to firmware when aborting active ATIO.

MFC after: 2 weeks

7 years agolibrss: simplify some NULL checks.
Pedro F. Giffuni [Mon, 27 Feb 2017 00:10:00 +0000 (00:10 +0000)]
librss: simplify some NULL checks.

MFC after: 1 week

7 years agodc(1): Merge minor changes from OpenBSD.
Pedro F. Giffuni [Sun, 26 Feb 2017 22:17:06 +0000 (22:17 +0000)]
dc(1): Merge minor changes from OpenBSD.

Prefer setvbuf() to setlinebuf() for portability.
Some style(9) and redundant tests for NULL.

These are only meant to ease up merging newer changes but we are skipping
changes done in order to accomodate OpenBSD's pledge support.

Obtained from: OpenBSD
MFC after: 2 weeks

7 years agoRemove unneeded variable initialization from r314319.
Mariusz Zaborski [Sun, 26 Feb 2017 22:15:39 +0000 (22:15 +0000)]
Remove unneeded variable initialization from r314319.

Pointed out by: kib

7 years agoDon't try to open devices in the gettc() function which will always
Mariusz Zaborski [Sun, 26 Feb 2017 22:07:26 +0000 (22:07 +0000)]
Don't try to open devices in the gettc() function  which will always
fail in the Capability mode. Instead silently fallback to the syscall
method, which is done for example in the gettimeofday(2) function.

Reviewed by: kib

7 years agoEnable pl011 UART FIFOs
Jayachandran C. [Sun, 26 Feb 2017 22:05:22 +0000 (22:05 +0000)]
Enable pl011 UART FIFOs

The pl011 UART has a 16 entry Tx FIFO and a 16 entry Rx FIFO that
have not been used so far. Update the driver to enable the FIFOs
and use them in transmit and receive.

Reviewed by: andrew
Differential Revision: https://reviews.freebsd.org/D8819

7 years agoInclude pcib_private.h for prototypes.
Warner Losh [Sun, 26 Feb 2017 21:33:18 +0000 (21:33 +0000)]
Include pcib_private.h for prototypes.

Noticed by: rpokala@
Sponsored by: Netflix

7 years agodc(1): Catch up with OpenBSD tag.
Pedro F. Giffuni [Sun, 26 Feb 2017 21:24:35 +0000 (21:24 +0000)]
dc(1): Catch up with OpenBSD tag.

OpenBSD rev 1.12 corresponds to our SVN r275162. Update the tag to make
easier future updates. No functional change.

MFC after: 3 days

7 years agonet80211 drivers: fix rate setup for EAPOL frames, obtain Tx parameters
Andriy Voskoboinyk [Sun, 26 Feb 2017 20:49:35 +0000 (20:49 +0000)]
net80211 drivers: fix rate setup for EAPOL frames, obtain Tx parameters
directly from the node.

- Use ni_txparms directly instead of calculating them manually every time
- Move M_EAPOL flag check upper; otherwise it may be skipped due to
'ucastrate' / 'mcastrate' check
- Use 'mgtrate' for control frames too (see ifconfig(8), mgtrate parameter)
- Add few more M_EAPOL checks where it was missing (zyd(4), ural(4),
urtw(4))
- Few unrelated cleanups

Tested with:
 - Intel 6205 (iwn(4)), STA mode;
 - WUSB54GC (rum(4)), HOSTAP mode + RTL8188EU (rtwn(4)), STA mode.

Reviewed by: adrian
Differential Revision: https://reviews.freebsd.org/D9811

7 years agoReturn EINVAL in case when an invalid size of signal mask specified.
Dmitry Chagin [Sun, 26 Feb 2017 20:01:58 +0000 (20:01 +0000)]
Return EINVAL in case when an invalid size of signal mask specified.

MFC after: 1 month

7 years agoRegen for r314312 (Linux epoll_pwait).
Dmitry Chagin [Sun, 26 Feb 2017 19:59:28 +0000 (19:59 +0000)]
Regen for r314312 (Linux epoll_pwait).

MFC after: 1 month

7 years agoChange Linux epoll_pwait syscall definition to match Linux actual one.
Dmitry Chagin [Sun, 26 Feb 2017 19:57:18 +0000 (19:57 +0000)]
Change Linux epoll_pwait syscall definition to match Linux actual one.

MFC after: 1 month

7 years agoRestore signal mask in epoll_pwait.
Dmitry Chagin [Sun, 26 Feb 2017 19:54:17 +0000 (19:54 +0000)]
Restore signal mask in epoll_pwait.

MFC after: 1 month