Commit Graph

217510 Commits

Author SHA1 Message Date
Dexuan Cui
df4d99a5f4 fix share/man/man4/Makefile for hv_ata_pci_disengage.4
We need to remove the line since we removed the related manual just now.

Reviewed by:	sephe
Approved by:	sephe (mentor)
MFC after:	1 week
Sponsored by:	Microsoft
2016-11-18 08:15:45 +00:00
Dexuan Cui
f02f0281e7 remove the hv_ata_pci_disengage(4) manual
A few months ago, we removed the driver, which was not necessary any longer.

Reviewed by:	sephe
Approved by:	sephe (mentor)
MFC after:	1 week
Sponsored by:	Microsoft
2016-11-18 07:36:00 +00:00
Dexuan Cui
439b66c000 update the hv_vmbus(4) manual by adding a dependency on pci
We enhanced the vmbus driver to support PCIe pass-through recently.

Reviewed by:	sephe
Approved by:	sephe (mentor)
MFC after:	1 week
Sponsored by:	Microsoft
2016-11-18 07:27:41 +00:00
Dexuan Cui
8c582c7c58 hyperv/pcib: change the file name: pcib.c -> vmbus_pcib.c
This makes the file name and the variable naming in the file consistent.

Reviewed by:	sephe
Approved by:	sephe (mentor)
MFC after:	1 week
Sponsored by:	Microsoft
2016-11-18 06:44:18 +00:00
Dexuan Cui
50182f1312 hyperv/vmbus,pcib: Add MODULE_DEPEND on pci
We'd better add this dependency explicitly, though usually the pci
driver is built into the kernel by default.

Reviewed by:	sephe
Approved by:	sephe (mentor)
MFC after:	1 week
Sponsored by:	Microsoft
2016-11-18 06:24:22 +00:00
Dexuan Cui
531582f5a9 hyperv/pcib: Fix the build for some kernel configs
Add the dependency on pci explicitly for the pcib and vmbus drivers.
The related Makefiles are updated accordingly too.

Reviewed by:	sephe
Approved by:	sephe (mentor)
MFC after:	1 week
Sponsored by:	Microsoft
2016-11-18 05:33:01 +00:00
Sean Bruno
da69b8f9d1 iflib updates and fixes:
-    reset gen on down
-    initialize admin task statically
-    drain mp_ring on down
-    don't drop context lock on stop
-    reset error stats on down
-    fix typo in min_latency sysctl
-    return ENOBUFS from if_transmit if the driver isn't running or the link is down

Submitted by:	mmacy@nextbsd.org
Reviewed by:	shurd
MFC after:	2 days
Sponsored by:	Isilon and Limelight Networks
Differential Revision:	https://reviews.freebsd.org/D8558
2016-11-18 04:19:21 +00:00
Mark Johnston
188011dbf2 Support fetching RFLAGS in fasttrap_getreg().
MFC after:	1 week
2016-11-18 03:11:11 +00:00
Ryan Stone
86112ec5ae Add a dtrace script for collecting schedgraph data 2016-11-18 02:29:09 +00:00
Gleb Smirnoff
5e680acd76 If FreeBSD source tree is a subproject of a bigger project, then .git or
.hg may reside above FreeBSD sources root.  Provide function findvcs()
that will climb up and seek for presence of a VCS directory.

Reviewed by:	imp (earlier version of the patch)
2016-11-18 00:13:30 +00:00
Bryan Drewery
9952941dd9 Cleanup some leftovers from '-s' removal in r302792.
MFC after:	2 weeks
Sponsored by:	Dell EMC Isilon
2016-11-17 23:16:56 +00:00
Stephen Hurd
00c468348f Add missing newline in error mesage
Approved by:	davidch
MFC after:	13 days
Sponsored by:	Broadcom Corporation
2016-11-17 23:05:34 +00:00
Jilles Tjoelker
bddbe3b2b1 rc.subr: Swap checks so we only fork sysctl if *_oomprotect is set. 2016-11-17 22:49:51 +00:00
Imre Vadász
260b8f08e6 [net80211] Don't check bgscanidle setting in net80211 for full-offload scan.
If full-offload scan is used, the NIC driver (or rather the firmware of
the NIC) should take care of interrupting and continuing the background
scan. So net80211 should ignore the vap->iv_bgscanidle setting then, instead
the NIC driver might look at this setting and pass it on to the firmware
in some way if possible.

Since full-offload scans won't be explicitly interrupted by net80211, it
also doesn't really make sense to check the vap->iv_bgscanidle condition
in that case, before starting a background scan. If the NIC driver
advertises background scan support and full-offload scanning, the firmware
should be able to execute that scan without interfering too much with our
data traffic.

Reviewed by:	adrian, avos
Approved by:	adrian (mentor)
Differential Revision:	https://reviews.freebsd.org/D8539
2016-11-17 21:52:00 +00:00
Gleb Smirnoff
00b5ffde8e Add flag SF_USER_READAHEAD to sendfile(2). When specified, the syscall won't
do any speculations about readahead, and use exactly the amount of readahead
specified by user.  E.g. setting SF_FLAGS(0, SF_USER_READAHEAD) will guarantee
that no readahead at all will be performed.
2016-11-17 21:36:18 +00:00
Gleb Smirnoff
5dba303d01 Use bogus_page to properly reduce number of I/Os in sendfile(2). The new
sendfile_swapin() loop works this way:

- Find first invalid page in the request.
- Do vm_pager_has_page() and get count of pages, that can be taken in
  single I/O.
- Trim valid pages from the end of the request.
- Cycle through the request and substitute to bogus_page all valid
  pages that are in the middle of the request.
- After I/O launched (pager copies array of pages into buf(9), it
  is important to restore proper page pointers with help vm_page_lookup().

Count bogus pages used and report them in sendfile stats.
2016-11-17 21:02:55 +00:00
Alexander Motin
14b5719f6a After some ZIL changes 6 years ago zil_slog_limit got partially broken
due to zl_itx_list_sz not updated when async itx'es upgraded to sync.
Actually because of other changes about that time zl_itx_list_sz is not
really required to implement the functionality, so this patch removes
some unneeded broken code and variables.

Original idea of zil_slog_limit was to reduce chance of SLOG abuse by
single heavy logger, that increased latency for other (more latency critical)
loggers, by pushing heavy log out into the main pool instead of SLOG. Beside
huge latency increase for heavy writers, this implementation caused double
write of all data, since the log records were explicitly prepared for SLOG.
Since we now have I/O scheduler, I've found it can be much more efficient
to reduce priority of heavy logger SLOG writes from ZIO_PRIORITY_SYNC_WRITE
to ZIO_PRIORITY_ASYNC_WRITE, while still leave them on SLOG.

Existing ZIL implementation had problem with space efficiency when it
has to write large chunks of data into log blocks of limited size. In some
cases efficiency stopped to almost as low as 50%. In case of ZIL stored on
spinning rust, that also reduced log write speed in half, since head had to
uselessly fly over allocated but not written areas. This change improves
the situation by offloading problematic operations from z*_log_write() to
zil_lwb_commit(), which knows real situation of log blocks allocation and
can split large requests into pieces much more efficiently. Also as side
effect it removes one of two data copy operations done by ZIL code WR_COPIED
case.

While there, untangle and unify code of z*_log_write() functions.
Also zfs_log_write() alike to zvol_log_write() can now handle writes crossing
block boundary, that may also improve efficiency if ZPL is made to do that.

Sponsored by:	iXsystems, Inc.
2016-11-17 21:01:27 +00:00
Alexander Motin
eb9bfc257d Revert r307392: I've found a way to avoid big allocations completely. 2016-11-17 20:44:51 +00:00
Alan Somers
2edc027cf0 Fix "camcontrol rescan" with SATA drives behind a SAS controller
A bug in CAM's serial number hash logic resulted in SATA drives behind a SAS
controller getting removed and readded anytime the drive was rescanned for
any reason.

PR:		212914
Submitted by:	kadesai
Reported by:	kadesai
Reviewed by:	asomers, ken
MFC after:	4 weeks
Sponsored by:	Spectra Logic Corp
2016-11-17 20:42:56 +00:00
Glen Barber
240e239505 Pass SWAPSIZE in env(1) when invoking mk-vmimage.sh for the
vm-image target, missed in r308737.

Sponsored by:	The FreeBSD Foundation
2016-11-17 20:34:08 +00:00
Gleb Smirnoff
e48b82bd83 - If caller specifies readbehind and readahead that together with count
doesn't fit into a buf, then trim readbehind and readahead evenly.  If
  rbehind was limited by the previous BMAP, then roundup its trim to
  block size.
- Add KASSERT to check that b_blkno has proper offset from original
  blkno returned by BMAP. [1]
- Add KASSERT to check that pages in buf are consecutive.

Reviewed by:	kib
Submitted by:	kib [1]
2016-11-17 20:32:32 +00:00
Imre Vadász
b22fe30db1 [iwm] Sync iwm_nvm_read_chunk() function with Linux iwlwifi.
This fixes an error handling detail in iwm_nvm_read_chunk(), where an
error response from the firmware for an NVM read shouldn't be fatal if
the offset was non-zero.

Approved by:	adrian (mentor)
Obtained from:	DragonFlyBSD git 250a1c33fca1725121fe499f9cebc90267d209f9
Differential Revision:	https://reviews.freebsd.org/D8542
2016-11-17 20:00:20 +00:00
Toomas Soome
0e75a50173 loader: zfs toplevel vdev must have spa set.
The salt based checksum mechanisms, such as skein, are storing the seed
in spa structure, and need to access the spa to use the seed. The current
mechanism for quick access to correct spa is via pointer provided by
vdev structure, but unfortunately the current code does set spa only
for the leaf vdev. This patch will fix the issue by making sure the
loader zfs reader will set spa also for top-level vdevs.

PR:		214375
Reported by:	lstewart
Reviewed by:	allanjude, imp
Approved by:	allanjude (mentor), imp (mentor)
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D8487
2016-11-17 19:38:30 +00:00
Luiz Otavio O Souza
08f58fe456 Zero etherswitch_vlangroup structure before doing partial assignments.
MFC after:	3 days
Sponsored by:	Rubicon Communications, LLC (Netgate)
2016-11-17 19:02:25 +00:00
Toomas Soome
00dbeb59ad loader: beri_sdcard_disk_print() needs to return int.
The https://reviews.freebsd.org/rS308434 did change the return type for
dv_print callbacks, but the return type for beri_sdcard_disk_print()
was left unchanged, causing compile errors.

Reported by:	cy
Reviewed by:	brooks, rstone, allanjude
Approved by:	allanjude (mentor)
Differential Revision:	https://reviews.freebsd.org/D8515
2016-11-17 18:38:35 +00:00
Mark Johnston
e20727061f Define dependencies for some auto-generated source files in libdtrace.
Remove an unneeded beforedepend rule.

Reported by:	emaste, jhb
Reviewed by:	bdrewery
MFC after:	1 week
2016-11-17 18:13:42 +00:00
Ed Maste
f513dfd44b crunchide: report explicit error for combined string table
Some tools produce objects with a combined strtab and shstrtab.
These objects are not supported by crunchide since it rewrites the
symtab and strtab to "hide" symbols. This invalidates section header
offsets into a combined strtab/shstrtab.

In the future we could support these objects (by ensuring that we retain
unmodified section name strings in the output .strtab, and then rewriting
each section header's sh_name).

MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2016-11-17 18:12:17 +00:00
Ruslan Bukin
6e18247a3d Fix build when no INET and INET6 in kernel config.
Submitted by:	kan
Sponsored by:	DARPA, AFRL
2016-11-17 16:13:30 +00:00
Ruslan Bukin
5515b0cb39 Do not reallocate driver softc for uart unnecessarily.
Do not assume that all uart drivers use uart_softc structure as is.
Some do a sensible thing and do declare their uart class and driver
properly and arrive into uart_bus_attach with suitably sized softc.

Submitted by:	kan
Sponsored by:	DARPA, AFRL
2016-11-17 16:06:53 +00:00
Ruslan Bukin
8e621af540 Make gpiobus early driver at BUS_PAS_BUS.
The gpiobus driver is attached explicitly and generally should be
at the same pass as its parent. Making it use BUS_PAS_BUS ensures
that it attaches immediately after parent adds it (assuming the
parent itself attached at BUS_PAS_BUS and above).

Submitted by:	kan
Sponsored by:	DARPA, AFRL
2016-11-17 15:37:44 +00:00
Tony Finch
3997df0cde More robust handling of whois referrals from RIRs.
An example problem case is 163.1.0.0 (University of Oxford)
which is in an APNIC ERX address range. Previously we assumed
that ARIN has the correct information for all ERX allocations,
but in this case ARIN refers back to APNIC, rather than referring
to RIPE. This caused whois to loop.

Whois will no longer loop back and forth forever between two RIRs
that don't have an answer, but instead try the other RIRs in turn.
2016-11-17 15:19:06 +00:00
Ruslan Bukin
ead1785e1e Declare dwc_otg_detach as non-static (same as dwc_otg_attach),
so it can be called from fdt-glue drivers.

Submitted by:	kan
Sponsored by:	DARPA, AFRL
2016-11-17 15:12:03 +00:00
Ruslan Bukin
cec8009ca1 Allow operation with UTMI+ phy.
Submitted by:	kan
Sponsored by:	DARPA, AFRL
2016-11-17 15:08:30 +00:00
Ruslan Bukin
a8d6954281 Remove outdated comment.
Pointed out by:	andrew (original author)
Sponsored by:	DARPA, AFRL
2016-11-17 14:43:13 +00:00
Ruslan Bukin
b192bae67e Add support for UART found in the Ingenic XBurst system on chips.
These CPUs has non-standard UART enable bit hidden in the UART FIFO
Control Register.

Sponsored by:	DARPA, AFRL
2016-11-17 14:41:22 +00:00
Bjoern A. Zeeb
310dc5a403 Writing out the L2TP control packet requires 12 bytes of
contiguous memory but in one path we did not always guarantee this,
thus do a m_pullup() there.

PR:			214385
Submitted by:		Joe Jones (joeknockando googlemail.com)
MFC after:		3 days
2016-11-17 14:03:44 +00:00
Ruslan Bukin
f3b37a1f47 Add driver for DM9000 Ethernet MAC Controller.
This device found in the Ingenic jz4780 SoC.

Submitted by:	kan
Sponsored by:	DARPA, AFRL
2016-11-17 11:48:07 +00:00
Ruslan Bukin
72180f17a7 Import Ingenic CI20 (jz4780) DTS files.
Submitted by:	kan
Sponsored by:	DARPA, AFRL
2016-11-17 11:31:13 +00:00
Michael Tuexen
6779a1a101 Notify the use via setting errno when a TCP RST segment is received
either in the CLOSING or LAST-ACK state.

Reviewed by:		hiren
MFC after:		3 weeks
Sponsored by:		Netflix
Differential Revision:	https://reviews.freebsd.org/D8371
2016-11-17 08:15:02 +00:00
Michael Zhilin
c702a80e27 [etherswitch] add infineon adm6996fc support on etherswitch
This is Infineon ADM6996FC/M/MX driver code on etherswitch framework.
Support PORT and DOT1Q VLAN.
This code suppose ADM6996FC SDC/SDIO connect to SOC network interface
MDC/MDIO.
This code tested on Netgear WGR614Cv7.

Submitted by:	Hiroki Mori <yamori813@yahoo.co.jp>
Reviewed by:	adrian, mizhka
Approved by:	adrian(mentor)
Differential Revision:	https://reviews.freebsd.org/D8495
2016-11-17 07:33:37 +00:00
Sepherosa Ziehau
f4dc47c87b hyperv/vss: Install the userland daemon to /usr/sbin instead of /
Submitted by:	markj
Reported by:	markj
MFC after:	3 weeks
Sponsored by:	Microsoft
2016-11-17 03:02:35 +00:00
Sepherosa Ziehau
bedddda00f hyperv/vss: Nuke unused variables.
Submitted by:	markj
Reported by:	markj
MFC after:	3 weeks
Sponsored by:	Microsoft
2016-11-17 03:00:56 +00:00
Bryan Drewery
fb9b2ab190 Fix grammar nit 2016-11-17 00:21:55 +00:00
Glen Barber
ea18fc2f0c Pass SWAPSIZE in env(1) when invoking mk-vmimage.sh, otherwise
mkimg(1) does not create the second partition after r307008.

Sponsored by:	The FreeBSD Foundation
2016-11-16 18:08:50 +00:00
Warner Losh
1ad69dcca9 Allow installworld to be skipped as well as installkernel with -W.
Allow -B to mean -K -W.

There are times when fixing non-base elementes of the build that you
don't want to wait to get a completely clean world install. This
allows that at the cost of a little danger.

Submitted by: gallatin@
Sponsored by: Netflix, Inc
2016-11-16 17:11:05 +00:00
Warner Losh
29481b994e Start to move the old interface into a legacy file. 2016-11-16 16:49:21 +00:00
Ed Maste
69712279cc crunchide: remove obsolete a.out header and comment
crunchide(1) gained ELF support in r39172, and lost the unused a.out
and non-functional ECOFF suport in r281655.

Sponsored by:	The FreeBSD Foundation
2016-11-16 16:39:51 +00:00
Konstantin Belousov
41ddec83c1 Move the fast fault path into the separate function.
Reviewed by:	alc
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2016-11-16 16:34:17 +00:00
Ruslan Bukin
7804dd5212 Add full softfloat and hardfloat support for RISC-V.
Hardfloat is now default (use riscv64sf as TARGET_ARCH
for softfloat).

Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D8529
2016-11-16 15:21:32 +00:00
Hans Petter Selasky
33299e3d96 Make sure MAC address is reprogrammed when if_init() callback is
invoked. Else promiscious mode must be used to pass traffic. While at
it fix a debug print macro.

MFC after:	1 week
2016-11-16 14:39:03 +00:00