]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
8 years agoFix spelling and grammer in tools/test/README.
Eric van Gyzen [Wed, 28 Oct 2015 15:00:21 +0000 (15:00 +0000)]
Fix spelling and grammer in tools/test/README.

Reviewed by: gnn

8 years agoAdd _flags2 per jhb@ suggestion since no room left in _flags.
Andrey A. Chernov [Wed, 28 Oct 2015 14:40:02 +0000 (14:40 +0000)]
Add _flags2 per jhb@ suggestion since no room left in _flags.
Rewrite O_APPEND flag checking using new __S2OAP flag.

MFC after:      3 weeks

8 years agoRemove the s3c2xx0 code, it's no longer used. As far as I know I as the
Andrew Turner [Wed, 28 Oct 2015 13:14:16 +0000 (13:14 +0000)]
Remove the s3c2xx0 code, it's no longer used. As far as I know I as the
main user of this code, however I haven't used it in over two years, and
don't expect to in the future.

8 years agoStart to remove support for the XScale i80321. As far as I can tell nobody
Andrew Turner [Wed, 28 Oct 2015 13:07:56 +0000 (13:07 +0000)]
Start to remove support for the XScale i80321. As far as I can tell nobody
uses this which makes it difficult to support.

8 years agoImprove/fix loop scanning routine.
Alexander Motin [Wed, 28 Oct 2015 12:34:59 +0000 (12:34 +0000)]
Improve/fix loop scanning routine.

For the most of chips (except anscient ones) port handlers have no relation
to port IDs.  In such situation old code scanning first 125 handlers was
quite naive.  Instead of doing that, send to chip single request to get full
list of port handlers available on specific virtual port and scan only them.

Old code had problems with case of several virtual ports enabled, when port
handlers allocated from global address space could easily go above 125.
This change was successfully tested on 23xx, 24xx and 25xx chips in loop
mode with 4 virtual initiator ports, each seing 50 virtual target ports.

8 years agoConnect mpsutil(8) to the build
Baptiste Daroussin [Wed, 28 Oct 2015 12:31:29 +0000 (12:31 +0000)]
Connect mpsutil(8) to the build

Sponsored by: Gandi.net

8 years agoMerge mpsutil(8) branch
Baptiste Daroussin [Wed, 28 Oct 2015 12:30:29 +0000 (12:30 +0000)]
Merge mpsutil(8) branch

mpsutil(8)/mprutil(8) are new utilities for managing LSI Fusion-MPT
2/3 controllers (mps(4) and mpr(4))

For now only informational commands have been implemented.

This utility has been written by scottl@ [1] and polished by myself[2]

Submitted by: scottl
Discussed with: scottl
Relnotes: yes
Sponsored by: Netflix [1]
Sponsored by: Gandi.net [2]

8 years agoBuild fix for i386/XBOX and pc98/GENERIC.
Hans Petter Selasky [Wed, 28 Oct 2015 12:10:01 +0000 (12:10 +0000)]
Build fix for i386/XBOX and pc98/GENERIC.

Reviewed by: kib

8 years agoMerge from head
Baptiste Daroussin [Wed, 28 Oct 2015 11:58:18 +0000 (11:58 +0000)]
Merge from head

Sponsored by: Gandi.net

8 years agoFix a typo in the comment about the include guard
Baptiste Daroussin [Wed, 28 Oct 2015 11:29:58 +0000 (11:29 +0000)]
Fix a typo in the comment about the include guard

Sponsored by: Gandi.net

8 years agoRemove more of the mptutil unused code
Baptiste Daroussin [Wed, 28 Oct 2015 11:28:46 +0000 (11:28 +0000)]
Remove more of the mptutil unused code

Sponsored by: Gandi.net

8 years agoRemove some unused code from the mptutil(8)
Baptiste Daroussin [Wed, 28 Oct 2015 11:25:28 +0000 (11:25 +0000)]
Remove some unused code from the mptutil(8)

The code from mptutil living in the same source tree the day those functions
will be implemented in the mpsutil(8) it can be copy/paste easily

Sponsored by: Gandi.net

8 years agoReduce overlinking, for now neither cam nor libutil are needed
Baptiste Daroussin [Wed, 28 Oct 2015 11:20:55 +0000 (11:20 +0000)]
Reduce overlinking, for now neither cam nor libutil are needed

Sponsored by: Gandi.net

8 years agoDo enforce "-g", DEBUG_FLAGS can be user if one want to set it
Baptiste Daroussin [Wed, 28 Oct 2015 11:18:43 +0000 (11:18 +0000)]
Do enforce "-g", DEBUG_FLAGS can be user if one want to set it

Sponsored by: Gandi.net

8 years agoReplace the manpage with one that actually describes the utility
Baptiste Daroussin [Wed, 28 Oct 2015 11:06:04 +0000 (11:06 +0000)]
Replace the manpage with one that actually describes the utility

Sponsored by: Gandi.net

8 years agoAdd some debugging code (under ARGE_DEBUG) that counts each interrupt source.
Adrian Chadd [Wed, 28 Oct 2015 05:11:06 +0000 (05:11 +0000)]
Add some debugging code (under ARGE_DEBUG) that counts each interrupt source.

This should make it easier to track down interrupt storms from arge.

Tested:

* AP135 (QCA955x) SoC - defaults to ARGE_DEBUG enabled
* Carambola2 (AR9331 SoC) - defaults to ARGE_DEBUG disabled

8 years agoAdd a test for the listen queue using two test programs,
George V. Neville-Neil [Wed, 28 Oct 2015 03:43:24 +0000 (03:43 +0000)]
Add a test for the listen queue using two test programs,
listen, and connect.  The listen program is a simple server that
accepts and closes sockets, until a fixed limit, then sets the listen
queue to 0 and counts how many remaining connections it processes.

The connect program repeatedly opens connections and closes them
serving as the driver for the listen program.

Sponsored by: Limelight Networks

8 years agoUpdate the README to describe all the current tests in this directory.
George V. Neville-Neil [Wed, 28 Oct 2015 03:39:18 +0000 (03:39 +0000)]
Update the README to describe all the current tests in this directory.

8 years agoioat: Define DMACAPABILITY bits
Conrad Meyer [Wed, 28 Oct 2015 02:37:24 +0000 (02:37 +0000)]
ioat: Define DMACAPABILITY bits

Check for BFILL capability before initiating blockfill operations.

Sponsored by: EMC / Isilon Storage Division

8 years agoUse proper CONFDIR after r289148
Bryan Drewery [Tue, 27 Oct 2015 23:49:32 +0000 (23:49 +0000)]
Use proper CONFDIR after r289148

8 years agoStart to remove support for the Samsung s3c24x0 SoCs by removing the kernel
Andrew Turner [Tue, 27 Oct 2015 23:37:54 +0000 (23:37 +0000)]
Start to remove support for the Samsung s3c24x0 SoCs by removing the kernel
config, and support from NOTES.

8 years agoRemove unneeded NAME override.
Bryan Drewery [Tue, 27 Oct 2015 23:35:08 +0000 (23:35 +0000)]
Remove unneeded NAME override.

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

8 years agoUse more appropriate ${SHAREDIR} rather than /usr/share.
Bryan Drewery [Tue, 27 Oct 2015 23:35:02 +0000 (23:35 +0000)]
Use more appropriate ${SHAREDIR} rather than /usr/share.

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

8 years agomips: use the correct va for wbinv flushing.
Adrian Chadd [Tue, 27 Oct 2015 23:11:22 +0000 (23:11 +0000)]
mips: use the correct va for wbinv flushing.

arge doesn't trigger this, but ath(4) does.

Tested:

* AR9331 SoC (Carambola2); ath(4) hostap

Submitted by: ian

8 years agoBring the tags and links entries for amd64 up to date.
Kirk McKusick [Tue, 27 Oct 2015 22:59:24 +0000 (22:59 +0000)]
Bring the tags and links entries for amd64 up to date.
Based on how out of date it is, I doubt that anyone
other than me and my code-reading students still use it.

8 years agoMark functions as such. This means we call them directly rather than have
Andrew Turner [Tue, 27 Oct 2015 22:24:57 +0000 (22:24 +0000)]
Mark functions as such. This means we call them directly rather than have
the dynamic linker copy them, but not relocate them at the new location.
This allows us to run sqlite3 without it crashing.

Sponsored by: ABT Systems Ltd

8 years agoUse m_cat() to reassembly IPv6 packets.
Alexander V. Chernikov [Tue, 27 Oct 2015 22:11:09 +0000 (22:11 +0000)]
Use m_cat() to reassembly IPv6 packets.

Submitted by: jonloony_gmail.com
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D3863

8 years agoUpdate NetBSD RCS IDs to reflect the changes being upstreamed.
Xin LI [Tue, 27 Oct 2015 21:26:05 +0000 (21:26 +0000)]
Update NetBSD RCS IDs to reflect the changes being upstreamed.

MFC after: 13 days
X-MFC-With: r290024

8 years agoEliminate last rtalloc_ign() caller.
Alexander V. Chernikov [Tue, 27 Oct 2015 21:25:40 +0000 (21:25 +0000)]
Eliminate last rtalloc_ign() caller.

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

8 years agoUpdate libucl to latest git snapshot (20151027)
Baptiste Daroussin [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
Jean-Sébastien Pédron [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)
Baptiste Daroussin [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 Tjoelker [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 copyright for Netflix for the files that changed from mptutil
Scott Long [Tue, 27 Oct 2015 20:56:57 +0000 (20:56 +0000)]
Add copyright for Netflix for the files that changed from mptutil

8 years agoRemove mps_config.c, it's unused.
Scott Long [Tue, 27 Oct 2015 20:56:34 +0000 (20:56 +0000)]
Remove mps_config.c, it's unused.

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

8 years agonet80211: add ieee80211_restart_all() call.
Andriy Voskoboinyk [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
Jean-Sébastien Pédron [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.
Alexander Motin [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.
Bryan Drewery [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
Bryan Drewery [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.
Bryan Drewery [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
Andriy Voskoboinyk [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
Konstantin Belousov [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.
Hans Petter Selasky [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 Panchasara [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.
Alexander Motin [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.
Kurt 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.
Takanori Watanabe [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.
Bryan Drewery [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.
Bryan Drewery [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
Xin LI [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
Bryan Drewery [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 Chadd [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
George V. Neville-Neil [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.
Bryan Drewery [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
Bryan Drewery [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
Xin LI [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
Michael 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
Andriy Voskoboinyk [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
Conrad Meyer [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
Conrad Meyer [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
Bryan Drewery [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.
Alexander Motin [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
Allan Jude [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.
Gleb Smirnoff [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.
Dag-Erling Smørgrav [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.
Dag-Erling Smørgrav [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
Dag-Erling Smørgrav [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
Roger Pau Monné [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.
Alexander Motin [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
Hans Petter Selasky [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.
David Chisnall [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.
David Chisnall [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.
Hans Petter Selasky [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.
Hans Petter Selasky [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
Conrad Meyer [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
Conrad Meyer [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
Conrad Meyer [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
Conrad Meyer [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
Zbigniew Bodek [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
Zbigniew Bodek [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
Zbigniew Bodek [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
Zbigniew Bodek [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
Zbigniew Bodek [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
Zbigniew Bodek [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.
Alexander Motin [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
Pawel Jakub Dawidek [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
Kristof Provost [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.
Alexander Motin [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.
Alexander Motin [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
Jean-Sébastien Pédron [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
David Chisnall [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
Jean-Sébastien Pédron [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.
Alexander Motin [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
Kristof Provost [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
Andrey A. Chernov [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.
Alexander Motin [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
Enji Cooper [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
Enji Cooper [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