Commit Graph

269099 Commits

Author SHA1 Message Date
Marcin Wojtas
55e7f40ce3 sdhci: allow setting MMC capabilities before sdhci_init_slot
With this change the host controller drivers can set the MMC capabilities
(e.g. using mmc_fdt_parse() helper) before calling sdhci_init_slot().
This way the configuration dump (eg. in bootverbose) can include the
possible additional information.

Reviewed by: manu
Obtained from: Semihalf
Sponsored by: Marvell
Differential Revision: https://reviews.freebsd.org/D30561
MFC after: 2 weeks

(cherry picked from commit 5652be30a3)
2022-03-07 16:59:50 +01:00
Mark Johnston
4a80132dcd rmlock: Temporarily revert commit c84bb8cd77
It appears to have introduced a regression on arm64, possibly due to the
fact that the pcpu pointer is reloaded outside of the critical section
in _rm_rlock().  Until this is resolved one way or another, let's
revert.

Reported by:	Ronald Klop <ronald-lists@klop.ws>
Sponsored by:	The FreeBSD Foundation

(cherry picked from commit afb44cb010)
2022-03-07 10:45:24 -05:00
Cy Schubert
d1f3afc4a4 ipfilter: Print protocol when listing NAT table mappings
NAT table mappings list only the source and destination IP, the source
and destinaion port numbers, and their mappings. But the protocol is not
listed. Now that Facebook and Google use QUIC, seeing port 443 in in a
list of active NAT sessions could mean 443/tcp or 443/udp. This patch
adds the protocol to the listing to aid in determining whether HTTPS is
TCP or QUIC in a NAT mapping listing. This also helps differentiatinete
between other protocols such as ICMP, ESP, and AH in ipnat list of active
sessions.

(cherry picked from commit 9291d079d5)
2022-03-07 05:32:58 -08:00
Cy Schubert
6b3a14c24c unbound: Vendor import 1.15.0
Vendor import GA release of unbound 1.15.0.

(cherry picked from commit 9cf5bc93f6)
2022-03-07 05:32:58 -08:00
Franco Fichtner
586827df60 dhclient: support VID 0 (no vlan) decapsulation
VLAN ID 0 is supposed to be interpreted as having no VLAN with a bit of
priority on the side, but the kernel is not able to decapsulate this on
the fly so dhclient needs to take care of it.

Reviewed by:	markj

(cherry picked from commit abf5bff71d)
2022-03-07 08:18:57 -05:00
Mark Johnston
5d0ccaa457 pci: Fix a -Wunused-but-set-variable warning
(cherry picked from commit 4db93fb278)
2022-03-07 08:18:45 -05:00
Mark Johnston
a82cdd3211 axge: Fix a -Wunused-but-set-variable warning
(cherry picked from commit 9218449b98)
2022-03-07 08:18:37 -05:00
Mark Johnston
181c3bf568 bhnd: Fix some -Wunused-but-set-variable warnings
(cherry picked from commit 1db163b825)
2022-03-07 08:18:25 -05:00
Mark Johnston
97c29a1d08 cdce: Fix a -Wunused-but-set-variable warning
(cherry picked from commit ceb246c7b2)
2022-03-07 08:18:16 -05:00
Mark Johnston
a2c1c57639 axe: Fix a -Wunused-but-set-variable warning
(cherry picked from commit f4a5d1f6c4)
2022-03-07 08:18:03 -05:00
Mark Johnston
29e0af110a iwm: Fix -Wunused-but-set-variable warnings
(cherry picked from commit 1dc8ed06f3)
2022-03-07 08:17:47 -05:00
Mark Johnston
45014f965e tests: Fix the test plan for closefrom_test
Fixes:	f3f3e3c44d ("fd: add close_range(..., CLOSE_RANGE_CLOEXEC)")
Reported by:	Jenkins

(cherry picked from commit 3a01dcc99f)
2022-03-07 12:15:47 +00:00
Mateusz Guzik
8891979494 fd: add close_range(..., CLOSE_RANGE_CLOEXEC)
For compatibility with Linux.

MFC after:	3 days
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D34424

(cherry picked from commit f3f3e3c44d)
2022-03-07 12:15:47 +00:00
Marcin Wojtas
63f3afe497 uart_dev_ns8250: Switch ACPI UART subtype for Marvell SoCs
DBG2 ACPI table description [1] specifies three subtypes
related to 16550 UART:
0x0 - 16550 compatible
0x1 - 16550 subset
0x12 - 16550 compatible with parameters defined in Generic Address Structure (GAS)

It turned out however, that the Windows OS treats 0x0 subtype as
legacy x86 UART with 8-bit access. ARM SoCs can use types 0x1 (16550 with
fixed mmio32 access) or 0x12 (16550 with fully respected GAS contents).

Switch Marvell SoCs ACPI UART subtype to 0x1 - thanks to that the same firmware
can run properly with UART output in FreeBSD, Windows 10, Linux and ESXI
hypervisor. Tests showed the older firmware versions that use 0x0
UART subtype in SPCR table continue to display output properly.

[1] https://docs.microsoft.com/en-us/windows-hardware/drivers/bringup/acpi-debug-port-table

Obtained from: Semihalf
Sponsored by: ARM
Differential revision: https://reviews.freebsd.org/D30386
MFC after: 2 weeks

(cherry picked from commit 9cf66a0458)
2022-03-07 12:19:29 +01:00
Marcin Wojtas
6f37cb64f3 pci_host_generic: update Synopsys device description for ACPI
The recent addition of Synopsys ECAM quirk set the
device description only for the DT variant.
Do the same in ACPI case.

Reported by: jrtc27

(cherry picked from commit e8a8725360)
2022-03-07 12:19:29 +01:00
Pawel Anikiel
393538e35d pci_host_generic: Add Synopsys Designware PCIe controller quirk
Due to the quirky nature of the Synopsys Designware PCIe IP,
the type 0 configuration is broadcast and whatever device
is plugged into slot, will appear at each 32 device
positions of bus0. Mitigate the issue by filtering out
duplicated devices on this bus for both DT and ACPI cases.

Reviewed by: mw
Sponsored by: Semihalf
MFC: after 3 weeks
Differential revision: https://reviews.freebsd.org/D31887

(cherry picked from commit 2de4c7f6d0)
2022-03-07 12:19:28 +01:00
Kornel Duleba
7aa6014fb1 mmc: Fix HS200/HS400 capability check
HS200 and HS400 speeds can be enabled either with 1.2, or 1.8V signaling voltage.
Because of that we have four cabability flags: MMC_CAP_MMC_HS200_120,
MMC_CAP_MMC_HS200_180, MMC_CAP_MMC_HS400_120, MMC_CAP_MMC_HS400_180.

MMC logic only enables HS200/HS400 mode if both flags are set for the corresponding speed.
Fix that by being more permissive in host timing cap check.

Reviewed by: manu, mw
MFC after: 2 weeks
Obtained from: Semihalf
Sponsored by: Alstom Group
Differential revision: https://reviews.freebsd.org/D33130

(cherry picked from commit 8661e085fb)
2022-03-07 12:19:28 +01:00
Ram Kishore Vegesna
120ba9ec7f ocs_fc: Ignore flogi failure when the remote node is pt2pt winner
Updated commit 79c56c9af5, do not proceed with discovery
if flogi fails in pt2pt winner case.

MFC after: 3 days

(cherry picked from commit 625a8bfb04)
2022-03-07 16:25:11 +05:30
Ram Kishore Vegesna
4a90d6c823 ocs_fc: Do not respond to unsolicited NOP BLS command.
Summary: Drop unsolicited BLS commands other than ABTS.

Reviewed by: mav

MFC after: 3 days

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

(cherry picked from commit 57e4b67755)
2022-03-07 16:24:56 +05:30
Ram Kishore Vegesna
95c714c6c4 ocs_fc: Support persistent topology feature
Summary: Enable persistent topology across power cycles/firmware resets.

Reviewed by: mav

MFC after: 3 days

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

(cherry picked from commit 965e2154e7)
2022-03-07 16:24:45 +05:30
Ram Kishore Vegesna
927f2126d2 ocs_fc: Ignore flogi failure when the discovery is already done.
Summary:
Some targets are not responding to the FLOGI in point-to-point topology,
If the pt2pt discovery is done, Ignore the FLOGI failure.

MFC after: 3 days

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

(cherry picked from commit 79c56c9af5)
2022-03-07 16:24:27 +05:30
Mateusz Piotrowski
7584921e6d RELNOTES: Note addition of zfskeys
zfskeys is about to be released for the first time with FreeBSD
13.1-RELEASE.

This is a direct commit.

Reviewed by:	allanjude
Sponsored:	Modirum
Sponsored:	Klara Inc.
Differential Revision:	https://reviews.freebsd.org/D34428
2022-03-06 21:28:29 +01:00
Mateusz Piotrowski
e614f7a55a rc.conf: Fix a typo
Reported by:	Pau Amma <pauamma@gundo.com>
MFC after:	3 days
MFC with:	8719e8a951

(cherry picked from commit 9062598e74)
2022-03-06 21:22:15 +01:00
Mateusz Piotrowski
e8baa00242 rc.conf: Document zfskeys
Fixes:		33ff39796f Add zfskeys rc.d script for auto-loading encryption keys
MFC after:	3 days
Reviewed by:	allanjude
Sponsored by:	Modirum
Sponsored by:	Klara, Inc
Differential Revision:	https://reviews.freebsd.org/D34427

(cherry picked from commit 8719e8a951)
2022-03-06 21:21:48 +01:00
Mateusz Guzik
b64a3b409a zstd: build with C11
This enables thread-aware timers which in turn fixes benchmark result
reports.

Reviewed by:	cem
Differential Revision:	https://reviews.freebsd.org/D34238

(cherry picked from commit 6882d53b7f)
2022-03-05 19:58:08 +00:00
наб
ed87197672 uname: -v: strip final whitespace compatibly with uname(3)
This restores POSIX.1 conformance

PR: 260938
(cherry picked from commit 7e05fa3b44)
2022-03-05 19:56:11 +00:00
Mateusz Guzik
d6132e2117 cache: improve vnode vs name assertion in cache_enter_time
(cherry picked from commit 1d65a9b47e)
2022-03-05 19:53:46 +00:00
Mateusz Guzik
807c4914a5 cache: remove NOCACHE handling from cache_fplookup_noentry
It was copy-pasted from locked lookup. As LOOKUP operation cannot have
the flag set it was always ending up setting MAKEENTRY.

(cherry picked from commit 611470a515)
2022-03-05 19:53:46 +00:00
Mateusz Guzik
df7ebff33c cache: whack "set but not used" warnings
(cherry picked from commit 7e9680d3be)
2022-03-05 19:53:20 +00:00
Mateusz Guzik
54c0eac7c1 cache: only let non-dir descriptors through when doing EMPTYPATH lookups
Otherwise things like realpath against a file and '.' end up with an
illegal state of having a regular vnode for the parent.

Reported by:	syzbot+9aa5439dd9c708aeb1a8@syzkaller.appspotmail.com

(cherry picked from commit 628c3b307f)
2022-03-05 19:52:57 +00:00
Mateusz Guzik
bac79d8e16 cache: only assert on flags when dealing with EMPTYPATH
Reported by:	syzbot+bd48ee0843206a09e6b8@syzkaller.appspotmail.com
Fixes:		7dd419cabc ("cache: add empty path support")

(cherry picked from commit 1045352f15)
2022-03-05 19:52:33 +00:00
Mateusz Guzik
3343c0afbf cache: add empty path support
This avoids spurious drop offs as EMPTY is passed regardless of the
actual path name.

Pushign the work inside the lookup instead of just ignorign the flag
allows avoid checking for empty pathname for all other lookups.

(cherry picked from commit 7dd419cabc)
2022-03-05 19:52:29 +00:00
Mateusz Guzik
f85d71e72e cache: retire cache_fast_revlookup sysctl
Sponsored by:	Rubicon Communications, LLC ("Netgate")

(cherry picked from commit b65ad70195)
2022-03-05 19:49:57 +00:00
Hans Petter Selasky
4340df3418 libusb(3): Ignore SIGPIPE when initializing the LibUSB v1.0 API.
The LibUSB v1.0 emulation layer uses pipes internally to signal between
threads. When USB devices are reset, as part of loading firmware, SIGPIPE
may happen, and that is expected and should be ignored.

PR:		261891
Sponsored by:	NVIDIA Networking

(cherry picked from commit d94d94e2c0)
2022-03-05 15:40:08 +01:00
Emmanuel Vadot
61b0043efb linuxkpi: Add mmap_lock.h
This contain mmap_read_lock, mmap_read_unlock and mmap_write_lock_killable
which are abstraction around down_read, up_read and down_write_killable.
Note that in Linux 5.8 mmap_sem was renamed to mmap_lock.
We might want to do the same at some point but some drivers still uses
the old mmap locking API.

Reviewed by:	bz
MFC after:	2 weeks
Sponsored by:	Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D34297

(cherry picked from commit 995c3b88d4)
2022-03-05 12:12:44 +01:00
Emmanuel Vadot
ec504d3049 linuxkpi: Add atomic64_fetch_add
Linux variant of atomic_fetchadd_64.

Reviewed by:	bz
MFC after:	2 weeks
Sponsored by:	Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D34296

(cherry picked from commit 1889bed23d)
2022-03-05 12:12:44 +01:00
Emmanuel Vadot
db4c095026 linuxkpi: Add orderly_poweroff
This simply poweroff the system.
Needed by drm-kmod v5.8

Reviewed by:	bz
MFC after:	2 weeks
Sponsored by:	Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D34287

(cherry picked from commit 8021ba6723)
2022-03-05 12:12:44 +01:00
Emmanuel Vadot
3d148ca784 linuxkpi: Add dev_emerg
Needed by drm-kmod v5.8

Reviewed by:	bz
MFC after:	2 weeks
Sponsored by:	Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D34286

(cherry picked from commit e3f1af9b33)
2022-03-05 12:12:44 +01:00
Emmanuel Vadot
78281dd986 linuxkpi: Add backlight_device_set_brightness
This simply set the brightness of a backlight device.
Needed by drm-kmod v5.8

Reviewed by:	bz, emaste
MFC after:	2 weeks
Sponsored by:	Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D34285

(cherry picked from commit 2cc3af6e1d)
2022-03-05 12:12:44 +01:00
Emmanuel Vadot
8082bc8e57 linuxkpi: Add user_write_access_*
Needed by drm-kmod v5.8

Reviewed by:	bz
MFC after:	2 weeks
Sponsored by:	Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D34284

(cherry picked from commit 4f689b302f)
2022-03-05 12:12:43 +01:00
Emmanuel Vadot
48df337c9e linuxkpi: Add list_rotate_to_front
This just calls list_move_tail.

Reviewed by:	hselasky, bz
Sponsored by:	Beckhoff Automation GmbH & Co. KG
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D34251

(cherry picked from commit bf7deecfe7)
2022-03-05 12:12:43 +01:00
Emmanuel Vadot
090eb6f388 linuxkpi: Add __var_waitqueue
This returns the wait queue based on the object but in LinuxKPI
we only have one waitqueue for this.

Reviewed by:	hselasky, bz
MFC after:	2 weeks
Sponsored by:	Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D34250

(cherry picked from commit cb15ed7da2)
2022-03-05 12:12:43 +01:00
Emmanuel Vadot
5145a79278 lindebugfs: Fix write
For write operation pseudofs creates an sbuf with the data.
Use this data instead of the uio as it's not usable anymore after
uiomove.

Reviewed by:	hselasky
MFC after:	1 week
Sponsored by:	Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D34114

(cherry picked from commit 867b4decb4)
2022-03-05 12:12:43 +01:00
Peter Jeremy
34f1d516aa
systat: Display seconds in vmstat mode
Providing a timestamp with seconds granularity helps make it obvious
that the display is updating.

Reviewed by:    mckusick
Differential Revision:  https://reviews.freebsd.org/D29181

(cherry picked from commit c9d1fa7003)
2022-03-05 13:53:34 +11:00
Peter Jeremy
a65f526add
geom_gate: Distinguish between classes of errors
The geom_gate API provides 2 distinct paths for exchanging error
details between the kernel and the userland client: Including an error
code in the g_gate_ctl_io structure passed in the ioctl(2) call or
having the ioctl(2) call return -1 with an error code in errno. The
latter reflects errors in the ioctl(2) call itself whilst the former
reflects errors within the geom_gate instance.

The G_GATE_CMD_START ioctl blocks waiting for an I/O request to be
directed to the geom_gate instance and the wait can fail
(necessitating an error return) if the geom_gate instance is destroyed
or if the msleep(9) fails. The code previously treated both error
cases indentically: Returning ECANCELED as a geom_gate instance error
(which the ggatec treats as a fatal error).  Whilst this is the correct
behaviour if the geom_gate instance is destroyed, a msleep(9) failure
is unrelated to the geom_gate instance itself and should be reported
as an ioctl(2) "failure".  The distinction is important because
msleep(9) can return ERESTART, which means the system call should be
retried (and this will occur automatically as part of the generic
syscall return processing).

This change alters the msleep(9) handling to directly return the error
code from msleep(9), which ensures ERESTART is correctly handled,
rather than being treated as a fatal error.

Reviewed by:    Johannes Totz <jo@bruelltuete.com>
Differential Revision:  https://reviews.freebsd.org/D33996

(cherry picked from commit afcd121024)
2022-03-05 13:52:24 +11:00
Navdeep Parhar
8240114045 cxgbe(4): Enable the hardware TCP Offload Module (t4_tom) on aarch64.
Sponsored by:	Chelsio Communications

(cherry picked from commit 13a0d225be)
2022-03-04 16:37:45 -08:00
Navdeep Parhar
84195600d1 cxgbe(4): Dump some more debug registers in cim_dump_regs.
Sponsored by:	Chelsio Communications

(cherry picked from commit 17f564a784)
2022-03-04 16:37:28 -08:00
Navdeep Parhar
ac1b4a8e1a cxgb(4): Fix "set but not used [-Wunused-but-set-variable]" warnings.
Sponsored by:	Chelsio Communications

(cherry picked from commit 6792568fe2)
2022-03-04 13:13:11 -08:00
Navdeep Parhar
73936ae305 bsdinstall: Fix typo (Instalation -> Installation).
(cherry picked from commit 5104dfbeff)
2022-03-04 13:10:59 -08:00
Stefan Eßer
cde51c2590 contrib/bc: MFC version 5.2.2
This release assigns a default value to the internal program name
variable in case the program is invoked with argv[0] == NULL.

There was no security issue: the prevuous program version would have
been immediately terminated due to a NULL dereference.

(cherry picked from commit 00698711de)
2022-03-04 21:19:50 +01:00