Commit Graph

30969 Commits

Author SHA1 Message Date
Andrew Turner
9c42d415a3 Stop including machine/fdt.h from the fdt uart code, it's unneeded.
Sponsored by:	ABT Systems Ltd
2016-04-26 13:16:45 +00:00
Ruslan Bukin
5c3a3f25ce Do not include fdt.h on RISC-V. 2016-04-26 12:31:23 +00:00
Sepherosa Ziehau
49bebba7aa hyperv/hn: Change description to "Hyper-V Network Interface"
This is consistent w/ other Hyper-V devices.

MFC after:	1 week
Sponsored by:	Microsoft OSTC
2016-04-26 06:50:41 +00:00
Sepherosa Ziehau
f494006fdf hyperv/stor: Set description properly in probe devmethod
MFC after:	1 week
Sponsored by:	Microsoft OSTC
2016-04-26 06:41:36 +00:00
Sepherosa Ziehau
96a8c456f1 hyperv/channel: Git rid of the sub-channel creation callback
It is no longer used.

MFC after:	1 week
Sponsored by:	Microsoft OSTC
2016-04-26 05:21:27 +00:00
Sepherosa Ziehau
99b476b1e8 hyperv/stor: Avoid sub-channel creation callback.
Since the sub-channel offers are synchronized, we can do our own
channel setup without using the sub-channel creation callback.

This paves the way to whack the sub-channel creation callback.

MFC after:	1 week
Sponsored by:	Microsoft OSTC
2016-04-26 05:15:15 +00:00
Sepherosa Ziehau
03dbe733c5 hyperv/hn: Avoid sub-channel creation callback.
Since the sub-channel offers are synchronized, we can do our own
channel setup without using the sub-channel creation callback.

This paves the way to whack the sub-channel creation callback.

MFC after:	1 week
Sponsored by:	Microsoft OSTC
2016-04-26 05:08:55 +00:00
Sepherosa Ziehau
232ab086dc hyperv/stor: Synchronize sub-channel offers
MFC after:	1 week
Sponsored by:	Microsoft OSTC
2016-04-26 05:00:40 +00:00
Sepherosa Ziehau
f4ffb60d10 hyperv/stor: Remove the useless hs_open_multi_channel
This fixes the sub-channel offer race after Hyper-V device probe/attach
is moved to vmbus SYSINIT/attach.

MFC after:	1 week
Sponsored by:	Microsoft OSTC
2016-04-26 04:48:57 +00:00
Adrian Chadd
125b570110 [iwm] implement suspend/resume through ieee80211_{suspend,resume}_all
This allows wifi to associate correctly after a suspend/resume cycle.

Yes, I'm using this now day to day.

Tested:

* Intel 7260AC, STA mode
2016-04-26 04:40:59 +00:00
Adrian Chadd
5a4e447647 [iwm] add extra transmit setup/completion logging so I can see what's going on.
I'm seeing 5GHz association work but data not work until the rate drops,
so I need way more information about what's being programmed into the
transmit descriptors.

Tested:

* 7260AC, STA mode
2016-04-26 03:24:28 +00:00
Adrian Chadd
9f3a915030 [ath] add LDPC capability support and LDPC RX support.
This enables LDPC receive support for the AR9300 chips that support it.
It'll announce LDPC support via net80211.

Tested:

* AR9380, STA mode
* AR9331, (to verify the HAL didn't attach it to a chip which
  doesn't support LDPC.)

TODO:

* Add in net80211 machinery to make this configurable at runtime.
2016-04-26 01:37:03 +00:00
Adrian Chadd
f026d6931a [ath] obey the STBC flag setting in iv_flags_ht
Add support for the FHT_STBC_TX flag in iv_flags_ht, so it'll now obey
the per-vap ifconfig stbctx flag.

This means that we can do STBC TX on one vap and not another VAP.
(As well as STBC RX on said vap; that changes the HTCAP announcement.)
2016-04-26 01:34:21 +00:00
Adrian Chadd
cc418e44a0 [iwm] restart the VAP if there's a firmware panic.
Always print out the firmware panic info before restarting; don't
put it behind IWM_DEBUG.

Submitted by:	bapt
Differential Revision:	https://reviews.freebsd.org/D6081
2016-04-25 22:00:05 +00:00
Pedro F. Giffuni
7b250b1ec9 dev/random: use our roundup() macro instead of re-implementing it.
While here also use howmany() macro from sys/param.h
No functional change.

Reviewed by:	markm (roundup replacement part)
Approved by:	so
2016-04-25 21:14:32 +00:00
David C Somayajulu
05c6aa727f 1. Removed -Wno-shift-negative-value from Makefile
2. Fixed warning its absence caused in bxe_elink.c

MFC after:5 days
2016-04-25 18:55:01 +00:00
Adrian Chadd
8a3fcfa7be [bhnd] Fix ChipCommon probing.
ChipCommon probing uses mapping table "chipc_devices". It calls bhnd_device_lookup,
which iterate over mapping table with end condition:

entry->desc != NULL

So if mapping table contains row with description equals to NULL, it will
stop processing of mapping. I.e. description is mandatory field and should
be not NULL.

This patch corrects mapping table for ChipCommon.

Submitted by:	Michael Zhilin <mizhka@gmail.com>
Differential Revision:	https://reviews.freebsd.org/D6088
2016-04-25 16:53:13 +00:00
Adrian Chadd
8d170e6ac1 [iwn] fix firmware command use in iwm_auth().
The iwm firmware has separate commands for add, modify and delete for
various things (mac, phy context, etc.)  The openbsd driver has a habit
of just completely resetting the NIC each time, which is technically
mostly okay (as long as the reset doesn't actually fail!) but it means
a lot of the code is doing ADD when it should do MODIFY.

The firmware responds in kind - it just asserts.

This fixes auth attempts that occur after the NIC has been already
configured.

(I'm sure there are more instances of this!)

Tested:

iwm0: <Intel Dual Band Wireless AC 7260> mem 0xf1400000-0xf1401fff irq 17 at device 0.0 on pci2
iwm0: revision: 0x140, firmware 25.228 (API ver. 9)

.. STA mode.

Submitted by:	Masachika ISHIZUKA <ish@amail.plala.or.jp>
2016-04-25 16:13:04 +00:00
Sepherosa Ziehau
049efd1090 hyperv/hn: Synchronize sub-channel offers
MFC after:	1 week
Sponsored by:	Microsoft OSTC
2016-04-25 10:16:07 +00:00
Sepherosa Ziehau
480805ab13 hyperv/channel: Add functions to synchronize sub-channel offers
MFC after:	1 week
Sponsored by:	Microsoft OSTC
2016-04-25 09:00:06 +00:00
Sepherosa Ziehau
b9dfafffcd hyperv/channel: Log a warning about duplicated primary channel offer
MFC after:	1 week
Sponsored by:	Microsoft OSTC
2016-04-25 05:58:32 +00:00
Sepherosa Ziehau
d4135e865c hyperv/channel: Remove unapplied comment
MFC after:	1 week
Sponsored by:	Microsoft OSTC
2016-04-25 05:46:44 +00:00
Sepherosa Ziehau
a37ec104c5 hyperv/channel: Minor style changes; no functional changes.
MFC after:	1 week
Sponsored by:	Microsoft OSTC
2016-04-25 05:30:42 +00:00
Sepherosa Ziehau
84e83c0abd hyperv/channel: Remove the unnecessary 'new' flag
MFC after:	1 week
Sponsored by:	Microsoft OSTC
2016-04-25 05:22:35 +00:00
Sepherosa Ziehau
625dc68a9e hyperv/et: Strip extra white space in function name
Reported by:	Sascha Wildner <saw online de>
MFC after:	1 week
Sponsored by:	Microsoft OSTC
2016-04-25 04:58:14 +00:00
Sepherosa Ziehau
4e0c3dc461 hyperv/hn: Allow users to configure ifq or bufring depth.
MFC after:	1 week
Sponsored by:	Microsoft OSTC
2016-04-25 03:48:28 +00:00
Sepherosa Ziehau
62cffb8d93 hn: Increase odrops for if_transmit method if drbr_enqueue fails.
MFC after:	1 week
Sponsored by:	Microsoft OSTC
2016-04-25 03:14:55 +00:00
Dmitry Chagin
9f8621b1d5 Fix streams and svr4 module dependency. Both modules are complaining about
undefined symbol svr4_delete_socket which was moved from streams to the svr4 module
in r160558 that created a two-way dependency between them.

PR:		208464
Submitted by:	Kristoffer Eriksson
Reported by:	Kristoffer Eriksson
MFC after:	2 week
2016-04-23 20:29:55 +00:00
David C Somayajulu
e5baa39aec Remove Unused/Dead Code
MFC after:5 days
2016-04-23 01:22:12 +00:00
John Baldwin
4c26ac696c Optionally return the output capabilities list from _OSC.
Both of the callers were expecting the input cap_set to be modified.
This fixes them to request cap_set to be updated with the returned buffer.

Reviewed by:	jkim
Differential Revision:	https://reviews.freebsd.org/D6040
2016-04-22 17:51:19 +00:00
Pedro F. Giffuni
b66bb393f2 Cleanup redundant parenthesis from existing howmany()/roundup() macro uses. 2016-04-22 16:57:42 +00:00
Adrian Chadd
178c755910 [bhnd] use correct bus deallocation method
Submitted by:	Mizhka Zhilin <mizhka@gmail.com>
Differential Revision:	https://reviews.freebsd.org/D5647
2016-04-22 16:28:41 +00:00
Adrian Chadd
05f61102bb [bhnd] Update bhndb format strings to match long -> rman_res_t size change.
Does what it says on the tin; this unbreaks 32-bit builds.

Submitted by:	Landon Fuller <landonf@landonf.org>
Differential Revision:	https://reviews.freebsd.org/D5764
2016-04-22 16:27:35 +00:00
Adrian Chadd
bb64eecc0b [bhnd] Add a common bhnd_pci driver shared by both bhnd_pcib and bhnd_pci_hostb
This extracts common code from bhndb_pci, bhnd_pcib, and bhnd_pci_hostb into a
simpler shared bhnd_pci base driver, and should enable SoC-side implementation
of bhnd_pcib root complex support.

Submitted by:	Landon Fuller <landonf@landonf.org>
Differential Revision:	https://reviews.freebsd.org/D5763
2016-04-22 16:26:53 +00:00
Sepherosa Ziehau
d1c801bbf1 hyperv/et: Make Hyper-V event timer a device.
Submitted by:	Jun Su <junsu microsoft com>
Reviewed by:	sephe, Dexuan Cui <decui microsoft com>
MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D5957
2016-04-22 05:15:59 +00:00
Sepherosa Ziehau
7cd9b96b7a hyperv: Update copyright to 2016 for the files Microsoft changed in 2016
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D6039
2016-04-22 05:01:43 +00:00
Andriy Voskoboinyk
0c8ed1fb02 urtwn: optimize rate lookup in the urtwn_ra_init()
Replace loop with switch statement (rate2ridx())
(should be noop).

Tested with RTL8188EU / RTL8188CUS, STA mode.

Reviewed by:	adrian
Differential Revision:	https://reviews.freebsd.org/D4848 (rebased)
2016-04-21 20:34:38 +00:00
Pedro F. Giffuni
a380994fff Yet more redundant parenthesis from r298431.
Mea culpa.
2016-04-21 20:30:38 +00:00
Pedro F. Giffuni
d9c9c81c08 sys: use our roundup2/rounddown2() macros when param.h is available.
rounddown2 tends to produce longer lines than the original code
and when the code has a high indentation level it was not really
advantageous to do the replacement.

This tries to strike a balance between readability using the macros
and flexibility of having the expressions, so not everything is
converted.
2016-04-21 19:57:40 +00:00
Pedro F. Giffuni
5977d3e898 Redundant parenthesis from r298431. 2016-04-21 19:48:28 +00:00
Pedro F. Giffuni
323b076e9c sys: use our nitems() macro when param.h is available.
This should cover all the remaining cases in the kernel.

Discussed in:	freebsd-current
2016-04-21 19:40:10 +00:00
John Baldwin
fed2c48af4 Adjust the fdc worker thread startup to work when APs are started earlier.
- Enable the commented out locking in fd_probe().  The worker thread
  should not be running yet (even after these changes), but better to be
  safe than sorry.
- Defer starting the worker thread until after the child drives have been
  probed.  The worker thread startup is moved into a fdc_start_worker()
  thread that the various front ends call at the end of attach.  As a
  side effect this fixes a few edge cases that weren't shutting down the
  worker thread if attach encountered a late failure.
- When executing the initial reset requested by attach in the worker
  thread, use DELAY() instead of a tsleep() if cold is set.

Tested by:	Howard Su <howard0su@gmail.com>
Sponsored by:	Netflix
2016-04-21 18:37:36 +00:00
John Baldwin
f8887b894c Queue the CPU-probing task after all acpi_cpu devices are attached.
Eventually with earlier AP startup this code will change to call the
startup function synchronously instead of queueing the task.  Moving
the time we queue the task should be a no-op since taskqueue threads
don't start executing tasks until much later, but this reduces the diff
with the earlier AP startup patches.

Sponsored by:	Netflix
2016-04-21 18:27:05 +00:00
Hans Petter Selasky
be4e639d7a Add new USB quirk.
Submitted by:	Naram Qashat <cyberbotx@cyberbotx.com>
PR:		208642
MFC after:	1 week
2016-04-21 17:45:37 +00:00
Pedro F. Giffuni
8dfea46460 Remove slightly used const values that can be replaced with nitems().
Suggested by:	jhb
2016-04-21 15:38:28 +00:00
Pedro F. Giffuni
c3f2d05727 siba(4): remove slightly used 'bound' variable.
It can be replaced with nitems(). While here simplify the function

Suggested by:	jhb
2016-04-21 15:24:21 +00:00
Andriy Voskoboinyk
6459bd2843 net80211: enable promiscuous mode state change for non-monitor/ahdemo modes
- Allow to enable/disable promiscuous mode when:
  * interface is not a member of bridge, or;
  * request was issued by user (ifconfig wlan0 promisc), or;
  * interface is in MONITOR or AHDEMO mode.
- Drop local workarounds in mwl(4) and malo(4).

Tested with:
- Intel 3945BG, STA mode;
- RTL8188CUS, MONITOR mode;

Reviewed by:	adrian
Differential Revision:	https://reviews.freebsd.org/D5472
2016-04-21 05:47:47 +00:00
Jung-uk Kim
e5f7701025 Prefer sizeof(*pointer) over sizeof(type). No funtional change. 2016-04-20 21:30:56 +00:00
Jung-uk Kim
87f0a4bf1f There is no need to use array any more. No functional change. 2016-04-20 21:26:59 +00:00
Jung-uk Kim
cad6d22280 Remove query flag from acpi_EvaluateOSC(). This function does not support
return buffer (yet).
2016-04-20 21:21:47 +00:00