Commit Graph

38220 Commits

Author SHA1 Message Date
Emmanuel Vadot
b48668250e pwm_backlight: Fix 32 bits build
Reported by:	jenkins, mjg
2020-10-03 08:31:28 +00:00
Navdeep Parhar
73f6606b47 cxgbe(4): set up the firmware flowc for the tid before send_abort_rpl.
MFC after:	3 days
Sponsored by:	Chelsio Communications
2020-10-02 23:48:57 +00:00
Emmanuel Vadot
38d94a4bc7 Add pwm_backlight
Driver for pwm-backlight compatible device.

Relnotes:	yes
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D26252
2020-10-02 18:23:27 +00:00
Emmanuel Vadot
675aae732d Add backlight subsystem
This is a simple subsystem that allow drivers to register as a backlight.
Each backlight creates a device node under /dev/backlight/backlightX and
an alias based on the name provided.

Relnotes:	yes
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D26250
2020-10-02 18:18:01 +00:00
Nick O'Brien
3f59a7f97b flash: Add support for SPI flash s25fl512s
Reviewed by:	kp
Approved by:	kp (mentor)
Sponsored by:	Axiado
2020-10-02 17:33:56 +00:00
Navdeep Parhar
7676c62aa3 cxgbe(4): validate largest_rx_cluster and safest_rx_cluster.
These tunables can only be set to a valid cluster size (2K, 4K, 9K, or
16K) as documented in the man page.  Anything else could lead to a
panic on interface up.

Reported by:	mav@
MFC after:	1 week
Sponsored by:	Chelsio Communications
2020-10-02 05:59:55 +00:00
Emmanuel Vadot
48c13e5270 ichsmb_pci: convert to pci_device_table / add PCI_PNP_INFO
Submitted by:	Greg V <greg@unrelenting.technology>
Reviewed by:	mav
Differential Revision:	https://reviews.freebsd.org/D25260
2020-10-01 16:55:01 +00:00
Michal Meloun
c19440e350 Fix the inverted condition in mtx_asserts.
Mutex should be owned in affected functions.

Reborted by:	emaste
MFC after:	4 weeks
MFC with:	r366161
2020-10-01 09:50:08 +00:00
Emmanuel Vadot
6b74091dd5 ahci_generic: add quirk for NXP0004 (NXP Layerscape LX2160A)
This fixes this error :
(aprobe3:ahcich3:0:15:0): NOP FLUSHQUEUE. ACB: 00 00 00 00 00 00 00 00 00 00 00 00
(aprobe3:ahcich3:0:15:0): CAM status: Command timeout
(aprobe3:ahcich3:0:15:0): Error 5, Retries exhausted

Submitted by:	Greg V <greg@unrelenting.technology>
Reviewed by:	imp, mav
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D25157
2020-09-30 17:10:49 +00:00
Emmanuel Vadot
a52c8a6502 acpi_resource: support multiple IRQs
Some DSDT entries have multiple interrupts for one device.
Add support for it.

This fixes ahci on NXP LS2160 and genet on RPi4

Submitted by:	Greg V <greg@unrelenting.technology>
Reviewed by:	jhb
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D25145
2020-09-30 17:09:17 +00:00
John Baldwin
0e99339684 Fallback to software for more GCM and CCM requests.
ccr(4) uses software to handle GCM and CCM requests not supported by
the crypto engine (e.g. with only AAD and no payload).  This change
adds a fallback for a few more requests such as those with more SGL
entries than can fit in a work request (this can happen for GCM when
decrypting a TLS record split across 15 or more packets).

Reported by:	Chelsio QA
Reviewed by:	np
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D26582
2020-09-29 21:51:32 +00:00
Bjoern A. Zeeb
3917c9ba65 rtwn: narrow the epoch area
Rather than placing the epoch around the entire receive loop which
might call into rtwn_rx_frame() and USB and sleep, split the loop
into two[1] and leave us with one unlock/lock cycle as well.

PR:		249925
Reported by:	thj, (rkoberman gmail.com)
Tested by:	thj
Suggested by:	adrian [1]
Reviewed by:	adrian
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation (initially, paniced my iwl lab host)
Differential Revision:	https://reviews.freebsd.org/D26554
2020-09-29 20:46:25 +00:00
Ruslan Bukin
6186bfbd18 Rename kernel option ACPI_DMAR to IOMMU.
This is mostly needed for a common arm64/amd64 iommu code.

Reviewed by:	kib
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D26587
2020-09-29 20:29:07 +00:00
Ruslan Bukin
025730aad6 o Rename acpi_iommu_get_dma_tag() -> iommu_get_dma_tag().
This function isn't ACPI dependent and we may use it on FDT systems
  as well.
o Don't repeat the function declaration, include iommu.h instead.

Reviewed by:	andrew, kib
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D26584
2020-09-29 15:10:56 +00:00
Navdeep Parhar
822967e7e5 cxgbe(4): Avoid unnecessary work in the firmware during netmap tx.
Bind the netmap tx queues to a special '0xff' scheduling class which
makes the firmware skip some processing related to rate limiting on the
outgoing traffic.  Future firmwares will do this automatically.

MFC after:	1 week
Sponsored by:	Chelsio Communications
2020-09-29 09:25:52 +00:00
Navdeep Parhar
7efe256233 Remove duplicate line. 2020-09-29 09:11:51 +00:00
Navdeep Parhar
15ca0766ed cxgbe(4): adjust the doorbell threshold for netmap freelists to match the
maximum burst size used when fetching descriptors from the list.

MFC after:	1 week
Sponsored by:	Chelsio Communications
2020-09-29 07:51:06 +00:00
Navdeep Parhar
f7b8615af5 cxgbe(4): display an error message when netmap cannot be enabled because
the interface is down.

MFC after:	1 week
2020-09-29 07:36:21 +00:00
Navdeep Parhar
a9f476580e cxgbe(4): fixes for netmap operation with only some queues active.
- Only active netmap receive queues should be in the RSS lookup table.

- The RSS table should be restored for NIC operation when the last
  active netmap queue is switched off, not the first one.

- Support repeated netmap ON/OFF on a subset of the queues.  This works
  whether the the queues being enabled and disabled are the only ones
  active or not.  Some kring indexes have to be reset in the driver for
  the second case.

MFC after:	1 week
Sponsored by:	Chelsio Communications
2020-09-29 05:08:45 +00:00
Michal Meloun
01d0f9c0e4 Refine locking inside of syscon driver.
In some cases, the syscon driver may be used by consumer requiring better
control about locking (ie. it may be used as registe file provider for clock
driver which needs locked access to multiple registers).
Add fine locking protocol methods together with bunch of helper functions
in syscon driver and implement this functionality in syscon_generic driver.

MFC after:	4 weeks
2020-09-25 16:44:01 +00:00
Michal Meloun
8dc348a479 Correctly handle nodes compatible with "syscon", "simple-bus".
Syscon can also have child nodes that share a registration file with it.
To do this correctly, follow these steps:
- subclass syscon from simplebus and expose it if the node is also
  "simple-bus" compatible.
- block simplebus probe for this compatible string, so it's priority
 (bus pass) doesn't colide with syscon driver.

While I'm in, also block "syscon", "simple-mfd" for the same reason.

MFC after:	4 weeks
2020-09-25 13:52:31 +00:00
Michal Meloun
b95a8021ec Make simplebus friendlier for subclassing.
MFC after:	1 week
2020-09-25 09:56:50 +00:00
Conrad Meyer
5b50517079 amdtemp(4), amdsmn(4): Attach to Ryzen 4000 APU (Zen 2, "Renoir")
PR:		249864
Reported by:	Florian Millet <florian.millet AT laposte.net>
Tested by:	Florian Millet
2020-09-25 04:16:28 +00:00
Bjoern A. Zeeb
fe5ebb23cc Provide MS() and SM() macros for 80211 and wireless drivers.
We have (two versions) of MS() and SM() macros which we use throughout
the wireless code.  Change all but three places (ath_hal, rtwn, and rsu)
to the newly provided _IEEE80211_MASKSHIFT() and _IEEE80211_SHIFTMASK()
macros.  Also change one internal case using both _S and _M instead of
just _S away from _M (one of the reasons rtwn and rsu were not changed).

This was done semi-mechanically.  No functional changes intended.

Requested by:	gnn (D26091)
Reviewed by:	adrian (pre line wrap)
MFC after:	2 weeks
Sponsored by:	Rubicon Communications, LLC (d/b/a "Netgate")
Differential Revision:	https://reviews.freebsd.org/D26539
2020-09-24 10:57:39 +00:00
Navdeep Parhar
30e3f2b4ea cxgbe(4): let the PF driver use VM work requests for transmit.
This allows the PF interfaces to communicate with the VF interfaces over
the internal switch in the ASIC.  Fix the GL limits for VM work requests
while here.

MFC after:	3 days
Sponsored by:	Chelsio Communications
2020-09-22 04:16:40 +00:00
Navdeep Parhar
7054f6ec97 cxgbe(4): add counters for mbuf pullups and defrags.
MFC after:	3 days
Sponsored by:	Chelsio Communications
2020-09-22 03:06:36 +00:00
Hans Petter Selasky
8463bd8a77 Add support for Winbond USB CDC modem device found in Tenma power supply.
PR:		249384
MFC after:	1 week
Submitted by:	darius@dons.net.au
Sponsored by:	Mellanox Technologies // NVIDIA Networking
2020-09-21 18:32:57 +00:00
David Bright
e32d47f32d Add an ioctl to get an NVMe device's maximum transfer size
Reviewed by:	imp, chuck
Obtained from:	Dell EMC Isilon
MFC after:	1 week
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D26390
2020-09-21 15:41:47 +00:00
Hans Petter Selasky
a29c0348f0 Fix for use of the XHCI driver on Cortex-A72 by adding a missing cache
flush operation before writing to the XHCI_ERSTBA_LO/HI register(s).

PR:		237666
Discussed with:	Mark Millard <marklmi@yahoo.com>
MFC after:	1 week
Sponsored by:	Mellanox Technologies // Nvidia
2020-09-19 22:37:45 +00:00
Eric van Gyzen
f9cc8410e1 vm_ooffset_t is now unsigned
vm_ooffset_t is now unsigned. Remove some tests for negative values,
or make other adjustments accordingly.

Reported by:	Coverity
Reviewed by:	kib markj
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D26214
2020-09-18 16:48:08 +00:00
Navdeep Parhar
3b8506ae30 cxgbe(4): add the firmware binaries instead of the empty files that were added
in r365861.

Obtained from:	Chelsio Communications
MFC after:	3 days
Sponsored by:	Chelsio Communications
2020-09-18 03:11:47 +00:00
Navdeep Parhar
a4a4ad2dd9 cxgbe(4): add support for stateless offloads for VXLAN traffic.
Hardware assistance includes checksumming (tx and rx), TSO, and RSS on
the inner traffic in a VXLAN tunnel.

Relnotes:	Yes
Sponsored by:	Chelsio Communications
2020-09-18 03:01:47 +00:00
Navdeep Parhar
88c9c3f4dd cxgbe(4): Update T4/5/6 firmwares to 1.25.0.0.
Obtained from:	Chelsio Communications
MFC after:	3 days
Sponsored by:	Chelsio Communications
2020-09-17 22:14:11 +00:00
Eric Joyner
a3b9a7366e e1000: Properly retain promisc flag
From Franco:
The iflib rewrite forced the promisc flag but it was not reported
to the system.  Noticed on a stock VM that went into unsolicited
promisc mode when dhclient was started during bootup.

PR:		248869
Submitted by:	Franco Fichtner <franco@opnsense.org>
Reviewed by:	erj@
MFC after:	3 days
2020-09-15 21:07:30 +00:00
Eric Joyner
467515a494 igb(4): Fix define and includes with RSS option enabled
This re-adds the opt_rss.h header to the driver and includes some
RSS-specific headers when RSS is defined.

PR:		249191
Submitted by:	Milosz Kaniewski <milosz.kaniewski@gmail.com>
MFC after:	3 days
2020-09-15 21:00:25 +00:00
Warner Losh
44a8153672 Don't do the busy dance in icee_open/close
We don't need to do the busy dance for this driver. It's handled by
destroy_dev() entirely. Since all we did was busy/unbusy in
open/close, just delete them. We therefore don't need to track closes
either.

Reviewed by: ian@
Differential Revision: https://reviews.freebsd.org/D26431
2020-09-14 23:30:04 +00:00
Navdeep Parhar
bb60ba7e22 cxgbe(4): Get the count of FCS errors from the MAC and not MPS for T6 ports.
The MPS register on the T6 counts something other than FCS errors despite its
name.

MFC after:	3 days
Sponsored by:	Chelsio Communications
2020-09-14 22:15:54 +00:00
Ian Lepore
3c41bcdf29 Add product ID strings for a couple Microchip usb hubs. Also, update the
vendor ID string to say just "Microchip Technology" -- the buyout of
Standard Microsystems happened in 2012 and the SMC/SMSC names are pretty
much retired at this point.

PR:		241406
2020-09-14 17:33:28 +00:00
Hans Petter Selasky
39b0f9c389 Poll statistics more frequently in mlx5en(4).
This makes traffic steering algorithms more accurate.

MFC after:	1 week
Submitted by:	gallatin @
Sponsored by:	Mellanox Technologies // NVIDIA Networking
2020-09-14 14:24:54 +00:00
Andrew Turner
d729904a4f Allow for interrupts on pl061 children
Add enough infrastructure for interrupts on children of the pl061 GPIO
controller. As gpiobus already provided these the pl061 driver also needs
to pass requests up the newbus hierarchy.

Currently there are no children that expect to configure interrupts, however
this is expected to change to support the ACPI Event Information interface.

Sponsored by:	Innovate UK
2020-09-14 08:59:16 +00:00
Scott Long
74c781ed91 Refine the busdma template interface. Provide tools for filling in fields
that can be extended, but also ensure compile-time type checking.  Refactor
common code out of arch-specific implementations.  Move the mpr and mps
drivers to this new API.  The template type remains visible to the consumer
so that it can be allocated on the stack, but should be considered opaque.
2020-09-14 05:58:12 +00:00
John-Mark Gurney
7d5522e16a A major update to the ure driver.
This update adds support for:
HW VLAN tagging
HW checksum offload for IPv4 and IPv6
tx and rx aggreegation (for full gige speeds)
multiple transactions

In my testing, I am able to get 900-950Mbps depending upon
TCP or UDP, which is a significant improvement over the previous
91Mbps (~8kint/sec*1500bytes/packet*1packet/int).

Reviewed by:	hselasky
MFC after:	2 months
Differential Revision:	https://reviews.freebsd.org/D25809
2020-09-12 00:33:11 +00:00
Scott Long
1002529ea9 Convert the mps driver to use busdma templates 2020-09-11 22:27:35 +00:00
Bjoern A. Zeeb
aaa1fdb87b iwm: fix regression from r365419 (ieee80211_media_change())
In r365419 ieee80211_media_change() callers were updated to not longer
act on the obselete ENETRESET return code.
While in the old days iwm has done a stop/init cycle in these cases,
this was not executed since r193340.
As a consequence simplify iwm code as well by passing ieee80211_media_change()
right to ieee80211_vap_attach() as there is no more need for a local
implementation.

Reported by:	Tomoaki AOKI (junchoon dec.sakura.ne.jp)
Tested by:	Tomoaki AOKI (junchoon dec.sakura.ne.jp)
MFC after:	3 days
X-MFC:		fix is already in stable/12
PR:		248955
2020-09-11 14:18:47 +00:00
John-Mark Gurney
0b39e3448a Don't clear reserved bits per RealTek
MFC after:	3 days
2020-09-11 02:02:13 +00:00
Eric Joyner
7d7af7f85b ice(4): Update to 0.26.16
Summary of changes:

- Assorted bug fixes
- Support for newer versions of the device firmware
- Suspend/resume support
- Support for Lenient Link Mode for E82X devices (e.g. can try to link with
  SFP/QSFP modules with bad EEPROMs)
- Adds port-level rx_discards sysctl, similar to ixl(4)'s

This version of the driver is intended to be used with DDP package 1.3.16.0,
which has already been updated in a previous commit.

Tested by:	Jeffrey Pieper <jeffrey.e.pieper@intel.com>
MFC after:	3 days
MFC with:	r365332, r365550
Sponsored by:	Intel Corporation
Differential Revision:	https://reviews.freebsd.org/D26322
2020-09-10 23:46:13 +00:00
Li-Wen Hsu
9f917148e0 urndis(4): Add support of Inseego/Novatel Wireless MiFi 8800/8000
PR:		245152
Submitted by:	rootless@gmail.com
Reviewed by:	hselasky
MFC after:	3 days
2020-09-10 18:27:52 +00:00
Andrew Turner
15fe2adacb Move the pl061 acpi attachment earlier
As the pl061 driver can be an interrupt controller attach it earlier in the
boot so other drivers can use it.

Use a new GPIO xref to not conflict with the existing root interrupt
controller.

Sponsored by:	Innovate UK
2020-09-10 14:58:46 +00:00
Ruslan Bukin
cb9050dd21 Move the rid variable to the generic iommu context.
It could be used in various IOMMU platforms, not only DMAR.

Reviewed by:	kib
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D26373
2020-09-10 14:12:25 +00:00
Andrew Turner
128e746c6a Switch the name of the pl061 driver to gpio
We need it to be named gpio for gpiobus to work.

Sponsored by:	Innovate UK
2020-09-10 09:50:43 +00:00