Commit Graph

205698 Commits

Author SHA1 Message Date
Edward Tomasz Napierala
b9124fc313 Fix resource leaks in error cases.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-11-11 23:00:57 +00:00
Conrad Meyer
28a0666622 if_ntb: MFV c92ba3c5: invalid buf pointer in multi-MW setups
Order of operations issue with the QP Num and MW count, which would
result in the receive buffer pointer being invalid if there are more
than 1 MW.  Corrected with parenthesis to enforce the proper order of
operations.

Reported by:	John I. Kading <John.Kading@gd-ms.com>
Reported by:	Conrad Meyer <cem@FreeBSD.org>
Authored by:	Jon Mason <jdmason@kudzu.us>
Obtained from:	Linux (Dual BSD/GPL driver)
Sponsored by:	EMC / Isilon Storage Division
2015-11-11 18:56:21 +00:00
Conrad Meyer
13e751cf1a NTB: Add more HW registers to device sysctl tree
Sponsored by:	EMC / Isilon Storage Division
2015-11-11 18:56:11 +00:00
Conrad Meyer
fe92caaf23 ntb: volatile some members set by interrupt routines
Sponsored by:	EMC / Isilon Storage Division
2015-11-11 18:56:02 +00:00
Conrad Meyer
bce32f9268 ntb_hw: Similarly, add a debug-leveled macro for ntb_hw
Sponsored by:	EMC / Isilon Storage Division
2015-11-11 18:55:53 +00:00
Conrad Meyer
98bdb1ce51 if_ntb: Add module-specific log level
Rather than relying on the quite accurately named 'bootverbose'.

Sponsored by:	EMC / Isilon Storage Division
2015-11-11 18:55:44 +00:00
Conrad Meyer
b22ecf1ff8 if_ntb: Transport link cleanup needs to be on a taskqueue
Because it can sleep drainking link work callout(s).  Linux (dual
BSD/GPL driver) does something very similar.

At the same time, switch the NTB CTX lock to a non-spin mutex, because
the taskqueue_swi lock can't be taken after a spin mutex.

Suggested by:	Witness
Sponsored by:	EMC / Isilon Storage Division
2015-11-11 18:55:34 +00:00
Conrad Meyer
9cf310367f NTB: Diff reduce with Linux
No functional change.

Sponsored by:	EMC / Isilon Storage Division
2015-11-11 18:55:25 +00:00
Conrad Meyer
e4a818a922 ntb_hw: Correctly detect DSD/USD
Sponsored by:	EMC / Isilon Storage Division
2015-11-11 18:55:16 +00:00
Conrad Meyer
2219047bc1 ntb_hw: In INTx fallback, correct db shift from 15 to 16
Sponsored by:	EMC / Isilon Storage Division
2015-11-11 18:55:07 +00:00
Conrad Meyer
6fde27ecee ntb: Use caddr_t to simplify pointer arithmetic
Sponsored by:	EMC / Isilon Storage Division
2015-11-11 18:54:58 +00:00
Conrad Meyer
1a60b0c88e NTB: Skip db_valid validation writing DB link bit
In ntb_poll_link, we are intentionally writing the link bit, which is
absent from db_valid_mask.  Don't panic on a kassert when we do so.

The Linux version of this (dual BSD/GPL) driver has the db_valid_mask
assertions in callers of db_iowrite() rather than db_iowrite() itself;
it skips the assertions in the equivalent of ntb_poll_link().  Rather
than duplicating the assertions in every caller, add a db_iowrite_raw()
that doesn't check and use it from ntb_poll_link().

Suggested by:	kassert_panic
Sponsored by:	EMC / Isilon Storage Division
2015-11-11 18:54:49 +00:00
Bryan Drewery
d4ea5890a8 Use explicit filename when creating locale symlinks to avoid creating a
directory symlink when the target directory does not exist.  This will
cause an error instead of a broken setup.

Sponsored by:	EMC / Isilon Storage Division
2015-11-11 18:45:48 +00:00
Bryan Drewery
b3932817a4 Remove redundant declaration for sysctl kern.
This is trying to fix the GCC build.

MFC after:	1 month
X-MFC-With:	r290663
2015-11-11 16:24:52 +00:00
Bryan Drewery
5d811cd568 Use a proper prototype.
This was a failure in the GCC build.

MFC after:	1 month
X-MFC-With:	r290663
2015-11-11 16:23:07 +00:00
Dag-Erling Smørgrav
f2e553364c Remove dead code. 2015-11-11 13:47:23 +00:00
Dag-Erling Smørgrav
845c9bd1d9 One more $Mdocdate$ 2015-11-11 13:27:58 +00:00
Dag-Erling Smørgrav
5bec830e40 Remove /* $FreeBSD$ */ from files that already have __RCSID("$FreeBSD$"). 2015-11-11 13:26:47 +00:00
Dag-Erling Smørgrav
5b71b2ebe0 Now that we have mandoc, we can leave $Mdocdate$ tags as-is. Unfortunately,
there is (currently) no way to make Subversion generate correct $Mdocdate$
tags, but perhas we can teach mandoc to read Subversion's %d format.
2015-11-11 13:23:07 +00:00
Alexander Motin
6bd364b523 Modify target port groups logic in CTL.
- Introduce "ha_shared" port option, which being set to "on" moves the
port into separate port group, shared between HA nodes.  This allows to
better handle cases when iSCSI portals are bound to CARP address that can
dynamically move between nodes.  Some initiators (at least VMware) don't
detect that after iSCSI reconnect they've attached to different SCSI port
from different port group, that totally breakes ALUA status parsing.
In theory, I believe, it should be enough to have different iSCSI portal
group tags on different nodes to make initiators detect this condition,
but it seems like VMware ignores those values, and even full LUN retaste
forced by UA does not help.
 - Make CTL report up to three port groups: 1 -- non-HA mode or ports
with "ha_shared" option set, 2 -- HA node 1, 3 -- HA node 2.
 - Report Transitioning state for all port groups when HA interlink is
connected, but neither of nodes is primary for the LUN.

MFC after:	2 weeks
2015-11-11 13:18:38 +00:00
Oleksandr Tymoshenko
cd3903c620 Refactor bcm2835_cpufreq to use bcm2835_mbox_property API 2015-11-11 00:45:41 +00:00
Oleksandr Tymoshenko
e597fdb889 - Set have_message in interrupt to handle "response before READ" case
- Serialize access to property channel when using bcm2835_mbox_property
2015-11-11 00:41:02 +00:00
Bryan Drewery
64bd42622a Build all of sys/modules with SUBDIR_PARALLEL.
Sponsored by:	EMC / Isilon Storage Division
MFC after:	3 weeks
2015-11-10 17:15:36 +00:00
Randall Stewart
18b4fd62e0 Add new async_drain to the callout system. This is so-far not used but
should be used by TCP for sure in its cleanup of the IN-PCB (will be coming shortly).

Sponsored by:	Netflix Inc.
Differential Revision:	https://reviews.freebsd.org/D4076
2015-11-10 14:49:32 +00:00
Randall Stewart
f52e50aef4 Add a kernel test framework. The callout_test is a demonstration and will only
work with the upcoming async-drain functionality. Tests can be added
to the tests directory and then the framework can be used to launch
those tests.

MFC after:	1 month
Sponsored by:	Netflix Inc.
Differential Revision:	https://reviews.freebsd.org/D1755
2015-11-10 14:14:41 +00:00
Josh Paetzel
09766dd52a Fix a bug in the CPU % limiting code
If you attempt to set a pcpu limit that is higher than
110% using rctl (for instance, you want a jail to be
able to use 2 cores on your system so you set pcpu to
200%) the thing you are trying to limit becomes unthrottled.

PR:	189870
Submitted by:	dustinwenz@ebureau.com
Reviewed by:	trasz
MFC after:	1 week
2015-11-10 14:14:32 +00:00
Michal Meloun
5fcbe89ac9 ARM: Refactor interrupt_enable/disable/restore.
Allow manipulation with PSR_A bit on ARMv6+.
Remove declaration of unused functions.

This effectively enables asynchronous aborts on early bootstrap stage,
which previously was not enabled due to an error in enable_interrupts().

PR:		201434
Reported by:	Gregory Soutade <soutade at gmail.com>
Approved by:	kib (mentor)
2015-11-10 13:47:28 +00:00
Enji Cooper
7c357fe0ee Move the MK_BLUETOOTH block down below the architecture specific sections by the
other generic options

MFC after: 3 days
X-MFC with: r290659
PR: 193260
Sponsored by: EMC / Isilon Storage Divisions
2015-11-10 13:32:05 +00:00
Enji Cooper
44642b54ec - Move ng_bluetooth.4 under MK_BLUETOOTH != no
- Move all section 5 bluetooth manpages under MK_BLUETOOTH != no

MFC after: 3 days
PR: 193260
Reported by: Philippe Michel <philippe.michel7@sfr.fr>
Sponsored by: EMC / Isilon Storage Division
2015-11-10 13:28:41 +00:00
Svatopluk Kraus
aeef015ea1 Fix cp15 PAR definition and function. While here, add cp15 ATS1CPW
function which checks an address for privileged (PL1) write access.
The function is inlined so it does not bring any cost, but makes
function set for checking privileged access complete.

Approved by:	kib (mentor)
2015-11-10 13:20:21 +00:00
Svatopluk Kraus
765b884ede Fix pmap_fault(). It turned out that alignment abort may have higher
priority than both translation and permission ones.

Approved by:	kib (mentor)
2015-11-10 13:15:34 +00:00
Andriy Voskoboinyk
a2ff3c9268 urtwn(4): add IBSS mode support
Tested with RTL8188EU, IBSS and STA modes.

Reviewed by:	kevlo
Approved by:	adrian (mentor)
Differential Revision:	https://reviews.freebsd.org/D4038
2015-11-10 12:52:26 +00:00
Hans Petter Selasky
dc7e38ac4d Add mlx5 and mlx5en driver(s) for ConnectX-4 and ConnectX-4LX cards
from Mellanox Technologies. The current driver supports ethernet
speeds up to and including 100 GBit/s. Infiniband support will be
done later.

The code added is not compiled by default, which will be done by a
separate commit.

Sponsored by:	Mellanox Technologies
MFC after:	2 weeks
2015-11-10 12:20:22 +00:00
Konstantin Belousov
081432a88f Implement atomic_testandset_{32,int,long,64} for ARMv6. Only
little-endian configuration for 64-bit variant is supported.

Reviewed by:	mmel
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D4113
2015-11-10 12:15:13 +00:00
Michal Meloun
4dbc00835d ARM: Remove trailing whitespace from sys/arm/include
No functional changes.

Approved by:    kib (mentor)
2015-11-10 12:02:41 +00:00
Michal Meloun
89b4b66950 ARM: Improve robustness of locore_v6.S and fix errors.
- boot page table is not allocated in data section, so must be
  cleared before use
- map only one section (1 MB) for SOCDEV mapping (*)
- DSB must be used for ensuring of finishing TLB operations
- Invalidate BTB when appropriate

PR:		198360
Reported by:	Daisuke Aoyama <aoyama at peach.ne.jp> (*)
Approved by:	kib (mentor)
2015-11-10 11:45:41 +00:00
Enji Cooper
79346959a2 Add missing licensing boilerplate to test-fnmatch.c
Carry over licensing author info from fnmatch_test.c (jilles@)

MFC after: 1 week
X-MFC with: r290572
Sponsored by: EMC / Isilon Storage Division
2015-11-10 11:28:02 +00:00
Enji Cooper
87323cd30b Fix some trivial warnings with bootparamd/main.c
- Convert K&R to something a bit less ancient
- Remove an incorrect, duplicate prototype for bootparamprog_1(..)

MFC after: 1 week
PR: 71667
Submitted by: bcran
Sponsored by: EMC / Isilon Storage Division
2015-11-10 11:19:36 +00:00
Hans Petter Selasky
a8a13a7e7f Renew my MAINTAINERS entries. 2015-11-10 11:04:23 +00:00
Enji Cooper
6e6fbf77b5 - Move the testing entries up for netbsd-tests/pjdfstest
- Add pjd to contrib/pjdfstest
- Add atf to the list; add jmmv
- Add tests
- Add share/mk/*.test.mk
2015-11-10 10:59:40 +00:00
Svatopluk Kraus
780fefef0b Fix slots DMA memory handling. It's similar to r290553.
Discussed with:	gonzo
Approved by:	kib (mentor)
2015-11-10 10:56:52 +00:00
Michael Tuexen
947d5c8d49 Add support for SCTP checksum offloading for the 82580 controller
similar to the 82576 controller.
Tested with Intel i340 cards.

Reviewed by:	erj@
MFC after:	1 week
2015-11-10 10:55:57 +00:00
Dag-Erling Smørgrav
e8ae2f6598 Upgrade my claim on fetch and libfetch since people don't seem to give a
hoot about "advance notification requested".
2015-11-10 10:49:26 +00:00
Hans Petter Selasky
fcc75f06aa Update the wsp driver to support newer touch pads, like found in
MacBookPro11,4 and MacBook12,1. This update adds support for the
force touch parameter.

PR:		204420
MFC after:	1 week
2015-11-10 09:27:52 +00:00
Baptiste Daroussin
87101cb572 return "US-ASCII" instead of "POSIX" for "C" and "POSIX" locales
as it used to be in previous version of the locales. Returning
"POSIX" has too many fallouts.
2015-11-10 08:11:27 +00:00
Navdeep Parhar
00cc2faabb cxgbe/t4_tom: add a knob to the default configuration file to tune
the TOE for LAN operation.  It is possible to set this to other values
(cluster for networks with little loss and really tight RTTs, and wan
for relatively large RTTs and/or lossy networks) depending on the
environment in which the TOE is being used.

None of this affects plain NIC operation in any way.

MFC after:	1 week
2015-11-10 02:29:19 +00:00
Andriy Voskoboinyk
98b83dc236 urtwn(4): fix the build.
Add some missing bits from D4020.
2015-11-10 00:42:32 +00:00
Andriy Voskoboinyk
337bcd0ac2 urtwn(4): add HOSTAP mode support.
Tested with RTL8188EU, HOSTAP and STA modes

Reviewed by:	kevlo
Approved by:	adrian (mentor)
Differential Revision:	https://reviews.freebsd.org/D4034
2015-11-10 00:12:00 +00:00
Andriy Voskoboinyk
3aedf2e3b6 urtwn(4): refactor and fix TX path.
- Split urtwn_tx_start() into urtwn_tx_data() and urtwn_tx_start()
  (the last will be used for beacon updates / raw xmit path).
- Remove unneeded code from _urtwn_getbuf().
- Use CCK11 for data frames in 11b mode.
- Send EAPOL frames at 1 Mbps.
- Reduce code duplication in urtwn_tx_data().
- Fix sequence numbering.
- Add IEEE80211_RADIOTAP_F_WEP flag for encrypted frames.
- Check URTWN_RUNNING flag under lock.

Tested with RTL8188EU, STA mode.

Reviewed by:	kevlo
Approved by:	adrian (mentor)
Differential Revision:	https://reviews.freebsd.org/D4017
2015-11-09 23:46:13 +00:00
Bryan Drewery
b03ca5c3ec FAST_DEPEND: Fix building of wrong source files in some cases.
Similar to the original reason for these dependency hints to be added,
in r124637, the missing-dependency file case can lead to building of the
wrong source.

A clear example of this is in gnu/lib/libstdc++ where the .PATH contains
both contrib/gcc and contrib/libstdc++/src.

  contrib/gcc has a debug.c.
  contrib/libstdc++/src has a debug.cc.

  When building for the objects of debug.o, debug.So, and debug.po, it is
  ambiguous for which src file to use due to the suffix transformation
  rules, even though the proper one is listed first in .PATH.

  This was normally avoided due to these dependency hints for the initial
  build, and then mkdep would add an explicit 'debug.o: debug.cc'
  dependency into the .depend file.  WITH_FAST_DEPEND does not generate
  the .depend file with these, but puts them into .depend.debug.o instead.

Rather than extending the exists() check to each object's .depend.*
file, just enable the hint when when using WITH_FAST_DEPEND.  It fixes
the problem and seems to be safe enough to use since it is mapping SRCS
back to OBJS, rather than letting make make assumptions from OBJS to
SRCS.

A similar check mapping objects to headers is present in some mk files
but was not extended here for FAST_DEPEND since it has not yet been
found to be a problem.

X-MFC-With:	r290433
MFC after:	3 weeks
Sponsored by:	EMC / Isilon Storage Division
2015-11-09 23:37:04 +00:00