]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
8 years agoUpdate libucl to latest git snapshot (20151027)
bapt [Tue, 27 Oct 2015 21:24:09 +0000 (21:24 +0000)]
Update libucl to latest git snapshot (20151027)

8 years agodrm/i915: Reduce diff with Linux 3.8
dumbbell [Tue, 27 Oct 2015 21:23:19 +0000 (21:23 +0000)]
drm/i915: Reduce diff with Linux 3.8

There is no functional change. The goal is to ease the future update to
Linux 3.8's i915 driver.

MFC after: 2 months

8 years agoUpdate libucl to git snapshot 20151027 (77d9d33)
bapt [Tue, 27 Oct 2015 21:19:11 +0000 (21:19 +0000)]
Update libucl to git snapshot 20151027 (77d9d33)

8 years agolibedit: Use correct buffer lengths in vi mode v command.
jilles [Tue, 27 Oct 2015 21:16:29 +0000 (21:16 +0000)]
libedit: Use correct buffer lengths in vi mode v command.

Libedit's vi mode provides a v command to edit the current line in vi(1)
(hard-coded to vi, in fact).

When Unicode/wide character mode was added, this command started truncating
and/or corrupting the edited text.

This commit fixes v if the text fits into the buffer. If the text is longer,
it is truncated.

PR: 203743
Obtained from: NetBSD (originally submitted by me)

8 years agoAdd WITHOUT_DEBUG_FILES description
emaste [Tue, 27 Oct 2015 20:49:56 +0000 (20:49 +0000)]
Add WITHOUT_DEBUG_FILES description

8 years agonet80211: add ieee80211_restart_all() call.
avos [Tue, 27 Oct 2015 20:40:57 +0000 (20:40 +0000)]
net80211: add ieee80211_restart_all() call.

This call may be used when device cannot continue to operate normally
(e.g., throws firmware error, watchdog timer expires)
and need to be restarted.

Approved by: adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D3998

8 years agodrm/i915: Reduce diff with Linux 3.8
dumbbell [Tue, 27 Oct 2015 20:34:30 +0000 (20:34 +0000)]
drm/i915: Reduce diff with Linux 3.8

There is no functional change. The goal is to ease the future update to
Linux 3.8's i915 driver.

MFC after: 2 months

8 years agoReimplement next port handle generation.
mav [Tue, 27 Oct 2015 18:32:03 +0000 (18:32 +0000)]
Reimplement next port handle generation.

For some reason port handles should be allocated from HBA-global space,
while old code was not very specific, mixing per-HBA and per-VP logic.

8 years agoUpdate nfs note and remove some other stale ones.
bdrewery [Tue, 27 Oct 2015 16:52:09 +0000 (16:52 +0000)]
Update nfs note and remove some other stale ones.

8 years agoUpdate notes about zfs and geom. Also add a note on how to find the real
bdrewery [Tue, 27 Oct 2015 16:50:41 +0000 (16:50 +0000)]
Update notes about zfs and geom.  Also add a note on how to find the real
maintainers in case of bitrot.

8 years agoAdd a hint on who can help with share/mk currently.
bdrewery [Tue, 27 Oct 2015 16:39:00 +0000 (16:39 +0000)]
Add a hint on who can help with share/mk currently.

8 years agourtwn(4): fix scanning from AUTH state
avos [Tue, 27 Oct 2015 14:21:24 +0000 (14:21 +0000)]
urtwn(4): fix scanning from AUTH state

Tested with RTL8188EU, STA mode.

Reviewed by: kevlo
Approved by: adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D3968

8 years agoDo not perform read-ahead for BA_CLRBUF request when we are low on
kib [Tue, 27 Oct 2015 13:44:13 +0000 (13:44 +0000)]
Do not perform read-ahead for BA_CLRBUF request when we are low on
memory or when dirty buffer queue is too large.

Reported and tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

8 years agoAdd missing FreeBSD RCS keyword and SVN properties.
hselasky [Tue, 27 Oct 2015 12:21:15 +0000 (12:21 +0000)]
Add missing FreeBSD RCS keyword and SVN properties.

Sponsored by: Mellanox Technologies

8 years agoAdd sysctl tunable net.inet.tcp.initcwnd_segments to specify initial congestion
hiren [Tue, 27 Oct 2015 09:43:05 +0000 (09:43 +0000)]
Add sysctl tunable net.inet.tcp.initcwnd_segments to specify initial congestion
window in number of segments on fly. It is set to 10 segments by default.

Remove net.inet.tcp.experimental.initcwnd10 which is now redundant. Also remove
the parent node net.inet.tcp.experimental as it's not needed anymore and also
because it was not well thought out.

Differential Revision: https://reviews.freebsd.org/D3858
In collaboration with: lstewart
Reviewed by: gnn (prev version), rwatson, allanjude, wblock (man page)
MFC after: 2 weeks
Relnotes: yes
Sponsored by: Limelight Networks

8 years agoFix error code that looks like wrong.
mav [Tue, 27 Oct 2015 09:33:47 +0000 (09:33 +0000)]
Fix error code that looks like wrong.

8 years agoAdd myself and my mentors to the committers-src.dot file.
lidl [Tue, 27 Oct 2015 03:48:42 +0000 (03:48 +0000)]
Add myself and my mentors to the committers-src.dot file.

Approved by: rpaulo (mentor)
Differential Revision: https://reviews.freebsd.org/D4006

8 years agoBluetooth LE Security Management channel support.
takawata [Tue, 27 Oct 2015 03:42:26 +0000 (03:42 +0000)]
Bluetooth LE Security Management channel support.
Add a socket option to block until underlying HCI connection encrypted.

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

8 years agoSpell CONFGROUPS properly.
bdrewery [Tue, 27 Oct 2015 02:04:21 +0000 (02:04 +0000)]
Spell CONFGROUPS properly.

8 years agoMETA MODE: Fix after addition of bsd.confs.mk: Stage in "files" set.
bdrewery [Tue, 27 Oct 2015 01:29:38 +0000 (01:29 +0000)]
META MODE: Fix after addition of bsd.confs.mk: Stage in "files" set.

The "files" staging name is not the same as "bsd.files.mk" but seems to just be
a group of extra files that are not the essential includes or libraries, which
include .

Sponsored by: EMC / Isilon Storage Division

8 years agoRevert r289269 for now. After looking at share/zoneinfo/Makefile this could
delphij [Tue, 27 Oct 2015 01:26:50 +0000 (01:26 +0000)]
Revert r289269 for now.  After looking at share/zoneinfo/Makefile this could
potentially break non-root installs and we need a better solution, probably
by doing it differently when no UI is involved.

8 years agoAdd Makefile.depend
bdrewery [Tue, 27 Oct 2015 01:24:57 +0000 (01:24 +0000)]
Add Makefile.depend

8 years agootus(4) - monitor mode fixes, large-mbuf crash fix
adrian [Tue, 27 Oct 2015 00:57:06 +0000 (00:57 +0000)]
otus(4) - monitor mode fixes, large-mbuf crash fix

* refactor out the rx filter and operating mode code into a separate
  method.
* add some comments about what's left with setting the operating mode
  based on what carl9170 does.
* comment out some init from otus_init_mac() - it's no longer needed as
  it's always init'ed now.
* add debugging and a missing return around a failure to call m_get2() -
  during monitor mode operation I found RXing of frames > 2k, which
  fails allocation.  I'm sure they're valid (it's configuring 11n RX and
  receiving 11n frames even though the driver doesn't "do" 11n)
  and may be A-MSDU; but allocations fail and we should handle that
  gracefully.

Tested:

* UB82 reference NIC (AR9170 + AR9104 2x2 dual band NIC); STA and
  monitor mode operation.

8 years agoTurning on IPSEC used to introduce a slight amount of performance
gnn [Tue, 27 Oct 2015 00:42:15 +0000 (00:42 +0000)]
Turning on IPSEC used to introduce a slight amount of performance
degradation (7%) for host host TCP connections over 10Gbps links,
even when there were no secuirty policies in place. There is no
change in performance on 1Gbps network links. Testing GENERIC vs.
GENERIC-NOIPSEC vs. GENERIC with this change shows that the new
code removes any overhead introduced by having IPSEC always in the
kernel.

Differential Revision: D3993
MFC after: 1 month
Sponsored by: Rubicon Communications (Netgate)

8 years agoMETA MODE: Fix FILESNAME not being respected sans other FILES_group overrides.
bdrewery [Mon, 26 Oct 2015 23:28:35 +0000 (23:28 +0000)]
META MODE: Fix FILESNAME not being respected sans other FILES_group overrides.

This was fixed in bsd.incs.mk in r242801 already.

Sponsored by: EMC / Isilon Storage Division

8 years agoMETA MODE: bsd.files.mk and bsd.confs.mk don't handle symlinks so there is no
bdrewery [Mon, 26 Oct 2015 22:31:57 +0000 (22:31 +0000)]
META MODE: bsd.files.mk and bsd.confs.mk don't handle symlinks so there is no
need to set STAGE_SYMLINKS_DIR.${STAGE_SET}.

Sponsored by: EMC / Isilon Storage Division

8 years agoIn gunzip(1), treat trailing garbage as a warning and not an error. This
delphij [Mon, 26 Oct 2015 22:29:58 +0000 (22:29 +0000)]
In gunzip(1), treat trailing garbage as a warning and not an error.  This
allows scripts to distinguish it between real fatal errors, for instance a
CRC mismatch.

Update manual page for the behavior change.

PR: bin/203873
Submitted by: Eugene Grosbein <eugen grosbein net>
MFC after: 2 weeks

8 years agoWhen processing a cookie, any mismatch in port numbers or the vtag results
tuexen [Mon, 26 Oct 2015 21:19:49 +0000 (21:19 +0000)]
When processing a cookie, any mismatch in port numbers or the vtag results
in failing the check.
This fixes https://github.com/nplab/ETSI-SCTP-Conformance-Testsuite/blob/master/sctp-imh-tests/sctp-imh-i-3-3.pkt

MFC after: 1 week

8 years agourtwn(4): do not filter out control frames in the RX path
avos [Mon, 26 Oct 2015 21:03:20 +0000 (21:03 +0000)]
urtwn(4): do not filter out control frames in the RX path

Approved by: adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D3811

8 years agoioat: Add support for Block Fill operations
cem [Mon, 26 Oct 2015 19:34:12 +0000 (19:34 +0000)]
ioat: Add support for Block Fill operations

The IOAT hardware supports writing a 64-bit pattern to some destination
buffer.  The same limitations on buffer length apply as for copy
operations.  Throughput is a bit higher (probably because fill does not
have to spend bandwidth reading from a source in memory).

Support for testing Block Fill has been added to ioatcontrol(8) and the
ioat_test device.  ioatcontrol(8) accepts the '-f' flag, which tests
Block Fill.  (If the flag is omitted, the tool tests copy by default.)
The '-V' flag, in conjunction with '-f', verifies that buffers are
filled in the expected pattern.

Tested on: Broadwell DE (Xeon D-1500)
Sponsored by: EMC / Isilon Storage Division

8 years agoioat: Dedupe operation enqueue logic
cem [Mon, 26 Oct 2015 19:34:00 +0000 (19:34 +0000)]
ioat: Dedupe operation enqueue logic

Add generic hw descriptor struct and generic control flags struct, in
preparation for other kinds of IOAT operation.

Sponsored by: EMC / Isilon Storage Division

8 years agoAdd a note about DEPFLAGS which is currently a hack around not properly passing
bdrewery [Mon, 26 Oct 2015 19:28:20 +0000 (19:28 +0000)]
Add a note about DEPFLAGS which is currently a hack around not properly passing
CXXFLAGS to sub-makes.

The bad passing also causes bsd.dep.mk's logic to selectively pull only some
flags from C[XX]FLAGS to not apply which can be seen with '-L' being passed to
mkdep when using an external compiler.

8 years agoReimplement enable and implement disable of virtual ports.
mav [Mon, 26 Oct 2015 18:14:15 +0000 (18:14 +0000)]
Reimplement enable and implement disable of virtual ports.

Now on 24xx and above chips it is really possible to simulate several
virtual FC ports with single physical one.  For example, it allows to
configure several targets in ctl.conf, assign each of them to separate
virtual port, and let user to control access to them with switch zoning.

I still doubt that all problems are solved there, but at now it passes
at least basic tests.

8 years agoAllow 'zfs holds -r' to recurse over a file system or volume to find holds
allanjude [Mon, 26 Oct 2015 17:07:22 +0000 (17:07 +0000)]
Allow 'zfs holds -r' to recurse over a file system or volume to find holds

Previously, the parameters of 'zfs holds' could only be snapshots

Add -d <depth> flag to limit depth of recursion
Add -p flag to print literal values, rather than interpreted values
Add -H flag to suppress header output and use tabs rather than whitespace

Reviewed by: mahrens, smh, dteske
Approved by: bapt (mentor)
MFC after: 3 weeks
Relnotes: yes
Sponsored by: ScaleEngine Inc.
Differential Revision: https://reviews.freebsd.org/D3994

8 years agoRemove svn:keywords that leaked in.
glebius [Mon, 26 Oct 2015 15:43:08 +0000 (15:43 +0000)]
Remove svn:keywords that leaked in.

8 years agoSince r275359, there is no need to provide a bogus service name.
des [Mon, 26 Oct 2015 15:16:27 +0000 (15:16 +0000)]
Since r275359, there is no need to provide a bogus service name.

MFC after: 3 weeks

8 years agoCorrectly document the change made in r275359.
des [Mon, 26 Oct 2015 15:14:55 +0000 (15:14 +0000)]
Correctly document the change made in r275359.

8 years agoLoading rc.subr and rc.conf has no effect since all we do is run other
des [Mon, 26 Oct 2015 15:14:16 +0000 (15:14 +0000)]
Loading rc.subr and rc.conf has no effect since all we do is run other
scripts which load them again.

MFC after: 3 weeks

8 years agox86/dma_bounce: revert r289834 and r289836
royger [Mon, 26 Oct 2015 14:50:35 +0000 (14:50 +0000)]
x86/dma_bounce: revert r289834 and r289836

The new load_ma implementation can cause dereferences when used with
certain drivers, back it out until the reason is found:

Fatal trap 12: page fault while in kernel mode
cpuid = 11; apic id = 03
fault virtual address   = 0x30
fault code              = supervisor read data, page not present
instruction pointer     = 0x20:0xffffffff808a2d22
stack pointer           = 0x28:0xfffffe07cc737710
frame pointer           = 0x28:0xfffffe07cc737790
code segment            = base 0x0, limit 0xfffff, type 0x1b
                        = DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags        = interrupt enabled, resume, IOPL = 0
current process         = 13 (g_down)
trap number             = 12
panic: page fault
cpuid = 11
KDB: stack backtrace:
#0 0xffffffff80641647 at kdb_backtrace+0x67
#1 0xffffffff80606762 at vpanic+0x182
#2 0xffffffff806067e3 at panic+0x43
#3 0xffffffff8084eef1 at trap_fatal+0x351
#4 0xffffffff8084f0e4 at trap_pfault+0x1e4
#5 0xffffffff8084e82f at trap+0x4bf
#6 0xffffffff80830d57 at calltrap+0x8
#7 0xffffffff8063beab at _bus_dmamap_load_ccb+0x1fb
#8 0xffffffff8063bc51 at bus_dmamap_load_ccb+0x91
#9 0xffffffff8042dcad at ata_dmaload+0x11d
#10 0xffffffff8042df7e at ata_begin_transaction+0x7e
#11 0xffffffff8042c18e at ataaction+0x9ce
#12 0xffffffff802a220f at xpt_run_devq+0x5bf
#13 0xffffffff802a17ad at xpt_action_default+0x94d
#14 0xffffffff802c0024 at adastart+0x8b4
#15 0xffffffff802a2e93 at xpt_run_allocq+0x193
#16 0xffffffff802c0735 at adastrategy+0xf5
#17 0xffffffff80554206 at g_disk_start+0x426
Uptime: 2m29s

8 years agoDon't try to replicate mode pages not present on this device.
mav [Mon, 26 Oct 2015 14:14:56 +0000 (14:14 +0000)]
Don't try to replicate mode pages not present on this device.

MFC after: 3 days

8 years agoAdd support for binding IRQs to CPUs in the LinuxKPI. The new function
hselasky [Mon, 26 Oct 2015 13:28:34 +0000 (13:28 +0000)]
Add support for binding IRQs to CPUs in the LinuxKPI. The new function
added is for BSD only and does not exist in Linux.

MFC after: 1 week
Sponsored by: Mellanox Technologies

8 years agoUpdate some obsolete information in the HACKING document.
theraven [Mon, 26 Oct 2015 11:02:57 +0000 (11:02 +0000)]
Update some obsolete information in the HACKING document.

Reported by: bapt

8 years agoEnsure that dtc is built in C++11 mode.
theraven [Mon, 26 Oct 2015 10:37:17 +0000 (10:37 +0000)]
Ensure that dtc is built in C++11 mode.

Reported by: George Abdelmalik

8 years agoBuild the LinuxKPI module by default.
hselasky [Mon, 26 Oct 2015 10:09:08 +0000 (10:09 +0000)]
Build the LinuxKPI module by default.

Sponsored by: Mellanox Technologies

8 years agoBuild fix for MIPS.
hselasky [Mon, 26 Oct 2015 09:34:43 +0000 (09:34 +0000)]
Build fix for MIPS.

Sponsored by: Mellanox Technologies

8 years agoioat: Add %b format string for CHANERR codes
cem [Mon, 26 Oct 2015 03:30:50 +0000 (03:30 +0000)]
ioat: Add %b format string for CHANERR codes

Sponsored by: EMC / Isilon Storage Division

8 years agoioat: Allocate memory for ring resize sanely
cem [Mon, 26 Oct 2015 03:30:38 +0000 (03:30 +0000)]
ioat: Allocate memory for ring resize sanely

Add a new flag for DMA operations, DMA_NO_WAIT.  It behaves much like
other NOWAIT flags -- if queueing an operation would sleep, abort and
return NULL instead.

When growing the internal descriptor ring, the memory allocation is
performed outside of all locks.  A lock-protected flag is used to avoid
duplicated work.  Threads that cannot sleep and attempt to queue
operations when the descriptor ring is full allocate a larger ring with
M_NOWAIT, or bail if that fails.

ioat_reserve_space() could become an external API if is important to
callers that they have room for a sequence of operations, or that those
operations succeed each other directly in the hardware ring.

This patch splits the internal head index (->head) from the hardware's
head-of-chain (DMACOUNT) register (->hw_head).  In the future, for
simplicity's sake, we could drop the 'ring' array entirely and just use
a linked list (with head and tail pointers rather than indices).

Suggested by: Witness
Sponsored by: EMC / Isilon Storage Division

8 years agoioat: Expose more softc members in sysctls
cem [Mon, 26 Oct 2015 02:21:32 +0000 (02:21 +0000)]
ioat: Expose more softc members in sysctls

Kill some unused softc variables while we're here.

Sponsored by: EMC / Isilon Storage Division

8 years agoioat: Introduce KTR probes
cem [Mon, 26 Oct 2015 02:21:19 +0000 (02:21 +0000)]
ioat: Introduce KTR probes

Sponsored by: EMC / Isilon Storage Division

8 years agoFix bus numbering in ThunderX ITS quirk
zbb [Sun, 25 Oct 2015 23:27:08 +0000 (23:27 +0000)]
Fix bus numbering in ThunderX ITS quirk

Internal busses (thus ECAM access) should be mapped to
all values from 0 to 143.

Obtained from: Semihalf
Sponsored by:  The FreeBSD Foundation
Differential revision: https://reviews.freebsd.org/D3753

8 years agoAdd support for unspecified ranges on ThunderX system
zbb [Sun, 25 Oct 2015 23:22:40 +0000 (23:22 +0000)]
Add support for unspecified ranges on ThunderX system

When one tries to allocate a resource with unspecified range,
read already configured BAR values (by UEFI or whatever).
This is necessary to make VNIC VFs working and to allow them to be
properly allocated.

Obtained from: Semihalf
Sponsored by:  The FreeBSD Foundation
Differential revision: https://reviews.freebsd.org/D3752

8 years agoImprove style in mge driver
zbb [Sun, 25 Oct 2015 22:20:13 +0000 (22:20 +0000)]
Improve style in mge driver

Minor improvements introduced to ensure code follows FreeBSD style
guidelines.

Reviewed by:    adrian
Obtained from:  Semihalf
Submitted by:   Bartosz Szczepanek <bsz@semihalf.com>
Differential revision: https://reviews.freebsd.org/D3904

8 years agoChange improper locking assertion in mge
zbb [Sun, 25 Oct 2015 22:17:10 +0000 (22:17 +0000)]
Change improper locking assertion in mge

Assertion used here was invalid. If current thread helds any of locks,
we never want to recurse on them.

Obtained from:  Semihalf
Submitted by:   Bartosz Szczepanek <bsz@semihalf.com>
Differential revision: https://reviews.freebsd.org/D3903

8 years agoIntroduce e6000sw etherswitch support
zbb [Sun, 25 Oct 2015 22:14:04 +0000 (22:14 +0000)]
Introduce e6000sw etherswitch support

Add e6000sw driver supporting Marvell 88E635288E617288E6176 switches.
It needs to be attached to mdio interface, exporting SMI access
functionality. e6000sw supports port-based VLAN configuration, per-port
media changing, accessing PHY and switch registers.

e6000sw attaches miibuses and PHY drivers as children. Instead of typical
tick as callout, kthread-based tick is used. This combined with SX locks
allows MDIO read/write calls to sleep. It is expected, because this
hardware requires long delays in SMI read/write procedures, which can not
be handled by busy-waiting.

Reviewed by:    adrian
Obtained from:  Semihalf
Submitted by:   Bartosz Szczepanek <bsz@semihalf.com>
Differential revision: https://reviews.freebsd.org/D3902

8 years agoAdd etherswitch support to mge
zbb [Sun, 25 Oct 2015 22:00:56 +0000 (22:00 +0000)]
Add etherswitch support to mge

This commit introduces support for etherswitch devices that utilize SMI as
a way of accessing its registers. SMI register is located in address space
of mge -- access to it was exported through MDIO interface.

Attachment functions were enhanced so as to ensure proper initialisation
in both cases: 1) PHYs attached directly to mge, 2) PHYs attached to
switch device and switch attached to mge. Attachment of etherswitch device
depends on dts entry with compatible="mrvl,sw" property. If none is found,
typical PHY attachment procedure follows.

In case of switch attached, PHYs' status and configuration is accessible
via etherswitchcfg, and ifconfig shows always-up, non-configurable mge
interfaces.

Due to the fact that there may be simultaneous accessess to SMI
registers (e.g. from PHY attached to one of mge instances and switch
to the other), SMI access interlock was added. It is SX lock,
because sleep ability is necessary -- busy-waiting would result
in poor performance due to long delays required by hardware.
Underlying switch driver is obliged to use sleepable locks as well.

Reviewed by:    adrian
Obtained from:  Semihalf
Submitted by:   Bartosz Szczepanek <bsz@semihalf.com>
Differential revision: https://reviews.freebsd.org/D3900

8 years agoDeliver INOTs only to enabled virtual ports.
mav [Sun, 25 Oct 2015 19:55:48 +0000 (19:55 +0000)]
Deliver INOTs only to enabled virtual ports.

8 years agoThe aio_waitcomplete(2) syscall should not sleep when the given timeout
pjd [Sun, 25 Oct 2015 18:48:09 +0000 (18:48 +0000)]
The aio_waitcomplete(2) syscall should not sleep when the given timeout
is 0. Without this change it was sleeping for one tick. Maybe not a big
deal, but it makes share/dtrace/blocking script to report that.

Reviewed by: jhb
Differential Revision: https://reviews.freebsd.org/D3814
Sponsored by: Wheel Systems, http://wheelsystems.com

8 years agopf: Fix compliation warning with gcc
kp [Sun, 25 Oct 2015 18:09:03 +0000 (18:09 +0000)]
pf: Fix compliation warning with gcc

While fixing the PF_ANEQ() macro I messed up the parentheses, leading to
compliation warnings with gcc.

Spotted by:     ian
Pointy Hat:     kp

8 years agoRework r289933 using already existing macro.
mav [Sun, 25 Oct 2015 17:24:37 +0000 (17:24 +0000)]
Rework r289933 using already existing macro.

8 years agoTry to keep Loop IDs persistent across chip reinits.
mav [Sun, 25 Oct 2015 16:04:31 +0000 (16:04 +0000)]
Try to keep Loop IDs persistent across chip reinits.

8 years agodrm/i915: Reduce diff with Linux 3.8
dumbbell [Sun, 25 Oct 2015 14:57:53 +0000 (14:57 +0000)]
drm/i915: Reduce diff with Linux 3.8

There is no functional change. The goal is to ease the future update to
Linux 3.8's i915 driver.

MFC after: 2 month

8 years agoLots of improvements to the BSD-licensed dtc
theraven [Sun, 25 Oct 2015 14:52:16 +0000 (14:52 +0000)]
Lots of improvements to the BSD-licensed dtc

- Various fixes to includes (including recursive includes)
- Lots of testing that the output exactly matches GPL'd dtc
- Lots of bug fixes to merging
- Fix incorrect mmap usage
- Ad-hoc memory management replaced with C++11 unique_ptr and similar

Patrick Wildt has successfully run many (all?) of the GPL dtc test suite.

8 years agodrm/i915: Reduce diff with Linux 3.8
dumbbell [Sun, 25 Oct 2015 14:42:56 +0000 (14:42 +0000)]
drm/i915: Reduce diff with Linux 3.8

There is no functional change. The goal is to ease the future update to
Linux 3.8's i915 driver.

MFC after: 2 months

8 years agoImprove Port Database Changed handling and reporting.
mav [Sun, 25 Oct 2015 14:34:07 +0000 (14:34 +0000)]
Improve Port Database Changed handling and reporting.

8 years agoPF_ANEQ() macro will in most situations returns TRUE comparing two identical
kp [Sun, 25 Oct 2015 13:14:53 +0000 (13:14 +0000)]
PF_ANEQ() macro will in most situations returns TRUE comparing two identical
IPv4 packets (when it should return FALSE). It happens because PF_ANEQ() doesn't
stop if first 32 bits of IPv4 packets are equal and starts to check next 3*32
bits (like for IPv6 packet). Those bits containt some garbage and in result
PF_ANEQ() wrongly returns TRUE.

Fix: Check if packet is of AF_INET type and if it is then compare only first 32
bits of data.

PR: 204005
Submitted by: MiƂosz Kaniewski

8 years agoAccording to POSIX, a write operation shall start at the current size of
ache [Sun, 25 Oct 2015 12:09:28 +0000 (12:09 +0000)]
According to POSIX, a write operation shall start at the current size of
the stream (if mode had 'a' as the first character).

MFC after:      1 week

8 years agoFormalize/unify chip (re-)inits.
mav [Sun, 25 Oct 2015 10:49:05 +0000 (10:49 +0000)]
Formalize/unify chip (re-)inits.

8 years agoFix compiling with gcc [4.2.1] after r287797 when MK_HESOID == no and
ngie [Sun, 25 Oct 2015 07:42:56 +0000 (07:42 +0000)]
Fix compiling with gcc [4.2.1] after r287797 when MK_HESOID == no and
MK_NIS == no by converting `i` back to an int, and instead cast the loop
comparison to `int`

The loop comparison is iterating the len(ns_dtab)-1, because
the last element is the sentinel tuple { NULL, NULL, NULL, }, so when
both HESOID and NIS are off, len(ns_dtab)-1 == 1 - 1 == 0, and the loop
is skipped because the expression is tautologically false

While here, convert `(sizeof(x) / sizeof(x[0]))` to `nitems(x)`

Tested with: clang 3.7.0, gcc 4.2.1, and gcc 4.9.4 [*] with MK_NIS={no,yes}
             and by running bash -lc 'id -u && id -g && id'

* gcc 4.9.4 needs another patch in order for the compile to succeed
  with -Werror with lib/libc/gen/getgrent.c

Reported by: jhibbits

8 years agoLimit RESOLUTION_MAX to INT_MAX, not UINT_MAX (all spelled out) so the
ngie [Sun, 25 Oct 2015 04:37:00 +0000 (04:37 +0000)]
Limit RESOLUTION_MAX to INT_MAX, not UINT_MAX (all spelled out) so the
mode value isn't always clipped to -1 when (resolution * size) == 32, which
would have been the case with values => {4i,32b,32t}.

This seems to have been broken in r64382.

MFC after: 1 week
X-MFC with: r289915
PR: 200619
Reported by: Michael Baptist
Submitted by: Lars Skodje
Sponsored by: EMC / Isilon Storage Division

8 years agoUse 't' (bit-field) not 'b' (bit-sized integral type) for describing MRIE (aka
ngie [Sun, 25 Oct 2015 04:04:25 +0000 (04:04 +0000)]
Use 't' (bit-field) not 'b' (bit-sized integral type) for describing MRIE (aka
"Method of Reporting Informational Exceptions") in the SCSI mode database.
T10/04-371 revision 2 (revision 4; page 2, table 1) describes it as a
bit-field of 4 bits wide.

1. http://www.t10.org/ftp/t10/document.04/04-371r2.pdf

This a recommit of head@r289913 to fix the original commit message, in
particular:
- I incorrectly claimed that unit change was 'i' -> 't'.
- The spec I reference in this commit is 2 decades newer than the one noted in
  r289913. The fields in the SCSI mode database are more complete in the newer
  spec, so it'll be easier for someone to decipher this commit if need be
  later.
- I screwed up the bug entry in the previous commit message

Pointyhat to: ngie (for botching up r289913)
PR: 200619
Reported by: Michael Baptist
Submitted by: Lars Skodje
Sponsored by: EMC / Isilon Storage Divisionf

8 years agoRevert r289913 -- I botched up the commit message by accident
ngie [Sun, 25 Oct 2015 03:22:21 +0000 (03:22 +0000)]
Revert r289913 -- I botched up the commit message by accident

Will redo the commit shortly

8 years agoUse 't' (bits) not 'i' (bytes) for describing MRIE (aka
ngie [Sun, 25 Oct 2015 03:16:08 +0000 (03:16 +0000)]
Use 't' (bits) not 'i' (bytes) for describing MRIE (aka
"Method of Reporting Informational Exceptions") in the SCSI mode database as
the field described in X3T10/94-190 (revision 4; page 2, table 1) [1.] is
4 bits wide, not 4 bytes wide

1. http://ftp.t10.org/ftp/t10/document.94/94-190r4.pdf

Bug 200619
MFC after: 1 week
Reported by: Michael Baptist <mbaptist@isilon.com>
Submitted by: Lars Skodje <lskodje@isilon.com>
Sponsored by: EMC / Isilon Storage Division

8 years agoioat: Actually bring the hardware back online after reset
cem [Sat, 24 Oct 2015 23:46:32 +0000 (23:46 +0000)]
ioat: Actually bring the hardware back online after reset

We need to reset the chancmp and chainaddr MMIO registers to bring the
device back to a working state.

Name the chanerr bits while we're here.

Sponsored by: EMC / Isilon Storage Division

8 years agoioat: Use bus_alloc_resource_any(9)
cem [Sat, 24 Oct 2015 23:46:20 +0000 (23:46 +0000)]
ioat: Use bus_alloc_resource_any(9)

Sponsored by: EMC / Isilon Storage Division

8 years agoioat: Extract halted error-debugging to a function
cem [Sat, 24 Oct 2015 23:46:08 +0000 (23:46 +0000)]
ioat: Extract halted error-debugging to a function

Sponsored by: EMC / Isilon Storage Division

8 years agoioat: Always re-arm interrupts in process_events
cem [Sat, 24 Oct 2015 23:45:56 +0000 (23:45 +0000)]
ioat: Always re-arm interrupts in process_events

It doesn't hurt, even if there is nothing to do.

Sponsored by: EMC / Isilon Storage Division

8 years agoioat: Add sysctl to force hw reset
cem [Sat, 24 Oct 2015 23:45:45 +0000 (23:45 +0000)]
ioat: Add sysctl to force hw reset

To enable controlled testing.

Sponsored by: EMC / Isilon Storage Division

8 years agoioat: refcnt users so we can drain them at detach
cem [Sat, 24 Oct 2015 23:45:33 +0000 (23:45 +0000)]
ioat: refcnt users so we can drain them at detach

We only need to borrow a mutex for the drain sleep and the 0->1
transition, so just reuse an existing one for now.

The wchan is arbitrary.  Using refcount itself would have required
__DEVOLATILE(), so use the lock's address instead.

Different uses are tagged by kind, although we only do anything with
that information in INVARIANTS builds.

Sponsored by: EMC / Isilon Storage Division

8 years agoioat: When queueing operations, assert the submit lock
cem [Sat, 24 Oct 2015 23:45:21 +0000 (23:45 +0000)]
ioat: When queueing operations, assert the submit lock

Callers should have acquired this lock when they invoked ioat_acquire()
before issuing operations.  Assert it is held.

Sponsored by: EMC / Isilon Storage Division

8 years agoioat: Don't use sleeping allocation in lock path
cem [Sat, 24 Oct 2015 23:45:10 +0000 (23:45 +0000)]
ioat: Don't use sleeping allocation in lock path

This is still the worst possible way to allocate memory if it will ever
be under pressure, but at least it won't deadlock.

Suggested by: WITNESS
Sponsored by: EMC / Isilon Storage Division

8 years agoioat: Pull out timer callout delay into a constant
cem [Sat, 24 Oct 2015 23:44:58 +0000 (23:44 +0000)]
ioat: Pull out timer callout delay into a constant

Pull out the timer callout delay into IOAT_INTR_TIMO and shorten it
considerably (5s -> 100ms).  Single operations do not take 5-10 seconds
and when interrupts aren't working, waiting 100ms sucks a lot less than
5s.

Sponsored by: EMC / Isilon Storage Division

8 years agoAdd libvmmapi to OptionalObsoleteFiles.inc when MK_BHYVE == no
ngie [Sat, 24 Oct 2015 23:25:43 +0000 (23:25 +0000)]
Add libvmmapi to OptionalObsoleteFiles.inc when MK_BHYVE == no

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

8 years agoAdd a regression test for r289899 to validate rockridge encoding
ngie [Sat, 24 Oct 2015 23:21:08 +0000 (23:21 +0000)]
Add a regression test for r289899 to validate rockridge encoding
of device types

X-MFC with: r289899
MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

8 years agoRemove an ls -l I was using for debugging
ngie [Sat, 24 Oct 2015 23:19:24 +0000 (23:19 +0000)]
Remove an ls -l I was using for debugging

MFC after: 2 weeks
X-MFC with: r289897
Sponsored by: EMC / Isilon Storage Division

8 years agoUpdate jemalloc to version 4.0.4.
jasone [Sat, 24 Oct 2015 23:18:05 +0000 (23:18 +0000)]
Update jemalloc to version 4.0.4.

8 years agoImport the fix from NetBSD kern/48852 (sic) to fix rockridge encoding of
ngie [Sat, 24 Oct 2015 23:16:13 +0000 (23:16 +0000)]
Import the fix from NetBSD kern/48852 (sic) to fix rockridge encoding of
device nodes

In particular, use st_rdev (the device type), not st_dev (the device inode),
and fix the comparison to be correct with the st_rdev field

Bug 203648
MFC after: 2 weeks
Submitted by: Thomas Schmitt <scdbackup@gmx.net>
Coverity CID: 1008927
Sponsored by: EMC / Isilon Storage Division

8 years agoarge(4): flip this on for AR9344 SoCs.
adrian [Sat, 24 Oct 2015 22:37:59 +0000 (22:37 +0000)]
arge(4): flip this on for AR9344 SoCs.

I couldn't test arge0->arge1 bridging, only arge0 VLAN bridging.
The DIR-825C1 only hooks up arge0 to the switch GMAC0 and so
you need to abuse VLANs to test.

Tested:

* DIR-825C1 (AR9344)

8 years agoAdd more cd9660/FFS makefs testcases
ngie [Sat, 24 Oct 2015 22:12:23 +0000 (22:12 +0000)]
Add more cd9660/FFS makefs testcases

General changes:
- Parameterize out the mount command.
- Use mtree to verify the contents of an image (check_image_contents) instead
  of using diff (diff verifies content, but not file metadata).
- Move common logic out to functions (common_cleanup, mount_image,
  check_image_contents)
- Add stub testcases for makefs -D (crashes with SIGBUS, similar to bug # 192839)
- Add a note about the ISO-9660 and rockridge specs
- Add testcases that exercise:
-- Creating disk images from an mtree and multiple directories.
-- -F flag use (not really an extensive testcase right now)

cd9660-specific test changes:

- Remove an XXX comment about symlinks; I forgot that non-rockridge images turn
  symlinks into hardlinks.
- Add testcases that exercise:
-- -o allow-deep-trees
-- -o allow-max-name stub testcase (doesn't seem to be implemented in makefs)
-- -o preparer (existence in image; not conformance to spec)
-- -o publisher (existence in image; not conformance to spec)
-- -o rockridge (basic)

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

8 years agoMake vers.c creation atomic by using a temporary file, then moving
ngie [Sat, 24 Oct 2015 21:59:58 +0000 (21:59 +0000)]
Make vers.c creation atomic by using a temporary file, then moving
the temporary file to vers.c at the end of the script

The previous logic wrote out to vers.c multiple times, so the file
could be incorrectly interpreted as being completely written out
after one of the echo calls with recursive make, when in reality it
was only partially written.

Also, in the event the build was interrupted when creating vers.c
(small race window), it would have a leftover file that needed to
be cleaned up before resuming the build.

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

8 years agoReduce the amount of calls to VOP_BMAP() made from the local vnode
kib [Sat, 24 Oct 2015 21:59:22 +0000 (21:59 +0000)]
Reduce the amount of calls to VOP_BMAP() made from the local vnode
pager.  It is enough to execute VOP_BMAP() once to obtain both the
disk block address for the requested page, and the before/after limits
for the contiguous run.  The clipping of the vm_page_t array passed to
the vnode_pager_generic_getpages() and the disk address for the first
page in the clipped array can be deduced from the call results.

While there, remove some noise (like if (1) {...}) and adjust nearby
code.

Reviewed by: alc
Discussed with: glebius
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 3 weeks

8 years agoIntel SDM before revision 56 described the CLFLUSH instruction as only
kib [Sat, 24 Oct 2015 21:37:47 +0000 (21:37 +0000)]
Intel SDM before revision 56 described the CLFLUSH instruction as only
ordered with the MFENCE instruction.  Similar weak guarantees are also
specified by the AMD APM vol. 3 rev. 3.22.  x86 pmap methods
pmap_invalidate_cache_range() and pmap_invalidate_cache_pages() braced
CLFLUSH loop with MFENCE both before and after the loop.

In the revision 56 of SDM, Intel stated that all existing
implementations of CLFLUSH are strict, CLFLUSH instructions execution
is ordered WRT other CLFLUSH and writes.  Also, the strict behaviour
is made architectural.

A new instruction CLFLUSHOPT (which was documented for some time in
the Instruction Set Extensions Programming Reference) provides the
weak behaviour which was previously attributed to CLFLUSH.

Use CLFLUSHOPT when available.  When CLFLUSH is used on Intel CPUs, do
not execute MFENCE before and after the flushing loop.

Reviewed by: alc
Sponsored by: The FreeBSD Foundation

8 years agoDefine a couple macros to access cacheline size/mask in an arch-dependent
ian [Sat, 24 Oct 2015 21:27:09 +0000 (21:27 +0000)]
Define a couple macros to access cacheline size/mask in an arch-dependent
way.  This code should now work for all arm versions v4 thru v7.

8 years agoProvide armv4/v5 implementations of several of the armv6 cache maintenance
ian [Sat, 24 Oct 2015 21:25:53 +0000 (21:25 +0000)]
Provide armv4/v5 implementations of several of the armv6 cache maintenance
functions.  This will make it possible to use the same busdma code for all
arm platforms v4 thru v7.

8 years agourtwn(4): fix mbuf leak in the TX path
avos [Sat, 24 Oct 2015 19:59:15 +0000 (19:59 +0000)]
urtwn(4): fix mbuf leak in the TX path

Reviewed by: kevlo
Approved by: adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D3988

8 years agoSkip reserved IP Broadcast handle from using.
mav [Sat, 24 Oct 2015 19:47:54 +0000 (19:47 +0000)]
Skip reserved IP Broadcast handle from using.

8 years ago- Plugging a memory leak when malloc() failed during initialisation;
avatar [Sat, 24 Oct 2015 19:40:03 +0000 (19:40 +0000)]
- Plugging a memory leak when malloc() failed during initialisation;
- Plugging another memory leak inside the destructor.

Reviewed by: matk
MFC after: 3 weeks

8 years agoRename dcache_dma_preread() to dcache_inv_poc_dma() to make it clear that it
ian [Sat, 24 Oct 2015 19:39:41 +0000 (19:39 +0000)]
Rename dcache_dma_preread() to dcache_inv_poc_dma() to make it clear that it
is a dcache invalidate to point of coherency just like dcache_inv_poc(), but
a slightly different version specific to dma operations.  Elaborate the
comment about how and why it's different.

8 years agoAdd new field to Abort IOCB.
mav [Sat, 24 Oct 2015 19:38:06 +0000 (19:38 +0000)]
Add new field to Abort IOCB.

8 years agoxen: Add missing semi-colon for BITSET_DEFINE()
cem [Sat, 24 Oct 2015 19:04:55 +0000 (19:04 +0000)]
xen: Add missing semi-colon for BITSET_DEFINE()

Broken when it was removed from the macro in r289867.

Pointy-hat: markj
Sponsored by: EMC / Isilon Storage Division

8 years agoAdd PIM_EXTLUNS support to isp(4) driver.
mav [Sat, 24 Oct 2015 17:34:40 +0000 (17:34 +0000)]
Add PIM_EXTLUNS support to isp(4) driver.

Now 24xx and above chips support full 8-byte LUN address space.
Older FC chips may support up to 16K LUNs when firmware allows.
Tested in both initiator and target modes for 23xx, 24xx and 25xx.