Commit graph

42062 commits

Author SHA1 Message Date
Mazin Fadl
93f1302dc6 usb: add quirks for the Genesys GL3220 card reader
Without these, card hotplugging does not work on the GL3220.

PR:	263868
Fixes:	7520b88860 ("usb(4): Automagically apply all quirks [...]")
(cherry picked from commit 94efe9f91be7f3aa501983716db5a4378282a734)
2023-11-25 22:07:11 -06:00
Brad Smith
d0b589b231 re(4): Add support for 8168FP HW rev
(cherry picked from commit 88d2b69c719a20da9eb53f1c58adf6ecb005f8ce)
Differential Revision:	https://reviews.freebsd.org/D42671
2023-11-25 16:38:05 -08:00
Martin Matuska
ac83e415ef mlx5_core: fix deadlock when using RXTLS
If removing a node of type FS_TYPE_FLOW_DEST we lock the flow group too
late. This can lead to a deadlock with fs_add_dst_fg().

PR:		274715
Reviewed by:	kib
Tested by:	mm
Differential Revision: https://reviews.freebsd.org/D42368

(cherry picked from commit a592812327deaf69ab226afc5c8a01af43dc03c2)
2023-11-22 09:00:23 +01:00
Konstantin Belousov
8377dd1c9a mlx5core: add linux/bitops.h include for mlx5_ifc.h use of BIT()
(cherry picked from commit 97beac79edf450851474934199e504e6244a7116)
2023-11-22 03:40:28 +02:00
Patrisious Haddad
588203bfbd mlx5: Introduce new destination type TABLE_TYPE
(cherry picked from commit 7b959396ca6fae5635260131eedb9bc19f2726a3)
2023-11-22 03:40:28 +02:00
Konstantin Belousov
d826188941 mlx5ib: adjust for the mlx5_create_auto_grouped_flow_table() interface change
(cherry picked from commit b94ef2a3bcbb369d85b276a45504d42f2f2cd369)
2023-11-22 03:40:28 +02:00
Mark Bloch
e073fccf14 mlx5: add ability to attach flow counter to steering rule
(cherry picked from commit ad744541311bfddd74ea3c5d49d52a4c366b9762)
2023-11-22 03:40:28 +02:00
Raed Salem
52164cb3bd mlx5: add fs_counters
(cherry picked from commit 35bbcf0916992d77fe1521962db42b3106a701fb)
2023-11-22 03:40:28 +02:00
Mark Bloch
5a2ff1f03a mlx5: Add a no-append flow insertion mode
(cherry picked from commit 6a6af22b6ec42eb0436381fae8dd1b86bc4c6327)
2023-11-22 03:40:28 +02:00
Mark Bloch
67a9c8868a net/mlx5: Allow creating autogroups with reserved entries
(cherry picked from commit 0a5db6bb3a953bd22f53f3607ae6853487548532)
2023-11-22 03:40:28 +02:00
Mark Bloch
4c6a46cea4 net/mlx5: Fix auto group size calculation
(cherry picked from commit 04db54fe4309e896c4c80baadbcc47b171722027)
2023-11-22 03:40:28 +02:00
Mark Bloch
0759f76e57 mlx5: Use software enum in APIs instead of PRM
(cherry picked from commit 76ed99ed8ad259792fea752461e2cd1ed481e8e1)
2023-11-22 03:40:28 +02:00
Mark Bloch
6fb2eebf64 mlx5: Add packet reformat support to flow rules
(cherry picked from commit 45e2e55df665c9b5749c9f2269d1b804147917eb)
2023-11-22 03:40:27 +02:00
Mark Bloch
8895a05096 mlx5: Add modify header support to flow rules
(cherry picked from commit 847542c60c2b3d922d636cc36ce51714032f9825)
2023-11-22 03:40:27 +02:00
Mark Bloch
08e7b322db mlx5: Refactor flow actions into a struct
(cherry picked from commit cb054a493a95cbd5a4b00c693c3924622914c51a)
2023-11-22 03:40:27 +02:00
Mark Bloch
87d86f3733 mlx5: Add packet reformat allocation support
(cherry picked from commit bb4645b95b0b3976decb4e68934b2e5cc002c53d)
2023-11-22 03:40:27 +02:00
Mark Bloch
2b729c222d mlx5: Add modify header support
(cherry picked from commit e4f84168b3c8bf99297dda712b147906d463b20e)
2023-11-22 03:40:27 +02:00
Aaron LI
9ed67f1307 if_wg: Missing radix unlock can cause deadlock
In function 'wg_aip_add()', the error path of returning ENOMEM when
(node == NULL) is forgetting to unlock the radix tree, and thus may lead
to a deadlock.

PR:		275001
Reviewed by:	kp
MFC after:	1 week

(cherry picked from commit dcc4d2939f789a6d1f272ffeab2068ba2b7525ea)
2023-11-18 10:46:21 +01:00
Alexander Motin
7ab9e36fc5 nvme: Introduce longer timeouts for admin queue
KIOXIA CD8 SSDs routinely take ~25 seconds to delete non-empty
namespace.  In some cases like hot-plug it takes longer, triggering
timeout and controller resets after just 30 seconds. Linux for many
years has separate 60 seconds timeout for admin queue.  This patch
does the same.  And it is good to be consistent.

Sponsored by:	iXsystems, Inc.
Reviewed by:	imp
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D42454

(cherry picked from commit 8d6c0743e36e3cff9279c40468711a82db98df23)
2023-11-14 07:54:18 -05:00
Mark Johnston
766cceba19 e6000sw: Fix locking in miibus_{read,write}reg implementations
Commit 4692906480 made e6000sw's
implementation of miibus_(read|write)reg assume that the softc lock is
held.  I presume that is to avoid lock recursion in e6000sw_attach() ->
e6000sw_attach_miibus() -> mii_attach() -> MIIBUS_READREG().

However, the lock assertion in e6000sw_readphy_locked() can fail if a
different driver uses the interface to probe registers.  Work around the
problem by providing implementations which lock the softc if it is not
already locked.

PR:		274795
Fixes:		4692906480 ("e6000sw: add readphy and writephy wrappers")
Reviewed by:	kp, imp
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D42466

(cherry picked from commit 725962a9f4c050b21488edd58d317e87c76d6f66)
2023-11-13 09:41:50 -05:00
Doug Rabson
61ba094af4 netfront: fix the support for disabling LRO at boot time
The driver has a tunable hw.xn.enable_lro which is intended to control
whether LRO is enabled. This is currently non-functional - even if its
set to zero, the driver still requests LRO support from the backend.
This change fixes the feature so that if enable_lro is set to zero, LRO
no longer appears in the interface capabilities and LRO is not requested
from the backend.

PR:		273046
MFC after:	1 week
Reviewed by:	royger
Differential Revision: https://reviews.freebsd.org/D41439

(cherry picked from commit da4b0d6eb06d730487d48e15d2d5e10c56266fd9)
2023-11-12 10:37:16 +00:00
Yishai Hadas
f521f9c178 mlx5ib: Fix RSS Toeplitz setup to be aligned with the HW specification
The specification for the Toeplitz function doesn't require to set the key
explicitly to be symmetric. In case a symmetric functionality is required
a symmetric key can be simply used.

Wrongly forcing the algorithm to symmetric causes the wrong packet
distribution and a performance degradation.

Link: https://lore.kernel.org/r/20190723065733.4899-7-leon@kernel.org
Fixes: 28d6137008b2 ("IB/mlx5: Add RSS QP support")
Signed-off-by: Yishai Hadas <yishaih@mellanox.com>
Reviewed-by: Alex Vainman <alexv@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>

[khng: cherry-picked from Linux
b7165bd0d6cbb93732559be6ea8774653b204480]

Sponsored by:	Juniper Networks, Inc.
MFC after:      7 days
Reviewed by:	kib, zlei
Differential Revision:	https://reviews.freebsd.org/D42178

(cherry picked from commit 813d981e1e78daffde4b2a05df35d054fcb4343f)
2023-11-04 15:22:18 -04:00
Ka Ho Ng
83dbc1dc8b mlx5ib: Fix ethertype to be ETH_P_IPV6
Sponsored by:	Juniper Networks, Inc.
MFC after:	7 days
Reviewed by:	ae, kib, zlei
Differential Revision:	https://reviews.freebsd.org/D42184

(cherry picked from commit 3b173281764ba7c02f9de0a67caa1c4eca604413)
2023-11-04 15:22:18 -04:00
Zhenlei Huang
1969d82fcf Hyper-V: vmbus: Add NULL check for vmbus_res
QEMU emulates Hyper-V [1] but lacks the emulation for vmbus_res, thus no
coherence information is available. Add NULL check for it and fallback
to no coherence. This will prevent FreeBSD guests from panic on QEMU
with the Hyper-V enlightenment hv-synic enabled.

For real Hyper-V, both gen1 and gen2 have vmbus_res then they are not
affected by this change.

1. https://www.qemu.org/docs/master/system/i386/hyperv.html

PR:		274810
Reviewed by:	mhorne, emaste, delphij, whu
Diagnosed by:	mhorne
Fixes:		e7a9817b8d32 Hyper-V: vmbus: implementat bus_get_dma_tag in vmbus
Insta-MFC approved by:	re (delphij) for 14.0-RC4
Differential Revision:	https://reviews.freebsd.org/D42414

(cherry picked from commit 63bf943d4af17799cef21e2bb78dd28003ce1ce5)
2023-11-02 17:10:03 +08:00
John Baldwin
cb63a64b8c acpi_pcib: Rename decoded_bus_range to get_decoded_bus_range
While here, change the return value to bool.

Discussed by:	gibbs

(cherry picked from commit f6c2774fe415f3b79c551b8075c159d6a7d4d0bf)
2023-10-24 12:19:59 -07:00
John Baldwin
76b37faac8 acpi_pcib: Trust decoded bus range from _CRS over _BBN
Currently if _BBN doesn't match the first bus in the decoded bus range
from _CRS for a Host to PCI bridge, the driver fails to attach as a
defensive measure.

There is now firmware in the field where these do not match, and the
_BBN values are clearly wrong, so rather than failing attach, trust
the range from _CRS over _BBN.

Co-authored-by:	Justin Gibbs <gibbs@FreeBSD.org>
Reported by:	gibbs
Reviewed by:	imp (earlier version)
Differential Revision:	https://reviews.freebsd.org/D42231

(cherry picked from commit 22a6678b627b39ceb94f7323be1010e928d92494)
2023-10-24 12:00:57 -07:00
John Baldwin
bfa1565246 Trim various $FreeBSD$
Approved by:	markj (cddl/contrib changes)
Reviewed by:	imp, emaste
Differential Revision:	https://reviews.freebsd.org/D41961

(cherry picked from commit f53355131f65d64e7643d734dbcd4fb2a5de20ed)
2023-10-24 11:22:23 -07:00
John Baldwin
efb26b3fe6 Update a couple of tools to not embed __FBSDID in generated files
Reviewed by:	imp, emaste
Differential Revision:	https://reviews.freebsd.org/D41955

(cherry picked from commit 99159b076a278d1feb0e18ae99fd866c90443893)
2023-10-24 10:09:55 -07:00
John Baldwin
5db9e9e296 Remove a few more stray __FBSDID uses
Reviewed by:	imp, emaste
Differential Revision:	https://reviews.freebsd.org/D41954

(cherry picked from commit 16837d353cdde87672d08112610e51e4121c4e50)
2023-10-24 10:08:46 -07:00
John Baldwin
62ba76f3d1 videomode: Regenerate files
Reviewed by:	imp, emaste
Differential Revision:	https://reviews.freebsd.org/D41953

(cherry picked from commit fc3cc652e500bd8e33b4b77449d167f1df073acb)
2023-10-24 10:08:29 -07:00
John Baldwin
c6dc53e7c8 videomode/devlist2h.awk: Don't include $FreeBSD$ in generated files
Reviewed by:	imp, emaste
Differential Revision:	https://reviews.freebsd.org/D41952

(cherry picked from commit bd524e2ddb77e1c691f308359ab917414ecb8bed)
2023-10-24 10:08:19 -07:00
Wei Hu
c81166b018 Hyper-V: vmbus: check if signaling host is needed in vmbus_rxbr_read
It is observed that netvsc's send rings could stall on the latest
Azure Boost platforms. This is due to vmbus_rxbr_read() routine
doesn't check if host is waiting for more room to put data, which
leads to host side sleeping forever on this vmbus channel. The
problem was only observed on the latest platform because the host
requests larger buffer ring room to be available, which causes
the issue to happen much more easily.

Fix this by adding check in the vmbus_rxbr_read call and signaling
the host in the callers if check returns positively.

Reported by:	NetApp
Tested by:	whu
Sponsored by:	Microsoft

(cherry picked from commit 49fa9a64372b087cfd66459a20f4ffd25464b6a3)
2023-10-20 10:03:35 +00:00
Sumit Saxena
10bbea2e25 mpi3mr: Move creation of watchdog to interupt config hook
Move creation of watchdog process from just before we configure the
interrupt config hook to into the config hook itself. This prevents it
from racing the config intr hook and doing an extra reset of the
card. This extra reset is usually harmless, but sometimes it can prevent
discovery of devices if done at just the wrong time. This can lead to no
disks being registered in a box full of disks, for example. Starting it
later eliminates this race, making discovery reliable.

Reviewed by: imp

(cherry picked from commit 7e02c7074c4c6df77b860e0dbcd032a2ea04b98b)
2023-10-19 15:21:12 -06:00
John Hall
01619a8faf smartpqi: Change alignment for dma tags
Problem: Under certain I/O conditions, a program doing large block disk
reads can cause a controller to crash.

Root Cause: The SCSI read request and destination address in the BDMA
descriptor is incorrect, causing the BDMA engine in the controller to
assert.

Fix: Change the alignment for creating bus_dma_tags in the driver from
PAGE_SIZE (4k) to 1, which allows the controller to manage it's own
address range for BDMA transactions.

Risk: Medium

Exposure: This reverts a change first made to support NVMe drives on
Excalibur. At that time a 4k alignment was necessary. This no longer
seems to be the case.

PR: 259541
Reported by: Ka Ho Ng <khng@freebsd.org>
Reviewed by: imp
Differential Revision:	https://reviews.freebsd.org/D41619

(cherry picked from commit f07b267d8cc87e88be3c78aa69504b5ebc6571ee)
2023-10-19 15:21:11 -06:00
John F. Carr
1ad148a68a smartpqi: Drop spinlock before freeing memory
pqisrc_free_device frees the device softc with the os spinlock
held. This causes crashes when devices are removed because the memory
free might sleep (which is prohibited with spin locks held). Drop the
spinlock before releasing the memory.

MFC After: 2 days
PR: 273289
Reviewed by: imp

(cherry picked from commit b064a4c9eed5b1dd2a40fc4fd2cb7e738b681547)
2023-10-19 15:21:11 -06:00
Emmanuel Vadot
d7d51aad8f iicbus: pmic: rk8xx: Fix logic in clock-output-names detection
Pointy hat to:	manu (probably)

(cherry picked from commit 66946511380bf088c96a7517ba9b018c943655c6)
2023-10-18 16:33:38 +02:00
Emmanuel Vadot
26bf8fff64 xilinx: reset: Remove debug printfs
Sponsored by:	Beckhoff Automation GmbH & Co. KG

(cherry picked from commit 257405d707d77bc55b38e7c2bb83b8a9247a86ae)
2023-10-18 16:32:37 +02:00
Emmanuel Vadot
b4cd14485a i2c: Add Microcrystal RV3032 RTC driver
This is a simple RTC driver for the rv3032 from Microcrystal.
Just the basic functionality is implemented (no timer, alarm etc ..).

Sponsored by:	Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D41995

(cherry picked from commit 1d6a6a524409662992ca96bc91ae69b2a2a5ff35)
2023-10-18 16:32:19 +02:00
Emmanuel Vadot
7b824791e7 i2c: Add cadence iic driver
This IP is found in Xilinx SoC, it only been tested on ZynqMP (arm64)
so only enable it there for now.

Differential Revision:	https://reviews.freebsd.org/D41994

(cherry picked from commit 137b58e4d2044adc200d13c8989d3746a0a4bd7f)
2023-10-18 16:32:17 +02:00
Emmanuel Vadot
c133589105 iicbus: Move opencores i2c driver into controller subdirectory
Sponsored by:	Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D41914

(cherry picked from commit 125f5c5b48b1fdccf364b821ce48bfdbd9687ed1)
2023-10-18 16:32:15 +02:00
Emmanuel Vadot
96edbfe36b iicbus: Move i2c sensors drivers into new sensor subdirectory
No reason that they should live directly under iicbus

Sponsored by:   Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D41913

(cherry picked from commit 7c569caa0a6fffa7e1cc0a7f61e986dbc7c59074)
2023-10-18 16:32:14 +02:00
Emmanuel Vadot
cd2f6226e7 iicbus: Move ADC drivers into a new adc subfolder
No reason that they should live directly under iicbus

Sponsored by:   Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D41911

(cherry picked from commit 06589d6e029c6ff64a7816d743e0a508abe6193b)
2023-10-18 16:32:11 +02:00
Emmanuel Vadot
26dd10a4f3 iicbus: Move adm1030 and adt746x to new pwm subdirectory
Those are (mainly) pwm controller so move it under a new subdirectory.

Sponsored by:	Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D41910

(cherry picked from commit 22d7dd834bc5cd189810e414701e3ad1e98102e4)
2023-10-18 16:32:10 +02:00
Emmanuel Vadot
8d715e2f49 iicbus: Move Silergy pmic/regulators under pmic/silergy subdirectory
Sponsored by:	Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D41909

(cherry picked from commit 062944cc4227e7bd002e4de2be48ec9b710bfaa5)
2023-10-18 16:32:08 +02:00
Emmanuel Vadot
5e25c410bd iicbus: Move remaining rtc driver into rtc subfolder
No reason that they should live directly under iicbus

Sponsored by:	Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D41908

(cherry picked from commit 2f16049c985a364e2bd2b256f5bef9af17e10c62)
2023-10-18 16:32:07 +02:00
Emmanuel Vadot
a5b3cbe6cc iicbus: Move twsi under a new controller subdirectory
The folder is a mess so start moving stuff into sub-directories.

Sponsored by:	Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D41907

(cherry picked from commit 580d00f42fdd94ce43583cc45fe3f1d9fdff47d4)
2023-10-18 16:32:05 +02:00
Emmanuel Vadot
1e685c7dd5 if_cgem: Rewrite clock part
- pclk and hclk are mandatory so always try to get them.
   Don't make it fatal if it fails as some platform (like Zynq) don't
   have a proper clock driver.
 - Always use pclk for the reference clock.
 - Try to get all the possible clocks and enable them.

Reviewed-by:	mhorne
Tested-by:	Milan Obuch <bsd@dino.sk>
Differential Revision:	https://reviews.freebsd.org/D41857
Sponsored by:	Beckhoff Automation GmbH & Co. KG

(cherry picked from commit 4c52dde5bda099936d43820da84e569dccc6f475)
2023-10-18 16:31:13 +02:00
Emmanuel Vadot
770b790eab if_cgem: Cleanup compatible and add new ones
- Remove cdns,gem, it's the generic binding but for all platform that include
  this one we need specific drivers setup so remove it.
- Remove cdns,macb, it's the generic binding for Atmel AT91 which we don't suport
- Remove cadence,gem, it's not an official binding and seems to be only used in some
  obscure ARM11 SoC.
- Note that the cdns,zynq* are deprecated
- Add the new Xilinx compatible for zynq and zynqmp

Reviewed-by:	mhorne
Tested-by:	skibo, Milan Obuch <bsd@dino.sk>
Differential Revision:	https://reviews.freebsd.org/D41856
Sponsored by:	Beckhoff Automation GmbH & Co. KG

(cherry picked from commit bdbbbbb32104569fccd786d9cc07d17f6231a713)
2023-10-18 16:31:11 +02:00
Emmanuel Vadot
0af2307d59 sdhci: fdt: Correctly export clock per the binding
The binding says that we can have one or two clocks to export.
The first one is the actual sdclock while the second is the sample clock.
Both have the same parent, clk_xin.
Correctly export the clocks for RK3399 and ZynqMP.
No need to use a high ID as before, we have our own clock domain so use
ids starting at 1 as all exported clocks should be.

Reviewed-by:	bz
Differential Revision:	https://reviews.freebsd.org/D41810
Sponsored by:	Beckhoff Automation GmbH & Co. KG

(cherry picked from commit 81a4fe38a6ce818bb7cba548bb2c697429fa9479)
2023-10-18 16:31:10 +02:00
Emmanuel Vadot
62b14a7531 sdhci: fdt: Always try to get the phy and the syscon
Per the bindings the phy and the syscon can always be present not just
for RK3399.

Reviewed-by:	bz
Differiential Revision:	https://reviews.freebsd.org/D41809
Sponsored by:	Beckhoff Automation GmbH & Co. KG

(cherry picked from commit 0ee5d6fcfc63be48fd7c1b461917dfb880dc7f72)
2023-10-18 16:31:08 +02:00