Commit Graph

31913 Commits

Author SHA1 Message Date
Sepherosa Ziehau
e93854c495 hyperv/vmbus: Function rename
MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D7230
2016-07-19 05:57:19 +00:00
Sepherosa Ziehau
742fb4f669 hyperv/vmbus: Cleanup cpu based channel selection.
And create cpu to channel map at device attach time for storvsc(4).

MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D7229
2016-07-19 05:46:15 +00:00
Scott Long
a498975ef7 Implement crashdump support on NVME
MFC after:	3 days
Sponsored by:	Netflix, Inc.
2016-07-19 03:13:51 +00:00
Adrian Chadd
ffa25bec32 [ath] don't do LDPC, STBC or short-gi for locationing frames.
The 11n duration calculation function in net80211 and the HAL round /up/
the duration calculation for short-gi, so we can't use that.

The 11n duration calculation doesn't know about the extra symbol time
needed for STBC, nor the LDPC encoding duration, so we can't use
that.

This (along with other, local hacks) allow the locationing services to
get down to around 200nS (yes, nanoseconds) of variance when speaking
to a "good" AP.

Tested:

* AR9380, STA mode, local locationing frame hacks
2016-07-19 00:27:17 +00:00
Alexander Motin
d0cefbdc0d Update if_hwassist when interface options are changed.
In particular for me this fixes checksum problem when if_bridge attached
to the interface requests TXCSUM to be disabled, but effectively ignored.

MFC after:	3 days
Sponsored by:	iXsystems, Inc.
2016-07-18 14:40:13 +00:00
Sepherosa Ziehau
367d703632 hyperv/vmbus: Cosmetic vmbus channel open cleanup
MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D7217
2016-07-18 05:36:31 +00:00
Michal Meloun
efafbd0a87 OFWPCI: Add support for NEW_PCIB.
MFC after: 3 weeks
2016-07-17 13:43:46 +00:00
Michal Meloun
5572376db2 OFWPCI: Improve resource handling.
- add new rman for prefetchable memory. Is used only if given 'ranges'
  property contains prefetchable memory range.

- not all ranges in 'ranges' property are subject for rman's filling.
  Tegra for example, have two addition records which are used for
  'pci 'register' -> 'assigned-address' -> 'ranges' machinery.
  Add sc_ranges_mask for masking not rman related ranges.

- consistently pass unknown (not managed at this level) resources
  allocation/release/adjust requests to parent.

MFC after: 3 weeks
2016-07-17 13:43:00 +00:00
Alexander Motin
e50f405eca In AHCI_IRQ_MODE_AFTER mode do not clear interrupts below.
This is probably a NOP change since IS register is not activery used for
interrupts below the shared, but it looked odd to clear interrupts we did
not handle.
2016-07-17 12:45:58 +00:00
Alexander Motin
eaf4f6fe69 Do not consider the last interrupt shared if there are enough interrupts
for all channels.
2016-07-17 12:31:31 +00:00
Sepherosa Ziehau
d745ae11c9 hyperv/vmbus: Cleanup channel sysctl tree creation
MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D7214
2016-07-15 08:40:22 +00:00
Sepherosa Ziehau
3ccc0ce030 hyperv/vmbus: Cosmetic vmbus channel close cleanup
MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D7213
2016-07-15 08:31:53 +00:00
Sepherosa Ziehau
d0856980e4 hyperv/vmbus: Function rename
MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D7212
2016-07-15 08:23:33 +00:00
Sepherosa Ziehau
a91e5fd55f hyperv/vmbus: Back out r302888 temporarily
Committed by accident w/ duplicated commit log

MFC after:	1 week
Sponsored by:	Microsoft OSTC
2016-07-15 08:13:44 +00:00
Sepherosa Ziehau
047affd165 hyperv/hn: Busdma-fy rxbuf and chimney sending buffer
Nuke unused channel GPADL API.

MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D7211
2016-07-15 08:08:13 +00:00
Sepherosa Ziehau
8c209c9206 hyperv/hn: Busdma-fy rxbuf and chimney sending buffer
Nuke unused channel GPADL API.

MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D7211
2016-07-15 08:06:48 +00:00
Sepherosa Ziehau
43bbe6b27f hyperv/vmbus: Cleanup channel packet receiving.
MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D7204
2016-07-15 07:53:45 +00:00
Sepherosa Ziehau
7c55724859 hyperv/vmbus: Cleanup channel receiving.
MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D7202
2016-07-15 07:45:30 +00:00
Sepherosa Ziehau
7bf5900964 hyperv/vmbus: Factor out macros to do channel packet length conversion.
MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D7194
2016-07-15 07:35:01 +00:00
Sepherosa Ziehau
a47c066339 hyperv/vmbus: Field rename
MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D7193
2016-07-15 07:26:31 +00:00
Sepherosa Ziehau
12140675e8 hyperv/vmbus: Function rename
And reorder the error prone parameters list.

MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D7191
2016-07-15 07:16:46 +00:00
Sepherosa Ziehau
4817a5a58d hyperv/vmbus: Cleanup channel sending
MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D7178
2016-07-15 07:07:17 +00:00
Sepherosa Ziehau
03055a2cea hyperv/vmbus: Move channel packet types definition to vmbus.h
MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D7177
2016-07-15 06:58:21 +00:00
Sepherosa Ziehau
1680fb300c hyperv/vmbus: Move channel packet flags definition to vmbus.h
MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D7176
2016-07-15 06:49:45 +00:00
Sepherosa Ziehau
66e132bd0f hyeprv/vmbus: Rework prplist sending.
MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D7175
2016-07-15 06:40:59 +00:00
Adrian Chadd
7ff1939db0 [ath] [ath_hal] break out the duration calculation to optionally include SIFS.
The pre-11n calculations include SIFS, but the 11n ones don't.

The reason is that (mostly) the 11n hardware is doing the SIFS calculation
for us but the pre-11n hardware isn't.  This means that we're over-shooting
the times in the duration field for non-11n frames on 11n hardware, which
is OK, if not a little inefficient.

Now, this is all fine for what the hardware needs for doing duration math
for ACK, RTS/CTS, frame length, etc, but it isn't useful for doing PHY
duration calculations.  Ie, given a frame to TX and its timestamp, what
would the end of the actual transmission time be; and similar for an
RX timestamp and figuring out its original length.

So, this adds a new field to the duration routines which requests
SIFS or no SIFS to be included.  All the callers currently will call
it requesting SIFS, so this /should/ be a glorious no-op.  I'm however
planning some future work around airtime fairness and positioning which
requires these routines to have SIFS be optional.

Notably though, the 11n version doesn't do any SIFS addition at the moment.
I'll go and tweak and verify all of the packet durations before I go and
flip that part on.

Tested:

* AR9330, STA mode
* AR9330, AP mode
* AR9380, STA mode
2016-07-15 06:39:35 +00:00
Sepherosa Ziehau
6199f16549 hyperv/vmbus: Rework sglist sending.
MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D7156
2016-07-15 06:29:19 +00:00
Sepherosa Ziehau
d64ec3506d hyperv/vmbus: Redefine channel packet.
The channel packet header will be shared w/ PRP (physical region page)
list channel packet and SG (scatter gather) list channel packet.

MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D7155
2016-07-15 06:16:39 +00:00
Sepherosa Ziehau
013c69bf17 hyperv/vmbus: Field rename
MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D7146
2016-07-15 06:08:48 +00:00
Sepherosa Ziehau
23eaa43cc8 hyperv/vmbus: Set vcpuid to 0, if MSR_HV_VP_INDEX does not exist.
Mainly for compatibility.  While I'm here, rename cpuid related
fields in hv_vmbus_channel.

MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D7141
2016-07-15 05:59:27 +00:00
Sepherosa Ziehau
29bf5462b5 hyperv/vmbus: Busdma-fy channel bufring.
MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D7140
2016-07-15 05:51:58 +00:00
Sepherosa Ziehau
9ab42c2138 hyperv/vmbus: Add vmbus_chan_gpadl_connect, which takes GPA physaddr
MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D7139
2016-07-15 05:40:34 +00:00
Sepherosa Ziehau
b3a6435528 hyperv/vmbus: Use iovec for bufring scatter/gather list.
MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D7134
2016-07-15 05:29:04 +00:00
Sepherosa Ziehau
4ad849ba82 hyperv/vmbus: Remove unused function definition/declaration.
MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D7131
2016-07-15 05:15:21 +00:00
Sepherosa Ziehau
9ef6240130 hyperv/vmbus: Function rename
MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D7129
2016-07-15 05:06:15 +00:00
Sepherosa Ziehau
1bb1ecfc00 hyperv/vmbus: Remove unused struct
MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D7127
2016-07-15 04:54:07 +00:00
Sepherosa Ziehau
7d590c7345 hyperv/vmbus: Merge hv_channel_mgmt.c into hv_channel.c
MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D7126
2016-07-15 04:42:08 +00:00
Andrew Turner
08916a36a9 Remove support for the arm64 pre-INTRNG interrupt framework from the PCI
driver. Support for this was removed in r302375.

Obtained from:	ABT Systems Ltd
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2016-07-14 16:52:18 +00:00
Enji Cooper
e5619a893e Always panic if an invalid capability is passed to capable(..) instead of
just with INVARIANTS

rwatson's point was valid in the sense that if the data passed at runtime is
invalid, it should always trip the invariant, not just in the debug case.
This is a deterrent against malicious input, or input caused by hardware
errors.

MFC after: 4 days
X-MFC with: r302577
Requested by: rwatson
Sponsored by: EMC / Isilon Storage Division
2016-07-14 13:55:38 +00:00
Sepherosa Ziehau
e11f3043cd hyperv/vmbus: Move bus related message processing into vmbus.
MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D7125
2016-07-14 08:40:59 +00:00
Sepherosa Ziehau
7e70f1cbaf hyperv/vmbus: Sub-channel related fields renaming
And reorganize comment.

MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D7113
2016-07-14 08:15:13 +00:00
Sepherosa Ziehau
e480791797 hyperv/vmbus: Fix the racy channel close.
It is not safe to iterate the sub-channel list w/o lock on the
close path, while it's even more difficult to hold the lock
and iterate the sub-channel list.  We leverage the
vmbua_{get,rel}_subchan() functions to solve this dilemma.

MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D7112
2016-07-14 07:59:01 +00:00
Sepherosa Ziehau
c1bea00ed1 hyperv/vmbus: Field renaming to reflect reality
MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D7111
2016-07-14 07:48:26 +00:00
Sepherosa Ziehau
77321df6e4 hyperv/vmbus: Release vmbus channel lock before detach devices
Device detach method may sleep.

While I'm here, rename the function, fix indentation and function
comment.

MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D7110
2016-07-14 07:39:34 +00:00
Sepherosa Ziehau
4cf4f2248e hyperv/vmbus: Only add primary channels to vmbus channel list
- Make the vmbus_chan_add more straightforward.
- Partially fix the hv_vmbus_release_unattached_channels().

MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D7109
2016-07-14 07:31:43 +00:00
Sepherosa Ziehau
3a1079321c hyperv/vmbus: Use sub-channel index to detect primary channel
In case that VMBUS_CHAN_ISPRIMARY is needed in the early place of
channel setup.

MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D7108
2016-07-14 07:24:03 +00:00
Sepherosa Ziehau
ea505e3821 hyperv/vmbus: Cleanup vmbus_chan_add()
MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D7106
2016-07-14 07:08:59 +00:00
Sepherosa Ziehau
8c1ac91660 hyperv/vmbus: Nuke the channel open state.
Channel is either opened or not-opened.

MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D7105
2016-07-14 06:59:04 +00:00
Sepherosa Ziehau
0b1e5b0fd0 hyperv/vmbus: Cleanup vmbus_chan_msgproc_choffer
MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D7104
2016-07-14 06:48:24 +00:00
Sepherosa Ziehau
dab4260c90 hyperv/vmbus: Move new channel scan notification to device register
And nuke now unnecessary function indirection.

MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D7103
2016-07-14 06:40:42 +00:00