Commit Graph

31200 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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