Commit Graph

273307 Commits

Author SHA1 Message Date
Mateusz Piotrowski
dd74471e49 ctime.3: Add a cross-reference to clock_gettime(2)
MFC after:	1 week
2022-03-04 17:49:34 +01:00
Ram Kishore Vegesna
625a8bfb04 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
2022-03-04 20:23:38 +05:30
Mateusz Piotrowski
5d3007c1a2 stats.7: Fix a typo
MFC after:	3 days
2022-03-04 12:35:55 +01:00
Peter Holm
2051171287 stress2: Added a new test scenario checing for a long fsck_ffs runtime 2022-03-04 12:06:45 +01:00
Ram Kishore Vegesna
965e2154e7 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
2022-03-04 10:19:03 +05:30
Ram Kishore Vegesna
57e4b67755 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
2022-03-04 10:19:03 +05:30
Ram Kishore Vegesna
79c56c9af5 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
2022-03-04 10:19:03 +05:30
Kyle Evans
0e73b834f3 tests: readlink: fix atf_test_case call [NFC]
This was meant to read `basic`, rather than a duplicate of `f_flag`.  It
is largely irrelevant, though, as atf_test_case mostly just makes
sure that the proper functions are defined.

Sponsored by:	Klara, Inc.
2022-03-03 21:51:40 -06:00
Alexander Motin
56070dd2e4 Improve timeout precision of pthread_cond_timedwait().
This code was not touched when all other user-space sleep functions were
switched to sbintime_t and decoupled from hardclock.  When it is possible,
convert supplied times into sbinuptime to supply directly to msleep_sbt()
with C_ABSOLUTE.  This provides the timeout resolution of few microseconds
instead of 2 milliseconds, plus avoids few clock reads and conversions.

Reviewed by:	vangyzen
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D34163
2022-03-03 22:03:09 -05:00
John Baldwin
0b25cbc79d Fix the size returned for NT_FPREGSET.
Sponsored by:	University of Cambridge, Google, Inc.
2022-03-03 17:53:06 -08:00
John Baldwin
9af41803cb Use vnsz2log directly in assertion on its relation to sizeof(struct vnode).
This reduces the size of diffs required to support different values of
vnsz2log.  In CheriBSD, kernels for CHERI architectures have vnodes
larger than 512 bytes and require a value of 9.

Reviewed by:	mjg
Obtained from:	CheriBSD
Sponsored by:	University of Cambridge, Google, Inc.
Differential Revision:	https://reviews.freebsd.org/D34418
2022-03-03 17:52:07 -08:00
John Baldwin
5a1de9c25d Add simple kyua tests for the mod* system calls.
Reviewed by:	markj
Obtained from:	CheriBSD
Sponsored by:	University of Cambridge, Google, Inc.
Differential Revision:	https://reviews.freebsd.org/D34417
2022-03-03 17:51:45 -08:00
Bjoern A. Zeeb
abf6e1a49e iwlwifi: update man pages
Update man pages given auto-loading is now enabled by default and
no user configuration is needed to load the driver.
Also note that the iwlwifi driver will appear the first time in 13.1-R.

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
Relnotes:	yes
2022-03-04 00:35:42 +00:00
Bjoern A. Zeeb
5493c6277a LinuxKPI: pci.h MODULE_DEVICE_TABLE to MODULE_PNP_INFO
Implement MODULE_PNP_INFO() support in LinuxKPI for the Linux
MODULE_DEVICE_TABLE.

This will allow us to auto-load LinuxKPI PCI drivers (drm-kmod do
not currently as they attach to vgapci0 which in turn grabs the PCI
to my understanding) and make any loading from loader or kld_list in
rc.conf unnecessary; see devmatch(8) for more information.

We need to ensure there is a DRIVER_MODULE() (or probably just
a DECLARE_MODULE but that makes not much difference) before the
MODULE_PNP_INFO (which we otherwise would not need).

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
Reviewed by:	imp, hselasky, manu
Differential Revision:	https://reviews.freebsd.org/D26651
2022-03-04 00:12:45 +00:00
Bjoern A. Zeeb
fbedd9d708 LinuxKPI: remove duplicate include
Remove a duplicate bus.h include from pci.h.

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2022-03-04 00:04:19 +00:00
Bjoern A. Zeeb
3d248a914d iwlwifi: adjust the LinuxKPI pci return for now
Rather than having LinuxKPI return BUS_PROBE_DEFAULT, return
"one less" so that on conflict of IDs others would be preferred.

This means that iwm(4) will attach instead of iwlwifi(4) for the
chipsets iwm(4) supports and iwlwifi(4) only for the other--in iwm(4)
unsupported--chipsets.  This is done so that we can enable auto-loading
of drivers but for the upcoming 13.1-Release people with working iwm(4)
will not yet be affected by iwlwifi(4).

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2022-03-03 23:16:40 +00:00
Bjoern A. Zeeb
b91dd79ba3 LinuxKPI: allow a driver to override the default pci probe result
Add bsd_probe_return which a driver can set in their 'struct pci_driver'
definition to set a driver-sepcific LinuxKPI pci return value.
This is helpful in case of multiple drivers with overlapping IDs,
such as iwlwifi(4) and iwm(4).

Contrary to an earlier version we now assume 0 is not BUS_PROBE_SPECIFIC
(which no driver should really return these days) but the bss initialized
value (bsd_probe_return unset) and we will return BUS_PROBE_DEFAULT.

Suggested by:	jhb
Reviewed by:	jhb
Reviewed by:	hselasky, imp (earlier versions)
Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
X-MFC:		new struct members need to go to the end for stable/13
Differential Revision:	https://reviews.freebsd.org/D33915
2022-03-03 23:16:39 +00:00
Mateusz Piotrowski
8b73b57c1b manpages: Fix use of At macro
The versions for the At macro from 1 to 7 must be prefixed with "v".

MFC after:	3 days
2022-03-04 00:03:44 +01:00
Mateusz Guzik
d283601b80 Revert "Expand __diagused to include the KTR kernel diagnostic option."
This reverts commit 55339af296.

Induces warnings for kernels built with KTR but without debug.

Discussed with:	scottl
2022-03-03 20:26:59 +00:00
Mateusz Piotrowski
8719e8a951 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
2022-03-03 20:14:14 +01:00
наб
6d8a00ff1f contrib/dracut: README: note rootfstype=zfs
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13093
2022-03-03 10:45:31 -08:00
наб
6a41310c70 contrib/dracut: zfs-lib: export_all: replace with inline zpool export -a
07a3312f17, which introduced this in
October of 2014, didn't have zpool export -a available; we do

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13093
2022-03-03 10:45:24 -08:00
наб
93669c3812 contrib/dracut: export-zfs: simplify
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13093
2022-03-03 10:45:19 -08:00
наб
497bf14a4a zdb.8: cleanup
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13093
2022-03-03 10:44:49 -08:00
Rich Ercolani
56fa4aa96e
Default to ON for compression
A simple change, but so many tests break with it,
and those are the majority of this.

Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Rich Ercolani <rincebrain@gmail.com>
Closes #13078
2022-03-03 10:43:38 -08:00
Kristof Provost
5bed7d2fa1 pfctl.8: Use the serial comma
Pointed out by:	Pau Amma.
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2022-03-03 18:32:27 +01:00
Santiago Martinez
52bcdc5b80 if_epair: fix build with RSS and INET or INET6 disabled
Reviewed by:	kp
MFC after:	1 week
2022-03-03 18:31:26 +01:00
Mateusz Guzik
afb08a6d07 cache: hide hash stats behind DEBUG_CACHE
They take a long time to dump and hinder sysctl -a when used with
DIAGNOSTIC.
2022-03-03 17:21:58 +00:00
Mateusz Guzik
f3f3e3c44d 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
2022-03-03 17:21:58 +00:00
Hans Petter Selasky
33cbbf268f xhci(4): Add quirk for "TUSB73x0 USB3.0 xHCI Controller".
Tested by:	br@
MFC after:	1 week
Sponsored by:	NVIDIA Networking
2022-03-03 18:14:21 +01:00
Cy Schubert
93c1048a13 ipfilter: Reliably print the interface name
When printing the interface name from the ipstate_t struct the interface
name in is_ifp may not always be avaiable when reading it from kmem
(tested on FreeBSD and NetBSD). However the is_ifname (the interface
name character string) is almost always available -- it is not available
when the source of the packet is a process running on the firewall
itself. Rather than print both interface name strings, print only the
one.

MFC after:	1 week
2022-03-03 06:43:12 -08:00
Cy Schubert
ec793543fe ipfilter: Obtain the interface name more efficiently
Rather than use a kmem read to determine the interface name used by a
nat_t structure through a pointer, nat_ipfs->netif->if_xname, obtain it
directly from nat_ifnames in the nat_t structure itself using the new
FORMAT_IF macro.

MFC after:	1 week
2022-03-03 06:43:11 -08:00
Cy Schubert
915395a280 ipfilter: Introduce the new FORMAT_IF macro
Interface names stored in the ipstate_t and ipnat_t structures can be
NULL. This occurs when an application, such as named, is running on the
firewall machine itself. For example an application, i.e. named, running
on the firewall itself will cause a state table display and NAT mapping
display to show a null ingress interface and its egress interface. This
is perfectly valid but confusing to human eyes. Rather than print
nothing, print "(null)".

MFC after:	1 week
2022-03-03 06:43:11 -08:00
Peter Holm
70cb626635 stress2: Reworked and cleaned up this test scenaio. 2022-03-03 14:29:18 +01:00
Mike Karels
b8b0c65e8a Add serial-number to hw.fdt sysctl area if found in fdt.
Add serial-number sysctl if that fdt property exists and is a printable
string.  While here, ensure that the hw.fdt sysctl values fit in the
buffers provided so that they will be NUL-terminated.  Tested on
Raspberry Pi 3B+ and 4.

MFC after:	5 days
Reviewed by:	manu imp
Differential Revision: https://reviews.freebsd.org/D34356
2022-03-03 07:08:32 -06:00
Hans Petter Selasky
fc99316ef9 ibcore: Fix multiple includes of same header file.
MFC after:	1 week
Sponsored by:	NVIDIA Networking
2022-03-03 12:51:20 +01:00
Hans Petter Selasky
fcca9fd98c usbhid(4): Be more restrictive about what requests are allowed from user-space.
MFC after:	1 month
Sponsored by:	NVIDIA Networking
2022-03-03 10:24:43 +01:00
Hans Petter Selasky
8ed5bb59e9 usb(4): Factor out the usb_check_request() function.
No functional change.

MFC after:	1 week
Sponsored by:	NVIDIA Networking
2022-03-03 10:24:24 +01:00
Corvin Köhne
87f6367f10 bhyve: add varfile option to nvlist of lpc device
Use seperate nvlist entries for the romfile and the varfile.

While here, don't leak varfd in bootrom_loadrom().

Reviewed by:    jhb, markj
Differential Revision:  https://reviews.freebsd.org/D33433
2022-03-02 22:50:24 -09:00
Ed Maste
f266082f11 vt_vga: fix colour in pixel blocks with more than 4 colours
VGA hardware provides many different graphics and data access modes,
each with different capabilities and limitations.

VGA vt(4) graphics mode operates on blocks of pixels at a time.  When a
given pixel block contains only two colours the vt_vga driver uses write
mode 3.  When the block contains more than two colours it uses write
mode 0.  This is done because two-colour write mode 3 is much more
efficient.

In practice write mode 3 is used most of the time, as there is often a
single foreground colour and single background colour across the entire
console.  One common exception requiring the use of mode 0 is when the
mouse cursor is drawn over a background other than black, as we need
black and white for the cursor in addition to the background colour.

VGA's default 16-colour palette provides the same set of colours as the
system console, but in a different order.  Previously we configured a
non-default VGA palette that had the same colours at the same indexes.
However, this caused anything drawn before the kernel started (drawn by
the loader, for instance) to change colours once the kernel configured
the new, non-default palette.

In 5e251aec86 we switched to leaving the default VGA palette in place,
translating console colour indexes to VGA colour indexes as necessary.
This translation was missed for the write mode 0 case for pixel blocks
with more than two colours.

PR:		261751
Reviewed by:	adrian
MFC after:	1 week
Fixes:		5e251aec86 ("vt(4): Use default VGA palette")
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D34412
2022-03-02 19:07:20 -05:00
Vladimir Kondratyev
42e2a173c7 hms(4): Change probe priority to BUS_PROBE_GENERIC
to give ietp(4) and bcm5974(4) drivers precedence over hms(4).

MFC after:	2 month
2022-03-03 02:35:24 +03:00
Vladimir Kondratyev
d5add41d4d ietp(4): Driver for Elantech I2C touchpad
MFC after:	2 month
Tested by:	Matt Daw <matt.daw_AT_gmail_DOT_com>
2022-03-03 02:35:24 +03:00
Vladimir Kondratyev
34e051c45c iichid(4): Add support for ASUS C300 chromebook.
Some chromebooks e.g. ASUS C300 have no valid _CID and _DSM ACPI
objects required for device identification and HID descriptor address
detection. Add quirk to allow required data to be hardcoded in to
driver.

MFC after:	2 month
2022-03-03 02:35:23 +03:00
Vladimir Kondratyev
6b1da3d223 iichid(4): Implement I2CRDWR command in hid_ioctl method
This command is intended to be compatible with I2CRDWR ioctl.
It is required to perform arbitrary I2C transfers by device
drivers which can switch between HID and native non-HID modes.

MFC after:	2 month
2022-03-03 02:35:23 +03:00
Vladimir Kondratyev
5aa839c9e2 bcm5974: wsp(4) driver version with HID attachment.
MFC after:	2 month
Tested by:	Greg V (Type 4 touchpads)
2022-03-03 02:35:23 +03:00
Vladimir Kondratyev
82e38b012c usbhid(4): Implement USB_REQUEST command in hid_ioctl method
This command is intended to be compatible with USB_REQUEST ioctl.
It is required to perform arbitrary control endpoint requests by device
drivers which can switch between HID and native non-HID modes.

MFC after:	2 month
2022-03-03 02:35:23 +03:00
Vladimir Kondratyev
5f47c5a3a3 hid: Add hid_ioctl method to HID interface
hid_ioctl method executes arbitrary transport backend command.
Format of the command is defined by hardware transport driver.

It is intended to assist HID device drivers to execute non-HID commands
on hybrid devices like Elan and Apple touchpads which can be switched
between HID and proprietary modes.

MFC after:	2 month
2022-03-03 02:35:23 +03:00
Vladimir Kondratyev
166f2cb40d ig4(4): Add PNP info for ACPI attachment
MFC after:	2 month
2022-03-03 02:35:23 +03:00
Vladimir Kondratyev
1ef67193ba hid: Add missed dependency on usbdevs.h for static builds
MFC after:	2 month
2022-03-03 02:35:23 +03:00
John Baldwin
2753997438 cxgbe: Move page pods KTR traces under VERBOSE_TRACES. 2022-03-02 15:32:21 -08:00