Commit graph

40138 commits

Author SHA1 Message Date
Gordon Bergling
fe557f61e7 ocs_fc(4): Fix a typo in an error message
- s/faild/failed/

(cherry picked from commit dabebd0ba2)
2022-10-30 04:41:21 +01:00
Gordon Bergling
c89b2fb09a firewire(4): Fix a typo in an error message
- s/faild/failed/

(cherry picked from commit c03e35accc)
2022-10-30 04:41:04 +01:00
Gordon Bergling
2293e1df00 qlnxe(4): Fix a typo in a source code comment
- s/defult/default/

(cherry picked from commit 5daf88ea5e)
2022-10-29 07:04:54 +02:00
Gordon Bergling
29ed1247ea arcmsr(4): Fix a typo in a source code comment
- s/faild/failed/

(cherry picked from commit 24a630de81)
2022-10-28 10:56:03 +02:00
Alexander Motin
7e53019b06 Add random VMware device IDs.
Just to make dmesg look nicer there.

MFC after:	1 week

(cherry picked from commit 2a31a06bf1)
2022-10-26 22:48:56 -04:00
Doug Moore
d0fb642b64 rb_tree: let insert search start from next node
When the node to insert in the rb_tree is known to precede or follow a
particular node, new methods RB_INSERT_PREV and RB_INSERT_NEXT,
defined here, allow the search for where to insert the new node begin
with that particular node, rather than at the root, to save a bit of
time.

Using those methods, instead of RB_INSERT, in managing a tree in
iommu_gas.c, saves a little time.

Reviewed by:	kib
MFC after:	3 weeks
Differential Revision:	https://reviews.freebsd.org/D35516

(cherry picked from commit 368ee2f86a)
2022-10-23 19:43:22 -05:00
Kenneth D. Merry
2edc70060d Fix mpr(4) panic during a firmware update.
Issue Description:
The RequestCredits field of IOCFacts got changed between the Phase23
firmware to Phase24 firmware. So as part of firmware update operation,
driver has to free the resources & pools which are created with the Phase23
Firmware's IOCFacts data (i.e. during driver load time) and has to
reallocate the resources and pools using Phase24's IOCFacts data. Here
driver has freed the interrupts but missed to reallocate the interrupts and
hence config page read operation is getting timed out and controller is
going for recursive reinit (controller reset) operations and leading to
kernel panic.

Fix:
Reallocate the interrupts if the interrupts are disabled as part of
firmware update/downgrade operation.

Submitted by:	Sreekanth Ready <sreekanth.reddy@broadcom.com>
Tested by:	ken
MFC after:	3 days

(cherry picked from commit 11778fca4a)
2022-10-20 11:01:03 -04:00
Alexander Motin
c68313cdf5 ioat: Add Ice Lake ID.
MFC after:	2 weeks

(cherry picked from commit e4e91353c6)
2022-10-20 10:22:23 -04:00
Alexander Motin
b106d43705 vmd: Add DID 8086:7D0B and 8086:AD0B for Intel MTL SKUs
MFC after:	2 weeks

(cherry picked from commit 9bce114106)
2022-10-20 10:22:23 -04:00
Alexander Motin
5e98842589 vmd: Bypass MSI/MSI-X remapping when possible.
By default all VMD devices remap children MSI/MSI-X interrupts into their
own.  It creates additional isolation, but also complicates things due to
sharing, etc.  Fortunately some VMD devices can bypass the remapping.
Add tunable to control it for remap testing or if something go wrong.

MFC after:	2 weeks

(cherry picked from commit c28220d866)
2022-10-20 10:22:23 -04:00
Warner Losh
f51c1d1dd5 pvscsi: Advertise maxio of 256k.
While the PV SCSI SG list can handle 512k of SG entries, it can only do
so for I/O that's aligned to 4k or better. newfs_msdos does unaligned
I/O, so triggers too long for host errors in cam when a 512k I/O is
attempted. Prefer power of 2 256k to the absolute maximum 508k, though
that can be revisited should the latter show to give significant
performance improvement.

MFC After:		3 days
Tested by:		darius on discord (508k version of patch)
Sponsored by:		Netflix

(cherry picked from commit 9a5a5c1576)
2022-10-19 13:47:45 -04:00
Mitchell Horne
b34de75d61 Downgrade tty_intr_event from a global
It can be static within uart_tty.c. It is an open question whether there
remains any real benefit to having uart instances share a swi thread.

Reviewed by:	imp, markj, jhb
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D36938

(cherry picked from commit 05b727fee5)
2022-10-19 10:46:46 -03:00
Yan Ka Chiu
95d3300d22
ixl(4): Fix SR-IOV panics
The hw and ifp of a vsi will be NULL if such ixl_vsi is allocated
for a VF. When ixl_reconfigure_filters called, it is trying to
access vsi->ifp and hw->mac.addr and therefore is casuing panic.

This commit add checks to determine if vsi is a VF by checking
if vsi->hw is NULL, before adding IXL_VLAN_ANY filter (which
is already in a VF vsi's filter list) and VLAN filters.

(erj's Note: The SR-IOV flows need revisiting; this will help
prevent panics for now)

Reviewed by:	krzysztof.galazka@intel.com, erj@
Differential Revision:	https://reviews.freebsd.org/D35649

(cherry picked from commit e706512a2b)
2022-10-17 21:19:41 -07:00
Krzysztof Galazka
2ff0054334
ixl(4): Add support for I710 devices and remove non-inclusive language
Intel introduces a new line of 1G Ethernet adapters
with Device ID 0x0DD2. While at that also remove
non-inclusive language.

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

Reviewed by:	kbowling@
Tested by:	gowtham.kumar.ks@intel.com
Sponsored by:	Intel Corporation
Differential Revision:	https://reviews.freebsd.org/D34924

(cherry picked from commit b7b40e4a38)
2022-10-17 21:19:41 -07:00
Eric Joyner
152fa6f5b0
ice(4): Add RDMA Client Interface
This allows the "irdma" driver to communicate with the ice(4)
driver to allow it access to the underlying device's hardware
resources as well as synchronize access to shared resources.

This interface already existed in the standalone out-of-tree
1.34.2 driver; this commit adds and enables it in the in-kernel
driver.

Note:

Adds hack to module Makefile to compile interface/.m files

These are required for the RDMA client interface, but they don't
build as-is like the normal .c files. The source directory doesn't
seem to be included by default, so add lines that specifically
add them as libraries so that ice_rdma.h can be found and the
interface files will compile.

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

Sponsored by:	Intel Corporation
Differential Revision:	https://reviews.freebsd.org/D30889

(cherry picked from commit 8a13362d49)
(cherry picked from commit d8cce8145c)
2022-10-17 21:19:36 -07:00
Alexander Motin
03acc85e3f pci: Disable Electromechanical Interlock.
Add sysctl/tunable to control Electromechanical Interlock support.
Disable it by default since Linux does not do it either and it seems
the number of systems having it broken is higher than having working.

This fixes NVMe backplane operation on ASUS RS500A-E11-RS12U server
with AMD EPYC 7402 CPU, where attempts to control reported interlock
for some reason end up in PCIe link loss, while interlock status does
not change (it is not really there).

MFC after:	2 weeks

(cherry picked from commit a58536b91a)
2022-10-17 21:02:36 -04:00
Kyle Evans
2258cf3624 pci_host_generic: stop address translation in bus_alloc_resource
Translating the provided range prior to rman_reserve_resource(9) is
decidedly wrong; the caller may be trying to do a wildcard allocation,
for which the implementation is expected to DTRT and clamp the range to
what's actually feasible.

We don't use the resulting translation here anyways, so just remove it
entirely -- the rman in the default implementation is derived from
sc->ranges, so the translation should trivially succeed every time as
long as the reservation succeeded.  If something has gone awry in a
derived driver, we'll detect it when we translate prior to activation,
so there's likely no diagnostic value in retaining the translation after
reservation either.

Reviewed by:	andrew
Noticed by:	jhb

(cherry picked from commit bd93b5f79a)
2022-10-17 10:36:59 -05:00
Kevin Bowling
0f95623db5 igc: Fix up hw vlan ops
Adapt 2796f7cab1 to igc(4)

* Don't reset the entire adapter for vlan changes, fix up the problems
* Remove the VFTA, this hardware doesn't seem to implement it

Approved by:	grehan
Differential Revision:	https://reviews.freebsd.org/D31979

(cherry picked from commit 2eaef8ec4a)
2022-10-16 20:36:01 -07:00
Mah Yock Gen
f2a0b610b8 igc: remove unnecessary PHY ID checks
I225 devices have only one PHY vendor. There is unnecessary to check
_I_PHY_ID during the link establishment and auto-negotiation process,
the checking also caused devices like i225-IT failed. This patch is to
remove the mentioned unnecessary checking.

Cc: stable@dpdk.org

Signed-off-by: Mah Yock Gen <yock.gen.mah@intel.com>
Signed-off-by: Taripin Samuel <samuel.taripin@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>

Approved by:	grehan
Differential Revision:	https://reviews.freebsd.org/D36923

(cherry picked from commit 29d7f1ff57)
2022-10-16 20:35:57 -07:00
Hans Petter Selasky
38b1cbc87b usb(4): Make the enumeration thread nice time a variable.
Depends on "options USB_DEBUG".

Suggested by:	koobs@
Sponsored by:	NVIDIA Networking

(cherry picked from commit 8758aabb16)
2022-10-12 17:53:22 +02:00
Hans Petter Selasky
1069b3b514 usb(4): Make sure the enumeration thread doesn't loop too fast.
Sponsored by:	NVIDIA Networking

(cherry picked from commit 55a3bd000d)
2022-10-12 17:53:22 +02:00
Hans Petter Selasky
8e7cb25f5b vt(4): Use define instead of numerical value.
No functional change intended.

Sponsored by:	NVIDIA Networking

(cherry picked from commit 18a44589fc)
2022-10-12 17:53:22 +02:00
Ivan Quitschal
90536729a4 vt(4): Clear paste buffer after pasting.
Sponsored by:	NVIDIA Networking
Differential Revision:	https://reviews.freebsd.org/D36042

(cherry picked from commit d2d3046436)
2022-10-12 17:53:21 +02:00
Ivan Quitschal
7edcf5ac8a vt(4): When cutting a line, append a newline character.
While at it optimise "case 3" into a default.
This way there is no need to initialize the "mark" variable in the beginning,
because all cases set it.

Sponsored by:	NVIDIA Networking
Differential Revision:	https://reviews.freebsd.org/D36042

(cherry picked from commit 90b8910054)
2022-10-12 17:53:21 +02:00
Hans Petter Selasky
bed7844abc vt(4): Make sure pressing the extend button updates the current selection.
Sponsored by:	NVIDIA Networking

(cherry picked from commit 4ea90153ac)
2022-10-12 17:53:21 +02:00
Kevin Bowling
4615eb96d8 Revert "e1000: Try auto-negotiation for fixed 100 or 10 configuration"
This reverts commit 9ab4dfce8f.

OPNsense users have reported a regression with fixed configs.

The e1000 api is not ready for this change.

(cherry picked from commit 66dad2db0a)
2022-10-12 05:04:28 -07:00
Doug Moore
cd63955198 rb_tree: augmentation shortcut
RB-tree augmentation maintains data in each node of the tree that
represents the product of some associative operator applied to all the
nodes of the subtree rooted at that node. If a node in the tree
changes, augmentation data for the node is updated for that node and
all nodes on the path from that node to the tree root. However,
sometimes, augmenting a node changes no data in that node,
particularly if the associated operation is something involving 'max'
or 'min'. If augmentation changes nothing in a node, then the work of
walking to the tree root from that point is pointless, because
augmentation will change nothing in those nodes either. This change
makes it possible to avoid that wasted work.

Define RB_AUGMENT_CHECK as a macro much like RB_AUGMENT, but which
returns a value 'true' when augmentation changes the augmentation data
of a node, and false otherwise. Change code that unconditionally walks
and augments to the top of tree to code that stops once an
augmentation has no effect. In the case of rebalancing the tree after
insertion or deletion, where previously a node rotated into the path
was inevitably augmented on the march to the tree root, now check to
see if it needs augmentation because the march to the tree root
stopped before reaching it.

Change the augmentation function in iommu_gas.c so that it returns
true/false to indicate whether the augmentation had any effect.

Reviewed by:	alc, kib
MFC after:	3 weeks
Differential Revision:	https://reviews.freebsd.org/D36509

(cherry picked from commit b16f993ec2)
2022-10-11 21:45:23 -05:00
Doug Moore
7e13918770 iommu_gas: don't remove and insert boundary entry
Avoid removing an item in iommu_gas_free_region only to reinsert it,
by avoiding removing an entry that is either first_place or
last_place.

Reviewed by:	kib
MFC after:	3 weeks
Differential Revision:	https://reviews.freebsd.org/D36597

(cherry picked from commit 87cd087a4a)
2022-10-11 21:31:18 -05:00
Hans Petter Selasky
1bac849806 vt(4): Make sure vt_switch_timer() has a sleepable context.
Fixes the following panic backtrace:

panic()
usbhid_sync_xfer()
usbhid_set_report()
hid_set_report()
hidbus_write()
hid_write()
hkbd_set_leds()
hkbd_ioctl_locked()
hkbd_ioctl_locked()
hkbd_ioctl()
kbdmux_ioctl()
vt_window_switch()
vt_switch_timer()

Differential Revision:	https://reviews.freebsd.org/D36715
Sponsored by:	NVIDIA Networking

(cherry picked from commit 2cce9aa078)
2022-10-04 16:40:46 +02:00
Warner Losh
b3ace70370 xl_attach: eliminate write only variable unit
Sponsored by:		Netflix

(cherry picked from commit c972f2c065)
2022-10-01 22:25:56 -06:00
Warner Losh
10a41dd708 vtpci_legacy_register_msix: eliminate write only variable dev
Sponsored by:		Netflix

(cherry picked from commit 76e9675663)
2022-10-01 22:25:56 -06:00
Warner Losh
6bdaf5917f ustorage_fs_verify: eliminate write only variables file_offset and file_offset
Sponsored by:		Netflix

(cherry picked from commit 7a1bef40f1)
2022-10-01 22:25:56 -06:00
Warner Losh
1e372ec9e1 cp2112iic_intr_write_callback: eliminate write only variable psc
Sponsored by:		Netflix

(cherry picked from commit 11110685fc)
2022-10-01 22:25:56 -06:00
Warner Losh
fff078d9ad wsp_intr_callback: eliminate write only variable h
Sponsored by:		Netflix

(cherry picked from commit 53c1f1fc60)
2022-10-01 22:25:56 -06:00
Warner Losh
0fdc327e5d uss820dci: eliminate unused variables sc, ep_no
Sponsored by:		Netflix

(cherry picked from commit 12312f7583)
2022-10-01 22:25:56 -06:00
Warner Losh
61181185cf uhci_xfer_setup: eliminate write only variable sc
Sponsored by:		Netflix

(cherry picked from commit 6ccdcae1b9)
2022-10-01 22:25:55 -06:00
Warner Losh
bbc7627317 musb: eliminate write only variable sc
Sponsored by:		Netflix

(cherry picked from commit ab59cd6a0b)
2022-10-01 22:25:55 -06:00
Warner Losh
3f07688cf6 atmegadci: eliminate unused variables sc, ep_no
Sponsored by:		Netflix

(cherry picked from commit e73b02f66b)
2022-10-01 22:25:55 -06:00
Warner Losh
79ef6bcd78 hdspe_dmapsetmap: eliminate write only variable sc
Sponsored by:		Netflix

(cherry picked from commit ad1b7fd714)
2022-10-01 22:25:55 -06:00
Warner Losh
9763453cd9 quicc_bus_setsig: eliminate write only variable bas
Sponsored by:		Netflix

(cherry picked from commit c8fe3923d8)
2022-10-01 22:25:55 -06:00
Warner Losh
5d6c09f869 hdaa_eld_dump: eliminate write only variable len
Sponsored by:		Netflix

(cherry picked from commit 557627dda9)
2022-10-01 22:25:55 -06:00
Warner Losh
b6e4f5ef2b emu10kx: eliminate write only variables val, r and move i to loop
Sponsored by:		Netflix

(cherry picked from commit 8717135d37)
2022-10-01 22:25:55 -06:00
Warner Losh
30711541ba emu10kx-pci: eliminate write only variable r
Sponsored by:		Netflix

(cherry picked from commit 451f54707a)
2022-10-01 22:25:55 -06:00
Warner Losh
62ec1f05fa emu_midi_probe: eliminate write only variable r
Sponsored by:		Netflix

(cherry picked from commit 7387abd342)
2022-10-01 22:25:54 -06:00
Warner Losh
eaa861ec10 pcmcsa_attach: eliminate write only variable unit
Sponsored by:		Netflix

(cherry picked from commit 33985865b2)
2022-10-01 22:25:54 -06:00
Warner Losh
36ae1e15b0 midicsa_attach: eliminate write only variable func
Sponsored by:		Netflix

(cherry picked from commit 3e423419cf)
2022-10-01 22:25:54 -06:00
Warner Losh
60911eda78 cs4281: eliminate write only variable codecno
Sponsored by:		Netflix

(cherry picked from commit 0c64fe0068)
2022-10-01 22:25:54 -06:00
Warner Losh
753b13c643 sb_probe: eliminate write only variable r
Sponsored by:		Netflix

(cherry picked from commit 635a4068d2)
2022-10-01 22:25:54 -06:00
Warner Losh
6b31f08b47 sb16_probe: eliminate write only variable r
Sponsored by:		Netflix

(cherry picked from commit 668986eae9)
2022-10-01 22:25:54 -06:00
Warner Losh
c74f4936fb ess_probe: eliminate write only variable r
Sponsored by:		Netflix

(cherry picked from commit 3a7365acc8)
2022-10-01 22:25:54 -06:00