Commit Graph

32778 Commits

Author SHA1 Message Date
Warner Losh
dc58cdf95e Expand the SMART / Health Information Log Page (Page 02) printout
based on NVM Express 1.2.1 Standard.

Sponsored by: Netflix, Inc
2016-11-19 17:12:49 +00:00
Ruslan Bukin
57b28934e9 Add receiver timeout interrupt enable bit implemented in some
system on chips.

Submitted by:	kan
Sponsored by:	DARPA, AFRL
2016-11-19 16:00:05 +00:00
Andrew Turner
f74776ed75 Make fdt_is_compatible a static function. It's only used in fdt_common.c.
Sponsored by:	ABT Systems Ltd
2016-11-19 13:57:21 +00:00
Kevin Lo
0ae37b2f01 For RTL8812AU:
- The Tx power (diff) values should be signed
- Fix an off by one error when reading Tx power (diff) values

Reviewed by:	avos, adrian
Differential Revision:	https://reviews.freebsd.org/D8571
2016-11-19 07:28:00 +00:00
Stephen Hurd
5f6bf12a3d Check link status after init
Because link state change events aren't enabled until the end of init(),
the initial link up event could be missed.  Check the current media status
immediately after enabling the default completion ring interrupt.

Approved by:	sbruno
MFC after:	12 days
Sponsored by:	Broadcom Limited
2016-11-18 21:18:51 +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
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
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
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
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
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
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
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
Dexuan Cui
871c968b3a hyperv/pcib: enable PCIe pass-through (a.k.a. Discrete Device Assignment)
The feature enables us to pass through physical PCIe devices to FreeBSD VM
running on Hyper-V (Windows Server 2016) to get near-native performance with
low CPU utilization.

The patch implements a PCI bridge driver to support the feature:

1) The pcib driver talks to the host to discover device(s) and presents
the device(s) to FreeBSD's pci driver via PCI configuration space (note:
to access the configuration space, we don't use the standard I/O port
0xCF8/CFC method; instead, we use an MMIO-based method supplied by Hyper-V,
which is very similar to the 0xCF8/CFC method).

2) The pcib driver allocates resources for the device(s) and initialize
the related BARs, when the device driver's attach method is invoked;

3) The pcib driver talks to the host to create MSI/MSI-X interrupt
remapping between the guest and the host;

4) The pcib driver supports device hot add/remove.

Reviewed by:	sephe
Approved by:	sephe (mentor)
MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D8332
2016-11-16 09:25:00 +00:00
Dexuan Cui
522c192d38 hyperv/vmbus: add new vmbus methods to support PCIe pass-through
The new methods will be used by the coming pcib driver.

Reviewed by:	sephe
Approved by:	sephe (mentor)
MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D8409
2016-11-16 09:08:32 +00:00
Dexuan Cui
c8b32f717d hyperv/vmbus: add a new method to get vcpu_id
vcpu_id is host's representation of guest CPU.
We get the mapping between vcpu_id and FreeBSD kernel's cpu id when VMBus
driver is loaded. Later, when a driver, like the coming pcib driver, talks
to the host and needs to refer to a guest CPU, the driver must use the
vcpu_id.

Reviewed by:	jhb, sephe
Approved by:	sephe (mentor)
MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D8410
2016-11-16 09:02:17 +00:00
Justin Hibbits
b2f831c009 Simplify the page tracking for VA<->PA translations.
Drop the tracking down to the pmap layer, with optimizations to only track
necessary pages.  This should give a (slight) performance improvement, as well
as a stability improvement, as the tracking is already mostly handled by the
pmap layer.
2016-11-16 05:24:42 +00:00
Justin Hibbits
099a0e1bea Add a GPIO poweroff and reset driver.
Summary:
This implements part of the gpio-poweroff and gpio-restart device tree
bindings.  Optional properties are not handled currently.  It also currently
only supports level-triggered reset.

Reviewed By: gonzo
Differential Revision: https://reviews.freebsd.org/D8521
2016-11-16 02:14:07 +00:00
Michael Zhilin
2567d71370 [etherswitch] enable phy4/mac4 of ip175c
If MII1 interface is disabled, then enable phy4/mac4.

Submitted by:	Hiroki Mori <yamori813@yahoo.co.jp>
Reviewed by:	mizhka, adrian
Approved by:	adrian (mentor)
Differential Revision:	https://reviews.freebsd.org/D6832
2016-11-15 22:30:25 +00:00
Michael Zhilin
477e3eff7e [etherswitch] add RTL8366SR support
Add RTL8366SR support at etherswitch driver. Tested on RTL8366RB and
RTL8366SR.

Submitted by:	Hiroki Mori <yamori813@yahoo.co.jp>
Reviewed by:	adrian, mizhka
Approved by:	adrian(mentor)
Differential Revision:	https://reviews.freebsd.org/D6796
2016-11-15 21:58:04 +00:00
Michael Zhilin
4677ca5bf1 [etherswitch] add Marvell 88e6060 switch support
Add 88e6060 basic support: only port-based VLAN is supported.
No vlan(4) support.

Submitted by:	Hiroki Mori <yamori813@yahoo.co.jp>
Reviewed by:	mizhka, adrian
Approved by:	adrian(mentor)
Differential Revision:	https://reviews.freebsd.org/D8344
2016-11-15 21:49:01 +00:00
Stephen Hurd
d933e97f9d New driver for Broadcom NetXtreme-C and NetXtreme-E devices.
This driver uses the iflib framework supporting Broadcom
25/50Gbps devices.

Reviewed by:	gallatin, wblock
Approved by:	davidch
MFC after:	2 weeks
Relnotes:	yes
Sponsored by:	Broadcom Limited
Differential Revision:	https://reviews.freebsd.org/D7551
2016-11-15 20:35:29 +00:00
Michael Zhilin
ba3eb10d85 [BHND] correct spelling error in macro name
This commit is part of D6920 review. One of macro had wrong prefix:
 BMCA => BCMA

Reviewed by:	landonf, adrian (mentor)
Approved by:	adrian (mentor)
Differential Revision:	https://reviews.freebsd.org/D6920
2016-11-15 20:05:22 +00:00
Oleksandr Tymoshenko
97fc5dbe89 [evdev] Add evdev support to kbdmux(4) driver
To enable event sourcing from kbdmux(4) kern.evdev.rcpt_mask value
should have bit 1 set (this is default)

Submitted by:	Vladimir Kondratiev <wulf@cicgroup.ru>
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D8437
2016-11-15 04:12:19 +00:00
Sepherosa Ziehau
168fce73b5 hyperv/vss: Add driver and tools for VSS
VSS stands for "Volume Shadow Copy Service".  Unlike virtual machine
snapshot, it only takes snapshot for the virtual disks, so both
filesystem and applications have to aware of it, and cooperate the
whole VSS process.

This driver exposes two device files to the userland:

    /dev/hv_fsvss_dev

    Normally userland programs should _not_ mess with this device file.
    It is currently used by the hv_vss_daemon(8), which freezes and
    thaws the filesystem.  NOTE: currently only UFS is supported, if
    the system mounts _any_ other filesystems, the hv_vss_daemon(8)
    will veto the VSS process.

    If hv_vss_daemon(8) was disabled, then this device file must be
    opened, and proper ioctls must be issued to keep the VSS working.

    /dev/hv_appvss_dev

    Userland application can opened this device file to receive the
    VSS freeze notification, hold the VSS for a while (mainly to flush
    application data to filesystem), release the VSS process, and
    receive the VSS thaw notification i.e. applications can run again.

    The VSS will still work, even if this device file is not opened.
    However, only filesystem consistency is promised, if this device
    file is not opened or is not operated properly.

hv_vss_daemon(8) is started by devd(8) by default.  It can be disabled
by editting /etc/devd/hyperv.conf.

Submitted by:	Hongjiang Zhang <honzhan microsoft com>
Reviewed by:	kib, mckusick
MFC after:	3 weeks
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D8224
2016-11-15 02:36:12 +00:00
Andriy Voskoboinyk
800762ee73 rtwn: drop excessive includes.
Since rom_defs.h is included in rxxx_var.h there is no need to
include both of them.

Submitted by:	kevlo
2016-11-14 20:37:07 +00:00
Sean Bruno
751e35548b Update WOL support for newer em(4) devices.
Do not overwrite the contents of the WUC register, add E1000_WUC_PME_EN
to the register contents, leaving the default contents intact.

PR:		208343
Submitted by:	Kaho Toshikazu <kaho@elam.kais.kyoto-u.ac.jp>
Reviewed by:	jeffrey piper <jeffrey.e.pieper@intel.com>
Approved by:	erj@
MFC after:	2 weeks
2016-11-14 17:19:03 +00:00
Michal Meloun
aa1f683bf3 Allow DRM2 code to be built on platforms without AGP.
This patch is taken from original drm-3.8 code.

Differential Revision: https://reviews.freebsd.org/D8454
MFC after: 3 weeks
2016-11-13 13:31:23 +00:00
Justin Hibbits
3e7ddf02dc Make dpaa work with only slightly modified Linux device trees.
Linux has a slightly different device tree definition for DPAA than originally
done in the FreeBSD driver.  This changes the driver to be mostly compatible
with the Linux device tree definitions.  Currently the differences are:

bman-portals: compatible = "fsl,bman-portals" (Linux is "simple-bus")
qman-portals: compatible = "fsl,qman-portals" (Linux is "simple-bus")
fman: compatible = "fsl,fman" (Linux is "simple-bus")

The Linux device tree doesn't specify anything for rgmii in the mdio.  This
change still requires the device tree to specify the phy-handle, and doesn't yet
support tbi.
2016-11-12 20:45:03 +00:00
Gavin Atkinson
bfcd23a946 iwm: If firmware load fails during init via iwm_preinit() we bail out
before calling ieee80211_ifattach() so the taskqueue hasn't been
initialized. Don't try to drain it, we'll panic.
Looks like this issue was introduced in r303326.

Reviewed by:	avos, sbruno, adrian
Differential Revision:	https://reviews.freebsd.org/D8499
2016-11-12 18:33:56 +00:00
Andriy Voskoboinyk
a14f9888d9 rtwn: enable 11n support for RTL8188CE.
- Increase Rx buffer size from MCLBYTES to MJUMPAGESIZE.
- Provide an additional defragmentation routine for frames larger
than MCLBYTES; that is required by A-MSDU / Atheros Fast-Frames
support to work with current Tx path implementation.

Enabled features list for RTL8188CE:
- Atheros Fast-Frames;
- A-MPDU (Tx / Rx);
- A-MSDU (Tx / Rx; 4k only);
- Short Guard Interval.

Tested with:
- RTL8188CE (STA+AP) + RTL8821AU (STA).
- RTL8188CE (STA) + RTL8188CUS (AP).

Relnotes:	yes
2016-11-12 17:58:37 +00:00
Alexander Motin
1f842820e1 Set of improvements to acpi_hp(4) driver.
- Attach only to WMI devices that provide supported GUIDs.  HP Spectre x360
has two WMI devices, only one of which provides the GUIDs.
 - Pass proper device to ACPI_WMI_REMOVE_EVENT_HANDLER() on detach.
 - Improve error WMI handling separating status and data paths.  This allows
to hide sysctls not supported by specific hardware/BIOS.
 - Improve CMI block parser to make it work on HP Spectre x360 laptop.
 - In verbose mode log all unknown events to help futher improvements.
2016-11-12 05:09:39 +00:00
Jakub Wojciech Klama
f7b1d7f419 Reserve space for control message payload (currently a port name).
Approved by:	trasz (mentor)
Sponsored by:	iXsystems, Inc.
2016-11-12 01:41:43 +00:00
Justin Hibbits
5bb79eade4 Replace another fdt_is_compatible() call. 2016-11-11 21:29:48 +00:00
Conrad Meyer
3a37091931 ioat(4): Fix race between process_events and reset_hw
In the case where a hardware error is detected during
ioat_process_events, hardware may advance (by one descriptor, probably)
and a subsequent ioat_process_events may race the intended ioat_reset_hw
followup.  In that case, the second process_events would observe a
completion update that does not match the software "last_seen" status,
and attempt to successfully complete already-failed descriptors.

Guard against this race with the resetting_cleanup flag.

Reviewed by:	bdrewery, markj
Sponsored by:	Dell EMC Isilon
2016-11-11 20:09:54 +00:00
Konstantin Belousov
836055542f Increase the max allowed size of the microcode update blob for x86.
Newer CPUs (SkyLakes) have updates of 100K size, which is bigger than
current limit 32K. Increase it to 4M but leave the check around to
prevent kernel memory allocator abuse.  Some time ago, the memory for
update was allocated by contigmalloc(9), and it was reasonable to be
conservative as much as possible.  Since all uses of contigmalloc(9)
appear to be either misunderstanding or too cautious, and were
removed, provide more slack than strictly neccessary.

Submitted by:	Oliver Pinter
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D8486
2016-11-11 18:57:41 +00:00
Justin Hibbits
472df8b8bd Use ofw_bus_node_is_compatible() instead of fdt_is_compatible()
No need to have two functions that do the same thing, let's let fdt_* go away,
and use ofw_bus_* equivalents instead.

Requested by:	andrew
2016-11-11 18:10:13 +00:00
Andrew Turner
a2696bf3c0 Use ofw_bus_node_is_compatible in more drivers used on arm.
Sponsored by:	ABT Systems Ltd
2016-11-11 15:42:12 +00:00
Andriy Gapon
88cc0bb940 iicsmb: SMB_MAXBLOCKSIZE can be used again
The constant was set to the correct value in r308242.
While there, fix iicsmb_bread() to not use a value of an out parameter
'count'.

MFC after:	3 weeks
X-MFC after:	r308242
2016-11-11 15:11:54 +00:00
Andriy Gapon
678d569fc2 intpm: clean up intsmb_bread and intsmb_pcall
The hardware does not implement SMBus Process Call command, so remove
ifdef-ed out code from intsmb_pcall.  The code used exactly the same
start sequence as for Write Word command.

intsmb_bread code used to access an in value of the count parameter,
but that parameter is supposed to be an out only parameter.
For example, smb(4) does not initialize it before calling smbus_bread.

MFC after:	3 weeks
2016-11-11 15:08:12 +00:00
Andriy Gapon
f43618f59f smb: fix SMB_READB, SMB_READW, SMB_PCALL to work as documented
Previously, those ioctls were defined as 'in' only, so rdata.byte and
rdata.word were never updated in the userland.  The read data went only
to rbuf if it was provided.  Thus, consumers were forced to always use it.

Now the ioctls are marked as in-out.
Compatibility handlers are provided for old ioctls.

PR:		213481
Reported by:	Lewis Donzis <lew@perftech.com>
MFC after:	2 weeks
Relnotes:	maybe
Differential Revision: https://reviews.freebsd.org/D8430
2016-11-11 14:41:02 +00:00
Andrew Turner
c6c4276bb7 Replace OF_getprop ... fdt32_to_cpu with OF_getencprop. The latter
correctly adjusts for the endian.

MFC after:	1 week
Sponsored by:	ABT Systems Ltd
2016-11-11 14:19:12 +00:00
Andriy Gapon
593077d613 pmc_process_csw_out: ignore deleted counters
I see the fllowing panic on AMD when exiting pmcstat:

panic: [pmc,1473] pp_pmcval outside of expected range cpu=2 ri=17
pp_pmcval=fffffffffa529f5b pm_reloadcount=10000

It seems that at least on AMD a performance counter keeps counting after
overflowing.  When pmcstat exits it sets counters that it used to
PMC_STATE_DELETED and waits until their use count goes to zero.
amd_intr() wouldn't reload a counter in that state and, thus, a counter
would be allowed to overflow.  That means that the counter's value would
be allowed to go outside the expected range.

MFC after:	2 weeks
2016-11-10 11:12:45 +00:00
Alexander Motin
c925d87e2a Fix copy/paste bug in r308464.
MFC after:	1 week
2016-11-09 17:57:55 +00:00
Alexander Motin
2b064d4653 Add some device IDs found in my new laptop. 2016-11-09 08:57:59 +00:00
Hans Petter Selasky
82364f24b5 Allow higher sample rates to have more jitter than lower ones.
PR:		208791
MFC after:	3 days
2016-11-09 07:09:27 +00:00
Kevin Lo
a28ed036b6 Sort DLINK section and add USB device ID of D-Link DWA-131 rev E1. 2016-11-09 06:47:29 +00:00
Bryan Drewery
28323add09 Fix improper use of "its".
Sponsored by:	Dell EMC Isilon
2016-11-08 23:59:41 +00:00
Emmanuel Vadot
ad6d341799 Do not warn if the 'assigned-clock-parents' property does not exists.
MFC after:	2 weeks
2016-11-08 10:05:11 +00:00
Hans Petter Selasky
dd3dde9828 Range check the jitter values to avoid bogus sample rate adjustments.
The expected deviation should not be more than 1Hz per second. The USB
v2.0 specification also mandates this requirement. Refer to chapter
5.12.4.2 about feedback.

PR:		208791
MFC after:	3 days
2016-11-08 08:09:48 +00:00
Scott Long
a965389b5a Convert the Q-Pair and PRP list memory allocations to use BUSDMA. Add a
bunch of safery belts and error handling in related codepaths.

Reviewed by:	jimharris
Obtained from:	Netflix
Differential Revision:	D8453
2016-11-08 00:24:49 +00:00
Sean Bruno
525e07418c The igb driver currently requires a VF interface to have a non-zero MAC
address, but the associated PF is giving the VF an all zeros MAC address
when one is not administratively assigned. The driver should check for
this case and generate a random address, similar to how the linux igbvf
driver does.

Submitted by:	skoumjian@juniper.net (Scott Koumjian)
MFH:		2 weeks
Differential Revision:	https://reviews.freebsd.org/D8399
2016-11-07 22:24:37 +00:00
Oleksandr Tymoshenko
aabc5ce043 Refactor FDT part of gpioled driver
- Split driver in two parts: FDT and non-FDT
- Instead of reattach gpioled nodes to GPIO bus use
    gpio_pin_get_by_ofw_idx and add ofwbus and simplebus as parrent buses

Reviewed by:	loos
Differential Revision:	https://reviews.freebsd.org/D8233
2016-11-07 21:15:39 +00:00
Scott Long
e0629b31f3 Fix the fallout from r308268 (mpt driver causes endless witness warnings in
VMWare and elsewhere) with the precision of a dull, rusty butter knife.

Reported by:	tuexen
Obtained from:	Netflix
2016-11-07 17:34:19 +00:00
Hans Petter Selasky
6f4cab6cc3 Add timer to watch the RQ when we are out of mbufs.
The firmware/hardware does not generate additional completion
events unless we post new buffers. Use a timer to try to post
more buffers in case we are temporarily out of mbufs. Else
the receive schedule completely stops.

Sponsored by:	Mellanox Technologies
MFC after:	1 week
2016-11-07 11:39:45 +00:00
Hans Petter Selasky
cb02244355 Add more firmware related structures and update existing ones in the
MLX5 core module. Update the set and query diagnostics counter API.

Sponsored by:	Mellanox Technologies
MFC after:	1 week
2016-11-07 11:28:50 +00:00
Hans Petter Selasky
627ef61aab Query flow table capabilities according to the correct capability bit
for infiniband.

Sponsored by:	Mellanox Technologies
MFC after:	1 week
2016-11-07 11:26:25 +00:00
Hans Petter Selasky
adea303c2a Correct checksum fields in the "mlx5_mini_cqe8" structure. The fields
in question are currently not used.

Sponsored by:	Mellanox Technologies
MFC after:	1 week
2016-11-07 11:22:50 +00:00
Hans Petter Selasky
91951e3978 Ensure the firmware is notified of any host memory allocation
failures. Else firmware commands may time out waiting for host
memory.

Sponsored by:	Mellanox Technologies
MFC after:	1 week
2016-11-07 11:20:13 +00:00
Hans Petter Selasky
97ac390861 When a firmware command times out do not free the command structure to
avoid use after free.

Sponsored by:	Mellanox Technologies
MFC after:	1 week
2016-11-07 11:15:40 +00:00
Andriy Voskoboinyk
d067ef0f0d rtwn: add HOSTAP / IBSS mode support for RTL8188CE.
NOTE: some multi-vap configurations (e.g., STA+IBSS) are not stable;
that will be fixed later.

Tested with:
 - RTL8188CE, STA + AP mode;
 - RTL8188CE, IBSS mode;
 - RTL8188CUS, IBSS mode;
 - RTL8188EU, IBSS mode.

Relnotes:	yes
2016-11-06 23:13:13 +00:00
Andriy Voskoboinyk
77cbc47958 rtwn_pci: omit tx_done() stage if device is not running.
rtwn_usb: drain USB transfers during device shutdown; this fixes possible
panic with 'options IEEE80211_SUPPORT_SUPERG' during device detach.

Tested with RTL8188CE, STA mode.
2016-11-06 19:17:39 +00:00
Andriy Voskoboinyk
519e6c0fc2 rtwn: fix Tx ring cleanup.
Do not try to clear stale Tx descriptor entries when there are some
running vaps; just free node references - rtwn_pci_tx_done() will free
mbufs without creating holes in the Tx descriptor space.
Also, reset only 2 first entries in the beacon ring - other will not be
used anyway.

Tested with RTL8188CE, STA + STA mode.
2016-11-06 18:11:19 +00:00
Andriy Voskoboinyk
1acd7ad907 rtwn: reduce shutdown time for RTL8188CE. 2016-11-06 17:24:16 +00:00
Andriy Voskoboinyk
1318032e9a rtwn: reset watchdog timer on device shutdown. 2016-11-06 17:12:02 +00:00
Andriy Voskoboinyk
c15d869233 rtwn: fix Rx filter setup for some multi-vap configuratons.
- Correctly refresh Rx filter when AP (IBSS) vap is created after STA vap.
- Block any RCR updates during TSF correction (IBSS mode).
- Set CBSSID* bits during vap creation, not when it was started / stopped.
- Cache current state to prevent unnecessary register reads.

Tested with RTL8188CE, STA + AP mode.
2016-11-05 23:21:30 +00:00
Andriy Voskoboinyk
8361f9cd07 rtwn: pause beacon queue during scanning.
Tested with RTL8821AU, AP + AP mode.
2016-11-05 22:47:09 +00:00
Sean Bruno
b1b6afa587 r295133 attempted to deactivate TSO in the 100Mbit link case with this
adapter to work around bugs in TSO handling at this speed.

em_init_locked is called during first boot of the adapter and will
see that link_speed is unitialized, effectively turning off tso for
all cards at all speeds, which I believe was *not* the intent.

Move the handling of TSO deactivation to the link handler where we can
more effectively make the decision about what to do.  In addition,
completely purge the TSO capabilities instead of disabling just CSUM_TSO.

Thanks to jhb for explanation of the hw capabilites api.

Thanks to royger and cognet for testing the 100Mbit failure case to
ensure that their adapters do indeed still work.

MFC after:	1 week
Sponsored by:	Limelight Networks
2016-11-05 16:30:42 +00:00
Sean Bruno
4f3a4c0163 r266979 missed a call to enable capabilities of the hw leading to an
inability to enable features of the device.

PR:             213845
Submitted by:   pherman@frenchfries.net
MFC after:      1 week
2016-11-05 16:17:07 +00:00
Scott Long
694cb8b815 Record the LogInfo field when reporting the IOCStatus. Helps in
debugging errors.

Submitted by:	slm
Obtained from:	Netflix
MFC after:	3 days
2016-11-04 17:25:47 +00:00
Emmanuel Vadot
90aabaafa5 Add clk_set_assigned
assigned-clock-parents are DT properties used to configure
some default parent clocks on one node.

Reviewed by:	mmel
MFC after:	2 weeks
2016-11-04 17:04:45 +00:00
Oleksandr Tymoshenko
95a3636709 [gpio] Add GPIO driver for Intel Bay Trail SoC
Bay Trail has three banks of GPIOs exposed to userland as /dev/gpiocN,
where N is 1, 2, and 3. Pins in each bank are pre-named to match names
on boards schematics: GPIO_S0_SCnn, GPIO_S0_NCnn, and GPIO_S5_nn.

Controller supports edge-triggered and level-triggered interrupts but
current version of the driver does not have interrupts support
2016-11-04 16:24:38 +00:00
Sepherosa Ziehau
afe30aa97f hyperv/vmbus: Reset ch_dev, once the child is deleted.
So it will not be mis-used later on, e.g. in vmbus_chan_printf().

Submitted by:	dexuan
Reported by:	dexuan
MFC after:	1 week
Sponsored by:	Microsoft
2016-11-04 01:14:41 +00:00
Adrian Chadd
0cbe6805b2 [ath] add the MIMO per-chain RSSI and noise floor information.
This is a long time coming.  The general pieces have been floating around
in a local repo since circa 2012 when I dropped the net80211 support
into the tree.

This allows the per-chain RSSI and NF to show up in 'ifconfig wlanX list sta'.
I haven't yet implemented the EVM hookups so that'll show up; that'll come
later.

Thanks to Susie Hellings <susie@susie.id.au> who did the original work
on this a looong time ago for a company we both worked at.
2016-11-03 23:05:39 +00:00
Andriy Gapon
19a8946bce smbus: remove smbus_trans / SMB_TRANS
This change reverts most of r281985.

The method did not map to anything defined by SMBus protocol and could
not be implemented for SMBus controllers.

This change is obviously not backwards compatible, but I have good
reasons to believe that there have never been any users of SMB_TRANS.

Discussed with:	grembo, jhb
MFC after:	6 weeks
2016-11-03 07:40:52 +00:00
Oleksandr Tymoshenko
38ae0c59b9 [evdev] Add evdev support to atkbd(4) driver
To enable event sourcing from atkbd kern.evdev.rcpt_mask value
should have bit 3 set.

Submitted by:	Vladimir Kondratiev <wulf@cicgroup.ru>
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D8381
2016-11-03 00:56:59 +00:00
Justin Hibbits
47a4ca603b Since it's no longer accessing a powerpc-specific register, drop the #ifdef. 2016-11-02 23:44:30 +00:00
Justin Hibbits
e8f58f1fb8 Fix the build. protctl is only used on powerpc.
While here, remove the need to check the SVR SPR, as others may be compatible
with the p1022-esdhc type.
2016-11-02 23:43:18 +00:00
Conrad Meyer
ea9e23edf3 ioat(4): Read CHANSTS register for suspended/halted checks
The device doesn't accurately update the CHANCMP address with the device state
when the device is suspended or halted.  So, read the CHANSTS register to check
for those states.

We still need to read the CHANCMP address for the last completed descriptor.

Sponsored by:	Dell EMC Isilon
2016-11-02 23:18:16 +00:00
Andriy Gapon
d8aeed01eb dev/cpuctl: put debug output under CPUCTL_DEBUG rather than DEBUG
DEBUG is a well-known flag.
It doesn't imply that there is a particular interest in cpuctl.

MFC after:	1 week
2016-11-02 17:47:19 +00:00
Andriy Gapon
eb6befba30 fix typo in a comment
MFC after:	5 weeks
X-MFC with:	r308219
2016-11-02 17:12:15 +00:00
Andriy Gapon
1d061e4ef2 smbus: remove the potentially very dangerous slave probing code
MFC after:	5 weeks
2016-11-02 17:07:18 +00:00
Andriy Gapon
e3d255499a ichiic/ig4: completely disengage from smbus
MFC after:	5 weeks
2016-11-02 17:04:00 +00:00
Andriy Gapon
0112b52b61 Add support for microcode update on newer AMD CPUs (10h+)
This includes new code for parsing microcode files as well as
the kernel-side change to apply the update on all processors
at the same time.

Developed with help from Borislav Petkov, formerly bp@amd64.org.

Tested using Athlon II X2 processor on a system where BIOS does
not have the latest microcode version:
/boot/firmware/microcode_amd.bin: updating cpu /dev/cpuctl0 to revision 0x10000c7... done.

The microcode file is taken from here:
https://web.archive.org/web/20160528230514/http://www.amd64.org/microcode.html
(note that the original site seems to be down at the moment)
It can also be found here:
https://git.kernel.org/cgit/linux/kernel/git/firmware/linux-firmware.git/tree/amd-ucode

Reviewed by:	kib, stas
MFC after:	2 weeks
Relnotes:	maybe
Differential Revision: https://reviews.freebsd.org/D8384
2016-11-02 16:15:49 +00:00
Scott Long
4ab1cdc5ad Add a fallback to the device mapper logic. We've seen systems in the field
that are apparently misconfigured by the manufacturer and cause the mapping
logic to fail.  The fallback allows drive numbers to be assigned based on the
PHY number that they're attached to.  Add sysctls and tunables to overrid
this new behavior, but they should be considered only necessary for debugging.

Reviewed by:	 imp, smh
Obtained from:	Netflix
MFC after:	3 days
Sponsored by:	D8403
2016-11-02 15:13:25 +00:00
Sean Bruno
7846f73cc8 Removed unused M_TSO_LEN.
MFC after:	2 weeks
2016-11-02 14:25:30 +00:00
Sepherosa Ziehau
30c90f019f hyperv/kvp: Don't mix message status codes and function return values.
While I'm here, move message status codes to hv_utilreg.h, since they
will be used by the upcoming VSS stuffs.

Submitted by:	Hongjiang Zhang <honzhan microsoft com>
MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D8391
2016-11-02 07:18:27 +00:00
Sepherosa Ziehau
2a5a7ca81d hyperv: GC unused functions.
MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D8406
2016-11-02 05:41:23 +00:00
Oleksandr Tymoshenko
dcc414b888 [psm] Fix choosing wrong mode for synaptic device + trackpoint
With guest trackpoint present trackpoint probing switched synaptics
device to absolute mode with different protocol instead of keeping it
in relative mode.

PR:		213757
Submitted by:	Vladimir Kondratyev <wulf@cicgroup.ru>
MFC after:	1 week
2016-11-02 01:27:20 +00:00
Justin Hibbits
eecaab5275 Merge i.MX and PowerPC SDHCI drivers
Summary:
i.MX5 and PowerPC use a very similar eSDHC controller, which is also
similar to the uSDHC controller used by i.MX6.  The imx_sdhci driver works
almost completely with PowerPC, with some minor tweaks.

There is one caveat with this: reset currently does not work on PowerPC, so has
been #ifdef'd out until this can be tracked down and fixed.  If resets are done
the controller will timeout all data transactions.  Without a reset, it appears
to work just fine.

This is part 3, following up r308186 and r308187.

Test Plan:
This has been tested on a PowerPC QorIQ P1022 board.  It has not been
tested on i.MX, but no regressions are expected.

Reviewed By: imp
Differential Revision: https://reviews.freebsd.org/D8407
2016-11-02 00:57:04 +00:00
Justin Hibbits
2b96b955e9 Toggle card insert/remove interrupt enable bits on events
Some controllers (namely Freescale's eSDHC, tested) will continue to assert
the card removed or card insert interrupts even after being handled.  To work
around this, disable watching the interrupt that just occurred until the
opposite interrupt is triggered.

Linux has a similar change in its driver to address the same problem.
2016-11-02 00:54:39 +00:00
Justin Hibbits
3d9df07abf Move imx_sdhci driver over to a dev/sdhci in preparation for QorIQ support.
Freescale uses eSDHC in both i.MX (ARM) and QorIQ (PowerPC), with slight
differences.  This is part one in unifying the drivers.

Reviewed by:	imp
2016-11-02 00:51:09 +00:00
Imre Vadász
06d706238b [iwm] Set full-offload scan flag. Fixes fw panic when already associated.
* Starting a scan from wpa_supplicant or via ifconfig while associated,
  should no longer cause firmware panics or abort early.

Tested:

* AC7260, STA mode

Approved by:	adrian (mentor)
Differential Revision:	https://reviews.freebsd.org/D8412
2016-11-01 22:47:58 +00:00
Imre Vadász
6dc2f84316 [iwm] Get rid of SYNC_RESP_STRUCT and SYNC_RESP_PTR macros.
* SYNC_RESP_STRUCT and SYNC_RESP_PTR originate from the OpenBSD version of
  iwm, and they weren't serving any real purpose in the FreeBSD port.

* We just do a single bus_dmamap_sync for syncing the complete received frame,
  instead of explicitly bus_dmamap_sync-ing subranges of the frame like in
  the OpenBSD iwm code.

Approved by:	adrian (mentor)
Differential Revision:	https://reviews.freebsd.org/D7939
2016-11-01 22:38:26 +00:00
Conrad Meyer
8e269d996a ioat(4): Allocate contiguous descriptors
This allows us to make strong assertions about descriptor address
validity.  Additionally, future generations of the ioat(4) hardware will
require contiguous descriptors.

Reviewed by:	markj
Sponsored by:	Dell EMC Isilon
2016-11-01 19:18:54 +00:00
Conrad Meyer
a0992979e9 ioat(4): Simplify by removing dynamic scaling
This paves the way for a contiguous descriptor array.

A contiguous descriptor array has the benefit that we can make strong
assertions about whether an address is a valid descriptor or not.  The
other benefit is that future generations of I/OAT hardware will require
a contiguous descriptor array anyway.  The downside is that after system
boot, big chunks of contiguous memory is much harder to find.  So
dynamic scaling after boot is basically impossible.

Reviewed by:	markj
Sponsored by:	Dell EMC Isilon
2016-11-01 19:18:52 +00:00
Sepherosa Ziehau
a457fab84c hyperv/vmbus: Avoid extra header copy.
MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D8395
2016-11-01 08:30:06 +00:00
Sepherosa Ziehau
8966e5d5b3 hyperv/hn: Directly fill chimney sending buffer for small packets.
MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D8394
2016-11-01 08:20:33 +00:00
Sepherosa Ziehau
edd3f31541 hyperv/hn: Move TSO packet fixup to an earlier place for if_transmit.
While TSO packet header may be still cache-hot.

MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D8393
2016-11-01 07:41:26 +00:00
Hans Petter Selasky
d03403c4b1 Make sure the virtual T-axis buttons generate button release event(s)
for continuous tilting.

PR:		213957
MFC after:	3 days
2016-11-01 07:15:39 +00:00
Sepherosa Ziehau
23bf9e1527 hyperv/hn: Regroup if_start related functions.
And put them under HN_IFSTART_SUPPORT, which is by default on until
we whack the if_start related bits from base system.

MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D8392
2016-11-01 07:10:43 +00:00
Sepherosa Ziehau
15516c776e hyperv/hn: Rename cleaned up file.
MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D8390
2016-11-01 06:54:25 +00:00
Sepherosa Ziehau
ba015837bf hyperv/hn: Cosmetic cleanup; no functional changes.
MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D8389
2016-11-01 04:44:11 +00:00
Li-Wen Hsu
d9fea9f287 - Fix make in sys/modules/bhnd
Reviewed by:	landonf, imp
Differential Revision:	https://reviews.freebsd.org/D8385
2016-11-01 03:49:31 +00:00
Conrad Meyer
8532d381a9 Add BUF_TRACKING and FULL_BUF_TRACKING buffer debugging
Upstream the BUF_TRACKING and FULL_BUF_TRACKING buffer debugging code.
This can be handy in tracking down what code touched hung bios and bufs
last. The full history is especially useful, but adds enough bloat that
it shouldn't be enabled in release builds.

Function names (or arbitrary string constants) are tracked in a
fixed-size ring in bufs. Bios gain a pointer to the upper buf for
tracking. SCSI CCBs gain a pointer to the upper bio for tracking.

Reviewed by:	markj
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D8366
2016-10-31 23:09:52 +00:00
Hans Petter Selasky
e2efc9becb Make sure the virtual T-axis buttons gets cleared for USB mice which has
less than 6 buttons.

PR:		213919
MFC after:	3 days
2016-10-31 18:38:50 +00:00
Roger Pau Monné
78eb32933b xen: add a grant-table user-space device
A grant-table user-space device will allow user-space applications to map
and share grants (Xen way to share memory) among Xen domains. This grant
table user-space device has been tested with the QEMU Qdisk Xen backed.

Submitted by:		jaggi
Reviewed by:		royger
Differential review:	https://reviews.freebsd.org/D7293
2016-10-31 13:12:58 +00:00
Roger Pau Monné
b2fd6999db xen/netfront: fix statistics
Fix the statistics used by netfront.

Reported by:    Trond.Endrestol@ximalas.info
Submitted by:   ae
Reviewed by:    royger, Wei Liu <wei.liu2@citrix.com>
MFC after:	4 weeks
PR:		213439
2016-10-31 11:31:11 +00:00
Kevin Lo
a24d62b533 Add preliminary support for the RTL8153.
Reviewed by:	hselasky
2016-10-31 05:58:11 +00:00
Sepherosa Ziehau
427e366e43 hyperv/hn: Don't start shared TX taskq, if the hypervisor is not Hyper-V.
- Move the SYSINIT to DRIVER/SECOND, i.e. after the vm_guest becomes
  determistic.
- Minor style changes.

MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D8370
2016-10-31 05:22:00 +00:00
Sepherosa Ziehau
82d71ca917 hyperv/hn: Reset do_lro, if the hash types are not TCP related.
Mainly because the host side only set TCPCS and IPCS even for
UDP datagrams.

MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D8369
2016-10-31 05:05:12 +00:00
Sepherosa Ziehau
7ccc20da6a hyperv/hn: Cleanup RXBUF ack processing.
- Increase the # of retries.
- Add comment.
- Log error, if RXBUF ack fails.
- Add stat for RXBUF ack failures.

RXBUF ack really should _not_ fail...

MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D8368
2016-10-31 04:54:15 +00:00
Sepherosa Ziehau
8ff20a73f6 hyperv/hn: Rework temporary channel packet buffer expanding.
And use large default temporary channel packer buffer; we really
don't want it to be expanded at run time.

MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D8367
2016-10-31 04:46:02 +00:00
Sepherosa Ziehau
e6ed06f904 hyperv/hn: Rename cleaned up RNDIS source file.
MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D8361
2016-10-31 01:36:28 +00:00
Andriy Gapon
448897d366 add iic interface to ig4 driver, move isl and cyapa to iicbus
Summary:
The hardware does not expose a classic SMBus interface.
Instead it has a lower level interface that can express a far richer
I2C protocol than what smbus offers.  However, the interface does not
provide a way to explicitly generate the I2C stop and start conditions.
It's only possible to request that the stop condition is generated
after transferring the next byte in either direction.  So, at least
one data byte must always be transferred.
Thus, some I2C sequences are impossible to generate, e.g., an equivalent
of smbus quick command (<start>-<slave addr>-<r/w bit>-<stop>).

At the same time isl(4) and cyapa(4) are moved to iicbus and now they use
iicbus_transfer for communication.  Previously they used smbus_trans()
interface that is not defined by the SMBus protocol and was implemented
only by ig4(4).  In fact, that interface was impossible to implement
for the typical SMBus controllers like intpm(4) or ichsmb(4) where
a type of the SMBus command must be programmed.

The plan is to remove smbus_trans() and all its uses.
As an aside, the smbus_trans() method deviates from the standard,
but perhaps backwards, FreeBSD convention of using 8-bit slave
addresses (shifted by 1 bit to the left).  The method expects
7-bit addresses.

There is a user facing consequence of this change.
A user must now provide device hints for isl and cyapa that specify an iicbus to use
and a slave address on it.
On Chromebook hardware where isl and cyapa devices are commonly found
it is also possible to use a new chromebook_platform(4) driver that
automatically configures isl and cyapa devices.  There is no need to
provide the device hints in that case,

Right now smbus(4) driver tries to discover all slaves on the bus.
That is very dangerous.  Fortunately, the probing code uses smbus_trans()
to do its job, so it is really enabled for ig4 only.
The plan is to remove that auto-probing code and smbus_trans().

Tested by:	grembo, Matthias Apitz <guru@unixarea.de> (w/o
		chromebook_platform)
Discussed with:	grembo, imp
Reviewed by:	wblock (docs)
MFC after:	1 month
Relnotes:	yes
Differential Revision: https://reviews.freebsd.org/D8172
2016-10-30 12:15:33 +00:00
Andriy Gapon
3c1f73b18d hwpmc: fix a race between amd_stop_pmc and amd_intr
It is possible that wrmsr in amd_stop_pmc() causes an overflow in a counter
that it disables.  In that case a non-maskable interrupt is generated.  The
interrupt handler code was written in such a way that it would re-enable the
counter.  That would lead to an unexpected interrupt later on.

This problem was easy to reproduce with
$ pmcstat -T -P instructions -t $pid
if the target process is sufficiently busy and there are context switches from
time to time.  There would be a lot of interrupts to "race" with amd_stop_pmc()
called during the context switches.  The problem affected only AMD processors.

While there, trace whether amd_intr() claimed an interrupt.

Reviewed by:	jhb
MFC after:	2 weeks
2016-10-30 09:38:10 +00:00
Conrad Meyer
0d0f264099 ioat(4): Use memory completion rather than device register
The CHANSTS register is a split 64-bit register on CBDMA units before
hardware v3.3.  If a torn read happens during ioat_process_events(),
software cannot know when to stop completing descriptors correctly.

So, just use the device-pushed main memory channel status instead.

Remove the ioat_get_active() seatbelt as well.  It does nothing if the
completion address is valid.

Sponsored by:	Dell EMC Isilon
2016-10-28 23:53:37 +00:00
Conrad Meyer
76305bb865 ioat(4): Add failpoint for delay() in ioat_release
Sponsored by:	Dell EMC Isilon
2016-10-28 23:53:36 +00:00
Conrad Meyer
5a8af401ae ioat(4): Assert the submit lock in ioat_submit_single
Sponsored by:	Dell EMC Isilon
2016-10-28 23:53:35 +00:00
Conrad Meyer
05e4cffbb0 ioat(4): Add additional tracing
These probes help track down driver bugs.

Sponsored by:	Dell EMC Isilon
2016-10-28 23:53:33 +00:00
Navdeep Parhar
041e5aed63 cxgbe(4): Accurate statistics for all chip settings.
There are 4 independent knobs in T5+ chips to include or exclude PAUSE
frames from the "total frames" and "multicast frames" counters in either
direction.  This change lets the driver deal with any combination of
these settings.
2016-10-28 23:01:11 +00:00
Warner Losh
aee4341421 Remove a PCI ID for a raid controller from Adaptec that was planned,
but never released. Since no real hardware was released with this ID,
just drop it from the aacraid driver. This paves the path for future
drivers for hardware that actually has this ID.

Submitted by: Scott Benesh from Microsemi.
Differential Revision: https://reviews.freebsd.org/D8377
MFC After: 3 days
2016-10-28 20:23:38 +00:00
Sean Bruno
c371f1143c The buffer address is always overwritten in the extended descriptor format,
we have to refresh it ... always.  This fixes problems reported in NetMap
with em(4) devices after conversion to extended descriptor format in
svn r293331.

Submitted by:	luigi@
Reported by:	franco@opnsense.org
MFC after:	2 days
2016-10-28 13:37:58 +00:00
Hans Petter Selasky
b133b47342 Fix indentation and remove duplicate queue stopped stats increment.
Found by:	Ryan Stone <rysto32@gmail.com>
Sponsored by:	Mellanox Technologies
MFC after:	1 week
2016-10-28 12:36:59 +00:00
Sepherosa Ziehau
fb448904d9 hyeprv/hn: Rename cleaned up RNDIS header file.
MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D8360
2016-10-28 08:53:18 +00:00
Sepherosa Ziehau
ec60eff9ab hyperv/hn: Change header guardian; in preparation for the upcoming rename.
MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D8359
2016-10-28 08:41:30 +00:00
Sepherosa Ziehau
d568f3ecfa hyperv/hn: Cleanup RNDIS related files.
MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D8358
2016-10-28 08:32:54 +00:00
Sepherosa Ziehau
8ef7124558 hyperv/hn: Pull data path code up.
MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D8357
2016-10-28 08:18:49 +00:00
Sepherosa Ziehau
91938ebba8 hyperv/hn: Reorganize RX path; mainly pull non-control code path up
MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D8356
2016-10-28 08:08:46 +00:00
Sepherosa Ziehau
96a98cbf14 hyperv/hn: Nuke unnecessary indirection.
MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D8355
2016-10-28 07:59:02 +00:00
Sepherosa Ziehau
68468712a7 hyperv/hn: Rename cleaned up NVS source file.
MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D8354
2016-10-28 07:48:17 +00:00
Sepherosa Ziehau
e61005fedc hyperv/hn: Rename cleaned up NVS header file.
MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D8353
2016-10-28 05:56:23 +00:00
Sepherosa Ziehau
0cf2aff4fa hyperv/hn: Change header guardian; in preparation for the upcoming rename.
MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D8352
2016-10-28 05:31:34 +00:00
Luigi Rizzo
844a6f0c53 Various fixes for ptnet/ptnetmap (passthrough of netmap ports). In detail:
- use PCI_VENDOR and PCI_DEVICE ids from a publicly allocated range
  (thanks to RedHat)
- export memory pool information through PCI registers
- improve mechanism for configuring passthrough on different hypervisors
Code is from Vincenzo Maffione as a follow up to his GSOC work.
2016-10-27 09:46:22 +00:00
Sepherosa Ziehau
2ae974568d hyperv/hn: NVS inclusion cleanup and forward declare functions.
MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D8347
2016-10-27 05:33:48 +00:00
Sepherosa Ziehau
e3946ae44a hyperv/hn: Move send context to NVS domain.
Since all sends are encapsulated in NVS messages.

MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D8346
2016-10-27 05:26:04 +00:00
Sepherosa Ziehau
19b2340a76 hyperv/hn: Move hn_softc to if_hnvar.h
While I'm here, use consistent macro names.

MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D8345
2016-10-27 05:13:00 +00:00
Sepherosa Ziehau
d6e37dc70f hyperv/hn: Shuffle chimney sending buffer alloc/free around.
This paves way for more chimney sending buffer reorganization.

MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D8343
2016-10-27 05:04:54 +00:00
Sepherosa Ziehau
14a31e99d7 hyperv/hn: Define empty packet filter.
MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D8342
2016-10-27 04:55:19 +00:00
Sepherosa Ziehau
5341cc1c91 hyperv/hn: Move %b format string for capabilities near their definition.
MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D8341
2016-10-27 04:42:39 +00:00
Sepherosa Ziehau
90321eb752 hyperv/hn: Nuke unnecessary M_NETVSC
MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D8340
2016-10-27 04:28:01 +00:00
Sepherosa Ziehau
20b3dcf039 hyperv/hn: Properly configure RSS according to RSS capabilities
MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D8338
2016-10-27 03:43:27 +00:00
Kevin Lo
3d8102824b Disable CLKREQ for ASPM since re(4) doesn't implement link level power saving.
Reviewed by:  yongari
2016-10-27 02:20:13 +00:00
Andrew Turner
0c5434ae58 Pull the common FDT interrupt values into a new header rather than be magic
numbers.

Sponsored by:	DARPA, AFRL
2016-10-26 15:18:08 +00:00
Andrew Turner
1fb2428f1c Stop including a possibly GPLd header from the GPIO code. Add the only
needed macro to ofw_gpiobus.c.

Reported by:	emaste
Sponsored by:	DARPA, AFRL
2016-10-26 12:41:44 +00:00