Commit Graph

215857 Commits

Author SHA1 Message Date
Michael Tuexen
5a17b6ad98 Ensure that the IPPROTO_TCP level socket options
* TCP_KEEPINIT
* TCP_KEEPINTVL
* TCP_KEEPIDLE
* TCP_KEEPCNT
always always report the values currently used when getsockopt()
is used. This wasn't the case when the sysctl-inherited default
values where used.
Ensure that the IPPROTO_TCP level socket option TCP_INFO has the
TCPI_OPT_ECN flag set in the tcpi_options field when ECN support
has been negotiated successfully.

Reviewed by:	rrs, jtl, hiren
MFC after:	1 month
Differential Revision:	7833
2016-09-14 14:48:00 +00:00
Bruce Evans
701ac88055 Use the MI macro TRAPF_USERMODE() instead of open-coded checks for
SEL_UPL and sometimes PSL_VM.  This is just a style change on amd64,
but on i386 it fixes 1 unimportant place where the PSL_VM check was
missing and starts fixing 1 important place where the PSL_VM check
had a logic error.

Fix logic errors in treating vm86 bioscall mode as kernel mode.  The
main place checked all the necessary flags, but put the necessary
parentheses for the PSL_VM and PCB_VM86CALL checks in the wrong
place.  The broken case is only reached if a vm86 bioscall uses a
%cs which is nonzero mod 4, but that is unusual -- most bios calls
start with %cs = 0xc000 or 0xf000 and rarely change it.  Another
place was missing the check for PCB_VM86CALL, but was only reachable
if there are bugs virtualizing PSL_I.

Add a macro TF_HAS_STACKREGS() and use this instead of converting
open-coded checks of SEL_UPL, etc. to TRAPF_USERMODE() when we only
care about whether the frame has stack registers.  This fixes 3
places in my recent fix for register variables in vm86 mode where I
messed up the PSL_VM check and cleans up other places.
2016-09-14 12:57:40 +00:00
Hans Petter Selasky
0eb8d46232 Improve USB polling mode by not locking any mutexes, asserting any
mutexes or using any callouts when active.

Trying to lock a mutex when KDB is active or the scheduler is stopped
can result in infinite wait loops. The same goes for calling callout
related functions which in turn lock mutexes.

If the USB controller at which a USB keyboard is connected is idle
when KDB is entered, polling the USB keyboard via USB will always
succeed. Else polling may fail depending on which state the USB
subsystem and USB interrupt handler is in. This is unavoidable unless
KDB can wait for USB interrupt threads to complete before stalling the
CPU(s).

Tested by:	Bruce Evans <bde@freebsd.org>
MFC after:	4 weeks
2016-09-14 12:07:34 +00:00
Edward Tomasz Napierala
275253770b Use proper argument order for calloc(3).
MFC after:	1 month
2016-09-14 11:20:58 +00:00
Hans Petter Selasky
8393643c27 Make the callout structure in the boot loader's kernel shim more
similar to the kernel one.

MFC after:	1 week
2016-09-14 11:16:00 +00:00
Sepherosa Ziehau
276c74b29a hyperv/hn: Fix some ifnet settings
- ifnet.if_mtu does not require explicit setting.
- ifnet.if_hdrlen must be set after ether_ifattach().

MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D7873
2016-09-14 09:17:00 +00:00
Sepherosa Ziehau
2b9577d34f hyperv/hn: Remove the FreeBSD_version check for TSO configuration
It is available on both stable/10 and stable/11. This eases future MFCs
to stable/10.

MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D7872
2016-09-14 08:59:13 +00:00
Sepherosa Ziehau
69c127b6e5 hyperv/hn: Bring in shims from stable/10
This eases future MFCs to stable/10.

MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D7871
2016-09-14 08:48:08 +00:00
Sepherosa Ziehau
8b7bba155c hyperv/hn: Use sx for the main lock.
MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D7870
2016-09-14 08:33:08 +00:00
Sepherosa Ziehau
af7799b26d hyperv/hn: Cleanup hn_ioctl.
MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D7869
2016-09-14 08:24:01 +00:00
Sepherosa Ziehau
23d0fe6357 hyperv/hn: Function renaming: hn_ifinit -> hn_init
No functional changes.

MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D7868
2016-09-14 08:08:45 +00:00
Sepherosa Ziehau
555e179833 hyperv/hn: Deprecate hn_softc_t
MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D7867
2016-09-14 08:00:30 +00:00
Sepherosa Ziehau
06100f2e8c hyperv/hn: Remove unused softc field
MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D7866
2016-09-14 06:47:25 +00:00
Sepherosa Ziehau
67e44048f0 hyperv/vmbus: Make sure that the sub-channel count is valid.
MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D7865
2016-09-14 06:30:14 +00:00
Sepherosa Ziehau
098ab4a242 hyperv/hn: Pull RSS key and indirect table setup up.
This paves the way for the dynamic RSS key and indirect table setting.

MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D7864
2016-09-14 06:15:45 +00:00
Cy Schubert
3dd30bd184 Switch from .CURDIR to the simpler, more legible SRCTOP.
Suggested by:	emaste
X-MFC-with:	upcoming amd upgrade
2016-09-14 01:47:01 +00:00
Andriy Voskoboinyk
95d9a127b2 net80211: improve error checking in ieee80211_parse_{wpa,rsn}()
- Add few checks for group/pairwise ciphers into
ieee80211_parse_{wpa,rsn}().
- Split error code and cipher value in wpa_cipher() / rsn_cipher(); current
hack with (1 << 32) does not work - it's 1, not 0 (detected by CSA).
- Return IEEE80211_REASON_UNSUPP_RSN_IE_VERSION instead of
IEEE80211_REASON_IE_INVALID when version field is not equal to RSN_VERSION.

Tested with wpi(4) / urtwn(4) (HOSTAP mode).

Reviewed by:	adrian
Differential Revision:	https://reviews.freebsd.org/D7887
2016-09-13 22:59:38 +00:00
Simon J. Gerraty
462b35ac65 Avoid clobbering existing value of META_COOKIE_TOUCH 2016-09-13 22:17:25 +00:00
Andrey V. Elsukov
70c1466dad Fix swap tables between sets when this functional is enabled.
We have 6 opcode rewriters for table opcodes. When `set swap' command
invoked, it is called for each rewriter, so at the end we get the same
result, because opcode rewriter uses ETLV type to match opcode. And all
tables opcodes have the same ETLV type. To solve this problem, use
separate sets handler for one opcode rewriter. Use it to handle TEST_ALL,
SWAP_ALL and MOVE_ALL commands.

PR:		212630
MFC after:	1 week
2016-09-13 18:16:15 +00:00
Andrew Turner
6de3c41534 Add a missing opt_ddb.h include from places that include debug_moditor.h
to fix the build.

Obtained from:	ABT Systems Ltd
X-MFC with:	r305771
Sponsored by:	The FreeBSD Foundation
2016-09-13 16:20:31 +00:00
Andrew Turner
5ed824174b Fix the arm64 kernel build when DDB is disabled, debug_monitor.c depends on
DDB, and is unused when it's disabled.

Obtained from:	ABT Systems Ltd
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2016-09-13 15:45:22 +00:00
Baptiste Daroussin
d600e95429 Add a comment on the #endif related to the guards
Reported by:	tsoome
2016-09-13 15:41:05 +00:00
Baptiste Daroussin
db3d647a40 Remove code that crept in r305125 by accident
Reported by:	tsoome
2016-09-13 15:37:23 +00:00
Andrew Turner
8b52054063 Add a warning about a known erratum we have observed on ThunderX pass 1.1.
As this is evaluation hardware with only a few users, and there is a lack
of information add a warning when booting on this hardware.

Reported by:	cognet
Obtained from:	ABT Systems Ltd
MFC after:	Instant
Sponsored by:	The FreeBSD Foundation
2016-09-13 14:10:49 +00:00
Sepherosa Ziehau
5e61a96882 hyperv/hn: Reorganize synthetic parts attach code.
MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D7860
2016-09-13 05:54:31 +00:00
Sepherosa Ziehau
ec10046102 hyperv/hn: Regroup synthetic parts attach code.
MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D7859
2016-09-13 05:41:13 +00:00
Sepherosa Ziehau
1f7866a48e hyperv/hn: Reorganize channel attach/detach code.
This paves the way for further attach/detach code reorganization.

MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D7858
2016-09-13 05:27:36 +00:00
Warren Block
bb00e5490b Add another badly-needed simple example to the pw(8) man page. 2016-09-13 02:18:29 +00:00
Andriy Voskoboinyk
04a5c73b30 net80211: fix possible panic in adhoc mode (INIT -> RUN state transition).
In case if there is already running interface, a second non-sta
interface will omit scanning, going directly to RUN state. Handle
this case for adhoc mode appropriately.

Tested with RTL8821AU, 2 vaps in IBSS mode.
2016-09-12 23:00:31 +00:00
Mariusz Zaborski
6e70b4f058 fd: add fget_cap and fget_cap_locked primitives
They can be used to obtain capabilities along with a referenced fp.

Reviewed by:	mjg@
2016-09-12 22:46:19 +00:00
Cy Schubert
8825d8e38d Fixup whitespace, repace space with a tab.
X-MFC-with:	Upcoming amd update.
2016-09-12 19:31:14 +00:00
John Baldwin
1fedfdd5c1 Remove explicit device_verbose() from the t4iov driver detach routine
now that this case is handled generically.
2016-09-12 18:07:06 +00:00
John Baldwin
71499f6a2d Make device_quiet() an attachment property.
In particular, reset the DF_QUIET flag when detaching from a device so
that a driver that marks a device quiet doesn't dictate policy for a
different driver that may claim the device in the future.

Reviewed by:	rpokala, wblock
MFC after:	2 weeks
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D7803
2016-09-12 18:06:42 +00:00
Oleksandr Tymoshenko
e0cfa1bc82 Remove semicolon from the end of the macro definition
Reported by: hans
2016-09-12 17:29:20 +00:00
Andriy Voskoboinyk
bf5e39f7a7 urtwn: fix possible driver hang when beacon miss is detected. 2016-09-12 16:46:14 +00:00
Konstantin Belousov
1a9ded46bd Fix typo in comment.
MFC after:	3 days
2016-09-12 16:44:21 +00:00
Ruslan Bukin
693b6aeede Add SMP support for MTI Malta 34kf CPU.
Sponsored by:	DARPA, AFRL
Sponsored by:	HEIF5
2016-09-12 16:38:51 +00:00
Emmanuel Vadot
d853a418ed Remove CUBIEBOARD kernel config file.
Every Allwinner board should either use ALLWINNER (SMP) or ALLWINER_UP kernel
config files.

MFC after:	2 week
2016-09-12 16:13:27 +00:00
Emmanuel Vadot
240e565c89 Use "generic" ALLWINNER_UP kernel config for Cubieboard release.
Reviewed by:	gjb
MFC after:	2 week
2016-09-12 16:10:47 +00:00
Ed Maste
04708d25e0 bspatch: remove superfluous newlines from errx strings 2016-09-12 14:28:38 +00:00
Sepherosa Ziehau
e0e273e2d4 hyperv/hn: Pull ether address and link status extraction up.
MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D7831
2016-09-12 06:12:28 +00:00
Sepherosa Ziehau
2a3a8a823c hyperv/hn: Reorganize RNDIS attach
MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D7830
2016-09-12 05:59:39 +00:00
Sepherosa Ziehau
2cd02514a1 hyperv/hn: Reorganize sub-channel allocation.
MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D7829
2016-09-12 05:37:44 +00:00
Sepherosa Ziehau
b5f59ae0e2 hyperv/hn: Function rename.
- Minor style changes.
- Nuke unnecessary indirection.
- Nuke unapplied comment.

MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D7827
2016-09-12 05:28:50 +00:00
Warner Losh
1648ac5095 Report the Silicon Revisions for the AM335x SoCs correctly. 2016-09-12 05:19:56 +00:00
Sepherosa Ziehau
0c84fbafef hyperv/hn: Rename chimney sending buffer connect/disconnect functions.
Minor cleanup and wording in error messages.

MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D7825
2016-09-12 05:18:30 +00:00
Sepherosa Ziehau
a711c28f62 hyperv/hn: Rename RXBUF connect/disconnect functions.
Minor cleanup and wording in error messages.

MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D7823
2016-09-12 05:09:45 +00:00
Adrian Chadd
b60cfea4fd [ath_hal] quieten a bit of the boot messages - this stuff has been working for a while. 2016-09-12 04:58:59 +00:00
Sepherosa Ziehau
b9f62e3a74 x86: Use sx lock for interrupt sources.
- Certain pic_assign_cpu, e.g. msi_assign_cpu can have quite a long
  call chain.  For msi_assign_cpu, mutex makes complex PCI bridge
  drivers more tricky, e.g. sleep can note be called, etc, it will
  be pretty tricky for upcoming Hyper-V PCI bridge driver for PCI
  pass-through.
- It is not used on any hot code path nor non-sleepable context, so
  sx should have the same effect as mutex.

PIC list is still protected by mutex to keep suspend/resume work.

Discussed with: jhb
Reviewed by:	jhb
MFC after:	3 weeks
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D7784
2016-09-12 04:57:58 +00:00
Adrian Chadd
5abc0b2590 [ath] set the relevant TOA/TOD locationing bits when trying to do locationing.
* Don't do RTS/CTS - experiments show that we get ACK frames for each of them
  and this ends up causing the timestamps to look all funny.
* Set the HAL_TXDESC_POS bit, so the AR9300 HAL sets up the hardware to return
  location and CSI information.
2016-09-12 04:55:13 +00:00