Commit Graph

204216 Commits

Author SHA1 Message Date
Konstantin Belousov
96cdb0ab9d Annotate arm userspace assembler sources stating their tolerance to
the non-executable stack.

Reviewed by:	andrew
Sponsored by:	The FreeBSD Foundation
2015-09-29 16:09:58 +00:00
John Baldwin
3e10dd1049 Use EFI page size constants instead of hardcoding 4096.
Reviewed by:	emaste
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D3692
2015-09-29 15:49:53 +00:00
John Baldwin
df66ebeba3 When XSAVE support was added on amd64, the FPU save area was moved
out of 'struct pcb' and into a variable-sized region after the
structure. The kgdb code currently only reads the pcb. It does not
read in the FPU save area but instead passes stack garbage as the
FPU's saved context. Fixing this would mean determining the proper
size of the area and fetching it. However, this state is not saved
for running CPUs in stoppcbs[], so the callback would also have to
know to ignore those pcbs. Instead, just remove the call since it is
of limited usefulness. It results in kgdb reporting the state of the
FPU/SIMD registers in userland, not their current values in the kernel.
In particular, it does not report the correct state for any code in
the kernel which does use the FPU and would report incorrect values
in that case.

Reviewed by:	kib
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D3743
2015-09-29 15:47:42 +00:00
Glen Barber
91c42fff77 In vm_copy_base(), turn off SU+J on the resultant filesystem,
leaving only SU enabled.

Discussed with:	kib (a few weeks ago)
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2015-09-29 15:30:27 +00:00
Alexander Motin
66b6967686 Really implement PREVENT ALLOW MEDIUM REMOVAL command. 2015-09-29 15:12:40 +00:00
Alexander Motin
7f3d6f1fe3 Don't report SYNC_NV bit set in SYNCHRONIZE CACHE as error.
While this bit is obsolete in SBC-3, behavior controlled by it is allowed
on device discretion.
2015-09-29 13:58:27 +00:00
Alexander Motin
862aedb0d6 Fix arguments order. 2015-09-29 12:53:41 +00:00
Andriy Gapon
6557a3b7dd sdt.h: no need for argtype_list_head
MFC after:	12 days
2015-09-29 12:14:59 +00:00
Andriy Gapon
a26cc6c081 sdt: static-ize couple of variables
MFC after:	11 days
2015-09-29 12:14:22 +00:00
Andriy Gapon
ab8d248801 sdt module does not seem to actually use any symbol from opensolaris module
MFC after:	11 days
2015-09-29 12:13:31 +00:00
Andriy Gapon
3bd9b9a600 std: it is important that func name is never an empty string
otherwise DTRACE_ANCHORED() returns false and that makes stack()
insert a bogus frame at the top.
For example:
dtrace -n 'test:dtrace_test::sdttest { stack(); }

This change is not really a solution, but just a work-around.
The real solution is to record the probe's call site and to use
that for resolving a function name.

PR:		195222
MFC after:	22 days
2015-09-29 12:02:23 +00:00
Andriy Gapon
09999d92b1 sdt: start checking version field when parsing probe definitions
This is an extra safety measure.

MFC after:	21 days
2015-09-29 11:58:21 +00:00
Andriy Gapon
c9d71814d5 dtrace_getarg: remove stray return statement on amd64, powerpc
MFC after:	10 days
2015-09-29 11:55:26 +00:00
Christian Brueffer
ff88b6a563 The Dt argument should be in capital letters. 2015-09-29 11:48:47 +00:00
Alexander Motin
6908da41fa Report that we can read all flavours of DVD. Why not? 2015-09-29 10:44:37 +00:00
Alexander Motin
d6e7f6e741 Add CD/DVD Capabilities and Mechanical Status Page.
This page is obsolete since MMC-4, but still used by some software.
2015-09-29 09:09:37 +00:00
Adrian Chadd
85dafc6977 rsu(4): Add support for 1T2R and 2T2R NICs.
This logic is mostly crimed from the reference driver and the linux
r92su driver.

I verified that it (a) worked on the rsu hardware I have, and (b)
did traffic testing whilst watching what ath(4) sent as a hostap.
It successfully sent MCS8..15 rates (which requires 2-stream reception)
as well as MCS0..7 (which is 1-stream.)

Tested:

* RTL8712, 1T1R NIC, MCS rates 0..7.
* RTL8712, 1T2R NIC, MCS rates 0..15

TODO:

* Find a 2T2R NIC!
2015-09-29 06:56:00 +00:00
Adrian Chadd
24c2763fb1 urtwn driver fixes - missing include, free node references, shut down xfers first
* include opt_wlan.h like a good little wlan driver;
* add a function to free the mbufq /and/ the node references on it, or we will leak
  said node references;
* free the mbufq upon NIC shutdown otherwise we may end up with a full list that
  we never begin transmit work on, and thus never drain it;
* .. which frees it upon NIC detach too;
* ensure urtwn_start() gets called after the completion of frame TX even if the
  pending queue is empty, otherwise transmit will stall.  It's highly unlikely that
  the usb tx queue would be empty whilst the incoming send queue is full, but hey,
  who knows.

This passes some iperf testing with and without the NIC being actively removed during
said active iperf test.

Tested:

* urtwn0: MAC/BB RTL8188EU, RF 6052 1T1R ; STA mode
2015-09-29 05:03:24 +00:00
Adrian Chadd
024223535f Add opt_wlan.h as requirements for the two drivers I'm currently working on. 2015-09-29 04:56:27 +00:00
Xin LI
55b2d63309 Use calloc() instead of malloc + memset.
MFC after:	2 weeks
2015-09-29 04:47:31 +00:00
Adrian Chadd
dd2fb488aa Defer calling into the driver to update the QOS (WME) configuration.
This gets called from the driver RX path which leads to driver re-entry.
2015-09-29 03:40:21 +00:00
Adrian Chadd
b94ab33751 Remove the references to the TX IC lock - i ended up solving this
using net80211 to seralise encap+xmit, so now it's a non-issue.
2015-09-29 03:37:17 +00:00
Alexander Motin
648dfc1a29 Umplement media load/eject support for removable devices.
In case of block backend eject really closes the backing store, while
load tries to open it back.  Failed store open is reported as no media.
2015-09-28 20:54:18 +00:00
Glen Barber
238397876d Append VMFORMATS and VMSIZE to RELEASE_RMAKEFLAGS only if
WITH_VMIMAGES is set.

MFC after:	3 days
X-MFC-With:	r288341, r288345
Sponsored by:	The FreeBSD Foundation
2015-09-28 19:19:53 +00:00
Glen Barber
a312aae568 In followup to r288341, ensure VMFORMATS and VMSIZE are not
set to empty values, which would result in nonintuitive build
errors.

MFC after:	3 days
X-MFC-With:	r288341
PR:		203420 (related to)
Sponsored by:	The FreeBSD Foundation
2015-09-28 18:39:21 +00:00
Xin LI
05212689bb Use _PATH_DEVNULL instead of direct hardcoding.
MFC after:	2 weeks
2015-09-28 18:19:22 +00:00
Glen Barber
3a8cff7804 Honor VMFORMATS and VMSIZE if set in release.conf.
PR:		203420
Submitted by:	luca <dot> pizzamiglio <at> gmail <dot> com
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2015-09-28 16:33:38 +00:00
Andriy Gapon
9b977fcea2 define aok in libnvpair which is linked to all zfs libraries that need aok
This removes the circular dependency of libnvpair on libzfs / libzpool.

PR:		199811
Obtained from:	bapt
MFC after:	23 days
2015-09-28 15:25:36 +00:00
Andriy Gapon
9875367b9a remove unused sgsmsg utility (originally imported from opensolaris)
MFC after:	25 days
2015-09-28 12:38:57 +00:00
Andriy Gapon
65b71c48d2 remove an extra copy of avl.c from illumos contrib code
MFC after:	20 days
2015-09-28 12:23:10 +00:00
Andriy Gapon
2f2f522b5d save some bytes by using more concise SDT_PROBE<n> instead of SDT_PROBE
SDT_PROBE requires 5 parameters whereas SDT_PROBE<n> requires n parameters
where n is typically smaller than 5.

Perhaps SDT_PROBE should be made a private implementation detail.

MFC after:	20 days
2015-09-28 12:14:16 +00:00
Hans Petter Selasky
b27480c68d Store PID after becoming a daemon() and not before to ensure the
correct PID gets written to the PID file.

Submitted by:	Maxime Soule <btik-fbsd@scoubidou.com>
PR:		203252
MFC after:	2 weeks
2015-09-28 07:23:05 +00:00
Adrian Chadd
6f5ed42a0c Remove some debugging that wasn't supposed to be there. 2015-09-28 06:26:46 +00:00
Enji Cooper
c36a2f462d Add initial testcases for bin/ls
MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
2015-09-28 03:36:15 +00:00
Adrian Chadd
3a8545c312 include opt_wlan.h . Tsk adrian. 2015-09-28 01:16:44 +00:00
Adrian Chadd
c74d474720 if_otus fixes; add fast-frames support.
Fast-frames:

* include opt_wlan.h ; tsk to not doing it earlier;
* add a tx pending tracking counter for seeing how deep
  the hardware TX queue is;
* add the frame aging code from if_ath;
* add fast-frames capability to the driver setup.

Bugs:

* free the buffers (and node references) before
  detaching net80211 state.  This prevents a use-after-free in
  the node free path where we've destroyed net80211 underneath it.
2015-09-28 01:09:48 +00:00
Adrian Chadd
d029471197 Migrate the fast-frames transmit support away from using the txa_private
field and into a separate fast-frames staging pointer in ieee80211_node.

The A-MPDU TX path allows txa_private to be used by drivers.  So it will
clash with any attempt to use fast-frames.  Now, fast-frames is not really
anything special - it's just a custom ethernet frame type that contains
two MSDUs into one MPDU.  So all the NIC has to support doing is transmitting
up to a 4KiB frame with an arbitrary ethertype and bam! Fast-frames.
However, using txa_private means we can /either/ do fast-frames or A-MPDU TX,
so fast frames has been turned off in the Atheros HAL for 11n chipsets.
This is a bit silly - it actually means that 802.11 performance to/from
11abg Atheros chips is actually better than between an 11abg atheros device
and an 11n Atheros device.

So:

* create a new mbuf staging queue for fast frames.  It only queues a single
  frame in the staging queue (and there's a top-level ic staging queue
  used for expiry/tracking) so it's just an mbuf pointer per TID.

* Still use the ampdu TX packet counter to determine whether to do
  aggregation or not.  It'll double count if we start doing both A-MPDU TX
  and fast frames, but that's not all that important right now.

* Initialise the pps tracker so ticks isn't zero.  This ensures that
  fast-frames actually gets used - without it, the ticks math overflows
  and the pps math always sets txa_pps=0.  This is the same bug that
  plagued A-MPDU TX starting logic.

This actually allows fast-frames transmit to occur between the AR9331
(in 11n HT/20 mode) and AR9170 (if_otus) in 11bg mode.

Now, this is a great big no-op on atheros 11n hardware, so don't worry.
It may mean you start seeing more reliable fast-frames transmission on
11abg hardware which may expose some more amusing bugs.

TODO:

* further testing and debugging of all of this before flipping on
  fast-frames in if_ath (for 11n) and if_otus.
2015-09-28 00:59:07 +00:00
Adrian Chadd
f9128a1be3 Comments, mostly to remind myself of what's going on and why. 2015-09-28 00:51:24 +00:00
Adrian Chadd
d7621b8c80 Abstract out the ampdu TX pps initialisation code so it can be reused
in the superg fast-frames code.

This harks back to an earlier commit (r280349) where I found that
initialising the pps code with ticks=0 would cause hilariously bad
hz ticks wraparound failures, leading to never actually aggregating
traffic.  This is still true for the superg path and so I have to
do the same thing there.

This is a big no-op; a subsequent commit will flip this on so it
works with the fast-frames transmit path.

Tested:

* AR9170, otus(4) - STA mode, 11bg operation
* AR9331, AP mode
2015-09-28 00:17:51 +00:00
Allan Jude
62a1a5f751 Fix whitespace error in ls(1) detected by igor
Approved by:	bcr (mentor)
Sponsored by:	EuroBSDCon DevSummit
2015-09-27 22:05:20 +00:00
Allan Jude
141af3c6ab Use one fewer made up words in the ls(1) man page
PR:		203337
Submitted by:	Mike Dame <damemi@gmail.com>
Approved by:	bcr (mentor)
Sponsored by:	EuroBSDCon DevSummit
2015-09-27 22:02:46 +00:00
Luiz Otavio O Souza
2dde378283 Set the #address-cells and #size-cells for the I2C controllers in RPi2.
This allows the use of I2C addresses in 'reg' property.
2015-09-27 18:21:22 +00:00
Alexander Motin
91be33dc78 Add to CTL initial support for CDROMs and removable devices.
Relnotes:	yes
2015-09-27 13:47:28 +00:00
Jilles Tjoelker
3caeab9db2 fnmatch(): Remove exponential behaviour as in sh r229201.
The old code was exponential in the number of asterisks in the pattern.
However, once a match has been found upto the next asterisk, the previous
asterisks are no longer relevant.
2015-09-27 12:52:18 +00:00
Bjoern A. Zeeb
cd44287c16 Fix what looks like a consistent copy&paste error.
Don't make an integer to a boolean and then compare to a value which
needs an integer comparison.

Spotted by:	reading kernel compile time log
MFC after:	2 weeks
2015-09-27 12:19:36 +00:00
Bjoern A. Zeeb
23d56b1e9c Compare the correct variable to see if memory allocation succeeded.
I don't even want to know where the symbol "version" comes from.

Spotted by:	reading kernel compile time log
MFC after:	2 weeks
2015-09-27 12:17:03 +00:00
Michael Reifenberger
27aa47691e Add support to systat to display zfs arc cache status/info
PR:		195460
Submitted by:	ota
2015-09-27 09:15:54 +00:00
Enji Cooper
abd7105060 Replace N #defines with nitems to simplify ifconfig code slightly
MFC after: 1 week
2015-09-27 07:51:18 +00:00
Enji Cooper
f1bbec5a6f Enable parallel subdirectory building with sys/modules/netgraph
MFC after: 2 weeks
2015-09-27 07:40:19 +00:00
Xin LI
100e2a06e2 MFV r288243: nc from OpenBSD 5.8. 2015-09-27 07:04:16 +00:00