Commit Graph

112231 Commits

Author SHA1 Message Date
Cy Schubert
e13c1ef1e7 Add Logitech Unifying receiver.
MFC after:	1 week
2016-08-06 20:27:12 +00:00
Stephen J. Kiernan
a183d81dc9 Add hw.fdt sysctl node.
Make FDT blob available via opaque hw.fdt.dtb sysctl, if a DTB has been
installed by the time sysctls are registered.

Reviewed by:	andrew
Approved by:	sjg (mentor)
Sponsored by:	Juniper Networks, Inc.
Differential Revision:	https://reviews.freebsd.org/D7411
2016-08-06 18:48:47 +00:00
Pedro F. Giffuni
25efc7c822 ext2fs: Add defines for some missing ext4 feature flags.
These are currently unused in our implementation and some even appear to
have not been implemented yet on linux but it is good to keep them for
reference.

Obtained from:	NetBSD (CVS Rev. 1.41)
MFC after:	1 month
2016-08-06 17:24:35 +00:00
Pedro F. Giffuni
ef4736fea8 ext2fs: Add some more inode flags.
These are currently unused in out implementation but it is good to keep
them for reference.

Obtained from:	NetBSD (CVS Rev. 1.35)
MFC after:	1 month
2016-08-06 16:48:40 +00:00
Michael Tuexen
cf46cace5c Don't modify a structure without holding a reference count on it.
MFC after:	3 days
2016-08-06 15:29:46 +00:00
Justin Hibbits
161c415133 Two fixups for dtrace
* Use the right incantation to get the next stack pointer.  Since powerpc uses
  special frames for traps, dereferencing the stack pointer straight up won't
  get us the next stack pointer in every case.
* Clear EE using the correct instruction sequence.  The PowerISA states that
  'andi.' ANDs the register with 0||<imm>, instead of sign extending or filling
  out the unavailable bits with 1.  Even if it did sign extend, PSL_EE is
  0x8000, so ~PSL_EE is 0x7fff, and the upper bits would be cleared.  Use rlwinm
  in the 32-bit case, and a two-rotate sequence in the 64-bit case, the latter
  chosen to follow the output generated by gcc.

MFC after:	1 week
2016-08-06 15:06:19 +00:00
Michael Tuexen
bfe7e9328c Mark an unused parameter as such.
MFC after:	3 days
2016-08-06 12:51:07 +00:00
Michael Tuexen
d1ea5fa9c2 Fix various bugs in relation to the I-DATA chunk support
This is joint work with rrs.

MFC after:	3 days
2016-08-06 12:33:15 +00:00
Andriy Gapon
4fb51b52ef fix .zfs-related cases in zfs_lookup that were broken by r303763
The problem is that the special .zfs nodes are not represented by
znodes but by special gfs-based nodes.
r303763 changed interface of zfs_dirlook such that started operating on
znodes rather than on vnodes and, thus, the function became unsuitable
for handling .zfs entities.
The solution is to move the handling of the special cases to zfs_lookup,
the only consumer of zfs_dirlook.
I already had this solution applied in D7421, but for different reasons.

Reported by:	asomers
MFC after:	3 days
X-MFC with:	r303763
2016-08-06 11:02:07 +00:00
Eric van Gyzen
a1566487db Fix some logic in PCIe HotPlug; display EI status
The interpretation of the Electromechanical Interlock Status was
inverted, so we disengaged the EI if a card was inserted.
Fix it to engage the EI if a card is inserted.

When displaying the slot capabilites/status with pciconf:

- We inverted the sense of the Power Controller Control bit,
  saying the power was off when it was really on (according to
  this bit).  Fix that.

- Display the status of the Electromechanical Interlock:
        EI(engaged)
        EI(disengaged)

Reviewed by:	jhb
MFC after:	3 days
Sponsored by:	Dell Inc.
Differential Revision:	https://reviews.freebsd.org/D7426
2016-08-05 23:23:48 +00:00
Mark Johnston
f1c1f188f7 mthca: Add a wrapper for the firmware's DIAG_RPRT command.
MFC after:	1 week
Sponsored by:	EMC / Isilon Storage Division
2016-08-05 21:34:09 +00:00
Adrian Chadd
921d7118e1 [ar934x] add tap/tun as modules, for people who wish to use VPNs. 2016-08-05 17:17:36 +00:00
Adrian Chadd
ab9df3af7f [arge] add some extra MDIO debugging support
* add an ANY debug level which will always echo the message if debugging
  is compiled in;
* log MDIO transaction timeouts if debugging is compiled in;
* the argemdio device is different to arge, so turning on MDIO debugging
  flags in arge->sc_debug doesn't help.  Add a debug sysctl to argemdio
  as well so that MDIO transactions can be debugged.

Tested:

* AR9331
2016-08-05 17:16:35 +00:00
Alan Cox
f0edf3f806 Correct a spelling error. 2016-08-05 16:44:11 +00:00
Roger Pau Monné
3c9d594089 xen-netfront: improve the logic when handling nic features from ioctl
Simplify the logic involved in changing the nic features on the fly, and
only reset the frontend when really needed (when changing RX features). Also
don't return from the ioctl until the interface has been properly
reconfigured.

While there, make sure XN_CSUM_FEATURES is used consistently.

Reported by:	julian
MFC after:	5 days
X-MFC-with:	r303488
Sponsored by:	Citrix Systems R&D
2016-08-05 15:48:56 +00:00
Edward Tomasz Napierala
37e56c6efe Remove lockmgr_waiters(9) and BUF_LOCKWAITERS(9); they were not used
for anything.

Reviewed by:	kib@
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D7420
2016-08-05 13:53:28 +00:00
Sepherosa Ziehau
b9ec6f0b02 tcp/lro: If timestamps mismatch or it's a FIN, force flush.
This keeps the segments/ACK/FIN delivery order.

Before this patch, it was observed: if A sent FIN immediately after
an ACK, B would deliver FIN first to the TCP stack, then the ACK.
This out-of-order delivery causes one unnecessary ACK sent from B.

Reviewed by:	gallatin, hps
Obtained from:  rrs, gallatin
Sponsored by:	Netflix (rrs, gallatin), Microsoft (sephe)
Differential Revision:	https://reviews.freebsd.org/D7415
2016-08-05 09:08:00 +00:00
Hans Petter Selasky
f87a304c8b Keep a reference count on USB keyboard polling to allow recursive
cngrab() during a panic for example, similar to what the AT-keyboard
driver is doing.

Found by:	Bruce Evans <brde@optusnet.com.au>
MFC after:	1 week
2016-08-05 08:58:00 +00:00
Sepherosa Ziehau
6fd14eb940 hyperv/vmbus: Only make sure the TX bufring will not be closed.
KVP can write data, whose size is > 1/2 TX bufring size.

MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D7414
2016-08-05 08:57:51 +00:00
Andriy Gapon
f79bc17233 zfs: honour and make use of vfs vnode locking protocol
ZFS POSIX Layer is originally written for Solaris VFS which is very
different from FreeBSD VFS.  Most importantly many things that FreeBSD VFS
manages on behalf of all filesystems are implemented in ZPL in a different
way.
Thus, ZPL contains code that is redundant on FreeBSD or duplicates VFS
functionality or, in the worst cases, badly interacts / interferes
with VFS.

The most prominent problem is a deadlock caused by the lock order reversal
of vnode locks that may happen with concurrent zfs_rename() and lookup().
The deadlock is a result of zfs_rename() not observing the vnode locking
contract expected by VFS.

This commit removes all ZPL internal locking that protects parent-child
relationships of filesystem nodes.  These relationships are protected
by vnode locks and the code is changed to take advantage of that fact
and to properly interact with VFS.

Removal of the internal locking allowed all ZPL dmu_tx_assign calls to
use TXG_WAIT mode.

Another victim, disputable perhaps, is ZFS support for filesystems with
mixed case sensitivity.  That support is not provided by the OS anyway,
so in ZFS it was a buch of dead code.

To do:
- replace ZFS_ENTER mechanism with VFS managed / visible mechanism
- replace zfs_zget with zfs_vget[f] as much as possible
- get rid of not really useful now zfs_freebsd_* adapters
- more cleanups of unneeded / unused code
- fix / replace .zfs support

PR:		209158
Reported by:	many
Tested by:	many (thank you all!)
MFC after:	5 days
Sponsored by:	HybridCluster / ClusterHQ
Differential Revision: https://reviews.freebsd.org/D6533
2016-08-05 06:23:06 +00:00
Conrad Meyer
520f6023de ioat(4): Log channel number in CTR events 2016-08-05 02:56:31 +00:00
Bryan Drewery
c1fa440409 Regenerate after r303755.
MFC after:	3 days
X-MFC-With:	r303755
Sponsored by:	EMC / Isilon Storage Division
2016-08-04 19:15:51 +00:00
Bryan Drewery
417d5dec39 Still provide freebsd10_* symbols from libc for COMPAT10.
r296773 was done to only remove libc symbols for <7.  We want to provide
the syscall symbols going forward for 7+.

Discussed with:	jhb
MFC after:	3 days
Sponsored by:	EMC / Isilon Storage Division
2016-08-04 19:14:18 +00:00
John Baldwin
f454e7ebf5 Add __printflike() to bus_describe_intr() to enable -Wformat checks.
Fix a few places that were passing a raw string as the format to use
a "%s" format string instead.

MFC after:	2 months
2016-08-04 18:29:16 +00:00
John Baldwin
ad1d96ca7a Don't permit mappings of invalid physical addresses on amd64 via /dev/mem.
Discussed with:	kib
2016-08-04 17:55:23 +00:00
Adrian Chadd
c94dc8089f [etherswitch] add in an initial API for controlling per-port LED behaviour.
This is just implemented for the AR8327 for now.

Submitted by:	Dan Nelson <dnelson_1901@yahoo.com>
2016-08-04 17:45:35 +00:00
Navdeep Parhar
9217931fb4 cxgbe/t4_tom: The page pod arena allocates from pod address space and
not index space.  The minimum valid allocation out of this arena is the
size of a single page pod.

Sponsored by:	Chelsio Communications
2016-08-04 17:29:42 +00:00
Alan Cox
248fe642a7 Clean up the comments and code style in and around vm_pageout_cluster().
In particular, fix factual, grammatical, and spelling errors in various
comments, and remove comments that are out of place in this function.

Reviewed by:	kib, markj
MFC after:	3 weeks
Sponsored by:	EMC / Isilon Storage Division
Differential Revision:	https://reviews.freebsd.org/D7410
2016-08-04 16:20:12 +00:00
Andrew Turner
b0316526b0 Remove the pvh_global_lock lock from the arm64 pmap. It is unneeded on arm64
as invalidation will have completed before the pmap_invalidate_* functions
have complete.

Discussed with:	alc, kib
Obtained from:	ABT Systems Ltd
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2016-08-04 13:49:36 +00:00
Edward Tomasz Napierala
7b255097eb Remove unused - never actually implemented - vnode lock types
from vnode_if.src.

MFC after:	1 month
2016-08-04 13:45:18 +00:00
Andriy Gapon
eec75f198b report sector size and number of sectors in lsdev output for bios disks
MFC after:	3 weeks
2016-08-04 06:40:51 +00:00
Sepherosa Ziehau
8d17f17043 hyperv/storvsc: Claim SPC-3 conformance, thus enable UNMAP support
The Hyper-V on pre-win10 systems will only report SPC-2 conformance,
but it actually conforms to SPC-3.  The INQUIRY response is adjusted
to propagate the SPC-3 version information to CAM.

Submitted by:	Hongjiang Zhang <honzhan microsoft com>
MFC after:	3 days
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D7405
2016-08-04 05:05:35 +00:00
Adrian Chadd
864ce9933d Add in tap/tun for openvpn-on-mips experiments.
(FWIW, it does work.)
2016-08-04 01:49:18 +00:00
Adrian Chadd
da21d39781 [ar934x] shuffle AR93XX_BASE -> std.AR934X 2016-08-03 19:23:22 +00:00
Adrian Chadd
aa4a430d2c [ar9330] ok, fine, I'll finally undo the 2011-era mistake of _BASE config files.
Repeated prodding by: imp
2016-08-03 19:18:53 +00:00
Adrian Chadd
cc98d789a8 [ar9330] add in module support for ipfw nat.
This actually does work, and works pretty well.
2016-08-03 19:13:09 +00:00
Bryan Drewery
78be18ae6e Correct some comments.
Sponsored by:	EMC / Isilon Storage Division
MFC after:	3 days
2016-08-03 18:48:56 +00:00
Emmanuel Vadot
80ab358ee4 We need aw_nmi to be attached which needs GIC so attach a bit later.
Also the GPIOC doesn't need to be attach early

Reviewed by:	andrew
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D7082
2016-08-03 18:45:56 +00:00
Oleksandr Tymoshenko
161f7406ad Fix EHCI driver by excluding first 512K from available memory
On Zynq 256K-512K memory region is not accessible by all bus masters.
EHCI driver fails when trying to use it for DMA transfers. Patching
memory node does not help because ubldr overrides values there with
the ones obtained from u-boot. So as a workaround we just mark first
512K as reserved.

PR:		211484
Submitted by:	Thomas Skibo <thoma555-bsd@yahoo.com>
MFC after:	3 days
2016-08-03 18:03:14 +00:00
Mark Johnston
15f6139cc2 Fix a few cosmetic issues in boot1.efi.
- Use ANSI function signatures.
- Remove unneeded checks for a NULL boot module.
- Use nitems().

MFC after:	1 week
Sponsored by:	EMC / Isilon Storage Division
2016-08-03 17:17:01 +00:00
John Baldwin
847bfa8eb7 Use the port device name for the iov device for Chelsio T4/T5 cards.
Chelsio T4/T5 adapters are multifunction cards.  The main driver uses
physical function 4 (PF4).  However, VF devices for SR-IOV are only
supported on physical functions 0 through 3, where PF0 creates VFs tied
to port 0, etc.  The t4iov/t5iov driver was previously added to
create VF devices for ports that are present on each adapter.  This
change uses the recently added pci_iov_attach_name() function to
name the character device in /dev/iov after the associated port on
the card (e.g. /dev/iov/cxl0 is used to create VFs that share the
cxl0 port).  With this in place, mark the t4iov/t5iov devices quiet
to prevent them from cluttering dmesg.

Reviewed by:	rstone
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D7402
2016-08-03 17:11:08 +00:00
John Baldwin
0aee83cc1d Permit the name of the /dev/iov entry to be set by the driver.
The PCI_IOV option creates character devices in /dev/iov for each PF
device driver that registers support for creating VFs.  By default the
character device is named after the PF device (e.g. /dev/iov/foo0).
This change adds a variant of pci_iov_attach() called pci_iov_attach_name()
that allows the name of the /dev/iov entry to be specified by the
driver.

Reviewed by:	rstone
MFC after:	1 month
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D7400
2016-08-03 17:09:12 +00:00
John Baldwin
1f095f7051 Apply the fix from r232612 to fixed function counters.
Reviewed by:	emaste
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D7397
2016-08-03 16:52:00 +00:00
Konstantin Belousov
ad600ac8e3 Remove ncl_printf(), use printf(9) directly. After r303710 the
function duplicates printf().

Correct function names in the messages [*].

Noted by:	bde [*]
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2016-08-03 15:58:20 +00:00
John Baldwin
2de70600fa Correct assertion on vcpuid argument to vm_gpa_hold().
PR:		208168
Submitted by:	Dave Cameron <daverabbitz@ihug.co.nz>
Reviewed by:	grehan
MFC after:	1 month
2016-08-03 15:20:10 +00:00
Konstantin Belousov
fa03524a9f Merge i386 and amd64 variants of mp_watchdog.c into x86/, there is no
difference between files.
For pc98, put x86/mp_x86.c into the same place as used by i386 file list.
Fix typo in comment.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2016-08-03 13:51:53 +00:00
Konstantin Belousov
83d7cf21ea Remove unneeded (recursing) Giant acquisition around vprintf(9).
Reviewed by:	rmacklem
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2016-08-03 11:49:17 +00:00
Mateusz Guzik
0453ade508 locks: fix sx compilation on mips after r303643
The kernel.h header is required for the SYSINIT macro, which apparently
was present on amd64 by accident.

Reported by:	kib
2016-08-03 09:15:10 +00:00
Konstantin Belousov
29ffb32ccd Remove Giant asserts. Update comment.
Owning Giant in the init/uninit is accidental due to the moment where
VFS modules initialization is performed, and is not enforced by the
VFS interface.  The Giant lock does not prevent a parallel execution
of the code, it is VFS which implements the proper protocol.

Approved by:	des (pseudofs maintainer)
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2016-08-03 08:57:15 +00:00
Konstantin Belousov
6828ba639a Some style changes. Fix a typo in comment.
Approved by:	des (pseudofs maintainer)
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2016-08-03 08:53:29 +00:00