Commit Graph

31550 Commits

Author SHA1 Message Date
Enji Cooper
c72088fd52 Delete duplicate declaration for i40e_blink_phy_link_led(..)
It was already declared on line 90

Differential Revision: https://reviews.freebsd.org/D6570
Reported by: gcc
Reviewed by: sbruno
Sponsored by: EMC / Isilon Storage Division
2016-05-29 01:52:05 +00:00
Andrew Turner
7bc7e3cd65 Don't panic in hwpmc when stopping sampling.
When hwpmc stops sampling it will set the pm_state to something other
than PMC_STATE_RUNNING. This means the following sequence can happen:

CPU 0: Enter the interrupt handler
CPU 0: Set the thread TDP_CALLCHAIN pflag
CPU 1: Stop sampling
CPU 0: Call pmc_process_samples, sampling is stopped so clears ps_nsamples
CPU 0: Finishes interrupt processing with the TDP_CALLCHAIN flag set
CPU 0: Call pmc_capture_user_callchain to capture the user call chain
CPU 0: Find all the pmc sample are free so no call chains need to be captured
CPU 0: KASSERT because of this

This fixes the issue by checking if any of the samples have been stopped
and including this in te KASSERT.

PR:		204273
Reviewed by:	bz, gnn
Obtained from:	ABT Systems Ltd
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D6581
2016-05-28 13:05:39 +00:00
Adrian Chadd
38c4fdf4c6 [ath] add WB335 btcoex for initial testing.
This is like the WB222 coexistence (ie, "MCI", a message bus inside the
chip), and it's currently a cut/paste so I can start using it to flesh
out the differences with WB222.

It doesn't completely /do/ bluetooth coexistence, because it turns out
I need to add some contigmalloc'ed buffers to the btcoex path for this
type of hardware.  I'm putting this work in the "people would like
to see functioning-ish btcoex before FreeBSD-11" bucket because I see
this as "broken".

Tested:

* QCA9535 (WB335) NIC, BT + 2GHz STA
2016-05-28 02:14:24 +00:00
Navdeep Parhar
addd6a52c4 cxgbe/t4_tom: Exempt RDMA connections from a TCP sanity test for now, to
avoid panicking debug kernels.

t4_tom does not keep track of a connection once it switches to ULP mode
iWARP.  If the connection falls out of ULP mode the driver/hardware seq#
etc. are out of sync.  A better fix would be to figure out what the
current seq# are, update the driver's state, and perform all sanity
checks as usual.
2016-05-28 00:38:17 +00:00
Bryan Drewery
b7622235d0 Don't truncate existing error when writing the log.
Suggested by:	markj
MFC after:	2 weeks
Sponsored by:	EMC / Isilon Storage Division
2016-05-27 23:58:00 +00:00
Bryan Drewery
33094a87c4 Rename function to be less generic.
MFC after:	2 weeks
Sponsored by:	EMC / Isilon Storage Division
2016-05-27 23:57:57 +00:00
Bryan Drewery
7ae27ff963 Write to the log using the tracer's credentials.
MFC after:	2 weeks
Sponsored by:	EMC / Isilon Storage Division
2016-05-27 23:57:53 +00:00
Bryan Drewery
f14fbe72ec exec: Cease tracing if credentials will change with the new image.
This also prevents tracing to a P_INEXEC process since it could race
with other processes attaching to it in filemon_event_process_exec() due
to the filemon_get_proc() race of incrementing ref and then locking the
filemon.  With the no-P_INEXEC invariant in place the p_filemon may only
be the same or NULL when trying to drop it in
filemon_event_process_exec().

MFC after:	2 weeks
Sponsored by:	EMC / Isilon Storage Division
Differential Revision:	https://reviews.freebsd.org/D6545
2016-05-27 23:57:43 +00:00
Navdeep Parhar
fc511a3302 iw_cxgbe: Plug a lock leak in process_mpa_request().
If the parent is DEAD or connect_request_upcall() fails, the parent
mutex is left locked.  This leads to a hang when process_mpa_request()
is called again for another child of the listening endpoint.

Submitted by:	Krishnamraju Eraparaju @ Chelsio
Obtained from:	upstream iw_cxgb4
Sponsored by:	Chelsio Communications
2016-05-27 23:44:33 +00:00
Ian Lepore
ad5a172c99 Fix erronious mixed use of tx/rx variables/constants in the same expression.
Pointed out by jmcneill; other instances found by grep -iE 'rx.*tx|tx.*rx'
2016-05-27 22:14:39 +00:00
Navdeep Parhar
69b913d68f iw_cxgbe: Use vmem(9) to manage PBL and RQT allocations.
Submitted by:	Krishnamraju Eraparaju at Chelsio
Reviewed by:	Steve Wise
Sponsored by:	Chelsio Communications
2016-05-27 21:26:26 +00:00
Ian Lepore
781ca89cf6 Don't wrap the declaration of gpio_alloc_intr_resource() in #ifdef INTRNG,
wrap the implementation so that it returns an error if INTRNG support is
not available.  It should be possible to write a non-INTRNG implementation
of this function some day.  In the meantime, there is code that contains
calls to this function (so the decl is needed), but have runtime checks to
avoid calling it in the non-INTRNG case.
2016-05-27 20:41:25 +00:00
Andrew Rybchenko
c34e3d6862 sfxge(4): fix typo in monitor types strings in common code
Submitted by:   Garrett D'Amore <garrett at damore.org>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
2016-05-27 11:50:26 +00:00
Andrew Rybchenko
8d8507f1ba sfxge(4): avoid necessity to add one more constant condition note
Use for forever loop instead of while.

Found by lint on illumos.

Submitted by:   Garrett D'Amore <garrett at damore.org>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
2016-05-27 11:49:46 +00:00
Andrew Rybchenko
2bfb64322a sfxge(4): cope with always true unsigned comparison with 0 to make lint happier
Found by lint on illumos.

Submitted by:   Garrett D'Amore <garrett at damore.org>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
2016-05-27 11:49:05 +00:00
Andrew Rybchenko
2ceb37acba sfxge(4): unsigned 1 should be shifted to produce bitmask
Found by lint on illumos.

Submitted by:   Garrett D'Amore <garrett at damore.org>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
2016-05-27 11:48:25 +00:00
Andrew Rybchenko
898285cdb2 sfxge(4): cope with lint for EFX_SET_OWORD_BIT() with const bit arg
Found by lint on illumos.

Submitted by:   Garrett D'Amore <garrett at damore.org>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
2016-05-27 11:47:56 +00:00
Andrew Rybchenko
647a7e8f49 sfxge(4): remove set but not used variable
Found by lint on illumos.

Submitted by:   Garrett D'Amore <garrett at damore.org>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
2016-05-27 11:47:11 +00:00
Andrew Rybchenko
1972e0c429 sfxge(4): remove unreachable break after goto
Found by lint on illumos.

Submitted by:   Garrett D'Amore <garrett at damore.org>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
2016-05-27 11:46:35 +00:00
Andrew Rybchenko
5e951ea735 sfxge(4): add constant condition note to make lint happier
Found by lint on illumos.

Submitted by:   Garrett D'Amore <garrett at damore.org>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
2016-05-27 11:45:42 +00:00
Andrew Rybchenko
a92a213321 sfxge(4): note unused variables to make lint happier
Found by lint on illumos.

Submitted by:   Garrett D'Amore <garrett at damore.org>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
2016-05-27 11:44:40 +00:00
Edward Tomasz Napierala
e199d80684 Fix build on i386.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2016-05-27 11:37:02 +00:00
Sepherosa Ziehau
5cb904dc2f hyperv: Test features before enabling optional functionalities
MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D6571
2016-05-27 07:29:31 +00:00
Adrian Chadd
63b3f62ab3 [iwm] remove dead code.
if_iwm - GC some dead code, left by a partially applied OpenBSD change.

Taken-From: OpenBSD (if_iwm.c r1.69)

Submitted by:	Imre Vadasz <imre@vdsz.com>
Obtained from:	DragonflyBSD git 07dfed32ea39b980b0b80d27ff938e7c3ca4c0b5
2016-05-27 07:10:11 +00:00
Sepherosa Ziehau
7da9c32e83 hyperv: Clean up Hyper-V timecounter a bit.
MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D6569
2016-05-27 07:05:30 +00:00
Sepherosa Ziehau
62eb6e21b6 hyperv: GC unneeded bits
MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D6568
2016-05-27 06:55:05 +00:00
Sepherosa Ziehau
e3ebe93016 hyperv/vmbus: Move MSR EOM to hyperv_reg.h
MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D6567
2016-05-27 06:47:04 +00:00
Sepherosa Ziehau
a4574fd680 hyperv: Move timer related MSRs into hyperv_reg.h
And avoid bit fields for event timer.

MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D6566
2016-05-27 06:12:43 +00:00
Sepherosa Ziehau
a8362fc737 hyperv: Move CPUID related bits to hyperv_reg.h and give them clean name
MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D6565
2016-05-27 05:58:53 +00:00
Ian Lepore
128e3872b9 Add a PPS driver that takes the timing pulse from a gpio pin. Currently
supports only ofw/fdt systems.  Some day, hinted attachment for non-fdt
systems should be possible too.
2016-05-26 23:56:12 +00:00
Bryan Drewery
23ae5cd74e filemon exec: Use imgp->execpath rather than vn_fullpath(9).
This will be more accurate as the actual name is provided if ran
from an absolute path in do_execve().

MFC after:	2 weeks
Sponsored by:	EMC / Isilon Storage Division
2016-05-26 23:27:08 +00:00
Andriy Voskoboinyk
0676206626 rtwn, urtwn: drop unused structures.
urtwn(4) uses another implementation of command queue; rtwn(4) don't need
it at all.
2016-05-26 22:43:02 +00:00
Ian Lepore
5030d499e7 Add a convenience function to get a gpio pin's capabilties. 2016-05-26 22:35:52 +00:00
Emmanuel Vadot
30068a1de9 Add support for interrupts, sensors and GPIO for AXP209 PMIC.
Pressing the PEK (power enable key) will shutdown the board.
Some events are reported to devd via system "PMU" and subsystem
"Battery", "AC" and "USB" such as connected/disconnected.
Some sensors values (power source voltage/current) are reported via
sysctl (dev.axp209_pmu.X.)
It also expose a gpioc node usable in kernel and userland. Only 3 of
the 4 GPIO are exposed (The GPIO3 is different and mostly unused on
boards). Most popular boards uses GPIO1 as a sense pin for OTG power.
Add a dtsi file that adds gpio-controller capability to the device as
upstream doesn't defined it and include it in our custom DTS.

Reviewed by:	jmcneill
Approved by:	cognet (mentor)
Differential Revision:	https://reviews.freebsd.org/D6135
2016-05-26 21:09:07 +00:00
Adrian Chadd
dbe3eb98b5 [siba] use the generic bus methods where appropriate.
Submitted by:	jhibbits
Differential Revision:	https://reviews.freebsd.org/D802
2016-05-26 18:01:03 +00:00
Andriy Voskoboinyk
c146f2712e ral: add missing ic_getradiocaps() assignment. 2016-05-26 17:06:43 +00:00
Ian Lepore
4cbedf8a36 Fix a typo in a comment. 2016-05-26 16:53:50 +00:00
Andriy Voskoboinyk
63b2493fcf bwi: switch to ieee80211_add_channel_list_2ghz().
- Use device's channel list instead of default one (from
ieee80211_init_channels()); adds 12 - 14 2GHz channels.
- Add ic_getradiocaps() method.
2016-05-26 16:48:20 +00:00
Andriy Voskoboinyk
a7c31fe1e9 urtwn, rtwn, rsu: switch to ieee80211_add_channel_list_2ghz().
- Use device's channel list instead of default one (from
ieee80211_init_channels()); adds 12 - 14 2GHz channels.
- Add ic_getradiocaps() method.
2016-05-26 16:39:11 +00:00
Andriy Voskoboinyk
2a06b6b33f urtw: switch to ieee80211_add_channel_list_2ghz().
- Use device's channel list instead of default one (from
ieee80211_init_channels()).
- Add ic_getradiocaps() method.
2016-05-26 16:15:10 +00:00
Andriy Voskoboinyk
0a02496f4b ral: switch to ieee80211_add_channel_list_*()
- Use device's channel list instead of default one (from
ieee80211_init_channels()).
- Add ic_getradiocaps() method.

Added channels:
- 2GHz (all): 12, 13, 14.
- 5GHz:
 * rt2661: 165
 * rt2860: 38, 46, 54, 62, 102, 110, 118, 126, 134, 151, 159, 165, 167,
169, 171, 173.

Differential Revision:	https://reviews.freebsd.org/D6182
2016-05-26 16:05:19 +00:00
Andriy Voskoboinyk
5a62dab132 zyd: switch to ieee80211_add_channel_list_*()
- Use device's channel list instead of default one (adds 12, 13 and 14
2GHz channels).
- Add ic_getradiocaps() method.

Differential Revision:	https://reviews.freebsd.org/D6171
2016-05-26 15:56:27 +00:00
Ian Lepore
c45b842250 Rename gpiobus_map_pin() to gpiobus_acquire_pin(), to better reflect the
fact that the caller is requesting exclusive use of the pin, and also to
better match the inverse operation which is named gpiobus_release_pin().
2016-05-26 15:45:36 +00:00
Andriy Voskoboinyk
83829b483d ural: switch to ieee80211_add_channel_list_*()
- Use device's channel list instead of default one (+ 12, 13 and 14
2GHz channels).
- Add ic_getradiocaps() method.

Differential Revision:	https://reviews.freebsd.org/D6170
2016-05-26 15:12:54 +00:00
Andriy Voskoboinyk
99bb30a9e0 run: switch to ieee80211_add_channel_list_*()
- Use device's channel list instead of default one (from
ieee80211_init_channels()).
- Add ic_getradiocaps() method.

Differential Revision:	https://reviews.freebsd.org/D6144
2016-05-26 15:05:37 +00:00
Andriy Voskoboinyk
354df9d4eb rtwn: replace hardcoded rate indices with their names (similar to r289758).
- Use macros to define rate indices; don't hardcode them in code.
- Add method for 'rate' -> 'rate index' conversion
(and array for the opposite).
- Determine if rate is CCK / OFDM via appropriate macro.

Reviewed by:	adrian
Differential Revision:	https://reviews.freebsd.org/D4837
2016-05-26 14:17:57 +00:00
Andrew Rybchenko
6dd81be2d2 sfxge(4): correct parenthesis location in if coundition
Found by lint on illumos.

Submitted by:   Garrett D'Amore <garrett at damore.org>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
2016-05-26 13:19:44 +00:00
Edward Tomasz Napierala
bcec64bc61 Add a special case for iSER data tranfers.
Obtained from:	Mellanox Technologies
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2016-05-26 12:43:15 +00:00
Edward Tomasz Napierala
4686f1a660 Fix crash on removal of an unconnected iSER session.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2016-05-26 11:40:07 +00:00
Andriy Voskoboinyk
1447d404e0 iwn: add watchdog for scanning.
Restart device if scanning was not done in time.

Tested by:	david@catwhisker.org

PR:		209198
Differential Revision:	https://reviews.freebsd.org/D6176
2016-05-26 11:12:36 +00:00