Commit Graph

110654 Commits

Author SHA1 Message Date
Andrew Rybchenko
8a53d16bd7 sfxge(4): remove unimplemented EFX PHY methods
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
2016-05-14 06:06:48 +00:00
Andrew Rybchenko
2d9312f664 sfxge(4): import TLV layout from firmwaresrc
Submitted by:   Laurence Evans <levans at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
2016-05-14 06:05:45 +00:00
Andrew Rybchenko
7a3e390b24 sfxge(4): remove obsolete EFSYS_OPT_PHY_PROPS option and APIs
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
2016-05-14 06:04:29 +00:00
Andrew Rybchenko
d31404ab6f sfxge(4): remove PHY property method stubs
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
2016-05-14 06:03:18 +00:00
Andrew Rybchenko
16e5d7bfd0 sfxge(4): move ef10 definitions to ef10_impl.h
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
2016-05-14 06:02:00 +00:00
Andrew Rybchenko
d5bd0d6b06 sfxge(4): prepare for moving EF10 definitions to ef10_impl.h
Move legacy privilege masks near to their only user.
Move Huntington definitions to the top of hunt_impl.h to prepare
for moving the remaining EF10 definitions to ef10_impl.h.

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D6343
2016-05-14 06:00:00 +00:00
Andrew Rybchenko
f7aa4b3d07 sfxge(4): rename falconsiena_filter types
Falcon support has been removed, so this code only supports Siena.

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D6342
2016-05-14 05:59:18 +00:00
Oleksandr Tymoshenko
bebd526933 Use OF_prop_free instead of direct call to free(9)
Reviewed by:	mmel@
2016-05-14 05:00:17 +00:00
Oleksandr Tymoshenko
f4eefe43b2 Use OF_prop_free instead of direct call to free(9)
Reviewed by:	mmel@
2016-05-14 04:59:36 +00:00
Oleksandr Tymoshenko
39a997283f Use OF_prop_free instead of direct call to free(9)
Approved by:	jmcneill
2016-05-13 22:28:02 +00:00
Oleksandr Tymoshenko
bb307f247a Use OF_prop_free instead of direct call to free(9) 2016-05-13 22:05:16 +00:00
Mark Johnston
ce59ff90af Fix a bug in r298340: "sim" was referenced after being unset. 2016-05-13 20:54:54 +00:00
Alan Cox
d3ffaee8e6 Eliminate an unused #include. For a brief period of time, _unrhdr.h was
used to implement PCID support on amd64.

Reviewed by:	kib
2016-05-13 20:14:41 +00:00
Ed Maste
4de3a46c66 Use awk to run bhnd's awk script, to allow noexec src dir
PR:		209435
Submitted by:	Landon Fuller <landonf@landonf.org>
Differential Revision:	https://reviews.freebsd.org/D6312
2016-05-13 18:56:56 +00:00
Alexander Motin
d2a2ccbc65 Fix FCP_CMD LENGTH mask in ATIO7 IOCB.
This caused "long IU length (16384) ignored" errors following by others.

MFC after:	2 weeks
2016-05-13 18:55:03 +00:00
Ed Maste
89f0b8c618 Remove sh accidentally added to dependency lines in r299684
Submitted by:	Landon Fuller <landonf@landonf.org>
2016-05-13 18:54:48 +00:00
Adrian Chadd
c390729786 [bwn] add N-PHY related register defintions.
* Add the siba bus phy/mac/bandwidth clock definitions (TGSLOW*)
* Add the PHY-N register gateway (BWN_PHY_N())
* Add the PHY-N TX phystat1 register - we need to actually fill out
  more of the PHY encoding information when we assemble a frame.
* Various ancillary stuff

Nothing uses this yet, but I do have CCK/OFDM somewhat working
in 2GHz mode on a PHY-N device.

Obtained from:	b43 (definitions)
2016-05-13 18:41:36 +00:00
Emmanuel Vadot
0aa4b81381 Add support for Allwinner H3 SoC.
For now clocks, GPIO, Pinmux, UART, MMC, EHCI is supported.
Tested on OrangePi-One

Reviewed by:	jmcneill
Approved by:	cognet (mentor)
Differential Revision:	https://reviews.freebsd.org/D6311
2016-05-13 18:20:54 +00:00
Navdeep Parhar
96807c23ce cxgbe(4): Update T5 and T4 firmwares to 1.15.37.0.
These firmwares were obtained from the "Chelsio T5/T4 Unified Wire
v2.12.0.3 for Linux" release.  Changes since 1.14.4.0 (which is the
firmware in -STABLE branches) are in the "Release Notes" accompanying
the Unified Wire release and are copy-pasted here as well.

22.1. T5 Firmware
+++++++++++++++++++++++++++++++++

Version : 1.15.37.0
Date    : 04/27/2016
================================================================================

FIXES
-----

BASE:
 - Fixed an issue in FW_RSS_VI_CONFIG_CMD handling where the default ingress
   queue was ignored.
 - Fixed an issue where adapter failed to load fw by adjusting DRAM frequency.
 - Fixed an issue in watchdog which was causing VM bring-up failure after reboot.
 - Fixed 40G link failures with some switches when auto-negotiation enabled.
 - Fixed to improve on link bring-up time.
 - Per port buffer groups size doubled to improve performance.
 - Fixed an issue where bogus d3hot bits were set causing traffic stall.
 - Fixed an issue where sometimes adapter was not seen after reboot.
 - Fixed an issue where iWARP was crashing in conjunction with traffic management.
 - Fixed an issue where link failed to come up after removing twinax cable and
   inserting optical module.

ETH
 - Fixed a link flap issue on T580-CR.

OFLD
 - Fixed a potential iSCSI data corruption issue by disabling RxFragEn flag.

FOiSCSI
 - Fixed an issue in recovery path where connection was getting closed before
   recovery processing was done.
 - Fixed an issue in TCP port reuse.
 - Fixed an issue in recovery path when large number (>64) of iSCSI connections
   were in use.
 - Returned ENETUNREACH if IP was not been provisioned yet and driver tried to
   use given inerface.
 - Fixed an issue where fw was sending ENETUNREACH event for normal tcp
   disconnection.

DCBX
 - Fixed an issue where iscsi tlv is sent incorrectly to host. (DCBX CEE)
 - Fixed an issue where apply bit set for APP id was affecting the ETS and PFC
  settings.(DCBX IEEE)
 - Fixed an issue where app priority values are not handled correctly in fw.
  (DCBX IEEE)
 - Fixed an issue where enable/disable dcbx can cause crash. (DCBX CEE,DCBX IEEE)

FOFCoE
 - Removed BB6 support.

ENHANCEMENTS
------------

BASE:
 - Added new interface to program DCA settings in SGE contexts; allow 32-byte
   IQE size
 - Added PTP interface fw_ptp_ts to support PTP Frequeny and Offset adjustment.
 - Added MPS raw interface.

ETH:
 - New mailbox command FW_DCB_IEEE_CMD api added for IEEE dcbx.

OFLD:
 - WR opcode is returned to host in cqe error response.

22.2. T4 Firmware
+++++++++++++++++

Version : 1.15.37.0
Date    : 04/27/2016
================================================================================

FIXES
-----

BASE:
 - Fixed an issue in FW_RSS_VI_CONFIG_CMD handling where default ingress queue
   was ignored.
 - Fixed an issue in watchdog which was causing VM bring-up failure after reboot.
 - Per port buffer groups size doubled to improve performance.
 - Fixed an issue where iWARP was crashing in conjunction with traffic management.

FOiSCSI:
 - Fixed an issue in recovery path where connection was getting closed before
   recovery processing was done.
 - Fixed an issue in TCP port reuse.
 - Fixed an issue in recovery path when large number (>64) of iSCSI connections
   were in use.
 - Returned ENETUNREACH if IP had not been provisioned yet and driver tried to
   use given inerface.

DCBX
 - Fixed an issue where iscsi tlv is sent incorrectly to host.(DCBX CEE)
 - Fixed an issue where enable/disable dcbx can cause crash in firmware.(DCBX CEE)

FOiSCSI
 - Fixes an issue where fw was sending ENETUNREACH event for normal tcp
   disconnection.

FOFCoE
 - Removed BB6 support.

ENHANCEMENTS
------------

BASE:
 - Added MPS raw interface.

ETH:
 - New mailbox command FW_DCB_IEEE_CMD api added for IEEE dcbx.
================================================================================

Obtained from:	Chelsio Communications
MFC after:	6 weeks
Relnotes:	yes
Sponsored by:	Chelsio Communications
2016-05-13 17:38:59 +00:00
Dimitry Andric
16fba18fc0 After r299241, which added bhnd(4), use sh to run the shell scripts for
generating nvram maps, to allow a noexec-mounted source directory.

Reported by:	Johan Hendriks <joh.hendriks@gmail.com>
PR:		209435
2016-05-13 16:35:37 +00:00
Andrew Turner
5db4448f06 Add support to the arm64 busdma to handle the cache. For now this is
disabled, however when we enable it it will default to assume memory is
not cache-coherent, unless either the tag was created or the parent was
marked as cache-coherent.

Obtained from:	ABT Systems Ltd
Relnotes:	yes
Sponsored by:	The FreeBSD Foundation
2016-05-13 16:03:50 +00:00
Bjoern A. Zeeb
587fe827b3 hunt_ev.c was deleted with r299596. Remove it from the files list to
(hopefully) unbreak amd64 LINT kernels.

MFC after:	1 week
2016-05-13 15:32:16 +00:00
Bjoern A. Zeeb
d68b7cfac5 Remove the extra _RD as _RDTUN already includes it.
Submitted by:	emaste
MFC after:	2 weeks
2016-05-13 15:29:40 +00:00
Andrew Turner
f3ad8ea007 Add DMA sync operations around accessing the dwmmc descriptor ring. Even
with it maps as cache-coherent we still need to call bus_dmamap_sync.

Obtained from:	ABT Systems Ltd
Sponsored by:	The FreeBSD Foundation
2016-05-13 15:15:54 +00:00
Bjoern A. Zeeb
2474dccf1a We already turn the AMD erratum383 workaround on for certain VM_GUEST_VM
if specific CPU features are not present.
Some simulation environments, e.g. gem5, have been found to require more
TLB management from the kernel in certain setups. It is currently unclear why.
Turning on the workaround_erratum383 seems to help and make problems (panics)
go away.
Given this is a fairly uncommon environment so far, allowing the workaround
to be manually enabled from loader in order to make debugging and comparing
traces easier, but also to allow gem5 run FreeBSD in X86 timing mode, seems
to be the least intrusive option for now until the issue if fully understood.

Sponsored by:	DARPA/AFRL
Reviewed by:	kib, alc (earlier)
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D6206
2016-05-13 15:11:17 +00:00
Hans Petter Selasky
fdddd267d7 Handle case of class being set, but not parent when calling
device_register() in the LinuxKPI.

Obtained from:	kmacy @
MFC after:	1 week
Sponsored by:	Mellanox Technologies
2016-05-13 13:01:02 +00:00
Hans Petter Selasky
83d5d45ea2 Add more PAGE related defines to the LinuxKPI. Move the definition of
"pgprot_t" to "linux/page.h" similar to what Linux does.

Obtained from:	kmacy @
MFC after:	1 week
Sponsored by:	Mellanox Technologies
2016-05-13 12:41:21 +00:00
Kashyap D Desai
ac624ec089 Version update patch.
Submitted by:   Sumit Saxena <sumit.saxena@broadcom.com>
Reviewed by:    Kashyap Desai <Kashyap.Desai@broadcom.com>
MFC after:  3 days
Sponsored by:   AVAGO Technologies
2016-05-13 12:24:39 +00:00
Kashyap D Desai
4bb0a4f048 Following bugs fixed as part of this patch:
.Kernel panic while collecting kdump (reported by Doug A.)
.NULL pointer dereference at sertain places
.Removed dead codes

Submitted by:   Sumit Saxena <sumit.saxena@broadcom.com>
Reviewed by:    Kashyap Desai <Kashyap.Desai@broadcom.com>
MFC after:  3 days
Sponsored by:   AVAGO Technologies
2016-05-13 12:21:50 +00:00
Kashyap D Desai
c620f351de Added supprot for Avago Intruder controller.
Submitted by:   Sumit Saxena <sumit.saxena@broadcom.com>
Reviewed by:    Kashyap Desai <Kashyap.Desai@broadcom.com>
MFC after:  3 days
Sponsored by:   AVAGO Technologies
2016-05-13 12:18:12 +00:00
Kashyap D Desai
8071588d7a Implemented interrupt Config Hook in mrsas(4) to defer some of the tasks, like:
riegistering AEN, creating cdev.

Submitted by:   Sumit Saxena <sumit.saxena@broadcom.com>
Reviewed by:    Kashyap Desai <Kashyap.Desai@broadcom.com>
MFC after:  3 days
Sponsored by:   AVAGO Technologies
2016-05-13 12:15:20 +00:00
Kashyap D Desai
3a3fc6cba6 This patch implements driver support for 1MB IO size.
NOTE:
The FreeBSD system currently restricts the MAX IO size to MAXPHYS which
in turn is 128KB. We tested the 1MB IO by converting the MAXPHYS to 1MB.

Following is the mail reference:
http://lists.freebsd.org/pipermail/freebsd-scsi/2015-January/006568.html

Submitted by:   Sumit Saxena <sumit.saxena@broadcom.com>
Reviewed by:    Kashyap Desai <Kashyap.Desai@broadcom.com>
MFC after:  3 days
Sponsored by:   AVAGO Technologies
2016-05-13 12:12:09 +00:00
Kashyap D Desai
a688fcd018 Similar to RAID map for Logical Drives, now JBOD map has been introduced for
JBODs. Driver has to sync the JBOD map with firmware and use sequence number
as a reference for JBOD FastPath I/O's.

Submitted by:   Sumit Saxena <sumit.saxena@broadcom.com>
Reviewed by:    Kashyap Desai <Kashyap.Desai@broadcom.com>
MFC after:  3 days
Sponsored by:   AVAGO Technologies
2016-05-13 12:05:02 +00:00
Kashyap D Desai
f0c7594bf3 There was no ERROR handling for firmware command TIMEOUT. This patch
takes care of any firmware command timeout scenarios by initiating OCR.

Submitted by:   Sumit Saxena <sumit.saxena@broadcom.com>
Reviewed by:    Kashyap Desai <Kashyap.Desai@broadcom.com>
MFC after:  3 days
Sponsored by:   AVAGO Technologies
2016-05-13 12:00:46 +00:00
Hans Petter Selasky
854e1d4e6c Implement "old_encode_dev()" for the LinuxKPI.
Obtained from:	kmacy @
MFC after:	1 week
Sponsored by:	Mellanox Technologies
2016-05-13 11:51:43 +00:00
Hans Petter Selasky
374377ce91 Define _IOC_SIZE() in the LinuxKPI.
Obtained from:	kmacy @
MFC after:	1 week
Sponsored by:	Mellanox Technologies
2016-05-13 11:42:36 +00:00
Hans Petter Selasky
677a229c76 Add unlikely() statement to optimise the IS_ERR_VALUE() macro.
Obtained from:	kmacy @
MFC after:	1 week
Sponsored by:	Mellanox Technologies
2016-05-13 11:30:56 +00:00
Enji Cooper
e20f435517 Fix a -Wformat warning by using %d, not %ld for md_iterations
md_iterations is int32_t, not long.

Reported by: clang
MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
2016-05-13 11:27:49 +00:00
Enji Cooper
e108b91da7 Add geliboot_crypt(..) definition to geliboot.h to mute a -Wimplicit-function-declaration
warning

Reported by: clang
MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
2016-05-13 11:24:55 +00:00
Enji Cooper
3f9bee9c5a Put slba and elba under LOADER_GELI_SUPPORT ifdef to mute warning about them being
unused in the non-GELI case

MFC after: 1 week
Reported by: clang
Sponsored by: EMC / Isilon Storage Division
2016-05-13 11:20:21 +00:00
Enji Cooper
6af558669b Remove unused const variable
MFC after: 1 week
Reported by: clang
Sponsored by: EMC / Isilon Storage Division
2016-05-13 11:18:29 +00:00
Bjoern A. Zeeb
8f519854c0 When using IOPORT with pci_host_generic we are missing setting the rman_end()
which leads to end being before start and thus a signed extended very large
number of size later on, which kva_alloc() will fail upon and we will panic.
Add the missing call.

Debugged with:	andrew
Reviewed by:	br, andrew
Sponsored by:	DARPA/AFRL
Found:		while using virtio with gem5
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D6337
2016-05-13 11:18:27 +00:00
Enji Cooper
622282b3b8 Include arpa/inet.h to get the htonl(3) definition
MFC after: 2 weeks
Reported by: clang
Sponsored by: EMC / Isilon Storage Division
2016-05-13 11:15:33 +00:00
Hans Petter Selasky
e320ac1958 Implement nsecs_to_jiffies() in the LinuxKPI and while at it
streamline the rest of the xxx_to_jiffies() functions to have a
constant 64-bit argument and use identical range checks for the
result.

Specifically preserve msecs_to_jiffies(0) returning 0. See r282743 for
further details.

MFC after:	1 week
Sponsored by:	Mellanox Technologies
2016-05-13 11:02:02 +00:00
Enji Cooper
6743ceefaa Add missing prototype for getchar(..)
MFC after: 1 week
Reported by: clang
Sponsored by: EMC / Isilon Storage Division
2016-05-13 10:59:46 +00:00
Hans Petter Selasky
abb14a540f Add more Linux defines. Improve some existing ones.
Obtained from:	kmacy @
MFC after:	1 week
Sponsored by:	Mellanox Technologies
2016-05-13 10:10:43 +00:00
Hans Petter Selasky
04a471587e The Linux error defines should all be positive, else frequently used
error code checks might fail. ERESTART is in the BSD world defined as
-1. While at it add more Linux error codes.

Obtained from:	kmacy @
MFC after:	1 week
Sponsored by:	Mellanox Technologies
2016-05-13 09:21:22 +00:00
Michael Tuexen
5f05199c19 Fix a bug introduced by the implementation of I-DATA support.
There was the requirement that two structures are in sync,
which is not valid anymore. Therefore don't rely on this
in the code anymore.
Thanks to Radek Malcic for reporting the issue. He found this
when using the userland stack.

MFC after: 1 week
2016-05-13 09:11:41 +00:00
Andrew Rybchenko
1c159dbf25 sfxge(4): rename falconsiena_filter_*
Falcon support has been removed, so this code only supports Siena.

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
2016-05-13 07:17:38 +00:00
Andrew Rybchenko
96ffcdee44 sfxge(4): rename falconsiena_tx_*
Falcon support has been removed, so this code only supports Siena.

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
2016-05-13 07:16:29 +00:00
Andrew Rybchenko
d2df9a4e48 sfxge(4): rename falconsiena_rx_*
Falcon support has been removed, so this code only supports Siena.

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
2016-05-13 07:15:51 +00:00
Andrew Rybchenko
5cab4fc7dc sfxge(4): rename falconsiena_mac_*
Falcon support has been removed, so this code only supports Siena.

Reviewed by:    Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
2016-05-13 07:15:02 +00:00
Andrew Rybchenko
e7b2e8b0ac sfxge(4): rename falconsiena_intr_*
falcon support has been removed, so this code only supports Siena.

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
2016-05-13 07:12:14 +00:00
Andrew Rybchenko
0f981da774 sfxge(4): rename falconsiena_ev_*
Falcon support has been removed, so this code only supports Siena.

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
2016-05-13 07:11:36 +00:00
Andrew Rybchenko
cc3897cf73 sfxge(4): move ef10_vpd_* to ef10_vpd.c
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
2016-05-13 07:10:07 +00:00
Andrew Rybchenko
69fb4e16ea sfxge(4): move ef10_tx_* to ef10_tx.c
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
2016-05-13 07:08:33 +00:00
Andrew Rybchenko
204d1d179e sfxge(4): move ef10_rx_* to ef10_rx.c
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
2016-05-13 07:06:57 +00:00
Andrew Rybchenko
647112a4b3 sfxge(4): move ef10_phy_* to ef10_phy.c
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
2016-05-13 07:05:40 +00:00
Andrew Rybchenko
dcab148366 sfxge(4): move ef10_nvram_* to ef10_nvram.c
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
2016-05-13 07:04:28 +00:00
Andrew Rybchenko
31bf5f0399 sfxge(4): move ef10_nic_* to ef10_nic.c
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
2016-05-13 07:03:04 +00:00
Andrew Rybchenko
e67df18431 sfxge(4): move ef10_mcdi_* to ef10_mcdi.c
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
2016-05-13 07:00:46 +00:00
Andrew Rybchenko
9573ed00c6 sfxge(4): move ef10_mac_* to ef10_mac.c
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
2016-05-13 06:59:20 +00:00
Andrew Rybchenko
57a2a11847 sfxge(4): move ef10_intr_* to ef10_intr.c
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
2016-05-13 06:58:20 +00:00
Andrew Rybchenko
fc737285c3 sfxge(4): move ef10_filter_* to ef10_filter.c
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
2016-05-13 06:57:08 +00:00
Andrew Rybchenko
f6078949da sfxge(4): move ef10_ev_* to ef10_ev.c
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
2016-05-13 06:54:18 +00:00
Andrew Rybchenko
fe7e969e7a sfxge(4): comment on when we assume multicast chaining is available
It's the same on Medford as Huntington.

Multicast chaining is not always on, even with Medford, as it's not
supported by low latency firmware.

Unlike the Linux driver, we don't need to support virtulization with
firmware released before support for multicast chaining was added.

Submitted by:   Mark Spender <mspender at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D6319
2016-05-13 06:47:47 +00:00
Andrew Rybchenko
d0a97c000f sfxge(4): avoid duplicate delivery of packets when changing multicast mode with multicast chaining enabled
With multicast chaining, if e.g. a specific multicast filter is
inserted and the multicast mis-match filter is then inserted, both may
match a packet and cause it to be delivered.

Copy the behaviour of the Linux driver, which is to remove the old filters
first, on the basis that customers are more likely to be able to handle
drops than duplicates (see bug49178 comment 4).

Submitted by:   Mark Spender <mspender at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D6331
2016-05-13 06:47:07 +00:00
Scott Long
dde1276e8e Don't jam the softc in the device_probe routine. The softc isn't owned by
the driver here, so it shouldn't be accessed, let alone written to.  Remove
the nearby debug line, it's the only thing that depended on the softc, and
it depended on it in a way that couldn't work in this part of the code.

This fixes some reports of use-after-free and system instability with
DEBUG_MEMGUARD enabled.

Submitted by:	Matthew Macy
MFC after:	3 days
2016-05-13 05:57:21 +00:00
Andriy Voskoboinyk
601a2543a0 net80211: drop some unused variables / local macros
Most of them left after some commits (r178354, r191544, r287197 etc.);
some were never used.

Found by:	Clang Static Analyzer
2016-05-12 22:17:00 +00:00
Conrad Meyer
6710d21d9f Pollute more places with off64_t and add __off64_t
Despite the private namespace, several broken ports depend on the __off64_t
name for the type.  Export it exactly the same way off_t and __off_t are
exported.

A follow-up to r299456.

Suggested by:	php56
Sponsored by:	EMC / Isilon Storage Division
2016-05-12 21:18:17 +00:00
Oleksandr Tymoshenko
81d3ea9f28 Add loadable module for gpiokeys 2016-05-12 20:20:54 +00:00
Oleksandr Tymoshenko
3c977d6f36 Fix detach routine for gpiokeys
- Release pin only when all per=key callouts are stopped
- Unregister keyboard when detaching device node
2016-05-12 20:15:23 +00:00
Oleksandr Tymoshenko
f058b6fbee Properly release mapped pin in gpio_pin_release 2016-05-12 20:13:16 +00:00
Oleksandr Tymoshenko
3381a3898a Add gpiobus_release_pin function to release mapped pin
Add gpiobus_release_pin as a counterpart for gpiobus_map_pin. Without it
it's impossible to properly release pin so if kernel module is reloaded
it can't re-use pins again
2016-05-12 20:12:45 +00:00
Nick Hibma
6d07c1575b Allow silencing of 'promiscuous mode enabled/disabled' messages.
PR:		166255
Submitted by:	eugen.grosbein.net
Obtained from:	eugen.grosbein.net
MFC after:	1 week
2016-05-12 19:42:13 +00:00
Eric Joyner
6bb8f4f665 ixl: Re-add a change to TC0 setup made in D5203.
Differential Revision:  https://reviews.freebsd.org/D6211
Reviewed by:    sbruno, kmacy, jeffrey.e.pieper@intel.com
MFC after:      2 weeks
Sponsored by:   Intel Corporation
2016-05-12 18:22:34 +00:00
Eric Joyner
d4683565fd ixl: Update to 1.4.27-k.
Changes:

Kevin Scott		i40e-shared: Save off VSI resource count when updating VSI
Anjali Singhai Jain	i40e-shared: Expose some registers to program parser, FD and RSS logic
Eric Joyner		ixl: Fix errors in queue interrupt setup in MSIX mode.
Shannon Nelson		i40e-shared: implement and use rx ctl helper functions
Shannon Nelson		i40e-shared: don't use AQ calls from clear_hw
Eric Joyner		ixl: Use rx ctl read/write functions instead of register accesses in certain places.
Shannon Nelson		i40e-shared: add adminq commands for rx ctl registers
Shannon Nelson		i40e-shared: implement and use rx ctl helper functions
Jeremiah Kyle		i40e-shared: Corrected function name in comment block
Deepthi Kavalur		i40e-shared: correcting a HW capability display info
Shannon Nelson		i40e-shared: fixups for (Linux) upstream consistency
Eric Joyner		ixl: Only stop firmware's LLDP agent on older firmware versions.

Differential Revision:  https://reviews.freebsd.org/D6211
Reviewed by:    sbruno, kmacy, jeffrey.e.pieper@intel.com
MFC after:      2 weeks
Sponsored by:   Intel Corporation
2016-05-12 18:22:12 +00:00
Eric Joyner
6d011ad5f6 ixl: Update to 1.4.24-k.
Changes by author:

Eric Joyner		ixl: Fix compile error when IXL_DEBUG is defined.
Eric Joyner		ixl: Fix taskqueues created in init() not being freed in stop().
Eric Joyner		ixl: Add additional debug sysctls, for Tx and Rx queue stats.
Eric Joyner		ixl: Enable dynamic itr by default.
Eric Joyner		ixl: Edit spacing, comments,  function signatures (to conform to style(9)).
Eric Joyner		ixl: Check for errors when tearing down msix interrupts.
Eric Joyner		ixl: Remove unnecessary register reads/writes.
Eric Joyner		ixl: Remove admin queue interrupt enable from general interrupt enable.
Eric Joyner		ixl: Update switch config after teardown/reset flow in init().
Eric Joyner		ixl: Add additional admin queue error code output to admin queue call errors.
Eric Joyner		ixl: Don't destroy i40e spinlock if it's already uninitialized.
Shannon Nelson		i40e-shared: clean event descriptor before use
Anjali Singhai Jain	i40e-shared: When in promisc mode apply promisc mode to Tx Traffic as well
Kevin Scott		i40e_shared: Increase timeout when checking GLGEN_RSTAT_DEVSTATE bit
Eric Joyner		ixlv: Fix IXL_DEBUG compile issue.
Eric Joyner		ixlv: Attempt to fix panic/other issues when rapidly unloading/loading driver.
Eric Joyner		ixl/ixlv: Revert m_collapse() in ixl_xmit() to m_defrag().
Deepthi Kavalur		i40e_shared: Trace logging HW capabilities
Eric Joyner		ixlv: Correctly unlock/relock around init() call in vc_completion().
Eric Joyner		ixl: Stop preventing changing flow control mode for CR4 media.
Eric Joyner		ixl: Set IPv6 TCP offload flag when doing TSO.

Differential Revision:  https://reviews.freebsd.org/D6211
Reviewed by:    sbruno, kmacy, jeffrey.e.pieper@intel.com
MFC after:      2 weeks
Sponsored by:   Intel Corporation
2016-05-12 18:21:52 +00:00
Eric Joyner
6c42605965 ixl: Update to 1.4.20-k.
Changes by author:

Eric Joyner	ixl: Add more error messages/checks to ixl_vsi_assign_msix().
Eric Joyner	ixl/ixlv: Clarify a comment about descriptors.
Eric Joyner	ixl/ixlv: Improve i40e_debug() implementation.
Eric Joyner	ixl/ixlv: Remove unused ASSERT() macro; move struct around.
Eric Joyner	ixl: Set initial advertised speed value in init_locked().
Eric Joyner	ixl: Fix flow control sysctl value being stored when new value is invalid.
Eric Joyner	Edit comments and spacing.
Carolyn Wyborny	i40e-shared: Add functions to blink led on Coppervale PHY
Eric Joyner	ixl: Re-do interrupt setup.
Eric Joyner	ixl: Remove VFLR task setup from legacy flow.
Eric Joyner	ixl: Shutdown/setup HMC when handling an EMPR reset.

Differential Revision:  https://reviews.freebsd.org/D6211
Reviewed by:    sbruno, kmacy, jeffrey.e.pieper@intel.com
MFC after:      2 weeks
Sponsored by:   Intel Corporation
2016-05-12 18:21:34 +00:00
Eric Joyner
1d767a8eae ixl: Update to 1.4.17-k.
Changes:

Kiran Patil	i40e-shared: APIs to Add/remove port mirroring rules
Shannon Nelson	i40e-shared: add VEB stat control and remove L2 cloud filter
Eric Joyner	ixl: Update NVM version information shown.
Eric Joyner	ixl: Remove empty else block.
Eric Joyner	ixl: Slightly re-work ixl_init_msix().
Eric Joyner	ixl: Remove duplicate queue enablement.
Shannon Nelson	i40e-shared: implement the API function for aq_set_switch_config
Eric Joyner	ixl: Update nvm version string shown in sysctl.
Eric Joyner	ixl/ixlv: Changes to PF/VF minor version checking/handling.
Eric Joyner	ixlv: Reduce maximum wait time for responses to VF AQ messages.
Eric Joyner	ixl/ixlv: Edit comments, comment out code, and edit spacing.
Eric Joyner	ixl: Print log message when SR-IOV init is successful.
Eric Joyner	ixl: Add Tx Flow Control filter from main PF VSI.
Eric Joyner	ixlv: Add extra error message when ixlv_get_vf_config times out.
Eric Joyner	ixl: Assign current MOCS optics the XLPPI media type.
Eric Joyner	ixl: Remove conditional wait after link status event.
Eric Joyner	ixl: Add line break and remove extraneous return statement.
Eric Joyner	ixl: Allow 40G speeds in the advertise_speed sysctl.
Eric Joyner	ixl: Add "CRC enable" field to link_status sysctl output.
Eric Joyner	ixl: Move sbuf.h include out of IXL_DEBUG* defines.
Eric Joyner	ixl: Move remaining debug sysctl funcs to IXL_DEBUG_SYSCTL define.
Eric Joyner	ixl: Add cases for all remaining media types in shared code to media_status().

Differential Revision:  https://reviews.freebsd.org/D6211
Reviewed by:    sbruno, kmacy, jeffrey.e.pieper@intel.com
MFC after:      2 weeks
Sponsored by:   Intel Corporation
2016-05-12 18:21:17 +00:00
Eric Joyner
95bb050439 ixl: Update to 1.4.13-k.
Changes:

Shannon Nelson		i40e-shared: set shared bit for multicast filters
Piotr Raczynski		i40e-shared: Bump AQ minor version for FVL/FPK
Eric Joyner		ixl: Remove call to i40e_aq_set_mac_config() in init path.
Eric Joyner		ixl: Always add interface mac address to driver+hw filter list.
Eric Joyner		ixl: Edit comments.
Eric Joyner		ixl: Add more descriptive sysctl help messages.
Eric Joyner		ixl: Report more info in link_status sysctl.
Eric Joyner		ixl: Flip set_aq_phy_int_mask mask bits.

Differential Revision:  https://reviews.freebsd.org/D6211
Reviewed by:    sbruno, kmacy, jeffrey.e.pieper@intel.com
MFC after:      2 weeks
Sponsored by:   Intel Corporation
2016-05-12 18:20:59 +00:00
Eric Joyner
fdb6f38a3d ixl: Update to 1.4.12-k.
Changes by author:

Eric Joyner		ixl: Remove substitution of EACCES for EPERM when perrno is set on an nvmupdate command return.
Eric Joyner		ixl: Print message when hardware sends GRST interrupt.
Eric Joyner		ixl: Fix kernel panic when driver fails to initialize admin queue.
Eric Joyner		ixl: Print out messages when a non-handled other interrupt occurs.
Eric Joyner		ixl: Fix spaces in a couple messages.
Eric Joyner		ixl: Add lock around nvmupd command entry point and reconvert EPERM errors to EACCES.
Anjali Singhai Jain	i40e-shared: Make some changes in the nvm read code
Shannon Nelson		i40e-shared: AQ Add Run PHY Activity struct
Shannon Nelson		i40e-shared: AQ Add Geneve cloud tunnel type
Shannon Nelson		i40e-shared: AQ Add external power class to get link status response struct
Shannon Nelson		i40e-shared: AQ Add shared resource flags for macvlan filters
Shannon Nelson		i40e-shared: AQ Add set_switch_config
Shannon Nelson		i40e-shared: AQ Add VXLAN-GPE tunnel type for cloud filter and tunnel commands
Shannon Nelson		i40e-shared: AQ thermal sensor control struct
Shannon Nelson		i40e-shared: Bump AQ minor version to 1.5 for FVL5 features
Shannon Nelson		i40e-shared: add a little more to an NVM update debug message
Carolyn Wyborny		i40e-shared: Fix for PHY NVM interaction problem
Eric Joyner		i40e-shared: Add prototypes for private NVM write functions
Eric Joyner		ixl/ixlv: Remove unused define from ixl.h.
Eric Joyner		ixl: Add handling of EMP reset for nvm update purposes.
Eric Joyner		ixl: Move addition of device sysctls to separate function.
Eric Joyner		ixl: Fix up a couple error messages in ixl_attach().
Eric Joyner		ixl: Update the hardware resource allocation debug sysctl.

Differential Revision:  https://reviews.freebsd.org/D6211
Reviewed by:    sbruno, kmacy, jeffrey.e.pieper@intel.com
MFC after:      2 weeks
Sponsored by:   Intel Corporation
2016-05-12 18:20:36 +00:00
Eric Joyner
7f70bec623 ixl: Update to 1.4.9-k.
Changes by author:

Kamil Krawczyk		i40e-shared: use explicit cast from u16 to u8
Anjali Singhai Jain	i40e-shared: Add a Virtchnl offload for RSS PCTYPE V2
Eric Joyner		ixl: Remove HP device IDs.
Jesse Brandeburg	i40e-shared: add small bit of debug
Mitch Williams		i40e-shared: check for stopped admin queue
Mitch Williams		i40e-shared: set aq count after memory allocation
Jesse Brandeburg	i40e-shared: remove forever unused ID
Eric Joyner		ixl: Fix bug where RSS does not hash to more than 16 queues.
Shannon Nelson		i40e-shared: define function capabilities in only one place
Eric Joyner		ixl: Change spacing, comments, and a single error message.
Eric Joyner		ixl: Save admin queue phy interrupt mask as a define.
Eric Joyner		ixl: Move callout_reset() to later in init_locked(), and stop clearing OACTIVE in driver flags.
Eric Joyner		ixl: Add new reset+build flow to init() if it detects that the admin queue is stopped.
Eric Joyner		ixl: Return EACCES instead of EPERM when an nvmupdate command fails.
Eric Joyner		ixl: Remove KX_A device ID.

Differential Revision:  https://reviews.freebsd.org/D6211
Reviewed by:    sbruno, kmacy, jeffrey.e.pieper@intel.com
MFC after:      2 weeks
Sponsored by:   Intel Corporation
2016-05-12 18:20:18 +00:00
Eric Joyner
223d846d93 ixl: Update to 1.4.7-k.
Changes by author:

Helin Zhang		i40e_shared: Fix compilation error - pointer-arith
Paul M Stillwell Jr	i40e-shared: Replace sprintf with i40e_debug
Anjali Singhai Jain	i40e-shared: Fix an accidental error with BIT_ULL replacement
Jesse Brandeburg	i40e-shared: remove useless assignments
Anjali Singhai Jain	i40e-shared: Add a workaround to drop all flow control frames
Anjali Singhai Jain	i40e-shared: Add new response struct from FW for AQ command i40e_aqc_lldp_set_local_mib
Anjali Singhai Jain	i40e-shared: Acquire NVM, before issuing an AQ read nvm command
Eric Joyner		ixl/ixlv: Remove unused MAX_LOOP define.
Eric Joyner		ixl: Remove extra aq_get_link_info() call in attach().
Eric Joyner		ixl: Modify a couple error messages in attach() to be more informative.
Eric Joyner		ixl: Add i40e_get_link_status() call to init_locked().
Eric Joyner		ixl: Move callout_stop() to earlier in ixl_stop().
Eric Joyner		ixl: Add extra comments around link ITR code.
Eric Joyner		ixl: Attempt to enhance link event handling.
Eric Joyner		ixl: Style, spacing, and comment changes.
Eric Joyner		ixl: Add I40E_NVM_ACCESS definition.
Eric Joyner		ixl: Add interface for nvmupdate tool ioctl to driver.
Eric Joyner		ixl: Don't strip out nvm update support from the driver anymore.
Eric Joyner		ixl: Interrupts are now allocated/setup and torn down/released on init()/stop().

Differential Revision:  https://reviews.freebsd.org/D6211
Reviewed by:    sbruno, kmacy, jeffrey.e.pieper@intel.com
MFC after:      2 weeks
Sponsored by:   Intel Corporation
2016-05-12 18:19:53 +00:00
Eric Joyner
a48d00d276 ixl: Update to 1.4.6-k.
Changes by author:

Greg Rose		ixl: Add MAC+VLAN filter for LAA MAC assignment
Carolyn Wyborny		i40e_shared: fix for PHY NVM interaction problem
Anjali Singhai Jain	i40e-shared: Fix an accidental error with BIT_ULL replacement
Eric Joyner		ixl: Fix potential crash when loading driver a startup and cannot setup all requested MSIX vectors.
Eric Joyner		ixl: Add max of 8 queues limit to autoconfig.
Eric Joyner		ixl: Re-add ian@'s sysctl fixes from upstream (r280043).

Differential Revision:  https://reviews.freebsd.org/D6211
Reviewed by:    sbruno, kmacy, jeffrey.e.pieper@intel.com
MFC after:      2 weeks
Sponsored by:   Intel Corporation
2016-05-12 18:19:31 +00:00
Eric Joyner
ac83ea833d ixl: Update to 1.4.5-k.
This first update will revert some upstream changes; forthcoming updates will reinstate them.

Changes, by author:

Anjali Singhai Jain		i40e-shared: Add WB_ON_ITR offload support
Shannon Nelson			i40e-shared: fix phy_types bitmap type
Kevin Scott			i40e-shared: Store off PHY capabilities
Shannon Nelson			i40e-shared: fix byteswap of phy_type
Jingjing Wu			i40e-shared: Fix compile issue related to const string
Greg Bowers			i40e-shared: Add AQ defines for non-willing Apps (DCB)
Greg Bowers			i40e-shared: Support for non-willing Apps (DCB)
Shannon Nelson			i40e-shared: use upper-32 bit macro for address
Shannon Nelson			i40e-shared: grab the AQ spinlocks before clearing registers
Eric Joyner			ixl: Properly strip out X722_SUPPORT (temporarily).
Eric Joyner			ixl: Allow Fort Pond devices to advertise 100M in set_advertise sysctl.

Differential Revision:  https://reviews.freebsd.org/D6211
Reviewed by:    sbruno, kmacy, jeffrey.e.pieper@intel.com
MFC after:      2 weeks
Sponsored by:   Intel Corporation
2016-05-12 18:18:55 +00:00
Scott Long
3934bc5561 Move mutex initialization from PCI probe to PCI attach. Drivers are not
allowed to create any persistent state in their probe routine because it's
not guaranteed that they'll win the election and be allowed to attach.

Submitted by:	Matthew Macy
MFC after:	3 days
2016-05-12 17:47:30 +00:00
Michael Tuexen
fd60718d17 Retire net.inet.sctp.strict_sacks and net.inet.sctp.strict_data_order
sysctl's, since they where only there to interop with non-conformant
implementations. This should not be a problem anymore.
2016-05-12 16:34:59 +00:00
Roger Pau Monné
107cfbb743 xen-netfront: fix feature detection
Current netfront code relies on xs_scanf returning a value < 0 on error,
which is not right, xs_scanf returns a positive value on error.

MFC after:	3 days
Tested by:	Stephen Jones <StephenJo@LivingComputerMuseum.org>
Sponsored by:	Citrix Systems R&D
2016-05-12 16:18:02 +00:00
Adrian Chadd
7deb99d785 [siba] add more MCS tx power offset decoding.
This is required by the bwn(4) N-PHY support.

Obtained from:	Linux ssb (definitions)
2016-05-12 16:14:16 +00:00
Adrian Chadd
98950ba039 [siba] add TX power index entry parsing.
This is required by the bwn(4) N-PHY support.

Obtained from:	Linux ssb (definitions)
2016-05-12 16:01:33 +00:00
Michael Tuexen
d88a626a1d Enable SACK Immediately per default.
This has been tested for a long time and implements covered by RFC 7053.

MFC after: 1 week
2016-05-12 15:48:08 +00:00
Andrew Turner
f82b6f5255 Rename the internal BUC_DMA_* flags to BF_* so they won't conflict with
the flags in sys/bus_dma.h.

Obtained from:	ABT Systems Ltd
Sponsored by:	The FreeBSD Foundation
2016-05-12 15:24:36 +00:00
Adrian Chadd
a0f943c116 [siba] add extra methods for chipcommon access and PLL configuration.
This is needed by the PHY-N bwn(4) support.

Obtained from:	Linux b43 (definitions)
2016-05-12 15:18:36 +00:00
Michael Tuexen
e7f232a0db Use a format string in snprintf() for consistency.
This was reported by Radek Malcic when using the userland stack in
combination with MinGW.

MFC after: 1 week
2016-05-12 14:41:53 +00:00
Andrew Turner
2b45fde379 Restrict the memory barriers in bus_dmamap_sync to just the operations
where it's needed.

Obtained from:	ABT Systems Ltd
Sponsored by:	The FreeBSD Foundation
2016-05-12 12:13:28 +00:00
Hans Petter Selasky
3a8bec33ef Fix handling of IOCTLs in the LinuxKPI.
Linux requires that all IOCTL data resides in userspace. FreeBSD
always moves the main IOCTL structure into a kernel buffer before
invoking the IOCTL handler and then copies it back into userspace,
before returning. Hide this difference in the "linux_copyin()" and
"linux_copyout()" functions by remapping userspace addresses in the
range from 0x10000 to 0x20000, to the kernel IOCTL data buffer.

It is assumed that the userspace code, data and stack segments starts
no lower than memory address 0x400000, which is also stated by "man 1
ld", which means any valid userspace pointer can be passed to regular
LinuxKPI handled IOCTLs.

Bump the FreeBSD version to force recompilation of all kernel modules.

Discussed with:	kmacy @
MFC after:	1 week
Sponsored by:	Mellanox Technologies
2016-05-12 11:38:28 +00:00
Hans Petter Selasky
15c98ff2f1 Remove redundant "task_struct_set()".
This is done by the "linux_kthread_fn()".

MFC after:	1 week
Sponsored by:	Mellanox Technologies
2016-05-12 09:11:18 +00:00
Hans Petter Selasky
464d20bcc8 Create a dummy "task_struct" on the stack which is returned by
"current" inside all LinuxKPI file operation callbacks. The "current"
is frequently used for various debug prints, printing the thread name
and thread ID for example.

Obtained from:	kmacy @
MFC after:	1 week
Sponsored by:	Mellanox Technologies
2016-05-12 09:06:54 +00:00
Edward Tomasz Napierala
ebc2f37754 Stop hiding errors that result in failure to mount /dev. Otherwise,
missing /dev directory makes one end up with a completely deaf (init
without stdout/stderr) system with no hints on the console, unless
you've booted up with bootverbose.

MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2016-05-12 07:38:10 +00:00
Konstantin Belousov
5525a2edd8 Typo in comment. 2016-05-12 06:20:26 +00:00
Andrew Rybchenko
2681c0e9fe sfxge(4): update multicast filter insertion algorithm
When the multicast filters we're allowed to insert are controlled by the
hypervisor, it may be that we can insert some but not others. So we need
to have fallbacks where we insert any filters we can without rolling back
when one fails to insert.

Submitted by:   Mark Spender <mspender at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D6318
2016-05-12 06:20:26 +00:00
Andrew Rybchenko
ec831f7ff9 sfxge(4): cleanup: constify common code method tables
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D6317
2016-05-12 06:19:06 +00:00
Conrad Meyer
5ecc225fc5 nfsd: Fix use-after-free in NFS4 lock test service
Trivial use-after-free where stp was freed too soon in the non-error path.
To fix, simply move its release to the end of the routine.

Reported by:	Coverity
CID:		1006105
Sponsored by:	EMC / Isilon Storage Division
2016-05-12 05:03:12 +00:00
Sepherosa Ziehau
eacb70ba70 mxge: Setup mbuf flowid before calling tcp_lro_rx().
Reviewed by:	gallatin
MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D6320
2016-05-12 03:36:49 +00:00
Sepherosa Ziehau
008c25ebb9 hyperv/stor: Enable INQUIRY result check only on WIN10 like host systems
On WIN8 like host systems, when rescan happens, the already installed
disks seem to return random invalid results for INQUIRY.

More investigation is under way to figure out why random invalid INQUIRY
results are delivered to VM on WIN8 like host systems.

Submitted by:	Hongjiang Zhang <honzhan microsoft com>
Reviewed by:	sephe
MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D6316
2016-05-12 03:29:29 +00:00
Conrad Meyer
5b81187fa9 snd_hda(4): Don't pass bogus sizeof()s to unused sysctl arg2 parameter (again)
More of the same sort of issue as r299503, just missed some sysctls added in a
different place than the others.

Reported by:	Coverity
CIDs:		1007692, 1009677, 1009678
Sponsored by:	EMC / Isilon Storage Division
2016-05-12 02:46:29 +00:00
Conrad Meyer
e6f79ac571 snd_hda(4): Don't pass bogus sizeof()s to unused sysctl arg2 parameter
None of the sysctl handlers in hdaa use the arg2 parameter, so just pass zero
instead.  Additionally, the sizes being passed in were suspect (size of the
pointer rather than the value).

Reported by:	Coverity
CIDs:		1007694, 1009679
Sponsored by:	EMC / Isilon Storage Division
2016-05-12 02:41:38 +00:00
Pedro F. Giffuni
3e17f981b0 sys/boot/common: use of spaces vs. TAB.
No functional change.
2016-05-12 01:19:11 +00:00
Conrad Meyer
fe4be618c9 subr_vmem: Fix double-free in error case of vmem_create
If vmem_init() fails, 'vm' is already destroyed and freed.  Don't free it
again.

Reported by:	Coverity
CID:		1042110
Sponsored by:	EMC / Isilon Storage Division
2016-05-11 23:16:11 +00:00
Conrad Meyer
f41be0f076 Revert r299467 to fix the kernel build.
$ svn merge -c -299467 .

Approved by:	build being broken for six hours
2016-05-11 23:00:12 +00:00
Ed Maste
699b3c8722 exec.h: Move PS_STRINGS define to kernel-only section
The kern.ps_strings sysctl was introduced in r103767 and the last
use of PS_STRINGS in userspace code was removed in r297888.

PR:		208760 [exp-run]
Reviewed by:	kib
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D5933
2016-05-11 21:14:36 +00:00
Andrew Turner
9615213bef Call busdma_swi from swi_vm as is done from other architectures.
Obtained from:	ABT Systems Ltd
Sponsored by:	The FreeBSD Foundation
2016-05-11 18:48:47 +00:00
Oleksandr Tymoshenko
bc90a48ccf Add OF_prop_free function as a counterpart for OF_*prop_alloc
- Introduce new OF API function OF_prop_free to free memory allocated by
  OF_getprop_alloc and OF_getencprop_alloc. Current code just calls free(9)
  with M_OFWPROP memory class which assumes knowledge about OF_*prop_alloc
  functions' internals and leads to unneccessary code coupling

- Convert some of the free(..., M_OFWPROP) instances to OF_prop_free

Files affected by this commit are the ones I was able to test on real
hardware. The rest of free(..., M_OFWPROP) instances will be handled with
idividual maintainers

Reviewed by:	andrew
Differential Revision:	https://reviews.freebsd.org/D6315
2016-05-11 18:20:02 +00:00
Oleksandr Tymoshenko
5a333f6f5f Add gpiokeys driver
gpiokey driver implements functional subset of gpiokeys device-tree bindings:
https://www.kernel.org/doc/Documentation/devicetree/bindings/input/gpio-keys.txt

It acts as a virtual keyboard, so keys are visible through kbdmux(4)

Driver maps linux scancodes for most common keys to FreeBSD scancodes and
also extends spec by introducing freebsd,code property to specify
FreeBSD-native scancodes.

Reviewed by:	mmel, jmcneill
Differential Revision:	https://reviews.freebsd.org/D6279
2016-05-11 17:57:26 +00:00
Hans Petter Selasky
a7f3dd6f72 Resolve LINT linking issue by renaming ida_init() to ida_setup(). The
ida_init() symbol name is now taken for use by the LinuxKPI.

Reported by:	emaste @
Discussed with:	mav @
2016-05-11 17:38:09 +00:00
Hans Petter Selasky
dacb734ea8 Match Linux behaviour and iterate the IDR tree unlocked. The caller is
responsible the IDR tree stays unmodified while iterating.

MFC after:	1 week
Sponsored by:	Mellanox Technologies
2016-05-11 17:20:20 +00:00
Hans Petter Selasky
30de20448d The idr_for_each() function is now part of the LinuxKPI. Use the
LinuxKPI's idr_for_each() function instead of the local one to avoid
compilation issues.

Discussed with:	np @
MFC after:	1 week
2016-05-11 17:17:48 +00:00
Andrew Turner
9a36a337ff Add a new get_id interface to pci and pcib. This will allow us to both
detect failures, and get different PCI IDs.

For the former the interface returns an int to signal an error. The ID is
returned at a uintptr_t * argument.

For the latter there is a type argument that allows selecting the ID type.
This only specifies a single type, however a MSI type will be added
to handle the need to find the ID the hardware passes to the ARM GICv3
interrupt controller.

A follow up commit will be made to remove pci_get_rid.

Reviewed by:	jhb, rstone
Obtained from:	ABT Systems Ltd
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D6239
2016-05-11 17:07:29 +00:00
Andrew Turner
b7a7ee3af1 On arm64 always create a bus_dmamap_t object. This will be use to hold the
list of memory that the kernel will need to sync when operating with a
non-cache coherent DMA engine.

Obtained from:	ABT Systems Ltd
Sponsored by:	The FreeBSD Foundation
2016-05-11 16:53:41 +00:00
Conrad Meyer
3b56262303 compat/opensolaris: Don't redefined off64_t if already defined
A follow-up to r299456.

Reported by:	gjb
Sponsored by:	EMC / Isilon Storage Division
2016-05-11 16:05:32 +00:00
Andrew Turner
7ca01e8f89 Add data barriers to the arm64 bus_dmamap_sync function. We need these
to ensure ordering between the CPU and device. As the CPU and DMA target
may be in different shareability domains they need to be full system
barriers.

Obtained from:	ABT Systems Ltd
Sponsored by:	The FreeBSD Foundation
2016-05-11 14:59:54 +00:00
Alexander Motin
c59a902fa3 MFV r299453: 6765 zfs_zaccess_delete() comments do not accurately reflect
delete permissions for ACLs

Reviewed by: Gordon Ross <gwr@nexenta.com>
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
Author: Kevin Crowe <kevin.crowe@nexenta.com>

openzfs/openzfs@a40149b935
2016-05-11 13:53:29 +00:00
Alexander Motin
0eb65a5367 MFV r299451: 6764 zfs issues with inheritance flags during chmod(2) with
aclmode=passthrough

Reviewed by: Gordon Ross <gwr@nexenta.com>
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
Author: Albert Lee <trisk@nexenta.com>

openzfs/openzfs@1bcf0d240b
2016-05-11 13:50:34 +00:00
Alexander Motin
85a69dbf66 MFV r299449: 6763 aclinherit=restricted masks inherited permissions by group
perms (groupmask)

Reviewed by: Gordon Ross <gwr@nexenta.com>
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
Author: Albert Lee <trisk@nexenta.com>

openzfs/openzfs@eebb483d0c
2016-05-11 13:48:15 +00:00
Alexander Motin
2a219f349e MFV r299442: 6762 POSIX write should imply DELETE_CHILD on directories - and
some additional considerations

Reviewed by: Gordon Ross <gwr@nexenta.com>
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
Author: Kevin Crowe <kevin.crowe@nexenta.com>

openzfs/openzfs@d316fffc9c
2016-05-11 13:43:20 +00:00
Zbigniew Bodek
0ef477ea8c Add support for MTU chaning and Jumbo frames to VNIC
Enable previously added code for MTU handling (based on
Cavium 1.0 driver released on BSD license).
This commit enables possibility to change MTU on VNIC driver.

Obtained from: Semihalf
Sponsored by:  Cavium
2016-05-11 13:42:20 +00:00
Zbigniew Bodek
f6cdb4ceb3 Fix deadlock in VNIC when using single CPU only
Number of free Tx descriptors does not need to be locked since
it can be modified atomically between SND and CQ tasks.
It will also block Tx routine from sending packets while CQ will not
be able to free descriptors.

Obtained from:	Semihalf
Sponsored by:	Cavium
Differential Revision: https://reviews.freebsd.org/D6266
2016-05-11 13:38:29 +00:00
Zbigniew Bodek
46542fb652 Fix I/O coherence issues on ThunderX when SMP is disabled
To maintain coherence between cache and DMA memory appropriate
shareability flags need to be set in the PTE regardless of SMP
option.

Reviewed by:	wma
Obtained from:	Semihalf
Sponsored by:	Cavium
Differential Revision: https://reviews.freebsd.org/D6231
2016-05-11 13:23:56 +00:00
Zbigniew Bodek
8191a87959 Add HW RSS support to VNIC driver
Based on v1.0 driver provided by Cavium under BSD license.
Support in-hardware RSS to distribute IP, UDP and TCP traffic
among available RX Queues and hence multiple CPUs.

Reviewed by:	wma
Obtained from:	Semihalf
Sponsored by:	Cavium
Differential Revision: https://reviews.freebsd.org/D6230
2016-05-11 13:22:13 +00:00
Zbigniew Bodek
ec6f8f42db Bind CQ interrupts and tasks to separate CPUs in VNIC
Delegate interrupts and completion tasks on separate CPUs
for each VNIC.

Reviewed by:	wma
Obtained from:	Semihalf
Sponsored by:	Cavium
Differential Revision: https://reviews.freebsd.org/D6229
2016-05-11 13:20:29 +00:00
Alexander Motin
42a54f9745 MFV r299440: 6736 ZFS per-vdev ZAPs
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: John Kennedy <john.kennedy@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Don Brady <don.brady@intel.com>
Reviewed by: Dan McDonald <danmcd@omniti.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
Author: Joe Stein <joe.stein@delphix.com>

openzfs/openzfs@215198a6ad
2016-05-11 12:54:00 +00:00
Alexander Motin
7d54dbae83 MFV r299438: 6842 Fix empty xattr dir causing lockup
Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed by: Dan McDonald <danmcd@omniti.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Chunwei Chen <tuxoko@gmail.com>

openzfs/openzfs@02525cd08f
2016-05-11 12:46:07 +00:00
Alexander Motin
d7ff478705 MFV r299436: 6843 Make xattr dir truncate and remove in one tx
Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed by: Dan McDonald <danmcd@omniti.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Chunwei Chen <tuxoko@gmail.com>

openzfs/openzfs@399cc7d5d9
2016-05-11 12:43:54 +00:00
Alexander Motin
0b99ac761e MFV r299434: 6841 Undirty freed spill blocks
Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed by: Dan McDonald <danmcd@omniti.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Tim Chase <tim@chase2k.com>

openzfs/openzfs@445e67805d
2016-05-11 12:38:07 +00:00
Hans Petter Selasky
b3c89b5ad9 Return a proper error code instead of panicing when an I/O vector
having the wrong number of entries is detected.

MFC after:	1 week
Sponsored by:	Mellanox Technologies
2016-05-11 10:50:59 +00:00
Hans Petter Selasky
fd42d62378 Add more IDR and IDA related functions to the LinuxKPI.
Obtained from:	kmacy @
MFC after:	1 week
Sponsored by:	Mellanox Technologies
2016-05-11 10:40:04 +00:00
Hans Petter Selasky
f8221002a5 Factor out common code into "idr_find_layer_locked()" and fix inverted
bitmap test for free entry in "idr_replace()".

Obtained from:	kmacy @
MFC after:	1 week
Sponsored by:	Mellanox Technologies
2016-05-11 10:35:15 +00:00
Roger Pau Monné
4ea0b4ad1a xen/resume: only send BITMAP IPIs if CPUs > 1
This is quite harmless on HEAD, but it's worse on stable/10 where
lapic_ipi_vectored is the local APIC native IPI implementation. On
stable/10 cpu_ops.ipi_vectored should be used instead.

MFC after:	5 days
Sponsored by:	Citrix Systems R&D
2016-05-11 10:10:25 +00:00
Hans Petter Selasky
5d35d77707 Add missing destruction of mutex.
MFC after:	1 week
Sponsored by:	Mellanox Technologies
2016-05-11 10:06:58 +00:00
Andrey V. Elsukov
9f2e5ed3cc Fix memory leak possible in error case.
Use free_rule() instead of free(), it will also release memory allocated
for rule counters.

Obtained from:	Yandex LLC
Sponsored by:	Yandex LLC
2016-05-11 10:04:32 +00:00
Edward Tomasz Napierala
300be80084 Remove NULL checks after M_WAITOK allocations from sys/mips/.
Reviewed by:	adrian@
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D6301
2016-05-11 09:42:24 +00:00
Hans Petter Selasky
8457719578 Add more atomic LinuxKPI functions.
Obtained from:	kmacy @
MFC after:	1 week
Sponsored by:	Mellanox Technologies
2016-05-11 07:58:43 +00:00
Edward Tomasz Napierala
220adb0416 Make sdhci(4) work after suspend/resume for chipsets that require
the frequency quirk. This makes it work on eg ThinkPad T420.

Without it, after resume one can see this:

mmc0: ACMD42 failed, RESULT: 4
mmcsd0: Error indicated: 1 Timeout
mmcsd0: Error indicated: 2 Bad CRC
mmcsd0: Error indicated: 2 Bad CRC
mmcsd0: Error indicated: 2 Bad CRC
mmcsd0: Error indicated: 2 Bad CRC
sdhci_pci0-slot0: Got data interrupt 0x00200000, but there is no active command.
sdhci_pci0-slot0: ============== REGISTER DUMP ==============
sdhci_pci0-slot0: Sys addr: 0x06317200 | Version: 0x00000502
sdhci_pci0-slot0: Blk size: 0x00000200 | Blk cnt: 0x00000010
sdhci_pci0-slot0: Argument: 0x00000200 | Trn mode: 0x00000037
sdhci_pci0-slot0: Present: 0x01ff0000 | Host ctl: 0x00000007
sdhci_pci0-slot0: Power: 0x0000000f | Blk gap: 0x00000000
sdhci_pci0-slot0: Wake-up: 0x00000000 | Clock: 0x00000007
sdhci_pci0-slot0: Timeout: 0x0000000d | Int stat: 0x00000000
sdhci_pci0-slot0: Int enab: 0x01ff00fb | Sig enab: 0x01ff00fb
sdhci_pci0-slot0: AC12 err: 0x00000000 | Slot int: 0x00000000
sdhci_pci0-slot0: Caps: 0x21e8c8b2 | Max curr: 0x00000040
sdhci_pci0-slot0: ===========================================
sdhci_pci0-slot0: Got data interrupt 0x00200000, but there is no active command.
sdhci_pci0-slot0: ============== REGISTER DUMP ==============
sdhci_pci0-slot0: Sys addr: 0x06317200 | Version: 0x00000502
sdhci_pci0-slot0: Blk size: 0x00000200 | Blk cnt: 0x00000001
sdhci_pci0-slot0: Argument: 0x00000040 | Trn mode: 0x00000013
sdhci_pci0-slot0: Present: 0x01ff0000 | Host ctl: 0x00000007
sdhci_pci0-slot0: Power: 0x0000000f | Blk gap: 0x00000000
sdhci_pci0-slot0: Wake-up: 0x00000000 | Clock: 0x00000007
sdhci_pci0-slot0: Timeout: 0x0000000d | Int stat: 0x00000000
autofs_flush: /net flushed
sdhci_pci0-slot0: Int enab: 0x01ff00fb | Sig enab: 0x01ff00fb
autofs_flush: /media flushed
sdhci_pci0-slot0: AC12 err: 0x00000000 | Slot int: 0x00000000
sdhci_pci0-slot0: Caps: 0x21e8c8b2 | Max curr: 0x00000040
sdhci_pci0-slot0: ===========================================

Afterwards all operations on /dev/mmcsd0 fail with EIO.

Reviewed by:	jhb@
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D6265
2016-05-11 07:50:35 +00:00
Konstantin Belousov
b6a60ae74a Use vfs_hash_ref(9) to eliminate LK_EXCLOTHER kludge. As a
consequence, the nfs client override of VOP_LOCK1() is no longer
needed.

Reviewed and tested by:	rmacklem
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2016-05-11 06:35:46 +00:00
Konstantin Belousov
54a33d2f97 Add vfs_hash_ref(9) function, which finds a vnode by the hash value
and returns it referenced.

The function is similar to vfs_hash_get(9), but unlike the later,
returned vnode is not locked.  This operation cannot be requested with
the vget(9) flags.

Reviewed and tested by:	rmacklem
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2016-05-11 06:32:22 +00:00
Andrew Rybchenko
8b94864213 sfxge(4): update unicast filter insertion algorithm
As unicast filters are not chained, we should always try to insert the
specific filter for our MAC address, and then try to insert the unicast
mis-match filter if that fails or all unicast has been requested.

Submitted by:   Mark Spender <mspender at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D6295
2016-05-11 06:29:07 +00:00
Andrew Rybchenko
47cb5106d2 sfxge(4): fix efx_filter_reconfigure parameter type
This caused signed/unsigned errors in some subsequent patches.
The only value passed to this is a uint32_t.

Submitted by:   Mark Spender <mspender at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D6294
2016-05-11 06:28:08 +00:00
Adrian Chadd
e426860f64 [siba] add r4 and r8 sprom formats for core_pwr_info.
The upcoming bwn(4) N-PHY support requires this (among other things that
are (hopefully) upcoming.)

Obtained from:	Linux ssb (definitions)
2016-05-11 06:27:46 +00:00
Konstantin Belousov
cd85d599d8 Style: wrap long lines.
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2016-05-11 06:27:00 +00:00
Andrew Rybchenko
b7875d2cdd sfxge(4): make efx_sram_test Siena-only
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D6293
2016-05-11 06:21:07 +00:00
Andrew Rybchenko
f634dfda66 sfxge(4): add new Emerald board sensors to common code
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D6292
2016-05-11 06:19:53 +00:00
Andrew Rybchenko
95812f27e1 sfxge(4): simplify efx_mac_select
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D6291
2016-05-11 06:19:05 +00:00
Andrew Rybchenko
0de035aa72 sfxge(4): remove Falcon specific EV_GLOBAL support
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D6290
2016-05-11 06:18:15 +00:00
Andrew Rybchenko
a4983a11aa sfxge(4): remove Falcon-specific code paths from common code
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D6289
2016-05-11 06:16:53 +00:00
Andrew Rybchenko
f49cb708cd sfxge(4): add TLV format buffer manipulation functions for V3 licensing
The licensing partition for V3 licensing will use the standard TLV format,
so Medford licensing operations on the staging buffer are implemented using
the TLV functions.

Submitted by:   Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D6288
2016-05-11 06:15:07 +00:00
Sepherosa Ziehau
11a55b7340 hyperv/hn: Extract RSS hash value and type.
MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D6287
2016-05-11 03:31:25 +00:00
Justin Hibbits
b03f6e30cc Don't mark the initial portal registers as fully mapped.
BMan and QMan will do this at attach time.  Even though the registers are mapped
now, dpaa_portal_map_registers() will be called at BMan and QMan attach time,
updating the mappings to be private, and in the case of cache-enabled registers,
marked as coherent memory mappings.
2016-05-11 00:41:40 +00:00
Oleksandr Tymoshenko
e2a1919df0 Use DEVMETHOD_END instead of its value to indicate end of methods table 2016-05-11 00:34:43 +00:00
Oleksandr Tymoshenko
26c36284a9 Use GPIO pin management API in gpiobacklight
- Get rid of hack with re-parenting gpio-leds node to gpiobus
- Use gpio_pin_set_active to enable/disable backlight, it automatically
    takes care of active-low pins
2016-05-11 00:26:52 +00:00
Adrian Chadd
0c3833fbcb Rename siba -> siba_s5, to specifically reference that it's for the
legacy siba sentry5 cpu glue.

The siba_cc code is the hard-coded chipcommon bits for the sentry s5,
which will eventually be replaced with the more flexible bhnd sipa/cc
code.

bwn, etc uses siba_bwn, which doesn't use siba or siba_cc to do anything.
2016-05-10 22:38:39 +00:00
Bjoern A. Zeeb
c850971baf Allow orm(4) to be disabled from probing/attaching by a hints entry:
hint.orm.0.disabled=1

Suggested by:	jhb
Reviewed by:	jhb
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D6307
2016-05-10 22:28:06 +00:00
John Baldwin
cf8cdda37c Move vm_domain_rr_selectdomain() under #ifdef VM_NUMA_ALLOC.
The function had a null function body in the !VM_NUMA_ALLOC case but
also wasn't called in the !VM_NUMA_ALLOC case.

Suggested by:	ngie
2016-05-10 22:25:55 +00:00
Conrad Meyer
ab11d379fa netipsec: Fix minor style nit
Coverity points out that 'continue' is equivalent to 'break' in a do {}
while(false) loop.

Reported by:	Coverity
CID:		1354983
Sponsored by:	EMC / Isilon Storage Division
2016-05-10 20:14:11 +00:00
Oleksandr Tymoshenko
51702162cc Pass device tree node as a part of gpio_pin_get_by_ofw_XXX API
Current API assumes that "gpios" property belongs to the device's node but for
some binding it's not true: gpiokeys has set of child nodes with this property.

Patch adds new argument instead of replacing device_t because device_t will be
used to track ownership for allocated pins

Reviewed by:	mmel
Differential Revision:	https://reviews.freebsd.org/D6277
2016-05-10 20:02:03 +00:00
Emmanuel Vadot
3a0f677c9d When PLATFORM_SMP is enabled, check if tunable hw.ncpu is set and valid
(>= 1 and <= real ncores) and set mp_ncpus to it.

Approved by:	andrew (mentor)
Differential Revision:	https://reviews.freebsd.org/D6151
2016-05-10 19:11:25 +00:00
Hans Petter Selasky
6a55ff4866 Ensure waiting loops terminate during cold boot. This fixes boot with
MacBookPro and i915kms_load="YES" in /boot/loader.conf.

A lowlevel timeout in one of the display ports caused an infinite wait
because a ticks/jiffies comparison was constant. The clock subsystem
which makes ticks/jiffies increment is started after the initial
driver probing is done. Refer to sys/kernel.h and SI_SUB_DRIVERS vs
SI_SUB_CLOCKS .

Discussed with:	kmacy @
2016-05-10 18:18:29 +00:00
Emmanuel Vadot
498b9fa710 Merge a20_mp_start_ap and a31_mp_start_ap into one function.
This function works with all smp non-multicluster allwinner SoC (A20, A31, A31S and H3).

Approved by:	cognet (mentor)
Differential Revision:	https://reviews.freebsd.org/D6269
2016-05-10 18:00:37 +00:00
Hans Petter Selasky
f2dbb750f4 Implement ioremap_wt() and use that in the MEMREMAP_WT case for i386
and amd64.

Suggested by:	cem @
Discussed with:	kmacy @
MFC after:	1 week
Sponsored by:	Mellanox Technologies
2016-05-10 17:51:17 +00:00
Pedro F. Giffuni
594c945a54 aic7xxx: minor spelling fixes.
Affects mostly comments but also a visible text string,

Differential Revision:	https://reviews.freebsd.org/D6270
2016-05-10 16:40:19 +00:00
Hans Petter Selasky
ae14b49908 Fix kernel LINT build after r299363.
Define shadowing macros the same way to avoid macro redefinition
compile error(s) for now.

Approved by:	np @
2016-05-10 16:31:18 +00:00
Alexander Motin
ed246e8260 Allow sleepable allocations in enclosure daemon threads.
There were at least two places where M_NOWAIT was used without NULL check.
This change should fix NULL-dereference panic there and possibly improve
operation in other ways under memory pressure.

MFC after:	2 weeks
2016-05-10 16:20:36 +00:00
Edward Tomasz Napierala
d68fae5849 Add "camcontrol reprobe" subcommand, and implement it for da(4).
This makes it possible to manually force updating capacity data
after the disk got resized. Without it it might be neccessary to
reboot before FreeBSD notices updated disk size under eg VMWare.

Discussed with:	imp@
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D6108
2016-05-10 15:46:33 +00:00
Andrew Turner
fb853e4270 Push the logic to talk with the MSI/MSI-X interrupt controller to the FDT
attachment. This is where it will live when we import intrng as it will
need to look at either the msi-parent or msi-map FDT properties.

Obtained from:	ABT Systems Ltd
Sponsored by:	The FreeBSD Foundation
2016-05-10 15:45:59 +00:00
Edward Tomasz Napierala
13a8942827 Remove NULL checks after M_WAITOK allocations from mpr(4).
Reviewed by:	asomers@
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D6297
2016-05-10 15:04:24 +00:00
Bjoern A. Zeeb
d360a5589e siba depends on bhndbus; add the device to the kernel config.
This gets us past compiling and now only linking is failing on builtins.
2016-05-10 14:59:48 +00:00
Edward Tomasz Napierala
6db37b5649 Remove NULL checks after M_WAITOK allocations from mps(4).
Reviewed by:	asomers@
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D6296
2016-05-10 14:57:14 +00:00
Hans Petter Selasky
684a5fef01 Add more LinuxKPI I/O functions.
Obtained from:	kmacy @
MFC after:	1 week
Sponsored by:	Mellanox Technologies
2016-05-10 12:04:57 +00:00
Hans Petter Selasky
7652bc32f7 Use function macros when possible to avoid stray substitutions.
MFC after:	1 week
Sponsored by:	Mellanox Technologies
2016-05-10 11:39:36 +00:00
Hans Petter Selasky
f2f5b1337e Add missing semicolon and properly wrap macro argument.
MFC after:	1 week
Sponsored by:	Mellanox Technologies
2016-05-10 11:34:22 +00:00
Hans Petter Selasky
c7d81c66df Allow the argument for the cpu_to_xxxp() and xxx_to_cpup() macros to
point to a constant.

Obtained from:	kmacy @
MFC after:	1 week
Sponsored by:	Mellanox Technologies
2016-05-10 11:31:00 +00:00
Edward Tomasz Napierala
084d207584 Remove misc NULL checks after M_WAITOK allocations.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2016-05-10 10:26:07 +00:00
Edward Tomasz Napierala
b00039f739 Remove NULL check after M_WAITOK allocations from mfi(4).
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2016-05-10 10:24:35 +00:00
Edward Tomasz Napierala
256a4cb9d7 Remove NULL checks after M_WAITOK allocations from firewire.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2016-05-10 10:21:03 +00:00
Konstantin Belousov
aa3ec63e02 Add locking annotations to amd64 struct md_page members.
Reviewed by:	alc
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2016-05-10 09:58:51 +00:00
Alexander Motin
8fadf66094 Fix previous commit to report proper error code.
MFC after:	2 weeks
2016-05-10 08:37:41 +00:00
Alexander Motin
38618bf430 Validate XCOPY range offsets and lengths.
MFC after:	2 weeks
2016-05-10 08:28:16 +00:00
Alexander Motin
e13f4248db More XCOPY parameters validation.
MFC after:	2 weeks
2016-05-10 08:08:39 +00:00
Andrew Rybchenko
a07bcda4ea sfxge(4): cleanup: fix typo
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
2016-05-10 08:00:40 +00:00
Andrew Rybchenko
dcb49ebade sfxge(4): cleanup: remove unneeded include files
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
2016-05-10 07:59:23 +00:00
Andrew Rybchenko
04bd9a165a sfxge(4): cleanup: remove unused efx_infer_family()
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
2016-05-10 07:42:18 +00:00
Andrew Rybchenko
908ecfc65d sfxge(4): cleanup: remove obsolete common code module
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
2016-05-10 07:40:03 +00:00
Andrew Rybchenko
7bfe1d8677 sfxge(4): cleanup: fix typos
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
2016-05-10 07:38:23 +00:00
Andrew Rybchenko
69a8775247 sfxge(4): cleanup efx_check.h comments and error messages
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
2016-05-10 07:22:19 +00:00
Andrew Rybchenko
b18622c3b3 sfxge(4): remove EFSYS_OPT_PHY_TXC43128
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
2016-05-10 07:21:14 +00:00
Andrew Rybchenko
ffb5b3947f sfxge(4): remove EFSYS_OPT_PHY_SFX7101
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
2016-05-10 07:20:18 +00:00
Andrew Rybchenko
7d276678b9 sfxge(4): remove EFSYS_OPT_PHY_SFT9001
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
2016-05-10 07:19:15 +00:00
Andrew Rybchenko
784995f8f3 sfxge(4): remove EFSYS_OPT_PHY_QT2025C
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
2016-05-10 07:18:18 +00:00
Andrew Rybchenko
0c2328b0ad sfxge(4): remove EFSYS_OPT_PHY_QT2022C2
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
2016-05-10 07:17:08 +00:00
Andrew Rybchenko
45a31c66ed sfxge(4): remove EFSYS_OPT_PHY_NULL
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
2016-05-10 07:15:57 +00:00
Andrew Rybchenko
eaec7581ab sfxge(4): remove EFSYS_OPT_NVRAM_SFX7101
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
2016-05-10 07:15:09 +00:00
Alexander Motin
3eb7651aad Improve validation of some POPULATE TOKEN parameters.
MFC after:	2 weeks
2016-05-10 07:14:49 +00:00
Andrew Rybchenko
d9b66edc7e sfxge(4): remove EFSYS_OPT_NVRAM_SFT9001
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
2016-05-10 07:13:45 +00:00
Andrew Rybchenko
6e85f167f6 sfxge(4): remove EFSYS_OPT_FALCON_BOOTROM
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
2016-05-10 07:12:27 +00:00
Andrew Rybchenko
1c7fb9c767 sfxge(4): remove EFSYS_OPT_MON_NULL
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
2016-05-10 07:11:09 +00:00
Andrew Rybchenko
3f20cf969d sfxge(4): remove EFSYS_OPT_MON_MAX6647
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
2016-05-10 07:09:18 +00:00
Andrew Rybchenko
4060d2b031 sfxge(4): remove EFSYS_OPT_MON_LM87
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
2016-05-10 07:08:40 +00:00
Andrew Rybchenko
16f997ae55 sfxge(4): remove EFSYS_OPT_MAC_FALCON_XMAC
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
2016-05-10 07:07:49 +00:00
Andrew Rybchenko
56dae5be28 sfxge(4): remove EFSYS_OPT_MAC_FALCON_GMAC
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
2016-05-10 07:06:44 +00:00
Andrew Rybchenko
53e1d37767 sfxge(4): remove EFSYS_OPT_FALCON_NIC_CFG_OVERRIDE
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
2016-05-10 07:02:59 +00:00
Andrew Rybchenko
e75412c9cb sfxge(4): remove EFSYS_OPT_FALCON
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
2016-05-10 07:01:06 +00:00
Andrew Rybchenko
0d38c77d19 sfxge(4): add TLV item manipulation functions to common code
Add creation, deletion and checksumming operations to the private copy of
TLV functions in the common code.  Functions added in preparation for V3
licensing support, as licensing keys are stored in the TLV format.  Missing
support for multiple segment partitions added. Annotations for Windows code
analysis also updated.

Submitted by:   Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D6264
2016-05-10 06:53:38 +00:00
Andrew Rybchenko
5abce2b919 sfxge(4): restructure TLV buffer validation
Move TLV buffer validation into ef10-specific function and add accessor
function which also converts the partition ID to the internal
representation.

Submitted by:   Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D6263
2016-05-10 06:51:20 +00:00
Adrian Chadd
45d8d7918e [siba] migrate siba.c to siba_mips.c
Turns out that ye olde siba.c is /just/ the siba mips code (used by
the initial SENTRY5 port.  However, I don't think it was ever
finished enough to be useful, and I do have this nagging feeling
that we'll eventually replace it with the bhnd code.

But, since bhnd(4) introduced siba.c too, we ended up with a
source file name clash, and that broke the SENTRY5 build.

It /looks/ like this is the only place siba.c / device siba is
used.
2016-05-10 05:05:23 +00:00
Sepherosa Ziehau
e6ec45f869 tcp/syncache: Add comment for syncache_respond
Suggested by:	hiren, hps
Reviewed by:	sbruno
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D6148
2016-05-10 04:59:04 +00:00
Adrian Chadd
05992f9e2c [bhnd] fix bcma resource allocation for regions; EROM work around.
* bcma.c - assign different resource IDs for different regions
* bcma_erom.c - workaround for BCM/MIPS bus enumerations

Tested:

* (submitter) Tested on ASUS RT-N16 initially, double checked on ASUS RT-N53
* (landonf) BCM4331

Submitted by:	Michael Zhilin <mizkha@gmail.com>
Differential Revision:	https://reviews.freebsd.org/D6245
2016-05-10 04:55:57 +00:00
John Baldwin
d9eed6f42e Don't store generated firmware object files in the source directory.
Trim the leading directory of a firmware source file from the resulting
target object file name so the object file is stored in the object
directory. Previously, using 'FIRMWS= /path/to/fw.bin:fw.bin' would
store the generated 'fw.bin.fwo' file in the /path/to directory. Now
it stores it in the object directory of the kernel module being built.

Reviewed by:	bdrewery
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D6285
2016-05-10 03:34:20 +00:00
John Baldwin
f7bc393477 Forward declare 'struct cpl_set_tcb_rpl' before including t4_tom.h. 2016-05-10 03:32:22 +00:00
Mark Johnston
df890b8e73 Remove obsolescent comments from nd6_purge().
MFC after:	1 week
2016-05-09 23:43:12 +00:00
John Baldwin
8d791e5af1 Add a new bus method to fetch device-specific CPU sets.
bus_get_cpus() returns a specified set of CPUs for a device.  It accepts
an enum for the second parameter that indicates the type of cpuset to
request.  Currently two valus are supported:

 - LOCAL_CPUS (on x86 this returns all the CPUs in the package closest to
   the device when DEVICE_NUMA is enabled)
 - INTR_CPUS (like LOCAL_CPUS but only returns 1 SMT thread for each core)

For systems that do not support NUMA (or if it is not enabled in the kernel
config), LOCAL_CPUS fails with EINVAL.  INTR_CPUS is mapped to 'all_cpus'
by default.  The idea is that INTR_CPUS should always return a valid set.

Device drivers which want to use per-CPU interrupts should start using
INTR_CPUS instead of simply assigning interrupts to all available CPUs.
In the future we may wish to add tunables to control the policy of
INTR_CPUS (e.g. should it be local-only or global, should it ignore
SMT threads or not).

The x86 nexus driver exposes the internal set of interrupt CPUs from the
the x86 interrupt code via INTR_CPUS.

The ACPI bus driver and PCI bridge drivers use _PXM to return a suitable
LOCAL_CPUS set when _PXM exists and DEVICE_NUMA is enabled.  They also and
the global INTR_CPUS set from the nexus driver with the per-domain set from
_PXM to generate a local INTR_CPUS set for child devices.

Compared to the r298933, this version uses 'struct _cpuset' in
<sys/bus.h> instead of 'cpuset_t' to avoid requiring <sys/param.h>
(<sys/_cpuset.h> still requires <sys/param.h> for MAXCPU even though
<sys/_bitset.h> does not after recent changes).
2016-05-09 20:50:21 +00:00
John Baldwin
d3cd2df1f2 Forward declare 'struct cpl_set_tcb_rpl' before including t4_tom.h.
Other structures needed by prototypes in t4_tom.h are explicitly
declared in this file, so adding the prototype here seems most
consistent with existing code.
2016-05-09 20:01:34 +00:00
Pedro F. Giffuni
9be4c8d056 otus: minor catchup with OpenBSD.
Bump the OpenBSD revision tag since the corresponding changes don't
apply to us and drop an unnecessary header.

No functional change.
2016-05-09 19:28:22 +00:00
Hiren Panchasara
7c375daa61 Add an option to use rfc6675 based pipe/inflight bytes calculation in htcp.
Submitted by:	Kevin Bowling <kevin.bowling@kev009.com>
MFC after:	1 week
Sponsored by:	Limelight Networks
2016-05-09 19:19:03 +00:00
Adrian Chadd
f9cf87a0e0 [bhnd] fix incorrect typing.
Pointed out by: emaste
2016-05-09 17:19:17 +00:00
Stephen McConnell
e769dfac49 Bump version of mpr driver to 13.00.00.00-fbsd
Approved by:	ken, scottl, ambrisko
MFC after:      1 week
2016-05-09 16:38:51 +00:00
Stephen McConnell
58581c1363 Disks can go missing until a reboot is done in some cases.
This is due to the DevHandle not being released, which causes the Firmware to
not allow that disk to be re-added.

Reviewed by:    ken, scottl, ambrisko, asomers
Approved by:	ken, scottl, ambrisko
MFC after:      1 week
Differential Revision: https://reviews.freebsd.org/D6102
2016-05-09 16:36:40 +00:00
Michael Tuexen
a807fe2d83 Cleanup a comment.
MFC after: 1 week
2016-05-09 16:35:05 +00:00
Stephen McConnell
5d21655f67 done_ccb pointer can be used if it is NULL.
To prevent this, move check for done_ccb == NULL to before done_ccb is used in
mprsas_stop_unit_done().

Reviewed by:    ken, scottl, ambrisko, asomers
Approved by:	ken, scottl, ambrisko
MFC after:      1 week
Differential Revision: https://reviews.freebsd.org/D6099
2016-05-09 16:34:06 +00:00
Stephen McConnell
407073a044 Use callout_reset_sbt() instead of callout_reset() if FreeBSD ver is >= 1000029
Reviewed by:    ken, scottl, ambrisko, asomers
Approved by:	ken, scottl, ambrisko
MFC after:      1 week
Differential Revision: https://reviews.freebsd.org/D6101
2016-05-09 16:31:43 +00:00
Stephen McConnell
dd9f4a95b2 No need to set the MPRSAS_SHUTDOWN flag because it's never used.
Approved by:	ken, scottl, ambrisko
MFC after:      1 week
2016-05-09 16:29:25 +00:00
Stephen McConnell
8861939221 Fix possible use of invalid pointer.
It was possible to use an invalid pointer to get the target ID value. To fix
this, initialize a local Target ID variable to an invalid value and change that
variable to a valid value only if the pointer to the Target ID is not NULL.

Reviewed by:    ken, scottl, ambrisko, asomers
Approved by:	ken, scottl, ambrisko
MFC after:      1 week
Differential Revision: https://reviews.freebsd.org/D6100
2016-05-09 16:26:34 +00:00
Stephen McConnell
b41c6ff97a Change logging level for a debug string to use MPR_LOG instead of MPR_INFO.
Approved by:	ken, scottl, ambrisko
MFC after:      1 week
2016-05-09 16:24:16 +00:00
Stephen McConnell
d3f6eabf13 No log bit in IOCStatus and endian-safe changes.
Use MPI2_IOCSTATUS_MASK when checking IOCStatus to mask off the log bit, and
make a few more things endian-safe.

Reviewed by:    ken, scottl, ambrisko, asomers
Approved by:	ken, scottl, ambrisko
MFC after:      1 week
Differential Revision: https://reviews.freebsd.org/D6097
2016-05-09 16:21:14 +00:00
Stephen McConnell
2bbc5fcb4b Add support for the Broadcom (Avago/LSI) 9305 16 and 24 port HBA's.
Reviewed by:    ken, scottl, ambrisko, asomers
Approved by:	ken, scottl, ambrisko
MFC after:      1 week
Relnotes:       yes
Differential Revision: https://reviews.freebsd.org/D6098
2016-05-09 16:19:13 +00:00
Stephen McConnell
7a2a6a1a6f Several style changes and add copyrights for 2016.
Reviewed by:    ken, scottl, ambrisko, asomers
Approved by:	ken, scottl, ambrisko
MFC after:      1 week
Differential Revision: https://reviews.freebsd.org/D6103
2016-05-09 16:16:00 +00:00
Stephen McConnell
28ae62b066 Update MPI headers to version 42.
Reviewed by:    ken, scottl, ambrisko, asomers
Approved by:	ken, scottl, ambrisko
MFC after:      1 week
Differential Revision: https://reviews.freebsd.org/D6096
2016-05-09 16:12:32 +00:00
Andrew Turner
b48c608386 Check malloc succeeded in pic_create, with M_NOWAIT it may return NULL.
Obtained from:	ABT Systems Ltd
Sponsored by:	The FreeBSD Foundation
2016-05-09 12:24:39 +00:00
Hans Petter Selasky
0754e66c54 Fix file polling bug.
Ensure the actual poll result is returned by the "linux_file_poll()"
function instead of zero which means no data is available.

MFC after:	3 days
Sponsored by:	Mellanox Technologies
2016-05-09 11:52:57 +00:00
Andrew Rybchenko
ca738e7a95 sfxge(4): remove EFSYS_OPT_PCIE_TUNE
With the removal of Falcon support, this is now dead code.

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
2016-05-09 08:38:56 +00:00
Andrew Rybchenko
5af774cbaf sfxge(4): disable common code support for Falcon
This patch ensures that client code will fail to build
with Falcon support. Following patches remove Falcon
support code entirely.

sfxge(4) has never supported Falcon.

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
2016-05-09 08:37:42 +00:00
Andrew Rybchenko
aa7e294253 sfxge(4): cleanup: fix obsolete EFSYS_OPT_PHY_BIST option
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
2016-05-09 08:35:08 +00:00
Andrew Rybchenko
edf6d8af7a sfxge(4): Siena no longer supports EFSYS_OPT_PCIE_TUNE
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
2016-05-09 08:32:49 +00:00
Andrew Rybchenko
cc22e260bb sfxge(4): remove unused efx_nic_pcie_extended_sync()
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
2016-05-09 08:28:52 +00:00
Dmitry Chagin
8521d01a71 Add a forgotten in r283424 .eh_frame section with CFI & FDE records to allow
stack unwinding through signal handler.

Reported by:	Dmitry Sivachenko
MFC after:	2 weeks
2016-05-09 07:38:47 +00:00
Adrian Chadd
c39790cd22 [siba] add 2GHz/5GHz FEM parameter fetching and accessor methods.
This is used by the bwn(4) PHY-N code that I'm working on.
2016-05-09 06:30:00 +00:00
Adrian Chadd
53daa9cd9c [siba] add FEM variables from the r8 SPROM layout.
This will eventually be used the bwn(4) N-PHY code that I'm (slowly)
writing.

Obtained from:	Linux b43
2016-05-09 06:05:23 +00:00
Adrian Chadd
e8f2757c0f [bwn] oops. typo. 2016-05-09 06:02:57 +00:00
Adrian Chadd
46d0ce84cc [bwn] add opt_bwi.h and BWN_DEBUG.
It isn't used yet in the bwn(4) code; that'll come next.
2016-05-09 05:59:21 +00:00
Adrian Chadd
e83ce34035 [bhnd] Initial bhnd(4) SPROM/NVRAM support.
This adds support for the NVRAM handling and the basic SPROM
hardware used on siba(4) and bcma(4) devices, including:

* SPROM directly attached to the PCI core, accessible via PCI configuration
  space.
* SPROM attached to later ChipCommon cores.
* SPROM variables vended from the parent SoC bus (e.g. via a directly-attached
  flash device).

Additional improvements to the NVRAM/SPROM interface will
be required, but this changeset stands alone as working
checkpoint.

Submitted by:	Landon Fuller <landonf@landonf.org>
Reviewed by:	Michael Zhilin <mizkha@gmail.com> (Broadcom MIPS support)
Differential Revision:	https://reviews.freebsd.org/D6196
2016-05-08 19:14:05 +00:00
Adrian Chadd
f74f1a68d5 [bhnd] Add support for matching on chip identifiers.
This is used by the upcoming SPROM code to match on chipsets
that require special handling of muxed SPROM pins.

Submitted by:	Landon Fuller <landonf@landonf.org>
Differential Revision:	https://reviews.freebsd.org/D6195
2016-05-08 18:30:08 +00:00