Commit Graph

803 Commits

Author SHA1 Message Date
Bjoern A. Zeeb
586c8e3233 iwlwifi: plug memory modified after free
In certain situations we saw a memory modified after free.  This was
tracked down to a pointer not NULLed after free and used in a different
code path.  It is unclear how the race happens pending further
investigation but setting the pointer to NULL after free and adding a
check in the 2nd code path handling the case gracefully helps for now.

While here improve another debug messge in sta handling.

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2021-12-27 18:47:26 +00:00
Bjoern A. Zeeb
8f06a2b550 iwlwifi: cherry-pick fixes from upstream iwlwifi-next
Cherry-pick f973795a8d19cbf3d03807704eb7c6ff65788d5a (Fix a double free
in iwl_txq_dyn_alloc_dma), db66abeea3aefed481391ecc564fb7b7fb31d742
(synchronize with FW after multicast commands),
d5d8ee526d1401173ad1261c3b6388a4f947e0a3 (remove session protection
upon station removal), and 8e967c137df3b236d2075f9538cb888129425d1a
(avoid clearing a just saved session protection id).

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2021-12-27 18:47:26 +00:00
Bjoern A. Zeeb
81ff67ffbe iwlwifi: also depend on linuxkpi_wlan
The 802.11 compat code is split off linuxkpi.ko into linuxkpi_wlan.ko
in case it is built as a module.  Depend on that.
While here adjust our module to a longer version to avoid conflicts.

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2021-12-27 18:47:25 +00:00
Bjoern A. Zeeb
bfcc09ddd4 iwlwifi: import Intel's iwlwifi/mvm driver.
Over the past few months we published multiple snapshots for this
Linux derived driver and it has become fairly stable in terms of
minimal local changes needed for new updates.

The current version is based on iwlwifi-next update at
cbaa6aeedee5f92dafa5982eceea2a1f98ce4f7d with the addition of
a hand full of files replaced for FreeBSD.

Given the lack of full license texts on non-local files this is
imported under the draft policy for handling SPDX files (D29226). [1]

Do not yet hook this to the build until the remaining compat code
is all in.  Along with the firmware import this will make publishing
the last bits and final testing a lot easier.

Sponsored by:   The FreeBSD Foundation
Approved by:    core (imp) [1]
MFC after:      10 days
2021-11-28 19:17:04 +00:00
Bjoern A. Zeeb
f4c129f5fb iwlwifi: import firmware for Intel iwlwifi/mvm supported chipsets.
Import the most recent versions of the firmware images for iwlwifi
chipsets supported by the "mvm" sub-driver.
This is based on linux-firmware at f5d519563ac9d2d1f382a817aae5ec5473811ac8.
The license of the firmware matches the previous iwnfw(4) and
iwmfw(4) firmware files and you can find a copy in
sys/contrib/dev/iwlwififw/LICENCE.iwlwifi_firmware .

Add build infrastructure to create the .ko files but do not yet hook
it up to the build until all parts are in the tree.
There is an open issue concerning kldxref that we need to resolve
(D32383).

Sponsored by:	The FreeBSD Foundation
MFC after:	10 days
2021-11-28 19:17:03 +00:00
Jung-uk Kim
1b7a2680fb Import ACPICA 20210930
(cherry picked from commit c509b6ab0d7e5bafc5348b08653b8738bd40716e)
2021-09-30 22:05:52 -04:00
Dimitry Andric
130a690ae1 Fix acpica macros that subtract null pointers
Clang 13.0.0 produces a new -Werror warning about the ACPI_TO_INTEGER(p)
and ACPI_OFFSET(d, f) macros in acpica's actypes.h:

    sys/contrib/dev/acpica/components/dispatcher/dsopcode.c:708:31: error: performing pointer subtraction with a null pointer has undefined behavior [-Werror,-Wnull-pointer-subtraction]
        ObjDesc->Region.Address = ACPI_PTR_TO_PHYSADDR (Table);
                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
    sys/contrib/dev/acpica/include/actypes.h:664:41: note: expanded from macro 'ACPI_PTR_TO_PHYSADDR'
    #define ACPI_PTR_TO_PHYSADDR(i)         ACPI_TO_INTEGER(i)
                                            ^~~~~~~~~~~~~~~~~~
    sys/contrib/dev/acpica/include/actypes.h:661:41: note: expanded from macro 'ACPI_TO_INTEGER'
    #define ACPI_TO_INTEGER(p)              ACPI_PTR_DIFF (p, (void *) 0)
                                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    sys/contrib/dev/acpica/include/actypes.h:656:82: note: expanded from macro 'ACPI_PTR_DIFF'
    #define ACPI_PTR_DIFF(a, b)             ((ACPI_SIZE) (ACPI_CAST_PTR (UINT8, (a)) - ACPI_CAST_PTR (UINT8, (b))))
                                                                                     ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~
    1 error generated.

This problem of undefined behavior was also reported to acpica by @cem
in 2018: https://github.com/acpica/acpica/issues/407, but it seems there
was never any fix committed for it upstream.

Instead fix these locally, for ACPI_TO_INTEGER by simply casting the
incoming pointer to ACPI_SIZE (which corresponds roughly to uintptr_t
and size_t), and for ACPI_OFFSET by reusing our __offsetof definition
from sys/cdefs.h.

Reviewed by:	emaste, kib, imp
MFC after:	3 days
Differential Revision: https://reviews.freebsd.org/D31710
2021-08-30 21:34:34 +02:00
Jung-uk Kim
97c0b5ab18 acpica: Import ACPICA 20210730
(cherry picked from commit 34cfdff1f386b2d7bf0a8ea873acf604753991e6)
2021-07-31 00:16:27 -04:00
Eric Joyner
070f7812da
ice_ddp: Revert mode back to 0644
The last commit (538ef055b7) accidentally
set the executable bits for this file. This is not intended to be
executed at all. (Would that even work?)

Sponsored by:	Intel Corporation
2021-06-25 10:28:28 -07:00
Eric Joyner
538ef055b7
ice_ddp: Update to 1.3.24.0
This version is intended to be used with the 0.29.4 version of the
ice(4) driver, which will be be committed afterwards.

Signed-off-by: Eric Joyner <erj@FreeBSD.org>

Reviewed by:	stallamr_netapp.com
Sponsored by:	Intel Corporation
Differential Revision:	https://reviews.freebsd.org/D30887
2021-06-25 10:21:39 -07:00
Jung-uk Kim
1970d69303 Import ACPICA 20210604
(cherry picked from commit 395770967c3664ec744e63fa47acc19670d32f47)
2021-06-05 01:58:00 -04:00
Adrian Chadd
bed90bf8ed [ath_hal] Add get/set NAV functions
The NAV (network allocation vector) register reflects the current MAC
tracking of NAV - when it will stay quiet before transmitting.

Other devices transmit their frame durations in their 802.11 PHY headers
and all devices that hear a frame - even if it's one in an encoding
they don't understand - will understand the low bitrate PHY header that
includes the frame duration.  So, they'll set NAV to this value so
they'll stay quiet until the transmit completes.

Anyway, sometimes the PHY NAV header is garbled and sometimes, notably
older broadcom devices, will fake a long NAV so they can get "cleaner" air
for local calibration.  When this happens, the hardware will stay quiet
for quite some time and this can lead to missed/stuck beacons, or
(for Very Large Values) a MAC hang.

This code just adds the ability to get/set the NAV; the driver will
need to take care of using it during transmit hangs and beacon misses
to see if it's due to a trash looking NAV.
2021-04-18 22:52:31 -07:00
Adrian Chadd
dead34f822 [ath_hal] ar9300: save TSF across full chip reset
This saves the TSF across a a full reset.  The TSF is otherwise cleared
and subsequent beaconing stops until the TSF catches up to nexttbtt.
2021-04-18 22:49:54 -07:00
Jung-uk Kim
429f71bf08 ACPICA: Fix build with options ACPI_DEBUG 2021-04-01 21:18:49 -04:00
Jung-uk Kim
cfd1ed4681 Merge ACPICA 20210331.
(cherry picked from commit 1e02e5b0ba8634758c128dcb43c67342c7219cd4)
2021-04-01 19:36:59 -04:00
Eric Joyner
a7ac518bff ice_ddp: Update package file to 1.3.19.0
This package is intended to be used with ice(4) version 0.28.1-k.
That update will happen in a forthcoming commit.

Signed-off-by: Eric Joyner <erj@FreeBSD.org>
Sponsored by: Intel Corporation
2021-02-22 18:02:19 -08:00
Jung-uk Kim
29f37e9bcc acpica: Import ACPICA 20210105.
(cherry picked from commit a61ec1492c58c40bd0d968794c380668c157e2ef)
2021-01-29 20:53:07 -05:00
Jung-uk Kim
385fb5d933 acpica: Import ACPICA 20201217.
(cherry picked from commit a4634ed7779f0905e3bfeb781e58d40a5bdf9bb7)
2021-01-29 19:48:02 -05:00
Michal Meloun
b9cbd68d1c ARM: Enhance common Nvidia Tegra drivers by support for Tegra210 SoC.
MFC after:	4 weeks
2020-12-26 19:13:10 +01:00
Ian Lepore
a7623790fb Add the firmware blob required to use the sdma hardware in the imx6
processor, and its associated license text (which is similar to a
bsd-3-clause, but with a prohibition against decompiling).  Install a copy
of the license in /usr/share/doc/legal/imx, to comply with the license terms
that requires a copy of the license to be delivered along with the firmware.

Obtained from:	https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/imx/sdma/sdma-imx6q.bin https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/LICENSE.sdma_firmware
2020-11-26 01:40:04 +00:00
Jung-uk Kim
fbde34778b MFV: r367652
Merge ACPICA 20201113.
2020-11-13 22:45:26 +00:00
Mark Johnston
acb5785aae Add firmware modules for qat(4), take two
My script to convert git commits to svn patch does not handle binary
files correctly, and r367387 committed a set of empty files as a result.

MFC with:	r367387
Sponsored by:	Rubicon Communications, LLC (Netgate)
2020-11-06 16:12:06 +00:00
Mark Johnston
f078c492a9 Add firmware modules for qat(4)
MFC after:	3 days
Sponsored by:	Rubicon Communications, LLC (Netgate)
2020-11-05 16:00:30 +00:00
Jung-uk Kim
f15e9afb1f MFV: r366539
Merge ACPICA 20200925.
2020-10-09 05:27:02 +00:00
Ed Maste
11224884f2 ys/contrib/dev/ath: remove unintentional double semicolon
Approved by:	adrian
2020-09-18 18:35:18 +00:00
Eric Joyner
cf08d707d4 ice_ddp: Fix 1.3.16.0 package
The version uploaded in the previous commit was far too small. This one
should be the right size.

MFC after:	1 day
Sponsored by:	Intel Corporation
2020-09-10 04:00:13 +00:00
Eric Joyner
1bd641af2b ice_ddp: Update package file to 1.3.16.0
This package is intended to be used with ice(4) version 0.26.16. That
update will happen in a forthcoming commit.

MFC after:	3 days
Sponsored by:	Intel Corporation
2020-09-04 17:37:58 +00:00
Jung-uk Kim
61b180362a MFV: r363292
Merge ACPICA 20200717.
2020-07-18 07:35:34 +00:00
Jung-uk Kim
0b229c80ae MFV: r361597
Import ACPICA 20200528.
2020-05-28 21:19:44 +00:00
Eric Joyner
71d104536b ice(4): Introduce new driver for Intel E800 Ethernet controllers
The ice(4) driver is the driver for the Intel E8xx series Ethernet
controllers; currently with codenames Columbiaville and
Columbia Park.

These new controllers support 100G speeds, as well as introducing
more queues, better virtualization support, and more offload
capabilities. Future work will enable virtual functions (like
in ixl(4)) and the other functionality outlined above.

For full functionality, the kernel should be compiled with
"device ice_ddp" like in the amd64 NOTES file, and/or
ice_ddp_load="YES" should be added to /boot/loader.conf so that
the DDP package file included in this commit can be downloaded
to the adapter. Otherwise, the adapter will fall back to a single
queue mode with limited functionality.

A man page for this driver will be forthcoming.

MFC after:	1 month
Relnotes:	yes
Sponsored by:	Intel Corporation
Differential Revision:	https://reviews.freebsd.org/D21959
2020-05-26 23:35:10 +00:00
Adrian Chadd
8c01c3dc46 [ath] [ath_hal] Propagate the HAL_RESET_TYPE through to the chip reset; set it during ath_reset()
Although I added the reset type field to ath_hal_reset() years ago,
I never finished adding it both throughout the HALs and in if_ath.c.

This will eventually deprecate the ath_hal force_full_reset option
because it can be requested at the driver layer.

So:

* Teach ar5416ChipReset() and ar9300_chip_reset() about the HAL type
* Use it in ar5416Reset() and ar9300_reset() when doing a full chip reset
* Extend ath_reset() to include the HAL_RESET_TYPE parameter added in the above functions
* Use HAL_RESET_NORMAL in most calls to ath_reset()
* .. but use HAL_RESET_BBPANIC for the BB panics, and HAL_RESET_FORCE_COLD during fatal, beacon miss and other hardware related hangs.

This should be a glorified no-op outside of actual hardware issues.
I've tested things with ath_hal force_full_reset set to 1 for years now,
so I know that feature and a full reset works (albeit much slower than
a warm reset!) and it does unwedge hardware.

The eventual aim is to use this for all the places where the driver
detects a potential hang as well as if long calibration - ie, noise floor
calibration - fails to complete. That's one of the big hardware related
things that causes station mode operation to hang without easy recovery.

Differential Revision:	https://reviews.freebsd.org/D24981
2020-05-25 22:31:45 +00:00
Adrian Chadd
43f12c5b66 [ath_hal_ar9300] Ensure AH_BYTE_ORDER is defined before used.
Same deal here - ensure endian bits are set here first!
2020-05-12 02:23:11 +00:00
Adrian Chadd
41137b0604 [ath_hal] [ath_hal_ar9300] Fix endian macros to work in and out of kernel tree.
Yes, people shouldn't use bitfields in C for structure parsing.
If someone ever wants a cleanup task then it'd be great to remove them
from this vendor code and other places in the ar9285/ar9287 HALs.

Alas, here we are.

AH_BYTE_ORDER wasn't defined and neither were the two values it could be.
So when compiling ath_ee_print_9300 it'd default to the big endian struct
layout and get a WHOLE lot of stuff wrong.

So:

* move AH_BYTE_ORDER into ath_hal/ah.h where it can be used by everyone.
* ensure that AH_BYTE_ORDER is actually defined before using it!

This should work on both big and little endian platforms.
2020-05-12 02:20:27 +00:00
Adrian Chadd
6851341a33 [ar9300] Disable unconditionally reducing transmit power in the case of FCC.
Ok, yeah, the commit title is a bit misleading.

This has to do with CDD (cyclic delay diversity) - how this and later
wifi hardware transmits lower rates over more antennas.  Eg, if you're
transmitting legacy 11abg rates on 2 or 3 antennas, you COULD just
send them all at the same time or you could delay each by tens/hundreds
of nanoseconds to try and get some better diversity characteristics.

However, this has a fun side effect - the antenna pattern is no longer
a bunch of interacting dipoles, but are a bunch of interacting dipoles
plus a bunch of changing phases.  And it's frequency dependent - 50-200nS
is not exactly the same fraction of a wavelength across all of 2GHz or 5GHz!

Thus the power spectral density and maximum directional gain that you're
effectively getting is not .. well, as flat as it once was.

For more information, look up FCC/OET 13TR1003 in the FCC technical report
database.  It has pretty graphics and everything.

Anyway, the problem lies thusly - the CDD code just subtracts another 3dB
or 5dB for the lower rates based on transmit antenna configuration.
However, it's not done based on operating configuration and it doesn't
take into account how far from any regulatory limits the hardware is at.
It also doesn't let us do things like transmit legacy rates and frames
on a single antenna without losing up to 5dB when we absolutely don't
need to in that case (there's no CDD used when one antenna is used!)

This shows up as the hardware behaving even worse for longer distance links
at 20MHz because, well, those are the exact rates losing a bunch more
transmit power.

* For lower power NICs (ie the majority of what is out there!) it's highly
  unlikely we're going to hit anywhere near the PSD limits.
* It's doing it based on the existing limits from the CTL table (conformance
  testing limits) - this isn't the regulatory max!  It's what the NIC is
  allowed to put out in each frequency and rate configuration!  So things like
  band edges, power amplifier behaviour and maximum current draw apply here.
  Blindly subtracting 3 to 5dB from /this/ value is /very/ conservative..
* /and/ ath9k just plainly doesn't do any of this at all.

So, for now disable it and get the TX power back, thus matching what ath9k
in Linux is doing.  If/once I get some more cycles I'll look at making it
a bit more adaptive and really only kick in if we're a few dB away from
hard regulatory limits.

Tested:

* AR9344 (2GHz + SoC, 2x2 configuration) - AP and STA modes
* QCA9580 (5GHz 2x2 and 3x3 configurations) - AP and STA modes
2020-05-11 05:53:12 +00:00
Jung-uk Kim
08ddfe8657 MFV: r360512
Merge ACPICA 20200430.
2020-05-01 01:26:36 +00:00
Jung-uk Kim
3ee58df503 Merge ACPICA 20200326. 2020-03-27 00:29:33 +00:00
Jung-uk Kim
ec0234b4c2 MFV: r357927
Merge ACPICA 20200214.
2020-02-15 03:47:25 +00:00
Jung-uk Kim
f425b8be7e MFV: r356607
Import ACPICA 20200110.
2020-01-10 22:49:14 +00:00
Jung-uk Kim
f9a6772ec3 MFV: r355716
Merge ACPICA 20191213.
2019-12-13 23:28:52 +00:00
Mark Johnston
50b5a6cc0a Downgrade the firmware images imported in r354201.
Version 43 requires further modifications to iwm(4), and this was not
caught in some initial testing.  Version 34 works and is the version
available on Intel's web site.

MFC with:	r354201
Sponsored by:	The FreeBSD Foundation
2019-11-03 03:23:27 +00:00
Mark Johnston
988a7cd1a6 Add firmware images for Intel 9000-series wifi chips.
This is in preparation for adding the corresponding support to iwm(4).

Version 46 is the latest but contains unrecognized TLVs, so use version
43 for now.

Obtained from:	linux-firmware
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2019-10-30 19:36:50 +00:00
Jung-uk Kim
a009b7dcab Merge ACPICA 20191018. 2019-10-19 14:56:44 +00:00
Bjoern A. Zeeb
e303ee524e athhal: disable unused function (big endian only)
Disable ar9300_swap_tx_desc() for the moment.  It is an unused
function only tried to compile on big endian systems.

Found by:	s390x buildkernel
MFC after:	3 months
2019-08-21 10:42:31 +00:00
Jung-uk Kim
37d7a5bcc0 MFV: r351091
Fix the reported boot failures and revert r350510.

Note this commit is effectively merging ACPICA 20190703 again and applying
an upstream patch.

https://github.com/acpica/acpica/commit/73f6372

Tested by:	scottl
2019-08-15 17:43:36 +00:00
Jung-uk Kim
d632f88e20 Enable ACPICA mutex debugging in INVARIANTS case.
This lets us detect lock order reversal in ACPICA code to avoid deadlock.
2019-08-15 16:04:22 +00:00
Jung-uk Kim
2e57804413 Revert r349863 (ACPICA 20190703).
This commit caused boot failures on some systems.

Requested by:	scottl
2019-08-01 17:45:43 +00:00
Jung-uk Kim
56a6dee6f7 MFV: r349861
Import ACPICA 20190703.
2019-07-09 18:02:36 +00:00
Jung-uk Kim
9ad8b64eb4 MFV: r347413
Import ACPICA 20190509.
2019-05-09 23:03:10 +00:00
Adrian Chadd
a8083b9c0b [ath] [ath_hal] [ath_hal_9300] Extend the start PCU receive to handle resetting ANI.
One of the fun issues with scanning has been how the existing
ANI values were programmed into the hardware when channels were
changed.  If you're on a really crappy channel and ANI has made
you deaf then when you scan you continue to be deaf on all channels.

This code passes in a flag to startpcureceive which in AR5416 and later
is also used to enable ANI.  This allows it to know if it's a normal
operation or a scan operation.

This fixes my situation at home where a temporary spot of a device
going deaf due to interference starts scanning and .. can't hear
anything until I restart.

Now, this isn't the full fix - ideally:

(a) all the ANI config and per-channel information would be migrated
     to the shared HAL stuff and enabled for all of the NICs;
(b) when a station reassociates and some other error conditions
    (like missed beacons, NF calibration failures, etc) a knob
    to reset ANI parameters would likely help recovery.

But hey, I'm committing bits of code again! woo!

Tested:

* AR9344 (2G), STA operation
2019-04-21 02:36:01 +00:00
Jung-uk Kim
44b0f624ae MFV: r345969
Import ACPICA 20190405.
2019-04-06 06:02:42 +00:00
Jung-uk Kim
278f0de60d Merge ACPICA 20190329. 2019-03-29 20:21:28 +00:00
Adrian Chadd
c788d9b010 [ath_hal_ar9300] Add some comments around the AR9300 ANI code.
I'm refamiliarising myself with the behaviour of the ANI code and I thought
I'd drop some comments to remind myself.
2019-03-19 00:07:12 +00:00
Ed Maste
cf3f5ed89e Remove radeonkmsfw firmware files
The drivers were removed in r344299 so there is no need to keep the
firmware files in the src tree.

Reviewed by:	imp, jhibbits, johalun
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D19583
2019-03-14 17:05:46 +00:00
Ed Maste
30903c8283 Remove npe microcode
The driver was removed in r336436.
2019-03-14 13:28:21 +00:00
Adrian Chadd
34d5464b85 [ath_hal_ar9300] Add the missing bits from the previous HAL commit.
Noticed by: 75+ emails telling me I messed up.
2019-03-06 08:52:02 +00:00
Adrian Chadd
647915ff20 [ath_hal_ar9300] Add the extra ANI configuration fields for the AR93xx HAL.
Tested:

* Carambola2 (Ar9331), STA/AP modes
2019-03-04 06:43:00 +00:00
Jung-uk Kim
f10dc83806 MFV: r344447
Fix missing comma in array declaration.
2019-02-21 21:33:27 +00:00
Jung-uk Kim
cd6518c765 MFV: r344395
Import ACPICA 20190215.
2019-02-20 23:53:39 +00:00
Li-Wen Hsu
4f3128086b Remove empty files
Approved by:	markj (mentor)
Sponsored by:	The FreeBSD Foundation
2019-02-12 08:16:05 +00:00
Jung-uk Kim
e5e1f58a87 MFV: r342867
Merge ACPICA 20190108.
2019-01-09 00:31:10 +00:00
Andriy Voskoboinyk
b3f3786e5d rtwn_pci(4): add support for RTL8188EE chipset.
Initially based on https://reviews.freebsd.org/D15692;
later deduplicated and improved a bit (Tx reports, IQ calibration support).

Submitted by:	Farhan Khan <khanzf@gmail.com>
MFC after:	4 days
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D15692
2019-01-02 06:48:53 +00:00
Jung-uk Kim
90b566fde9 MFV: r342049
Merge ACPICA 20181213.
2018-12-14 00:40:38 +00:00
Jung-uk Kim
4a38ee6de7 MFV: r339981
Merge ACPICA 20181031.
2018-11-02 22:50:13 +00:00
Jung-uk Kim
6f1f1a6395 Update ACPICA to 20181003.
Approved by:	re (gjb)
2018-10-09 18:40:36 +00:00
Warner Losh
592ffb2175 Revert drm2 removal.
Revert r338177, r338176, r338175, r338174, r338172

After long consultations with re@, core members and mmacy, revert
these changes. Followup changes will be made to mark them as
deprecated and prent a message about where to find the up-to-date
driver.  Followup commits will be made to make this clear in the
installer. Followup commits to reduce POLA in ways we're still
exploring.

It's anticipated that after the freeze, this will be removed in
13-current (with the residual of the drm2 code copied to
sys/arm/dev/drm2 for the TEGRA port's use w/o the intel or
radeon drivers).

Due to the impending freeze, there was no formal core vote for
this. I've been talking to different core members all day, as well as
Matt Macey and Glen Barber. Nobody is completely happy, all are
grudgingly going along with this. Work is in progress to mitigate
the negative effects as much as possible.

Requested by: re@ (gjb, rgrimes)
2018-08-24 00:02:00 +00:00
Matt Macy
92c151322b r338172 follow - remove firmwares 2018-08-22 02:53:35 +00:00
Jung-uk Kim
51f42bad71 Merge ACPICA 20180810. 2018-08-13 16:26:26 +00:00
Jung-uk Kim
da9b0901f6 MFV: r335802
Merge ACPICA 20180629.
2018-06-29 23:48:30 +00:00
Adrian Chadd
8a97beff98 [ath_hal] Return failure if noise floor calibration fails.
If we fail noise floor calibration then we may end up with a deaf NIC
which we can't recover without a full chip reset.

Earlier chips seem to get less stuck in this condition versus AR9280/later
and AR9300/later, but whilst here just fix up the AR5212 era chips to also
return NF calibration failures.

This HAL routine would only return failure if the channel was not configured.

This is a no-op until the driver side code for doing resets and the HAL
code for being told about the reset type (and then handling it!) is
implemented.

Tested:

* AR9280, STA mode
* AR2425, STA mode
* AR9380, STA mode
2018-06-08 18:21:57 +00:00
Jung-uk Kim
3d90091d60 MFV: r334448
Import ACPICA 20180531.
2018-06-04 22:26:47 +00:00
Adrian Chadd
a861b06b97 [ath_hal] migrate the shared HAL_RESET_* pieces out into ath_hal.
I'm in the process of reworking how the reset path works with an eye
to better recovery when the chips hang and/or go RF/PHY deaf.
This is the first step in a lot of unification and API changes.
2018-05-25 01:27:39 +00:00
Sean Bruno
1696e1f2b8 Quiesce a couple pages of clang warnings with a cast. Duplicates
linux maintainer commit:

627871b71c (diff-8c6ddb4c3ad69a6fb9f289475821db56)

ar9300template_aphrodite.h:575:40: warning: implicit conversion from 'int'
  to 'u_int8_t' (aka 'unsigned char') changes value from 3495 to 167
  [-Wconstant-conversion]
            /* Data[8].ctl_edges[7].bChannel*/FREQ2FBIN(5795, 0)}
                                              ^~~~~~~~~~~~~~~~~~
ar9300eep.h:142:41: note: expanded from macro 'FREQ2FBIN'
    (((y) == HAL_FREQ_BAND_2GHZ) ? ((x) - 2300) : (((x) - 4800) / 5))

Reviewed by:	imp
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D15476
2018-05-18 17:23:23 +00:00
Jung-uk Kim
e7dfa7d8ab MFV: r333378
Import ACPICA 20180508.
2018-05-08 18:18:27 +00:00
Jung-uk Kim
835b56bfeb MFV: r333077
Merge ACPICA 20180427.
2018-05-01 19:17:38 +00:00
Eitan Adler
6472fa9a9d [iwm] Add support for iwm 3168 cards
```
iwm0@pci0:5:0:0:        class=0x028000 card=0x21108086 chip=0x24fb8086
rev=0x10 hdr=0x00
vendor     = 'Intel Corporation'
device     = 'Dual Band Wireless-AC 3168NGW [Stone Peak]'
class      = network
[94829] iwm0: <Intel(R) Dual Band Wireless AC 3168> mem
0xef700000-0xef701fff at device 0.0 on pci5
[94829] iwm0: hw rev 0x220, fw ver 22.361476.0, address
28:c6:3f:15:43:c5
```

MFC After:	2 weeks
Reviewed by:	ivadasz (over IRC)
PR:		224886
Differential Revision:	https://reviews.freebsd.org/D14865
2018-03-28 07:59:16 +00:00
Jung-uk Kim
8438a7a80a Merge ACPICA 20180313. 2018-03-14 23:45:48 +00:00
Anish Gupta
9363000dfe Move the new AMD-Vi IVHD [ACPI_IVRS_HARDWARE_NEW]definitions added in r329360 in contrib ACPI to local files till ACPI code adds new definitions reported by jkim.
Rename ACPI_IVRS_HARDWARE_NEW to ACPI_IVRS_HARDWARE_EFRSUP, since new definitions add Extended Feature Register support.  Use IvrsType to distinguish three types of IVHD - 0x10(legacy), 0x11 and 0x40(with EFR). IVHD 0x40 is also called mixed type since it supports HID device entries.
Fix 2 coverity bugs reported by cem.

Reported by:jkim, cem
Approved by:grehan
Differential Revision://reviews.freebsd.org/D14501
2018-03-05 02:28:25 +00:00
Anish Gupta
0b37d3d90e This change fixes duplicate detection of same IOMMU/AMD-Vi device for Ryzen with EFR support.
IVRS can have entry of type legacy and non-legacy present at same time for same AMD-Vi device. ivhd driver will ignore legacy if new IVHD type is present as specified in AMD-Vi specification. Earlier both of IVHD entries used and two ivhd devices were created.
Add support for new IVHD type 0x11 and 0x40 in ACPI. Create new struct of type acpi_ivrs_hardware_new for these new type of IVHDs. Legacy type 0x10 will continue to use acpi_ivrs_hardware.

Reviewed by:	avg
Approved by:	grehan
Differential Revision:https://reviews.freebsd.org/D13160
2018-02-16 05:17:00 +00:00
Jung-uk Kim
ff879b0799 MFV: r329072
Merge ACPICA 20180209.
2018-02-09 21:49:38 +00:00
Jung-uk Kim
6c30ff135c Fix a header inclusion missed in the previous commit.
Reported by:	Michael Butler (imb at protected-networks dot net)
2018-01-06 03:41:35 +00:00
Jung-uk Kim
32ac401671 Merge ACPICA 20180105. 2018-01-05 23:21:47 +00:00
Jung-uk Kim
f1db5ef7aa MFC: r326864
Merge ACPICA 20171214.
2017-12-14 23:21:31 +00:00
Nathan Whitehorn
32d122363f Switch the default firmware for npe(4) from the QOS_VLAN one to the
plain-vanilla ETH microcode. The QOS_VLAN firmware added support in microcode
for handling IEEE 802.1q tags, but the npe(4) driver did not actually
support the relevant signalling. As a result, it was impossible to use
VLANs with npe(4). Switching to the more basic microcode (same license)
removes the on-NIC promisisng and makes vlan(4) work on both NPE interfaces.

Ref: https://lists.freebsd.org/pipermail/freebsd-arm/2012-August/003826.html
2017-11-24 15:48:17 +00:00
Warner Losh
ca987d4641 Move sys/boot to stand. Fix all references to new location
Sponsored by:	Netflix
2017-11-14 23:02:19 +00:00
Jung-uk Kim
b7b7e71176 MFV: r325668
Merge ACPICA 20171110.
2017-11-10 18:46:34 +00:00
Jung-uk Kim
67d9aa4422 Merge ACPICA 20170929 (take 2). 2017-10-10 19:33:24 +00:00
George V. Neville-Neil
61fa6c0bd7 Add the firmware for the Intel 8265 WiFi device.
MFC after:	1 month
2017-10-09 15:54:57 +00:00
Jung-uk Kim
d7bbccdd82 Revert r324109. This commit broke a number of systems.
Reported by:	lwhsu, kib
Requested by:	ngie
2017-09-30 20:28:50 +00:00
Jung-uk Kim
c39c15e23f Merge ACPICA 20170929. 2017-09-29 23:02:49 +00:00
Sean Bruno
f173c2b77e The diff is the initial submission of Cavium Liquidio 2350/2360 10/25G
Intelligent NIC driver.

The submission conconsists of firmware binary file and driver sources.

Submitted by:	pkanneganti@cavium.com (Prasad V Kanneganti)
Relnotes:	Yes
Sponsored by:	Cavium Networks
Differential Revision:	https://reviews.freebsd.org/D11927
2017-09-12 23:36:58 +00:00
Jung-uk Kim
2f6a1a81bb Merge ACPICA 20170831. 2017-08-31 22:47:04 +00:00
Jung-uk Kim
5f9b24fa43 Merge ACPICA 20170728. 2017-07-28 22:23:29 +00:00
Adrian Chadd
13811c2677 [iwmfw] 8000C ver 22 firmware. 2017-06-04 21:27:39 +00:00
Adrian Chadd
ab5bad9ee3 [iwmfw] add 7265D-22 firmware 2017-06-04 21:26:31 +00:00
Adrian Chadd
f0949f0cc6 [ath_hal] add USB reset PLL work around for AR9331/AR9344 (Hornet/Wasp.)
It turns out that this is useful on hornet and wasp SoCs but it isn't
enabled in ye olde HAL /unless/ you were using a version from one of the
business units building USB targetted devices.  It eventually got fixed
for all of them as people started wanting to use the USB ports on their
SoCs (eg for flash storage, bluetooth, 4G/LTE widgets, etc.)

This is actually a fix from ath9k but I'm merging it with the available-but-
disabled code in the QCA reference HAL.

Tested:

* AR9331 SoC
2017-06-04 21:21:44 +00:00
Jung-uk Kim
af05116143 Merge ACPICA 20170531. 2017-06-01 00:01:19 +00:00
Jung-uk Kim
0d84335f99 Merge ACPICA 20170303. 2017-03-03 18:56:15 +00:00
Warner Losh
fbbd9655e5 Renumber copyright clause 4
Renumber cluase 4 to 3, per what everybody else did when BSD granted
them permission to remove clause 3. My insistance on keeping the same
numbering for legal reasons is too pedantic, so give up on that point.

Submitted by:	Jan Schaumann <jschauma@stevens.edu>
Pull Request:	https://github.com/freebsd/freebsd/pull/96
2017-02-28 23:42:47 +00:00
Adrian Chadd
027d4da3e0 Add 7265D firmware. 2017-02-22 04:42:02 +00:00
Adrian Chadd
95b861f576 [iwm] add this 3 megabyte firmware image. 2017-02-08 07:03:09 +00:00