Commit Graph

203545 Commits

Author SHA1 Message Date
Sean Bruno
27b134f016 Remove rge driver from Broadcom XLR
nlge(4) is supposed to deprecate rge(4) for Broadcom XLR when it was
introduced 5 years ago.

rge doesn't build on -CURRENT due to MII changes. All the XLR kernel confs
use nlge. Let's get rid of the old driver for FreeBSD 11. We can use
10-STABLE or SVN to go back and look at the old driver if needed.

Differential Revision:	https://reviews.freebsd.org/D3339
Submitted by:	kevin.bowling@kev009.com
2015-09-04 19:57:28 +00:00
Sean Bruno
d751decc98 Add more BCM gigabit PHYs
Gleaned from a public header file. 5402 and 5404 look like they may be
used on embedded devices. 5478 and 5488 are switch PHYs. 5754 change is just
to note a product alias.

Differential Revision:	https://reviews.freebsd.org/D3338
Submitted by:	kevin.bowling@kev009.com
2015-09-04 17:48:19 +00:00
Sean Bruno
98ae230f07 em(4): Add Skylake/I219 support.
- driver rev 7.5.2
- use new functions em_flush* for i219 devices

Differential Revision:	https://reviews.freebsd.org/D3163
Submitted by:	erj jfv
Reviewed by:	jfv
MFC after:	1 month
Relnotes:	Yes
Sponsored by:	Intel Corporation
2015-09-04 17:21:55 +00:00
Cy Schubert
9bf168600c Turn on RAWDCF by default.
Suggested by:	ian
Approved by:	roberto
MFC after:	1 week
2015-09-04 16:59:01 +00:00
Sean Bruno
67ebffd348 e1000: Shared code updates
-    Fix compiler warning in 80003es2lan.c
-    Add return value handler for e1000_*_kmrn_reg_80003es2lan
-    Fix usage of DEBUGOUT
-    Remove unnecessary variable initializations.
-    Removed unused variables (complaints from gcc).
-    Edit defines in 82571.h.
-    Add workaround for igb hw errata.
-    Shared code changes for Skylake/I219 support.
-    Remove unused OBFF and LTR functions.

Differential Revision:	https://reviews.freebsd.org/D3162
Submitted by:	erj
MFC after:	1 month
Sponsored by:	Intel Corporation
2015-09-04 16:30:48 +00:00
Baptiste Daroussin
bfa800d311 Remove remnant from USEPRIVATELIB removal
Sponsored by:	gandi.net
2015-09-04 16:13:25 +00:00
Sean Bruno
02415af2ee igb(4): Update and fix HW errata
- HW errata workaround for IPv6 offload w/ extension headers
- Edited start of if_igb.c (Device IDs / #includes) to match ixgbe/ixl

Differential Revision:	https://reviews.freebsd.org/D3165
Submitted by:	erj
MFC after:	1 month
Sponsored by:	Intel Corporation
2015-09-04 16:07:27 +00:00
Gleb Smirnoff
24067db8ca Make tcp_mtudisc() static and void. No functional changes.
Sponsored by:	Nginx, Inc.
2015-09-04 12:02:12 +00:00
Alexander Motin
c01a5fa910 Another addition to r287455. 2015-09-04 10:16:21 +00:00
Alexander Motin
3b6077ae3d Addition to r287455. 2015-09-04 10:14:58 +00:00
Michael Tuexen
6fb9db98b3 Don't leak memory in an error case.
MFC after:	1 week
2015-09-04 09:24:07 +00:00
Michael Tuexen
59713bbf27 Add a NULL pointer check to silence the clang code analyzer.
MFC after:	1 week
2015-09-04 09:22:16 +00:00
Alexander Motin
bd236ba5c0 Remove some dead code. 2015-09-04 09:19:01 +00:00
Xin LI
072d210fa1 Fix build. 2015-09-04 08:04:12 +00:00
Xin LI
9fc5c47fa5 MFV r287451 + 287452: file 5.24 + fix for bin/181436.
PR:		181436
MFC after:	2 weeks
2015-09-04 05:56:14 +00:00
Xin LI
0e51cba5db Apply vendor changeset e64bdc5 to address FreeBSD bin/181436. 2015-09-04 05:42:08 +00:00
Xin LI
0724fbd4e8 Vendor import of file 5.24. 2015-09-04 05:32:26 +00:00
John Baldwin
9695459d02 Add more mmap tests related to character devices.
- Add cdev-related tests for bad args.
- Add two simple tests cases for mapping /dev/zero that test for
  MAP_ANON-like behavior.

Reviewed by:	alc, kib
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D3323
2015-09-04 01:02:21 +00:00
Xin LI
28ffe927c2 Expose an interface to determine if an ACE is inherited.
Submitted by:	sef
Reviewed by:	trasz
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D3540
2015-09-04 00:14:20 +00:00
Michael Tuexen
aa1cfca969 Fix a bug where two SHUTDOWN_ACK chunks were sent if a SHUTDOWN chunk was
received acking all outstanding data.
2015-09-03 22:15:56 +00:00
Conrad Meyer
14bdbaf2e4 Detect badly behaved coredump note helpers
Coredump notes depend on being able to invoke dump routines twice; once
in a dry-run mode to get the size of the note, and another to actually
emit the note to the corefile.

When a note helper emits a different length section the second time
around than the length it requested the first time, the kernel produces
a corrupt coredump.

NT_PROCSTAT_FILES output length, when packing kinfo structs, is tied to
the length of filenames corresponding to vnodes in the process' fd table
via vn_fullpath.  As vnodes may move around during dump, this is racy.

So:

 - Detect badly behaved notes in putnote() and pad underfilled notes.

 - Add a fail point, debug.fail_point.fill_kinfo_vnode__random_path to
   exercise the NT_PROCSTAT_FILES corruption.  It simply picks random
   lengths to expand or truncate paths to in fo_fill_kinfo_vnode().

 - Add a sysctl, kern.coredump_pack_fileinfo, to allow users to
   disable kinfo packing for PROCSTAT_FILES notes.  This should avoid
   both FILES note corruption and truncation, even if filenames change,
   at the cost of about 1 kiB in padding bloat per open fd.  Document
   the new sysctl in core.5.

 - Fix note_procstat_files to self-limit in the 2nd pass.  Since
   sometimes this will result in a short write, pad up to our advertised
   size.  This addresses note corruption, at the risk of sometimes
   truncating the last several fd info entries.

 - Fix NT_PROCSTAT_FILES consumers libutil and libprocstat to grok the
   zero padding.

With suggestions from:	bjk, jhb, kib, wblock
Approved by:	markj (mentor)
Relnotes:	yes
Sponsored by:	EMC / Isilon Storage Division
Differential Revision:	https://reviews.freebsd.org/D3548
2015-09-03 20:32:10 +00:00
John Baldwin
188458ea7c Currently the Linux character device mmap handling only supports mmap
operations that map a single page that has an associated vm_page_t.
This does not permit mapping larger regions (such as a PCI memory
BAR) and it does not permit mapping addresses beyond the top of RAM
(such as a 64-bit BAR located above the top of RAM).

Instead of using a single OBJT_DEVICE object and passing the physaddr via
the offset as a hack, create a new sglist and OBJT_SG object for each
mmap request. The requested memory attribute is applied to the object
thus affecting all pages mapped by the request.

Reviewed by:	hselasky, np
MFC after:	1 week
Sponsored by:	Chelsio
Differential Revision:	https://reviews.freebsd.org/D3386
2015-09-03 18:27:39 +00:00
Sean Bruno
e6aa141248 r249170 was just plain wrong. The effect of the change is to always
delete a logic volume on status change which is NOT what we want here.

The original code is correct in that when the volume changes status
the driver will only delete the volume if the status is one of the
fatal errors.  A drive failure in a mirrored volume is NOT a situtation
where the volume should dissapear.

Reported on freebsd-scsi@:
https://lists.freebsd.org/pipermail/freebsd-scsi/2015-September/006800.html

MFC after:	3 days
2015-09-03 17:46:57 +00:00
Bryan Drewery
880c41ba36 Avoid sub-shell for realpath(1) for bmake by using its built-in :tA.
MFC after:	2 weeks
Approved by:	portmgr (implicit)
2015-09-03 17:01:58 +00:00
Alexander Motin
420abfcecd Small UA cleanup. 2015-09-03 12:56:57 +00:00
Alexander Motin
8be6a2df51 Fix copy-paste bug introduced in r275458.
MFC after:	3 days
2015-09-03 12:15:14 +00:00
Edward Tomasz Napierala
23bd2dd4a4 Use proper term in the ctld(8) and iscsid(8) man pages.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-09-03 11:43:56 +00:00
Edward Tomasz Napierala
10b5297f57 Simplify the introductory example in ctl.conf(5) down to absolute
basics.  The more complicated cases - like how to use physical
ports - are explained later, in the "EXAMPLES" section.

MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-09-03 11:42:59 +00:00
Edward Tomasz Napierala
2f221c70f9 The dumpfs(8) utility doesn't actually use disktab(5); remove it
from "SEE ALSO".

MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-09-03 11:40:47 +00:00
Edward Tomasz Napierala
8e6acc531a Fix acl_strip_np(3) breakage introduced in r279962.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-09-03 11:31:34 +00:00
Edward Tomasz Napierala
b0f957f94a Fix the way acl_init(3) uses posix_memalign(3) - the latter doesn't
set errno.

MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-09-03 11:30:39 +00:00
Marcelo Araujo
aa44f2ed5e Rename YP to NIS in the manpages.
Approved by:		bapt (mentor)
Differential Revision:	D3555
2015-09-03 07:18:52 +00:00
Marcelo Araujo
d84e564f14 Sync with the latest code from OpenBSD.
Approved by:		rodrigc (mentor)
Differential Revision:	D3550
2015-09-03 07:12:40 +00:00
Marcelo Araujo
804fc8c859 Lower the compiler warning: unused-but-set-variable.
Approved by:		bapt (mentor)
Differential Revision:	D3556
2015-09-03 06:53:17 +00:00
Marcel Moolenaar
504ca52575 For UGA, the frame buffer address obtained by scanning the
PCI BARs does not necessarily correspond to the upper-left
most pixel. Scan the frame buffer for which byte changed
when changing the pixel at (0,0).

Use the same technique to determine the stride. Except for
changing the pixel at (0,0), we change the pixel at (0,1).

PR:		202730
Tested by:	hartzell (at) alerce.com
2015-09-03 04:35:17 +00:00
Devin Teske
8fdb5185b9 Fix mandoc(1) "WARNING: end of line whitespace"
MFC after:	3 days
X-MFC-to:	stable/10
2015-09-03 03:58:59 +00:00
Devin Teske
3ed46372b5 Remove non-functional examples.
MFC after:	3 days
X-MFC-to:	stable/10
2015-09-03 03:29:44 +00:00
Oleksandr Tymoshenko
1aca4f8fb4 Enable both i2c1 and i2c2. These devices are disabled in TI's DTS
so they were disabled during DTS transition. Though there are
no standard devices/drivers on them people might use iic(4) userland
interface to access these buses.
2015-09-03 02:28:18 +00:00
Justin Hibbits
2109efd169 pmap_mapdev_attr() also takes a vm_paddr_t.
This was missed in r235936.  With recent work for 36-bit paddr, this is now
needed.
2015-09-03 01:38:15 +00:00
Xin LI
65b4f27054 Don't leak 'var'.
Reported by:	clang static analyzer
2015-09-03 01:15:23 +00:00
Mateusz Guzik
7e8f566c0c fd: remove UMA_ZONE_ZINIT argument from Files zone
Originally it was added in order to prevent trashing of objects with
INVARIANTS enabled. The same effect is now provided with mere UMA_ZONE_NOFREE.

This reverts r286921.

Discussed with:		kib
2015-09-02 23:14:39 +00:00
Mateusz Guzik
19c591bfe2 Don't trash memory from UMA_ZONE_NOFREE zones.
Objects obtained from such zones are supposed to retain type stability,
which was violated by aforementioned trashing.

This is a follow-up to r284861.

Discussed with:		kib
2015-09-02 23:09:01 +00:00
Conrad Meyer
0d1a05d9e6 ioat(4): pci_save/restore_state to persist MSI-X registers over BDXDE reset
Also for BWD devices, per jimharris@.

Reviewed by:	jhb
Approved by:	markj (mentor)
Sponsored by:	EMC / Isilon Storage Division
Differential Revision:	https://reviews.freebsd.org/D3552
2015-09-02 22:48:41 +00:00
Devin Teske
61016a614e Minor code cleanups (no functional changes).
MFC after:	3 days
X-MFC-to:	stable/10
2015-09-02 21:53:48 +00:00
Jilles Tjoelker
92fe71faae sh: Allow empty << EOF markers. 2015-09-02 19:49:55 +00:00
Hiroki Sato
81dacd8beb Simplify kvm symbol resolution and error handling. The symbol table
nl_symbols will eventually be organized into several modules depending
on MK_* variables.
2015-09-02 18:51:36 +00:00
Hiroki Sato
a261e36179 Divide statistics in the number of packets with 1000 instead of 1024
in human-readable form.

PR:	183598
2015-09-02 18:42:35 +00:00
Warner Losh
3f2e5b8584 After the introduction of direct dispatch, the pacing code in g_down()
broke in two ways. One, the pacing variable was accessed in multiple
threads in an unsafe way. Two, since large numbers of I/O could come
down from the buf layer at one time, large numbers of allocation
failures could happen all at once, resulting in a huge pace value that
would limit I/Os to 10 IOPS for minutes (or even hours) at a
time. While a real solution to these problems requires substantial
work (to go to a no-allocation after the first model, or to have some
way to wait for more memory with some kind of reserve for pager and
swapper requests), it is relatively easy to make this simplistic
pacing less pathological.

Move to using a volatile variable with loads and stores. While this is
a little racy, losing the race is safe: either you get memory and
proceed, or you don't and queue. Second, sleep for 1ms (or one tick, whichever
is larger) instead of 100ms. This removes the artificial 10 IOPS limit
while still easing up on new I/Os during memory shortages. Remove
tying the amount of time we do this to the number of failed requests
and do it only as long as we keep failing requests.

Finally, to avoid needless recursion when memory is tight (start ->
g_io_deliver() -> g_io_request() -> start -> ... until we use 1/2 the
stack), don't do direct dispatch while pacing. This should be a rare
event (not steady state) so the performance hit here is worth the
extra safety of not starving g_down() with directly dispatched I/O.

Differential Review: https://reviews.freebsd.org/D3546
2015-09-02 17:29:30 +00:00
Hiroki Sato
34e38a56b0 - snprintf() returns at most size-1 of the chars printed into
the buffer.  (n == hostlen) also means the buffer length was
  too short.

- Use sdl->sdl_data only when (sdl->sdl_nlen > 0 && sdl->sdl_alen == 0)
  to prevent redundant output.
2015-09-02 16:50:49 +00:00
Conrad Meyer
4253ea5083 ioat: re-initialize interrupts after resetting hw on BDXDE
Resetting some generations of the I/OAT hardware (just BDXDE for now)
resets the corresponding MSI-X registers.  So, teardown and
re-initialize interrupts after resetting the hardware.

Reviewed by:	jimharris
Approved by:	markj (mentor)
Sponsored by:	EMC / Isilon Storage Division
Differential Revision:	https://reviews.freebsd.org/D3549
2015-09-02 16:48:03 +00:00