Commit Graph

203733 Commits

Author SHA1 Message Date
Bryan Drewery
42c4cf86d4 Update META_MODE dependencies. 2015-09-17 05:06:34 +00:00
Bryan Drewery
1c67eb6420 Document NO_SILENT for META_MODE.
Reword and add some formatting as well.
2015-09-17 05:01:04 +00:00
Bryan Drewery
a87f765b19 Rework r287900 to keep arm64/aarch64 stable in the TARGETS list.
This is relevant for makeman using the 'make targets' output in src.conf(5).

This makes a _UNIVERSE_TARGETS that removes arm64 if the build
requirements are not met.
2015-09-17 04:54:49 +00:00
Bryan Drewery
26b7188dae Let makeman run 'make showconfig' without hitting the aarch64 error. 2015-09-17 04:48:15 +00:00
Adrian Chadd
b4d4079c85 Bring over the QoS logic from the Linux r92su driver.
* the tx descriptor TID is priority, not TID.
* the tx descriptor queue id mapping is separate from the
  TID/priority; rather than just "BE".

TODO:

* go and re-re-re-verify the queue mappings; the linux and openbsd
  mappings aren't exactly the same.  I need to verify all of this
  before I try to flip on 11n RX.
2015-09-17 04:45:29 +00:00
Bryan Drewery
f80c5b811b Get arm64/aarch64 into 'make targets' output to fix makeman. 2015-09-17 04:43:07 +00:00
Bryan Drewery
7a46bc8129 META_MODE: Default OBJROOT to the traditional /usr/src/SRCTOP/.
This avoids easily colliding multiple src trees with the same objects.  Having
multiple checkouts in dir/ dir2/ dir3/ would all use obj/ without any unique
identifier inside of obj/.  This pattern is more likely to be used due
to the non-META_MODE behavior working with it fine.

In environments where ../obj/ is wanted as the obj directory the value of
OBJROOT can be set to ${SRCTOP:H}/obj/ instead via src-env.conf (set by
SRC_ENV_CONF) or environment.  For environment it must be single quoted or
escaped.  This will be more likely for vendors who are building images or using
NFS for builds.  In those cases MAKEOBJDIRPREFIX may already be utilized and
is supported.

Discussed with:	imp
Sponsored by:	EMC / Isilon Storage Division
2015-09-17 04:22:00 +00:00
Bryan Drewery
3c35812126 META_MODE: Allow MAKEOBJDIRPREFIX to work more closely to its traditional behavior.
The preferred way to modify the object directory root is to use OBJROOT.
However, setting OBJROOT to ${MAKEOBJDIRPREFIX}/${SRCTOP}/ effectively behaves
as expected.

The problem with this before was that setting OBJROOT to contain SRCTOP
resulted in a recursive replacement (/usr/obj/usr/obj/usr/src/). Anchoring to
the start of the path for replacing SRCCTOP in CURDIR resolves this by
avoiding replacing SRCTOP when CURDIR is within the OBJDIR.

Sponsored by:	EMC / Isilon Storage Division
2015-09-17 04:01:05 +00:00
Adrian Chadd
b8303685fa Program the firmware setup stuff with the current hardware setup:
* Do 1T1R for now, until we read the config out of ROM and use it.
* Disable turbo mode, I dunno what this is, but the linux drivers
  have this disabled.
* Set the firmware endpoints to what we read from USB.

Tested:

* RTL8712 cut 3, STA mode
2015-09-17 03:42:18 +00:00
Adrian Chadd
bc6a9865d6 Use the H2C endpoint for sending firmware commands, rather than the voice
data queues.

This is similar to the openbsd and rtlwifi/r92su drivers.

Note: this driver still assumes it's a 4-endpoint device; I'll enforce
that in a follow-up commit.
2015-09-17 03:19:09 +00:00
Adrian Chadd
882704d0ce Add 11n and QoS methods.
The firmware takes care of ampdu tx/rx (except for RX reordering, grr),
QoS/WME and other bits/pieces.  So they're stubs, just in case.
2015-09-17 03:13:01 +00:00
Adrian Chadd
47b0d9dd88 Prepare for 11n - get the number of endpoints and whether 11n is available. 2015-09-17 03:08:02 +00:00
Adrian Chadd
ddf4995dc5 Bump RX_LIST_COUNT so we don't fall behind during active traffic. 2015-09-17 03:01:55 +00:00
Adrian Chadd
17ebf55362 Use DELAY() rather than usb_pause_mtx() - the latter releases the lock
before waiting, which prevents the lock from really acting like
a hardware serialiser.  Sigh.
2015-09-17 03:01:19 +00:00
Bryan Drewery
63c304b083 META_MODE: Don't define the default MAKEOBJDIR twice. Just expand the default.
Sponsored by:	EMC / Isilon Storage Division
2015-09-17 00:17:32 +00:00
Steven Hartland
412ce2744c Fix kqueue write events for files > 2GB
Due to the use of int's for file offsets in the VOP_WRITE_(PRE|POST)
macros, kqueue write events for files greater 2GB where never fired.

This caused tail -f on a file greater 2GB to never see updates.

MFC after:	1 week
Relnotes:	YES
Sponsored by:	Multiplay
2015-09-17 00:03:55 +00:00
Bryan Drewery
5ac0efdba9 Update META_MODE architectures for universe 2015-09-16 23:59:53 +00:00
Zbigniew Bodek
7b1c945350 Block secondary ITS instances from attaching on ARM64
Currently FreeBSD supports only single PIC controller. Some systems
that have more than one (like ThunderX dual-socket) fails to boot.
Disable other PICes until proper handling is implemented in the
generic interrupt code.

Reviewed by:   imp
Obtained from: Semihalf
Sponsored by:  The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D3682
2015-09-16 23:59:45 +00:00
Zbigniew Bodek
dbf66ac207 Release memory for CPUs that fail to init on ARM64
cpu_init_fdt will now release memory allocated for structures
serving CPUs that have failed to init.

Obtained from: Semihalf
Sponsored by:  The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D3297
2015-09-16 23:46:20 +00:00
Zbigniew Bodek
18c72666ce Add domain support to PCI bus allocation
When the system has more than a single PCI domain, the bus numbers
are not unique, thus they cannot be used for "pci" device numbering.
Change bus numbers to -1 (i.e. to-be-determined automatically)
wherever the code did not care about domains.

Reviewed by:   jhb
Obtained from: Semihalf
Sponsored by:  The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D3406
2015-09-16 23:34:51 +00:00
Dag-Erling Smørgrav
ae96779933 If forwarders were specified on the command line, create an empty
resolvconf.conf so that resolvconf won't replace the manually configured
forwarders with dynamically configured ones the next time the lease is
renewed.
2015-09-16 23:09:31 +00:00
Bryan Drewery
8d4b8102d5 META_MODE: Don't create obj directories automatically when running make -V.
Sponsored by:	EMC / Isilon Storage Division
2015-09-16 23:01:16 +00:00
Alexander Motin
83981e319d Fix reading after end of file for file-backed LUNs.
If backing file is smaller then the LUN size, we have to explicitly clear
the rest of the buffer to not leak some random data from previous I/Os.
2015-09-16 21:43:51 +00:00
Gleb Smirnoff
db642c8e6e In tcp_ctlinput() separate the (ip == NULL) block from the rest of the
function to reduce so many levels of indentation.  Style the lines that
got now indentation reduced.  No functional change.

Checked with:	md5
2015-09-16 21:42:33 +00:00
Bryan Drewery
cf25886e34 META_MODE: Fix OBJROOT ending in two // when it does not yet exist.
This would lead to the 2nd build (after the first with a missing OBJROOT) to
always rebuild everything as the 'command' would have changed due to the path
changing from having // to only /.

Sponsored by:	EMC / Isilon Storage Division
2015-09-16 20:58:43 +00:00
John Baldwin
bdd64116b0 Always clear TDB_USERWR before fetching system call arguments. The
TDB_USERWR flag may still be set after a debugger detaches from a
process via PT_DETACH.  Previously the flag would never be cleared
forcing a double fetch of the system call arguments for each system
call.  Note that the flag cannot be cleared at PT_DETACH time in case
one of the threads in the process is currently stopped in
syscallenter() and the debugger has modified the arguments for that
pending system call before detaching.

Reviewed by:	kib
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D3678
2015-09-16 20:55:00 +00:00
Bryan Drewery
bf7ff1d2bf Fix check from r287867 for valid MAKEOBJDIR from top-level builds.
MAKEOBJDIR is based on OBJTOP so cannot be expanded until OBJTOP is set.

Reported by:	Nikolai Lifanov <lifanov@mail.lifanov.com>
Sponsored by:	EMC / Isilon Storage Division
2015-09-16 19:58:04 +00:00
Alexander Motin
d6043e4643 Make COMPARE AND WRITE report offset of difference. 2015-09-16 18:33:04 +00:00
Bryan Drewery
7aeb371515 Error and give better feedback for invalid MAKEOBJDIR settings.
Submitted by:	sjg
2015-09-16 18:02:04 +00:00
Alexander Motin
723c363f7f Fix fixed sense writing when passed more data then it can fit.
MFC after:	1 week
2015-09-16 17:56:24 +00:00
Bryan Drewery
0b5150a36e Ignore CCACHE_DIR for meta mode decisions.
Sponsored by:	EMC / Isilon Storage Division
2015-09-16 17:44:45 +00:00
John Baldwin
4295bec16a When a process group leader exits, all of the processes in the group are
sent SIGHUP and SIGCONT if any of the processes are stopped.  Currently this
behavior is triggered for any type of process stop including ptrace() stops
and transient stops for single threading during exit() and execve().
Thus, if a debugger is attached to a process in a group when the leader
exits, the entire group can be HUPed.  Instead, only send the signals if a
process in the group is stopped due to SIGSTOP.

PR:		201149
Reviewed by:	kib
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D3681
2015-09-16 16:40:07 +00:00
Alexander V. Chernikov
fb373bc2b1 Fix build broken by r287861.
Spotted by:	zb
2015-09-16 15:40:08 +00:00
Alexander V. Chernikov
1fe201c322 Simplify the way of attaching IPv6 link-layer header.
Problem description:
How do we currently perform layer 2 resolution and header imposition:

For IPv4 we have the following chain:
  ip_output() -> (ether|atm|whatever)_output() -> arpresolve()

Lookup is done in proper place (link-layer output routine) and it is possible
  to provide cached lle data.

For IPv6 situation is more complex:
  ip6_output() -> nd6_output() -> nd6_output_ifp() -> (whatever)_output() ->
    nd6_storelladdr()

We have ip6_ouput() which calls nd6_output() instead of link output routine.
nd6_output() does the following:
  * checks if lle exists, creates it if needed (similar to arpresolve())
  * performes lle state transitions (similar to arpresolve())
  * calls nd6_output_ifp() which pushes packets to link output routine along
    with running SeND/MAC hooks regardless of lle state
    (e.g. works as run-hooks placeholder).

After that, iface output routine like ether_output() calls nd6_storelladdr()
  which performs lle lookup once again.

As a result, we perform lookup twice for each outgoing packet for most types
  of interfaces. We also need to maintain runtime-checked table of 'nd6-free'
  interfaces (see nd6_need_cache()).

Fix this behavior by eliminating first ND lookup. To be more specific:
  * make all nd6_output() consumers use nd6_output_ifp() instead
  * rename nd6_output[_slow]() to nd6_resolve_[slow]()
  * convert nd6_resolve() and nd6_resolve_slow() to arpresolve() semantics,
    e.g. copy L2 address to buffer instead of pushing packet towards lower
    layers
  * Make all nd6_storelladdr() users use nd6_resolve()
  * eliminate nd6_storelladdr()

The resulting callchain is the following:
  ip6_output() -> nd6_output_ifp() -> (whatever)_output() -> nd6_resolve()

Error handling:
Currently sending packet to non-existing la results in ip6_<output|forward>
  -> nd6_output() -> nd6_output _lle() which returns 0.
In new scenario packet is propagated to <ether|whatever>_output() ->
  nd6_resolve() which will return EWOULDBLOCK, and that result
  will be converted to 0.

(And EWOULDBLOCK is actually used by IB/TOE code).

Sponsored by:		Yandex LLC
Differential Revision:	https://reviews.freebsd.org/D1469
2015-09-16 14:26:28 +00:00
Alexander Motin
5c5fb901eb Frontends don't need to set errors themselves. 2015-09-16 13:25:35 +00:00
Andrey V. Elsukov
b71bed24a6 Use KASSERT for some checks, that are late to do.
Discussed with:	melifaro, glebius
2015-09-16 13:17:00 +00:00
Alexander V. Chernikov
f0316e1acb Constantify lookup key in several nd6_* functions. 2015-09-16 11:06:07 +00:00
Oleg Bulyzhin
3f70ebbf05 Remove superfluous m_freem().
MFC after:	1 month
2015-09-16 10:07:45 +00:00
Alexander Motin
e2c3044b13 Don't flap the HA link if sysctl is reset to the same value. 2015-09-16 09:59:05 +00:00
Kevin Lo
97ad4604d7 Use M_WAITOK rather than M_NOWAIT since it's not used within
interrupt context.
2015-09-16 07:26:18 +00:00
Kevin Lo
4bae831003 Fix a debug message which didn't quite get it right about eeprom version. 2015-09-16 07:18:54 +00:00
Kevin Lo
f75281b8f2 Remove checks for a NULL return value from M_WAITOK allocations. 2015-09-16 07:16:21 +00:00
Alexander V. Chernikov
59c180c35c Unify loopback route switching:
* prepare gateway before insertion
* use RTM_CHANGE instead of explicit find/change route
* Remove fib argument from ifa_switch_loopback_route added in r264887:
  if old ifp fib differes from new one, that the caller
  is doing something wrong
* Make ifa_*_loopback_route call single ifa_maintain_loopback_route().
2015-09-16 06:23:15 +00:00
Bryan Drewery
9c7aaa01b3 Similar to r287844, create 'symlinks' cookie in proper place with -j and META_MODE.
Sponsored by:	EMC / Isilon Storage Division
2015-09-16 04:27:12 +00:00
Bryan Drewery
a2fdfab008 Create 'copies' cookie in proper place in META_MODE.
With -j the cookie would be created in CURDIR/sys/teken rather than OBJDIR.

Sponsored by:	EMC / Isilon Storage Division
2015-09-16 04:07:39 +00:00
Allan Jude
4c95e76ac4 Add a number of models to the bsdinstall GPT hack blacklist
PR:		194359
Approved by:	bapt (mentor)
MFC after:	2 weeks
Sponsored by:	ScaleEngine Inc.
Differential Revision:	https://reviews.freebsd.org/D3525
2015-09-16 03:32:27 +00:00
Allan Jude
cc59771c4a Make ifconfig always exit with an error code if an important ioctl fails
PR:		203062
Arm Twisting by:	Kristof Provost
Reviewed by:	kp
Approved by:	bapt (mentor)
MFC after:	2 weeks
Relnotes:	yes
Sponsored by:	ScaleEngine Inc.
Sponsored by:	vBSDCon
Differential Revision:	https://reviews.freebsd.org/D3644
2015-09-16 03:03:19 +00:00
Adrian Chadd
a14bc739d5 Add ASUS Sandybridge laptops to the similar x2apic disable logic
that was recently added for Lenovo laptops.

This is a prime candidate for conversion into a table and also
checking other fields like "product".

Tested:

* ASUS UX31E
2015-09-16 01:44:11 +00:00
Mark Johnston
4af587d062 Ensure that the MAD agent's delayed taskqueue is completely stopped
before proceeding. Otherwise, nothing prevents it from running after the
MAD agent struct has been been freed, and this results in a use-after-free
when the task's ta_pending count is incremented in the callout handler.

MFC after:	2 weeks
Sponsored by:	EMC / Isilon Storage Division
2015-09-15 23:56:31 +00:00
Ed Maste
319a55f4cd arm64: add kbd.c to the build for ukbd to fix the build
Pointy hat to:	emaste
2015-09-15 23:44:19 +00:00