39812 Commits

Author SHA1 Message Date
Warner Losh
8f07932272 nvme_sim: Only report PCI related stats when we can
For AHCI attached devices, we report the location and identification
information of the AHCI controller that we're attached to. We also
don't reprot link speed in that case, since we can't get to the PCIe
config space registers to find that out.

Sponsored by:		Netflix
Reviewed by:		mav
Differential Revision:	https://reviews.freebsd.org/D33287
2021-12-06 10:23:40 -07:00
Warner Losh
b8194f3766 nvd: For AHCI attached devices, report ahci bridge
When an NVME device is attached via a AHCI controller, we have no access
to its config space. So instead of information about the nvme drive
itself, return info about the AHCI controller as the next best
thing. Since the Intel Hardware RAID support looks at these values, this
likely is best.

Sponsored by:		Netflix
Reviewed by:		mav
Differential Revision:	https://reviews.freebsd.org/D33286
2021-12-06 10:23:40 -07:00
Warner Losh
7cf8d63c88 nvme_ahci: Mark AHCI devices as such in the controller
Add a quirk to flag AHCI attachment to the controller. This is for any
of the strategies for attaching nvme devices as children of the AHCI
device for Intel's RAID devices. This also has a side effect of cleaning
up resource allocation from failed nvme_attach calls now.

Sponsored by:		Netflix
Reviewed by:		mav
Differential Revision:	https://reviews.freebsd.org/D33285
2021-12-06 10:23:40 -07:00
Warner Losh
053f8ed6eb nvme: Move to a quirk for the Intel alignment data
Prior to NVMe 1.3, Intel produced a series of drives that had
performance alignment data in the vendor specific space since no
standard had been defined. Move testing the versions to a quick so the
NVMe NS code doesn't know about PCI device info.

Sponsored by:		Netflix
Reviewed by:		mav
Differential Revision:	https://reviews.freebsd.org/D33284
2021-12-06 10:23:40 -07:00
Mitchell Horne
e43d081f35 ucom: s/sio/ucom/
Seems like a copy-paste error, or at least this made more sense when the
sio(4) driver still existed. This modifies the debug port name displayed
at boot, but otherwise has no functional change.

Reviewed by:	hselasky
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D33278
2021-12-06 10:10:27 -04:00
Emmanuel Vadot
ca23e9d2ac fb: Add new FBTYPE_EFIFB
Currently the type isn't set in the fbtype struct so any userland
program that call the FBIOGTYPE ioctl will think it's a FBTYPE_SUN1BW
which is far from the truth.
No app that I found find checks the type but at least now it's correct.

Reviewed by:	emaste, tsoome
MFC after:	2 weeks
Sponsored by:   Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D33221
2021-12-06 11:28:03 +01:00
Emmanuel Vadot
706f32db8a fb: Remove some unused ioctls
6d1699583d7e added the FBIOGXINFO,FBIOMONINFO and FBIOPUTCMAPI/FBIOGETCMAPI
ioctls and said that implementation in driver will come later.
Since it was in 2001 I think we can remove this.

Reviewed by:	emaste, imp, tsoome
MFC after:      2 weeks
Sponsored by:   Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D33218
Differential Revision:	https://reviews.freebsd.org/D33219
Differential Revision:	https://reviews.freebsd.org/D33220
2021-12-06 11:28:01 +01:00
Emmanuel Vadot
b9d3b253e2 fb: Remove unused cursors ioctls
The cursors related ioctls were added in 1994 with the 4.4 Lite import
but were never implemented in either sc(4), fb(4) or vt(4).
Remove it.

Reviewed by:	emaste, tsoome
MFC after:      2 weeks
Sponsored by:   Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D33217
2021-12-06 11:27:59 +01:00
Emmanuel Vadot
87fae70dc5 fb: Remove unused FBIOVERTICAL ioctl
Commit 6d1699583d7e added the FBIOVERTICAL ioctl and said that implementation
in driver will come later.
Since it was in 2001 I think we can remove this.

MFC after:      2 weeks
Sponsored by:   Beckhoff Automation GmbH & Co. KG
2021-12-06 11:27:55 +01:00
Emmanuel Vadot
26542b33a4 fb: Remove unused FBIOSVIDEO/FBIOGVIDEO ioctls
The FBIOSVIDEO/FBIOGVIDEO ioctls were added in 1994 with the 4.4 Lite import
but were never implemented in either sc(4), fb(4) or vt(4).
Remove it.

Reviewed by:	emaste, tsoome
MFC after:      2 weeks
Sponsored by:   Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D33216
2021-12-06 11:27:53 +01:00
Emmanuel Vadot
f1105fb8f7 fb: Remove unused FBIOSATTR/FBIOGATTR ioctls
The FBIOSATTR/FBIOGATTR ioctls were added in 1994 with the 4.4 Lite import
but were never implemented in either sc(4), fb(4) or vt(4).
Remove it.

Reviewed by:	emaste, tsoome
MFC after:      2 weeks
Sponsored by:   Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D33215
2021-12-06 11:27:51 +01:00
Andriy Gapon
9c612a5d0a vmxnet3: skip zero-length descriptor in the middle of a packet
Passing up such descriptors to iflib is obviously wasteful.
But the main conern is that we may overrun iri_frags array because of
them.  That's been observed in practice.

Also, assert that the number of fragments / descriptors / segments is
less than IFLIB_MAX_RX_SEGS.

Reviewed by:	gallatin, pkelsey
MFC after:	3 weeks
Sponsored by:	Panzura LLC
Differential Revision:	https://reviews.freebsd.org/D33189
2021-12-06 10:00:30 +02:00
Andreas Wetzel
cd6f0b4769 rtwn/usb: add product ID for Asus USB N10 Nano Rev. B1
According to information found on the internet the following products
use exactly the same hardware but probably different USB IDs:
- Edimax EW-7811Un V2 (v2)
- Edimax EW-7811GLN 2.0A (v2)
I am not adding them as I cannot verify.

PR:		254280
MFC after:	1 week
2021-12-06 09:43:26 +02:00
Scott Long
14c912c60d FIx "set but not used" in the isp driver.
Sponsored by: Rubicon Communications, LLC ("Netgate")
2021-12-05 15:19:56 -07:00
Scott Long
cc557faf86 Fix "set but not used" in cardbus
Sponsored by: Rubicon Communications, LLC ("Netgate")
2021-12-05 15:14:35 -07:00
Adrian Chadd
288a92252b ahci: Add Intel Comet Lake RAID/RST controller PCI ID
This is needed on my ASUS motherboard / Intel Comet Lake i5-10500
desktop machine.

This with some work arounds for nvme behind the RST controller
boots and works.

Reviewed by: cognet
2021-12-05 21:28:39 +00:00
Scott Long
f25d575762 Fix "set but not used" for hptmv
Sponsored by: Rubicon Communications, LLC ("Netgate")
2021-12-04 11:07:04 -07:00
Scott Long
dcf4745271 Fix "set but not used" for hptiop
Sponsored by: Rubicon Communications, LLC ("Netgate")
2021-12-04 11:07:04 -07:00
Scott Long
98470f0e0b Fix "set but not used" in mrsas. This includes removing unnecessary cdevsw
methods.

Sponsored by: Rubicon Communications, LLC ("Netgate")
2021-12-04 00:08:27 -07:00
Scott Long
1c64538f58 Fix "set but not used" for bge
Sponsored by: Rubicon Communications, LLC ("Netgate")
2021-12-03 23:29:51 -07:00
Scott Long
a21f086a33 Fix "set but not used" in the tws driver
Sponsored by: Rubicon Communications, LLC ("Netgate")
2021-12-03 15:40:29 -07:00
Scott Long
74765431b7 Fix "set but not used" for the ti driver
Sponsored by: Rubicon Communications, LLC ("Netgate")
2021-12-03 15:31:14 -07:00
Scott Long
bca8e8c00c Fix "set but not used" in arcmsr
Sponsored by: Rubicon Communications, LLC ("Netgate")
2021-12-03 15:26:57 -07:00
Scott Long
5045cb8f18 Fix "set but not used" for the sym driver.
Sponsored by: Rubicon Communications, LLC ("Netgate")
2021-12-03 15:18:39 -07:00
Eric Joyner
5577aa338a
iavf(4): Include RSS header file when RSS is defined
This should unbreak the kernel build when "options RSS" is
defined in the kernel configuration, and make the feature work.

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

Reported by:	adrian@
Sponsored by:	Intel Corporation
2021-12-03 12:02:42 -08:00
Arnaud Ysmal
ea68079ffd Suport Q-in-Q for mvneta. 2021-12-03 11:06:58 +01:00
Gleb Smirnoff
4b4cce02ac xhci: add PCI IDs for USB controllers found on Supermicro M12SWA-TF 2021-12-02 20:12:33 -08:00
Alexander Motin
2dfc1f7355 APEI: Improve multiple error sources handling.
Some AMD systems I have report 8 NMI and 3591 polled error sources.
Previous code could handle only one NMI source and used separate
callout for each polled source.  New code can handle multiple NMIs
and groups polled sources by power of 2 of the polling period.

MFC after:	2 weeks
2021-12-02 18:06:12 -05:00
Cy Schubert
db0ac6ded6 Revert "wpa: Import wpa_supplicant/hostapd commit 14ab4a816"
This reverts commit 266f97b5e9a7958e365e78288616a459b40d924a, reversing
changes made to a10253cffea84c0c980a36ba6776b00ed96c3e3b.

A mismerge of a merge to catch up to main resulted in files being
committed which should not have been.
2021-12-02 14:45:04 -08:00
Cy Schubert
266f97b5e9 wpa: Import wpa_supplicant/hostapd commit 14ab4a816
This is the November update to vendor/wpa committed upstream 2021-11-26.

MFC after:      1 month
2021-12-02 13:35:14 -08:00
Warner Losh
a10253cffe mps(4): Fix unmatched devq release.
Port 9781c28c6d63 and a8837c77efd0 to the mps driver.  Before this
change devq was frozen only if some command was sent to the target after
reset started, but release was called always.  This change freezes the
devq immediately, leaving mprsas_action_scsiio() check only to cover
race condition due to different lock devq use.

This should also avoid unnecessary requeue of the commands, creating
additional log noise and confusing some broken apps. It also avoids a
'busy' requeue of I/Os failing when we're doing recovery that takes
longer than the normal busy timeout. These I/Os failing can lead to
filesystems being unmounted in the force unmount case for I/O errors.

Sponsored by:		Netflix
Reviewed by:		mav
Differential Revision:	https://reviews.freebsd.org/D33228
2021-12-02 13:53:44 -07:00
Don Morris
8f82dc8dd3 hyperv: Flag hn and storvsc statistics with CTLFLAG_STATS.
Reviewed by:    vangyzen, whu, bdrewery
Sponsored by:	Dell EMC
Differential Revision: https://reviews.freebsd.org/D30060
2021-12-02 10:46:36 -08:00
Gordon Bergling
25d0ccbe10 bce(4): Fix a typo in a sysctl description
- s/duirng/during/

MFC after:	3 days
2021-12-02 16:12:34 +01:00
Gordon Bergling
c937fb286f mlx5: Correct a typo in a sysctl description
- s/parameteres/parameters/

MFC after:	3 days
2021-12-02 10:51:18 +01:00
Hubert Mazur
f89f6f9581 TMP461: Add thermal sensor driver
Add driver for TMP461 thermal sensor. Register new sysctl node
of integer type for device. Read register and fill sysctl with
valid temperature.

Reviewed by:
Sponsored by:		Alstom
Obtained from:		Semihalf
Differential revision:	https://reviews.freebsd.org/D32818
2021-12-02 09:18:48 +01:00
Vincenzo Maffione
d0633af765 em: skip rxcsum offload processing when disabled
Similarly to the other Intel drivers, don't try to process
RX checksum offloads when this feature (IFCAP_RXCSUM) is
disabled.

Reviewed by:	gallatin, kbowling, erj
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D33155
2021-12-01 21:10:46 +00:00
Vincenzo Maffione
d91559564d e1000: remove unused ifp backpointer
The ifp (struct ifnet) backpointer in the e1000 private ifnet
data is not used anymore since the iflib transition.
Remove it so that developers are not tempted to use it and
get a NULL pointer dereference.

Reviewed by:	markj, kbowling, erj
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D33157
2021-12-01 21:08:31 +00:00
Alexander Motin
94a72c5ac4 amdtemp: Revert related part of "Make CPU children" commit.
While it still looks like previous code worked by coincidence, this
change broke things even more instead of fixing.

Reported by:	avg@
MFC after:	1 week
2021-12-01 13:04:31 -05:00
Warner Losh
1c7d15b030 Make device_busy/unbusy work w/o Giant held
The vast majority of the busy/unbusy users in the tree don't acquire
Giant before calling device_busy/unbusy. However, if multiple threads
are opening a file, say, that causes the device to busy/unbusy, then we
can race to the root marking things busy. Move to using a reference
count to keep track of how many times a device_t has been made busy. Use
that count to make the same decisions that we'd make with the old device
state.

Note: gpiopps.c uses D_TRACKCLOSE. Others do as well. However, there's a
known race with closes that will be corrected for all the drivers that
do this in a future commit.

Sponsored by:		Netflix
Reviewed by:		hselasky, jhb
Differential Revision:	https://reviews.freebsd.org/D26284
2021-11-30 15:18:01 -07:00
Warner Losh
25c49c426c Revert "Make device_busy/unbusy work w/o Giant held"
This reverts commit 08e781915363f98f4318a864b3b5a52bd99424c6.

Commit message was for a very old version of the patch. Will re-commit
with the right one since it's so bad. There's no locked versions of
it...that code was reworked to use refcnt APIs.

Noticed by:	jhb, jtrc27
Sponsored by:	Netflix
2021-11-30 15:17:07 -07:00
Warner Losh
08e7819153 Make device_busy/unbusy work w/o Giant held
The vast majority of the busy/unbusy users in the tree don't acquire Giant
before calling device_busy/unbusy. However, if multiple threads are opening a
file, say, that causes the device to busy/unbusy, then we can race to the root
marking things busy. Create a new device_busy_locked and device_unbusy_locked
that are the current implemntations of device_busy and device_unbusy. Make
device_busy and unbusy acquire Giant before calling the _locked versrions. Since
we never sleep in the busy/unbusy path, Giant's single threaded semantics
suffice to keep this safe.

Sponsored by:		Netflix
Reviewed by:		hselasky, jhb
Differential Revision:	https://reviews.freebsd.org/D26284
2021-11-30 15:03:26 -07:00
Vladimir Kondratyev
c508b0818b iichid(4): Perform acknowledgement of I2C device interrupt after RESET command
in sampling mode to workaround firmware bug.

This fixes reboot or poweroff on frame.work laptops after first touch.

Reported by:	many
PR:		259230
MFC after:	1 week
Tested by:	kevans, markj
2021-12-01 00:29:50 +03:00
Elliott Mitchell
d893d9e94d xen/dev: remove write-only variable
This was found while looking for driver_filter_t functions which got the
trap frame from the argument.  This particular instance it isn't even
used, so remove now lest someone else get to it first.

Reviewed by:	mhorne
2021-11-30 17:11:57 -04:00
Gordon Bergling
ddeb702f7b mpr(4): Fix a typo in a source code comment
- s/segement/segment/

MFC after:	3 days
2021-11-30 10:40:50 +01:00
Gordon Bergling
e3080a9cca xen(4): Fix two typos in source code comments
- s/segement/segment/

MFC after:	3 days
2021-11-30 10:39:42 +01:00
Gordon Bergling
b15a632c41 if_hn: Fix a few typos in comments and a sysctl description
- s/segement/segment/

MFC after:	3 days
2021-11-30 10:35:14 +01:00
Gordon Bergling
5f8ccf6515 nvme(4): Correct a typo in a sysctl description
- s/printting/printing/

MFC after:	3 days
2021-11-30 10:26:25 +01:00
Wojciech Macek
94e25b7acb flex_spi: Support for FlexSPI Flash controller.
NXP FlexSPI is a complex SPI controller which provides
full offload for accessing NOR Flash.
Create a Flash driver which attaches to existing FreeBSD
infrastructure and exports generic READ and WRITE disk commands.
The Flash has to be identified first to configure controller
internals. For now, only one NOR Flash chip is supported.
Future commits shall either increase number of known chips
or implement SFDP mechanism which can be used by other Flash
drivers.

Sponsored by:		Alstom
Obtained from:		Semihalf
Differential revision:	https://reviews.freebsd.org/D33117
2021-11-30 06:41:34 +01:00
Mark Johnston
7a33723038 mii/dp83822phy: Remove a declaration for a non-existent function
Fixes:	0c9156faeccb ("Introduce DP83822 PHY driver")
2021-11-29 13:57:24 -05:00
Bjoern A. Zeeb
1910048eb9 USB: add CYUSB330x to usbdevs
Add the Cypress dual USB3/2 HUB CYUSB330x as found in SolidRun's
HoneyComb to usbdevs.
2021-11-29 17:44:08 +00:00