Commit graph

39432 commits

Author SHA1 Message Date
Stefan Eßer
dc4114875e Make CPU_SET macros compliant with other implementations
(cherry picked from commit e2650af157)
2022-01-14 18:17:30 +02:00
Greg V
ae4067ce94 efifb,vbefb: implement vd_fini
This removes the pmap entry when switching away to e.g. drm fb.

Differential Revision:	https://reviews.freebsd.org/D29020
MFC After:	1 month

(cherry picked from commit 8ebda6e44b)
2022-01-14 16:55:23 +01:00
Mark Johnston
4905ce27b8 mvneta: Unconditionally print an error message if mii_attach() fails
The error message is useful for diagnosing mvneta_attach() failures.

(cherry picked from commit ed166a0173)
2022-01-11 09:28:33 -05:00
Alexander Motin
4ee9fbcd85 acpi_support: Remove CTLFLAG_NEEDGIANT from sysctls.
MFC after:	2 weeks

(cherry picked from commit 6237a1cc2d)
2022-01-09 19:30:14 -05:00
Alexander Motin
1b1f80ae1c sound: Remove CTLFLAG_NEEDGIANT from some sysctls.
While there, remove some dead code.

MFC after:	2 weeks

(cherry picked from commit 3b4c543322)
2022-01-09 19:29:59 -05:00
Alexander Motin
f39bf9a217 acpica: Remove CTLFLAG_NEEDGIANT from most sysctls.
MFC after:	2 weeks

(cherry picked from commit 3e68d2c52b)
2022-01-09 19:29:55 -05:00
Alexander Motin
6bc8606fca pccbb: Remove Giant mention in comments.
MFC after:	2 weeks

(cherry picked from commit 22405bb2e4)
2022-01-08 20:24:13 -05:00
Alexander Motin
2a36679b74 amdtemp: Remove CTLFLAG_NEEDGIANT from sysctls.
It seems to be needed only to serialize very old K8 registers access.
Introduce separate lock for that and remove Giant dependency.

MFC after:	2 weeks

(cherry picked from commit 6c101ed7a3)
2022-01-08 20:24:07 -05:00
Alexander Motin
cd9fe8d81d uart: Remove CTLFLAG_NEEDGIANT from sysctl.
MFC after:	2 weeks

(cherry picked from commit c214c2c004)
2022-01-08 20:24:01 -05:00
Alexander Motin
7518562484 hwpmc: Remove CTLFLAG_NEEDGIANT from sysctl.
MFC after:	2 weeks

(cherry picked from commit 1886cef69b)
2022-01-08 20:23:58 -05:00
Hans Petter Selasky
457750da86 snd_uaudio(4): Loosen up the USB MIDI permissions.
This makes USB MIDI more userfriendly for desktop users.

PR:		260489
Sponsored by:	NVIDIA Networking

(cherry picked from commit 2fcd7d380b)
2022-01-07 14:23:26 +01:00
Scott Long
ea4e9becc7 Fix "set but not used" warnings in the mpr driver. This fixes a minor
bug in error handling.

(cherry picked from commit 61f17c5fd6)
2022-01-06 14:08:50 -05:00
Warner Losh
59e2f48e03 mpr: Minor formatting changes to match mps.
Minor reformatting nits to make mprsas_scsiio_timeout match
mpssas_scsiio_timeout more closely. The differences aren't necessary and
are distracting when comparing the routines. No functional changes.

Sponsored by:		Netflix

(cherry picked from commit 2bbaed4d7f)
2022-01-06 14:08:24 -05:00
Warner Losh
726d8e1852 mps(4): Fix unmatched devq release.
Port 9781c28c6d and a8837c77ef 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

(cherry picked from commit a10253cffe)
2022-01-06 14:03:38 -05:00
Scott Long
0565198d80 Fix "set but not used" warnings in the mps driver.
(cherry picked from commit bcce9c5bed)
2022-01-06 14:01:59 -05:00
Warner Losh
f9c51d3a1d mps: Fix debugging line
Print cm instead of sc here, as is done in mpr. We can get the sc from
cm, but not vice versa.

Sponsored by:		Netflix

(cherry picked from commit b086bc0bf1)
2022-01-06 14:01:19 -05:00
Andrew Turner
bc98adaf6a Check cpu_softc is not NULL before dereferencing
In the acpi_cpu_postattach SYSINIT function cpu_softc may be NULL, e.g.
on arm64 when booting from FDT. Check it is not NULL at the start of
the function so we don't try to dereference a NULL pointer.

Sponsored by:	The FreeBSD Foundation

(cherry picked from commit 4e50efb194)
2022-01-04 13:08:58 -05:00
Alexander Motin
6b06f8a792 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

(cherry picked from commit 94a72c5ac4)
2022-01-04 12:21:49 -05:00
Alexander Motin
a77188ffd3 acpi_cpu: Fix panic if some CPU devices are disabled.
While there, remove couple unneeded global variables.

(cherry picked from commit 695323ae88)
2022-01-04 12:21:46 -05:00
Alexander Motin
b7668d009e Make CPU children explicitly share parent unit numbers.
Before this device unit number match was coincidental and broke if I
disabled some CPU device(s).  Aside of cosmetics, for some drivers
(may be considered broken) it caused talking to wrong CPUs.

(cherry picked from commit d3a8f98acb)
2022-01-04 12:21:42 -05:00
Alexander Motin
083a2ff0f0 acpi_cpu: Make device unit numbers match OS CPU IDs.
There are already APIC ID, ACPI ID and OS ID for each CPU.  In perfect
world all of those may match, but at least for SuperMicro server boards
none of them do.  Plus none of them match the CPU devices listing order
by ACPI.  Previous code used the ACPI device listing order to number
cpuX devices.  It looked nice from NewBus perspective, but introduced
4th different set of IDs. Extremely confusing one, since in some places
the device unit numbers were treated as OS CPU IDs (coretemp), but not
in others (sysctl dev.cpu.X.%location).

(cherry picked from commit c8077ccd70)
2022-01-04 12:21:35 -05:00
Alexander Motin
2572b6bd6b xen/blkfront: Remove CTLFLAG_NEEDGIANT from sysctl.
It only converts bit field into string.  It does not need locking.

MFC after:	1 week

(cherry picked from commit 54daceab55)
2022-01-02 16:39:28 -05:00
Bjoern A. Zeeb
a34668185b modules: increase MAXMODNAME and provide backward compat
With various firmware files used by graphics and wireless drivers
we are exceeding the current 32 character module name (file path
in kldxref) length.
In order to overcome this issue bump it to the maximum path length
for the next version.
To be able to MFC provide backward compat support for another version
of the struct as the offsets for the second half change due to the
array size increase.

MAXMODNAME being defined to MAXPATHLEN needs param.h to be
included first.  With only 7 modules (or LinuxKPI module.h) not
doing that adjust them rather than including param.h in module.h [1].

Reported by:	Greg V (greg unrelenting.technology)
Sponsored by:	The FreeBSD Foundation
Suggested by:	imp [1]
Reviewed by:	imp (and others to different level)
Differential Revision:	https://reviews.freebsd.org/D32383

(cherry picked from commit df38ada293)
2021-12-30 18:26:18 +00:00
Bjoern A. Zeeb
8adc24f7c5 USB dwc3 controller: add quirk snps,dis_rxdet_inp3_quirk
Add support for the "snps,dis_rxdet_inp3_quirk" quirk needed
at least on SolidRun's HoneyComb.

Reviewed by:	manu, mw
Differential Revision: https://reviews.freebsd.org/D32921

(cherry picked from commit 3987e50611)
2021-12-29 16:02:51 +00:00
Bjoern A. Zeeb
907c4e7538 USB: add CYUSB330x to usbdevs
Add the Cypress dual USB3/2 HUB CYUSB330x as found in SolidRun's
HoneyComb to usbdevs.

(cherry picked from commit 1910048eb9)
2021-12-29 16:02:38 +00:00
Andriy Gapon
bf206683a8 amdsbwd: always enable watchdog register decoding
This seems to be required even if the watchdog is accessed via the common
MMIO space.

Tested on:
- Ryzen 3 3200U APU;
- Ryzen 7 5800X CPU with X570 chipset.

(cherry picked from commit cca0d3bbd8)
2021-12-27 13:37:29 +02:00
Andriy Gapon
96097be6a8 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.

Sponsored by:	Panzura LLC

(cherry picked from commit 9c612a5d0a)
2021-12-27 13:37:12 +02:00
黃清隆
a6f70ce9fc sys/dev/arcmsr: Update Areca RAID driver to fix some issues on ARC-1886.
1. Doorbell interrupt status may arrive lately when doorbell interrupt on
   ARC-1886.
2. System boot up hung when ARC-1886 with no volume created or no device
   attached.

Many thanks to Areca for continuing to support FreeBSD.

(cherry picked from commit 6964b77e59)
2021-12-26 22:54:48 -08:00
Mark Johnston
2520c9ba7e qat: Address -Wunused-but-set-variable warnings
(cherry picked from commit 8fcf230c13)
2021-12-26 19:15:14 -05:00
Andriy Gapon
fe3c0370da twsi: use twsi_error() to handle wrong bus status when starting
(cherry picked from commit 46e0c03795)
2021-12-26 12:15:18 +02:00
Alexander Motin
e6140a05bc hwpmc: Add IDs for Intel Comet/Ice/Tiger/Rocketlake CPUs.
MFC after:	1 month

(cherry picked from commit 913c07a049)
2021-12-25 19:47:16 -05:00
Gordon Bergling
56cb816fb7 sound(4): Fix a typo in a source code comment
- s/aggresively/aggressively/

(cherry picked from commit d34632a235)
2021-12-25 11:40:16 +01:00
Ram Kishore Vegesna
cc3114e17b ocs_fc: Populate subvendor and subdevice ids.
Enable serialnumber reporting.

Reviewed by: mav
MFC after: 3 days

(cherry picked from commit cba757ef2a)

ocs_fs(4): Fix some common typos in source code comments

- s/transfered/transferred/
- s/associted/associated/

MFC after:	3 days

(cherry picked from commit 16b71d98d9)
2021-12-24 14:28:15 +05:30
Alexander Motin
f9c97b8ada hpt27xx: Remove FreeBSD 9.x support including Giant.
MFC after:	2 weeks

(cherry picked from commit 63e0f96ace)
2021-12-23 20:05:21 -05:00
Alexander Motin
7f703988b5 ahc: Mark sysctls with CTLFLAG_MPSAFE.
MFC after:	2 weeks

(cherry picked from commit 35b2021a0a)
2021-12-23 20:05:13 -05:00
Alexander Motin
4fd804ef66 ahci(4): Allow enclosure emulation without hardware.
After 53f5ac1310 allowed SATA device mapping to enclosure slots,
it may have sense to provide enclosure device emulation even without
real hardware interface like SGPIO just for purposes of physical
device location tracking (still assuming straight cabling).

MFC after:	1 week
Sponsored by:	iXsystems, Inc.

(cherry picked from commit 9aba757e92)
2021-12-23 20:05:10 -05:00
Alexander Motin
dee2739713 wbwd: Mark sysctls with CTLFLAG_MPSAFE.
MFC after:	2 weeks

(cherry picked from commit fdec27ed82)
2021-12-23 20:05:06 -05:00
Alexander Motin
93ce10ed26 hptiop: Remove Giant locking around ioctls.
The methods have their own locking and don't require Giant.

MFC after:	2 weeks

(cherry picked from commit e06c67eef8)
2021-12-23 20:05:03 -05:00
Alexander Motin
951183ac83 fxp: Mark sysctls with CTLFLAG_MPSAFE.
MFC after:	2 weeks

(cherry picked from commit 35efbedc98)
2021-12-23 20:03:09 -05:00
Alexander Motin
c5794c708c fxp: Remove unneeded Giant from bus_dma_tag_create().
All bus_dmamap_load() calls here use BUS_DMA_NOWAIT.

MFC after:	2 weeks

(cherry picked from commit 5ae7518b7b)
2021-12-23 20:03:05 -05:00
Andriy Gapon
a520d08538 twsi: fix handling of consecuitve write messages in transaction
Make sure to reset 'message_done' flag when jumping from a message to the
next one within the same interrupt handler call.  This happens only when
a write with no-stop flag message is followed by a write with no-start
flag message.
Without this fix the second message would be prematurely "completed"
without waiting for an ACK (or NACK) for its first byte and without
sending subsequent bytes (if any).

Fixes:		ff1e8581 twsi: support more message combinations in transfers

(cherry picked from commit e5268c3d43)
2021-12-23 10:45:38 +02:00
Andriy Gapon
524020aa37 ds3231: allow configuration via hints on FDT systems
(cherry picked from commit 1256067c5c)
(cherry picked from commit b277ef3304)
2021-12-23 10:44:54 +02:00
Vincenzo Maffione
ecb7f44be9 e1000: fix interface capabilities management
The e1000 drivers (em, lem, igb) are currently looking at the
iflib copies of the capabilities bitvectors (scctx->isc_capabilities
and scctx->isc_capenable) rather than the ifnet ones
(ifp->if_capabilities and ifp->if_capenable). However, the latter
are the ones that are actually updated by ifconfig and that should
be used by the drivers during interface operation. The former are
set by the driver on interface attach (for iflib internal use)
and should not be used anymore by the driver.
This patch fixes the e1000 driver to use the correct bitvectors.

PR:		260068
Reviewed by:	markj
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D33154

(cherry picked from commit e0f4cdba53)
2021-12-22 08:50:35 +00:00
Emmanuel Vadot
6bd6344f13 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

(cherry picked from commit ca23e9d2ac)
2021-12-21 10:21:26 +01:00
Emmanuel Vadot
0c543a6541 fb: Remove some unused ioctls
6d1699583d 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

(cherry picked from commit 706f32db8a)
2021-12-21 10:21:26 +01:00
Emmanuel Vadot
cee79df364 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

(cherry picked from commit b9d3b253e2)

arm/freescale: remove FBIOSCURSOR

Unbreaks building EFIKA_MX

Fixes:	b9d3b253e2 ("fb: Remove unused cursors ioctls")
Sponsored by:	Rubicon Communications, LLC ("Netgate")

(cherry picked from commit 793c74e415)
2021-12-21 10:21:16 +01:00
Emmanuel Vadot
906e705e08 fb: Remove unused FBIOVERTICAL ioctl
Commit 6d1699583d 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

(cherry picked from commit 87fae70dc5)
2021-12-21 10:18:52 +01:00
Emmanuel Vadot
cc72313664 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

(cherry picked from commit 26542b33a4)
2021-12-21 10:18:50 +01:00
Emmanuel Vadot
2d8d4ade23 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

(cherry picked from commit f1105fb8f7)
2021-12-21 10:18:49 +01:00
Alexander Motin
dd8d32c669 isp(4): Allow more than 2 ports to read WWNs from NVRAM.
It appears at least on QLE2694L cards 3rd and 4th ports follow the
same NVRAM addressing logic as the first two.  In lack of proper
documentation this guess is as good as it can be.

MFC after:	1 week
Sponsored by:	iXsystems, Inc.

(cherry picked from commit 483e464ed4)
2021-12-20 20:06:32 -05:00