Commit Graph

220730 Commits

Author SHA1 Message Date
Andriy Voskoboinyk
d7de0a2c2a iwn: some initialization / RF switch state change fixes.
- Check return code from initialization path; otherwise, vap state
may be wrong after an error.
- Do not try to run iwn_stop() / iwn_init() multiple times.
- Merge iwn_radio_on/off() and move RFKILL bit check into the task.
- Try to handle possible RF switch state change in S3 state (PR 181694).

PR:		181694
Reviewed by:	adrian
Differential Revision:	https://reviews.freebsd.org/D9797
2017-02-25 00:40:50 +00:00
Enji Cooper
15f0eea574 Parameterize out the length of struct filed->f_lasttime as MAXDATELEN
This removes the hardcoded value for the field (16) and the equivalent
hardcoded lengths in logmsg(..).

This change is being done to help stage future work to add RFC5424/RFC5434
support to syslogd(8).

Obtained from:	Isilon OneFS (dcd33d13da) (as part of a larger change)
Submitted by:	John Bauman <john.bauman@isilon.com>
MFC after:	2 weeks
Sponsored by:	Dell EMC Isilon
2017-02-25 00:12:29 +00:00
Warner Losh
35a419a2cb Exit when we can't print a variable.
Exit after printing a message on stderr when we can't get a
message. This is slightly different than linux, but keeps shell
scripts from thinking the value of the variable is the error message
and so is a net win.

Sponsored by: Netflix
2017-02-25 00:09:26 +00:00
Warner Losh
589c673b32 Don't convert ENOENT to nothing for individual lookup, just for the
iterative get_next interface. This prevents efivar(3) from printing 4k
of 0's when a variable isn't set.

Sponsored by: Netflix
2017-02-25 00:09:21 +00:00
Warner Losh
d8fab838af Make nvmecontrol logpage -p help list known pages.
Make -p help and -v help list all the pages we know about.
Add -v to usage.
Update the man page.

Sponsored by: Netflix
2017-02-25 00:09:16 +00:00
Warner Losh
e71bab696f Exit with usage if argv[1] is NULL in dispatch. This fixes core dumps
when a command has subcommands, but the user doesn't give the
parameters on the command line.

Sponsored by: Netflix
2017-02-25 00:09:12 +00:00
Warner Losh
56e101b337 Fix typos in output.
Sponsored by: Netflix
2017-02-25 00:09:02 +00:00
Enji Cooper
8fe70bb8f2 Use SRCTOP instead of .CURDIR relative paths with ".."
This simplifies pathing in make/displayed output

MFC after:	1 week
Sponsored by:	Dell EMC Isilon
2017-02-24 21:35:59 +00:00
Mahdi Mokhtari
bd911530b7 Add linux_preadv() and linux_pwritev() syscalls to Linuxulator.
Reviewed by:	dchagin
Approved by:	dchagin, trasz (src committers)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D9722
2017-02-24 20:04:02 +00:00
Dmitry Chagin
8665c4d9cd Revert r314217. Commit is not match that I have approved. 2017-02-24 19:47:27 +00:00
Mahdi Mokhtari
21d23e3249 Add linux_preadv() and linux_pwritev() syscalls to Linuxulator.
Reviewed by:	dchagin
Approved by:	dchagin, trasz (src committers)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D9722
2017-02-24 19:22:17 +00:00
Jonathan T. Looney
a81ce6e9d5 We have seen several cases recently where we appear to get a double-fault:
We have an original panic. Then, instead of writing the core to the dump
device, the kernel has a second panic: "smp_targeted_tlb_shootdown:
interrupts disabled". This change is an attempt to fix that second panic.

When the other CPUs are stopped, we can't notify them of the TLB shootdown,
so we skip that operation. However, when the CPUs come back up, we
invalidate the TLB to ensure they correctly observe any changes to the
page mappings.

Reviewed by:	kib
Sponsored by:	Netflix
Differential Revision:	https://reviews.freebsd.org/D9786
2017-02-24 18:56:00 +00:00
Hans Petter Selasky
0f32531a56 Implement more string functions in the LinuxKPI.
MFC after:		1 week
Sponsored by:		Mellanox Technologies
2017-02-24 17:36:55 +00:00
Hans Petter Selasky
5a5a8c8a17 Prototype device structure to ensure LinuxKPI header file can be
included standalone.

MFC after:		1 week
Sponsored by:		Mellanox Technologies
2017-02-24 17:03:14 +00:00
Allan Jude
f91d1c83cd Remove control+r handling from geliboot's pwgets()
pwgets() is based on ngets() from libstand, which includes a feature
that is not wanted in a very of the function designed for password
handling.

Pressing control+r echos out the entered string

This commit removes that feature from pwgets()

PR:		217298
Reported by:	ehaupt
Reviewed by:	kristof, tsoome, ehaupt
Sponsored by:	ScaleEngine Inc.
Differential Revision:	https://reviews.freebsd.org/D9782
2017-02-24 16:52:57 +00:00
Ruslan Bukin
e42e2a1edc Use correct macro for Synopsys UART driver declaration. 2017-02-24 16:37:35 +00:00
Konstantin Belousov
8cd5962571 Remove cpu_deepest_sleep variable.
On Core2 and older Intel CPUs, where TSC stops in C2, system does not
allow C2 entrance if timecounter hardware is TSC.  This is done by
tc_windup() which tests for TC_FLAGS_C2STOP flag of the new
timecounter and increases cpu_disable_c2_sleep if flag is set.  Right
now init_TSC_tc() only sets the flag if cpu_deepest_sleep >= 2, but
TSC is initialized too early for this variable to be set by
acpi_cpu.c.

There is no reason to require that ACPI reported C2 and deeper states
to set TC_FLAGS_C2STOP, so remove cpu_deepest_sleep test from
init_TSC_tc() condition.  And since this is the only use of the
variable, remove it at all.

Reported and submitted by:	Jia-Shiun Li <jiashiun@gmail.com>
Suggested by:	jhb
MFC after:	2 weeks
2017-02-24 16:11:55 +00:00
Adrian Chadd
9c8efa1dfb [iwm] add if_iwm_fw.c. 2017-02-24 15:17:43 +00:00
Alexander Motin
87de303c4a Respecting r314204 tighten ATIO cleanup requirements.
Every ATIO must complete with either successfully sent status or XPT_ABORT.

MFC after:	2 weeks
2017-02-24 14:48:17 +00:00
Hans Petter Selasky
959d6165a2 Implement srcu_dereference() macro in the LinuxKPI.
MFC after:		1 week
Sponsored by:		Mellanox Technologies
2017-02-24 14:40:15 +00:00
Eric van Gyzen
f4b4cf565d Guard sem_clockwait_np() declaration with __BSD_VISIBLE
This is a POSIX header file, so keep the namespace clean.

Reported by:	kib
MFC after:	13 days
X-MFC with:	r314179
Sponsored by:	Dell EMC
2017-02-24 14:37:55 +00:00
Hans Petter Selasky
797046eebb Implement BIT_ULL() macro in the LinuxKPI.
MFC after:		1 week
Sponsored by:		Mellanox Technologies
2017-02-24 14:23:46 +00:00
Alexander Motin
d7c2cc352e Explicitly abort ATIO if CTIO sending status has failed.
This helps SIM to free related resources in questionable cases.

MFC after:	2 weeks
2017-02-24 12:12:30 +00:00
Alexander Motin
5c0b756a9a Fix missing xpt_done() for ATIO/INOT on missing LUN.
MFC after:	2 weeks
2017-02-24 12:11:17 +00:00
Alexander Motin
8d1316f914 We can't access periph after ctlfe_free_ccb().
MFC after:	2 weeks
2017-02-24 11:25:32 +00:00
Alexander Motin
a504738fac Unify ATIO/INOT CCBs requeuing.
MFC after:	2 weeks
2017-02-24 09:16:21 +00:00
Konstantin Belousov
63cdcaaead Properly handle possible underflow in vm_fault_prefault().
In vm_fault_prefault(), if backward count causes underflow in
calculation of
	starta = addra - backward * PAGE_SIZE;
then starta must be clipped to entry->start, instead of zero.
Clipping to zero allowed mapping outside of the map entries address
ranges, in particular, map at zero.

Submitted by:	Yanko Yankulov <yanko.yankulov@gmail.com>
Reviewed by:	alc
MFC after:	1 week
2017-02-24 08:09:16 +00:00
Andriy Gapon
7fa27112f3 zfs: clean up unused files and definitions
MFC after:	1 month
X-MFC after:	r314048
2017-02-24 07:53:56 +00:00
Alexander Motin
6b0878502e Some code cleanup.
MFC after:	2 weeks
2017-02-24 07:47:50 +00:00
Adrian Chadd
ad35d47138 [iwm] Add support for Firmware paging, needed for newer 8000C firmware.
* Uses the IWM_FW_PAGING_BLOCK_CMD firmware command to tell the firmware
  what memory ranges to use for paging.

Obtained from:	dragonflybsd.git 8a5b199964f8e7bdb00039f0b48817a01b402f18
2017-02-24 07:07:58 +00:00
Enji Cooper
8f7861b26f Fix up r314189
The conditional in do_buff_decode(..) after the while loop was accidentally
inverted. Only increment the pointer for fmt if it's not NUL.

MFC after:	2 weeks
X-MFC with:	r314189
Reported by:	pstef
Sponsored by:	Dell EMC Isilon
2017-02-24 06:49:31 +00:00
Enji Cooper
29d14889f5 Fix some minor style nits: put parentheses around return values
MFC after:	2 weeks
Sponsored by:	Dell EMC Isilon
2017-02-24 06:28:58 +00:00
Enji Cooper
69c703b9c4 Fix up NULL/'\0' uses and fix 2 derefs after NULL
MFC after:	2 weeks
Reported by:	Coverity
CID:		1018898, 1018899
Differential Revision:	https://reviews.freebsd.org/D6142
Sponsored by:	Dell EMC Isilon
2017-02-24 06:24:39 +00:00
Warner Losh
bbf6e5144e Cast values to (int) before comparing them to the range of the
enum. This ensures they are in range w/o the warnings.
2017-02-24 01:39:12 +00:00
Warner Losh
df1c30f6bd KDTRACE_HOOKS isn't guaranteed to be defined. Change to check to see
if it is defined or not rather than if it is non-zero.

Sponsored by: Netflix, Inc
2017-02-24 01:39:08 +00:00
Pedro F. Giffuni
ee7030f303 at91: double assignment.
Found with:	coccinelle (da.cocci)
Suggested by:	cognet
2017-02-23 23:48:44 +00:00
Mateusz Guzik
dfaa7859d6 mtx: microoptimize lockstat handling in spin mutexes and thread lock
While here make the code compilablle on kernels with LOCK_PROFILING but without
KDTRACE_HOOKS.
2017-02-23 22:46:01 +00:00
Andriy Gapon
3f6fb18e93 add jedec_ts.4 to the list of manual pages
Reported by:	rpokala
MFC after:	3 days
2017-02-23 22:08:35 +00:00
Adrian Chadd
843635d3b0 [ifconfig] handle illegal WPS frames
Some APs broadcast WPS IE frames with totally broken data.  Ifconfig's printwpsie()
loops through WPS frames printing the attributes out; if the frame's data is bad,
printwpsie() can end up looking at out-of-bounds addresses causing ifconfig to
bus error.

Thanks to Takashi Inoue at Nihon U for his efforts in debugging this.

PR:		bin/217312
Submitted by:	fbsd@opal.com
MFC after:	1 week
2017-02-23 20:49:17 +00:00
Brooks Davis
b853277efc Fix and shorten BERI kernel builds during universe.
Stop building BERI_DE4_BASE and BERI_SIM_BASE, they aren't particularly
valid as they don't have a root dev.  Do build BERI_DE4_SDROOT which
does so devices get coverage.

Remove ident from BERI_DE4_BASE for the reasons above which will cause
it to fail to build.  BERI_SIM_BASE was already this way and broke
universe.[0]

Reported by:	rpokala
Sponsored by:	DARPA, AFRL
2017-02-23 20:41:55 +00:00
Eric van Gyzen
b215ceaaec Add sem_clockwait_np()
This function allows the caller to specify the reference clock
and choose between absolute and relative mode.  In relative mode,
the remaining time can be returned.

The API is similar to clock_nanosleep(3).  Thanks to Ed Schouten
for that suggestion.

While I'm here, reduce the sleep time in the semaphore "child"
test to greatly reduce its runtime.  Also add a reasonable timeout.

Reviewed by:	ed (userland)
MFC after:	2 weeks
Relnotes:	yes
Sponsored by:	Dell EMC
Differential Revision:	https://reviews.freebsd.org/D9656
2017-02-23 19:36:38 +00:00
Navdeep Parhar
af67ca3780 Add support for RDMA from userspace with T6 cards.
Submitted by:	Krishnamraju Eraparaju @ Chelsio
Sponsored by:	Chelsio Communications
2017-02-23 19:21:47 +00:00
Navdeep Parhar
3ae36eee9c cxgbe/iw_cxgbe: Minor changes for T6.
Submitted by:	Krishnamraju Eraparaju at Chelsio
Sponsored by:	Chelsio Communications
2017-02-23 19:02:40 +00:00
Pedro F. Giffuni
46f8be3953 vxge(4): Yet another (minor) mismatch.
VXGE_DEFAULT_TTI_RTIMER_VAL and VXGE_DEFAULT_RTI_RTIMER_VAL have value
zero but nevertheless we should use the right value on each.

Pointed by:	jhb
X-MFC with:	r314145
2017-02-23 18:56:31 +00:00
Pedro F. Giffuni
d43e62ddea rt_attach(): double assignment.
Found with:	coccinelle (da.cocci)
2017-02-23 18:15:04 +00:00
Michael Tuexen
8d62aae8df TCP window updates are only sent if the window can be increased by at
least 2 * MSS. However, if the receive buffer size is small, this might
be impossible. Add back a criterion to send a TCP window update if
the window can be increased by at least half of the receive buffer size.
This condition was removed in r242252. This patch simply brings it back.
PR:			211003
Reviewed by:		gnn
MFC after:		1 week
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D9475
2017-02-23 18:14:36 +00:00
Mark Johnston
d935f34b8f Fix memory leaks in error cases in libdtrace.
Submitted by:	Tom Rix <trix@juniper.net>
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D9705
2017-02-23 17:56:24 +00:00
Mark Johnston
74d9553e43 Fix a memory leak in an error case in libctf.
Submitted by:	Tom Rix <trix@juniper.net>
MFC after:	1 week
2017-02-23 17:54:17 +00:00
Jung-uk Kim
d751009457 Remove an assembler flag, which is redundant since r309124. The upstream
took care of it by introducing a macro NO_EXEC_STACK_DIRECTIVE.

http://llvm.org/viewvc/llvm-project?rev=273500&view=rev

Reviewed by:	dim
2017-02-23 17:46:38 +00:00
Enji Cooper
6233db9fac Unbreak if_iwm.ko after r314076
Add if_iwm_7000.c/if_iwm_8000.c to SRCS to match similar additions made
to sys/conf/files after refactoring done in the commit noted.

PR:		217308
Pointyhat to:	adrian
Submitted by:	Andreas Nilsson <andrnils@gmail.com>
Reported by:	Jakob Alvermark <jakob@alvermark.net>, Juan Ramómon Molina Menor <listjm@club.fr>
Sponsored by:	Dell EMC Isilon
2017-02-23 17:44:06 +00:00