Commit Graph

281248 Commits

Author SHA1 Message Date
Baptiste Daroussin
5a36c82614 libedit: import version 2023-02-06 2023-02-06 12:46:20 +01:00
Peter Holm
0126bd3e6c stress2: Return error on exit. Run test for longer 2023-02-06 11:09:52 +01:00
Simon J. Gerraty
3cc3c1eb79 Skip EFI framebuffer information if there is none
Avoid several lines of useless info if there is no EFI framebuffer

Reviewed by:	stevek, imp
Differential Revision:	https://reviews.freebsd.org/D38393
2023-02-05 17:23:09 -08:00
Simon J. Gerraty
e9d6b699d8 kern.post.mk we need .MAKE.DEPENDFILE for DIRDEPS_BUILD
When MK_DIRDEPS_BUILD is yes, we need .MAKE.DEPENDFILE left
alone

Reviewed by:	stevek
2023-02-05 14:50:31 -08:00
Bjoern A. Zeeb
b15491b477 LinuxKPI: PCI: implement support for more than 1 MSI vector
Following e9715b1c44 and
4b56afaf7b, implement support
for up-to 32 MSI vectors.  This is used by wireless drivers.
This also switches msi_desc to an array in order to store
per-vector information.

Sponsored by:	The FreeBSD Foundation
Discussed with:	grehan (in Dec)
MFC after:	3 days
Reviewed by:	jhb
Differential Revision: https://reviews.freebsd.org/D38222
2023-02-05 20:49:06 +00:00
Bjoern A. Zeeb
4c72d075a5 LinuxKPI: const argument to irq_set_affinity_hint()
irq_set_affinity_hint() takes a const mask argument and some drivers
pass it in as such where earlier implementations were more lenient.
Deal with it and __DECONST() the argument when passed to intr_setaffinity().

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
Differential Revision: https://reviews.freebsd.org/D38242
2023-02-05 20:46:59 +00:00
Bjoern A. Zeeb
bc81a2b788 LinuxKPI: interrupt.h: add disable_irq_nosync(), irq_set_status_flags()
Add a dummy irq_set_status_flags() along with #defines passed by the driver.
Add disable_irq_nosync() as another wrapper to lkpi_disable_irq().
Those are used by wireless drivers.

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
Differential Revision: https://reviews.freebsd.org/D38241
2023-02-05 20:45:28 +00:00
Bjoern A. Zeeb
934cb7a331 LinuxKPI: pm.h: add dummy pm_wakeup_event()
Add a dummy implementation of pm_wakeup_event() which is used to notify
the power management system about a wakeup (which we currently do not
implement yet).

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
Differential Revision: https://reviews.freebsd.org/D38239
2023-02-05 20:43:46 +00:00
Bjoern A. Zeeb
ffdf10fb9c LinuxKPI: device: add device_set_wakeup_enable()
Add a dummy device_set_wakeup_enable() which is used for WoWLAN which we
do not (yet) support and device_wakeup_enable() which is a wrapper to the
former with the enable argument being true.

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
Differential Revision: https://reviews.freebsd.org/D38238
2023-02-05 20:36:54 +00:00
Bjoern A. Zeeb
52c28b9903 LinuxKPI: add more dummy header files
Add more empty header files wireless drivers try to include but
we do not (yet) need for any implementation.

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
Differential Revision: https://reviews.freebsd.org/D38271
2023-02-05 20:34:57 +00:00
Bjoern A. Zeeb
78cab57ac6 LinuxKPI: dummy: remove files which have implementation
Remove former dummy/ files which now have an actual implementation
in common/ .

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
Differential Revision: https://reviews.freebsd.org/D38269
2023-02-05 20:33:30 +00:00
Bjoern A. Zeeb
fd1a2f3dfc LinuxKPI: pci: add more functions
Add a dummy pci_assign_resource() and an implementation of
pci_irq_vector() returning the irq for MSI-X, MSI, and legacy interrupt.
Both are needed by wirless drivers.

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
Reviewed by:	jhb
Differential Revision: https://reviews.freebsd.org/D38237
2023-02-05 20:31:40 +00:00
Bjoern A. Zeeb
70b97048a0 LinuxKPI: mm.h: implement virt_to_head_page()
Implement virt_to_head_page().

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
Reviewed by:	markj
Differential Revision: https://reviews.freebsd.org/D38240
2023-02-05 20:29:56 +00:00
Ed Maste
c755a7cc1e ssh: remove old reference from update instructions
ssh_config and ssh_config.5 no longer contain the VersionAddendum,
so remove instructions to update these files.

Fixes:		bffe60ead0 ("ssh: retire client VersionAddendum")
Sponsored By:	The FreeBSD Foundation
2023-02-05 13:17:46 -05:00
Ed Maste
7ee81174ca Vendor import of OpenSSH 9.2p1 2023-02-05 13:04:12 -05:00
Elliott Mitchell
dcb4b13816 xen/timer: rename "timer.c" to "xen_timer.c"
The better to avoid conflicting with other files given how "timer.c"
isn't a very unique name.  ARM and RISC-V both have timer.c files.

Reviewed by: royger, imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/609
Differential Revision: https://reviews.freebsd.org/D36258
2023-02-05 10:50:50 -07:00
Aymeric Wibo
8d5fef85f0 ietp(4): Load dummy HID report descriptor if mangled
Some Elantech trackpads have a mangled HID report descriptor, which
reads as having an incorrect input size (i.e. < IETP_REPORT_LEN_LO).
If the input size is incorrect, load a dummy report descriptor.

Reviewed by:	wulf
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D38387
2023-02-05 18:32:08 +03:00
Yuri
e4d3f1e40a hv_hid: Hyper-V HID driver
Hyper-V HID driver using hidbus/hms.

Reviewed by:	wulf
MFC after:	1 week
PR:		221074
Differential revision:	https://reviews.freebsd.org/D38140
2023-02-05 18:32:08 +03:00
Dmitry Chagin
edfc7d6e5b linux(4): Add the forgotten in the 6f8439db opt_compat include.
MFC after:		1 week
2023-02-05 18:25:10 +03:00
sadaszewski
8362905cb6 coretemp: Only log critical temperature events
According to the Intel manual
https://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-vol-3b-part-2-manual.pdf
the Thermal Status (0) and Thermal Status Log (1) bits report only a
high temperature on the CPU, not a critical temperature as suggested in
the coretemp driver. Check the Critical Temperature Log (5) instead.
The critical temperature waives guarantees of correct function,
therefore the CPU could have for example written some wrong values into
memory at that point and the OS should be stopped ASAP as the state is
no longer reliable.

Reviewed by: imp (confirmed descriptions of bits, linux ignores these bits)
Pull Request: https://github.com/freebsd/freebsd-src/pull/562
2023-02-04 22:05:48 -07:00
Alfonso
70164d957e Fix truncation when ssize_t is larger than MAX_INT
Casting to int truncates size on some platforms, resulting swab not
copying all the data. Cast len to size_t to avoid right shifting a
signed value: we know here it's > 0, so we can safely cast it w/o losing
precision.

In addition, be more careful with signedness of char pointers and
temporaries. Downgrade tmp from unsigned long to unsigned char since
we're only reading and writing characters.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/516
2023-02-04 21:14:14 -07:00
ev
0cec5b99b3 usb/u3g: Add support for QUECTEL EP06-E 4G modem
Add QUECTEL EP06-E modem support via USB for FreeBSD.
Tested and works like a ppp on FreeBSD-13.

Reviewed by: imp
PR: 269326
2023-02-04 20:48:41 -07:00
Rick Macklem
db5655124c vfs_mount.c: Free exports structures in vfs_destroy_mount()
During testing of exporting file systems in jails, I
noticed that the export structures on a mount
were not being free'd when the mount is dismounted.

This bug appears to have been in the system for a
very long time.  It would have resulted in a slow memory
leak when exported file systems were dismounted.

Prior to r362158, freeing the structures during dismount
would not have been safe, since VFS_CHECKEXP() returned
a pointer into an export structure, which might still have been
used by the NFS server for an in-progress RPC when the file system
is dismounted.  r362158 fixed this, so it should now be safe
to free the structures in vfs_mount_destroy(), which is what
this patch does.

Reviewed by:	kib
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D38385
2023-02-04 14:45:23 -08:00
Rick Macklem
d94e0bdc14 Revert "vfs_export: Add checks for correct prison when updating exports"
This reverts commit 7926a01ed7.

A new patch in D38371 is being considered for doing this.
2023-02-04 14:38:32 -08:00
Michael Paepcke
75d41cb696 u3g: Add new 4G Huawei devices
New 4G devices. Longer description of new modes to follow.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/633
2023-02-04 14:31:41 -07:00
Michael Paepcke
848ac8451b usb: Remove obsolete Huawei 3G from usbdevs
- remove Huawei 3G E3131 (E3131_INIT):
	- frees up 0x1505/0x14fe shared IDs => product is EOL (since...)
	- 3G networks are shutdown/scheduled
	- E3131 devices will still work the same via scsi_huawei_eject2
	- new 4G devices will switch & report correctly now

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/633
2023-02-04 14:27:09 -07:00
Michael Paepcke
e66352013a usb: add support for Huawei E5573Cs322
Switch the now added E5573Cs322_ECM (0x14db) as well per default to NCM.
With this patch we default all devices to simple NCM mode to avoid the
problem and get a consistent reliable behavior. No matter what firmware
version and provider mix are involved.

Rationale:
Even the bigger SOC shows under complex load in ECM (double-nat) mode
the same performance drop from 25Mbit to 2Mbit Line Speed, similar to E3372h.
Reason: Thermal problems (reported via serial debug interface in ACM Mode)
after 2-3 minutes load.

Fix the root cause and bundle a working firmware is out of reach because
Huawei sells the same hardware, different (crippled) firmware versions
at different price points in different markets as strategy.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/633
2023-02-04 14:27:09 -07:00
Michael Paepcke
1997d3a4a9 usb: add new scsi_huawei eject3 & eject4 driver support
Add initialization for new Huawei 4G E3372_NCM, E3372v153_NCM,
E5573Cs322_NCM, E5573Cs322_ECM, and E5573Cs322_ACM.

Remove now-obsolete Huawei 3G E3131 init sequence. These devices are
obsolete, share IDs with new devices and the 3G networks are shutdown.
These old devices work correctly via the 4G code while still allowing
the shared IDs to work differently for the new devices.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/633
2023-02-04 14:27:08 -07:00
Michael Paepcke
7d4b2b5834 usb: add new scsi_huawei eject3 & eject4 sequences
Add new Huawei eject3 and eject4 command sequences.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/633
2023-02-04 14:27:08 -07:00
Michael Paepcke
64fd867f8c usb: add new scsi_huawei eject3 & eject4 quirks
Add new scsi_huawei eject3 & eject4 mode driver to usb quirks

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/633
2023-02-04 14:27:08 -07:00
Michael Paepcke
2c6b88da71 usb: Add Huawei 4G Modem devices (2022) to usbdevs
ADD [sys/dev/usb/usbdevs]
- add new Huawei 4G E3372_NCM 		0x1505
- add new Huawei 4G E3372v153_NCM	0x155f
- add new Huawei 4G E5573Cs322_NCM	0x155e
- add new Huawei 4G E5573Cs322_ECM	0x14db
- add new Huawei 4G E5573Cs322_ACM	0x1442

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/633
2023-02-04 14:27:08 -07:00
Kornel Dulęba
e5d7c5c857 arm: mv: Add missing function prototype
This fixes armv7 kernel build with gcc12.
2023-02-04 20:21:43 +01:00
Kornel Dulęba
6926e2699a arm: Add support for using VFP in kernel
Add missing logic to allow in-kernel VFP usage for ARMv7 NEON.
The implementation is strongly based on arm64 code.
It introduces a family of fpu_kern_* functions to enable the usage
of VFP instructions in kernel.
Apart from that the existing armv7 VFP logic was modified,
taking into account that the state of the VFP registers can now
be modified in the kernel.

Co-developed by: Wojciech Macek <wma@FreeBSD.org>
Sponsored by:	Stormshield
Obtained from:	Semihalf
Reviewed by:	andrew
Differential Revision: https://reviews.freebsd.org/D37419
2023-02-04 20:21:43 +01:00
Tom Hukins
767964fd86 tcp: Document TCP congestion control history
CUBIC replaced NEWRENO as the default congestion control algorithm in
bb1d472d79. Update man pages to reflect that.

Fixes: bb1d472d79
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/641
2023-02-04 12:17:19 -07:00
Marius van Witzenburg
17720d0bd0 Strip trailing slashes from DESTDIR
Solves duplicate slashes in paths

Scanning //usr/share/certs/trusted for certificates...
Scanning //usr/local/share/certs for certificates...

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/595
2023-02-04 12:11:02 -07:00
Elvin Aslanov
cfd6acbb55 jail: Correct jail_max_af_ips sysctl name
The sysctl is named "security.jail.jail_max_af_ips" with the jail_
prefix in the final part.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/605
2023-02-04 11:46:46 -07:00
Konstantin Belousov
3b6056204d FIOSEEKHOLE/FIOSEEKDATA: correct consistency for bmap-based implementation
Writes on UFS through a mapped region do not allocate disk blocks in
holes immediately. The blocks are allocated when the pages are paged out
first time.

This breaks the algorithm in vn_bmap_seekhole() and ufs_bmap_seekdata(),
because VOP_BMAP() reports hole for the place which already contains a
valid data.

Clean the pages before doing VOP_BMAP() in the affected functions.  In
principle, we could clean less by only requesting clean starting from
the offset, but it is probably not very important.

PR:	269261
Reported by:	asomers
Reviewed by:	asomers, markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D38379
2023-02-04 20:32:07 +02:00
Mateusz Guzik
d9d5f2c042 cpuset: add --count
Can be used to count the number of hardware threads in the cpu set.

For example:
$ cpuset -g -p $$
pid 2440 mask: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
35, 36, 37, 38, 39
pid 2440 domain policy: first-touch mask: 0, 1
$ cpuset -g --count -p $$
40

The intent is to replace calls to sysctl hw.ncpu and kern.smp.cpus which
can be found in the tree, which are not adequate given existence of
cpusets.

Right now only -g -p combination is supported to reduce complexity.
As anything else errors out, this can be expanded later as needed.

Differential Revision:	https://reviews.freebsd.org/D36351
2023-02-04 17:50:41 +00:00
Elliott Mitchell
da6ae2cf17 rtwm: purge EOL release compatibility
Remove FreeBSD 11 support

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/603
Differential Revision: https://reviews.freebsd.org/D35560
2023-02-04 09:13:10 -07:00
Elliott Mitchell
5fa1833514 wmt: purge EOL release compatibility
Remove FreeBSD 11 support

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/603
Differential Revision: https://reviews.freebsd.org/D35560
2023-02-04 09:13:10 -07:00
Elliott Mitchell
d27d543c78 vmm: purge EOL release compatibility
Remove FreeBSD 11 support

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/603
Differential Revision: https://reviews.freebsd.org/D35560
2023-02-04 09:13:10 -07:00
Elliott Mitchell
263261e519 rtsx: purge EOL release compatibility
Remove support for FreeBSD 11 and earlier

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/603
Differential Revision: https://reviews.freebsd.org/D35560
2023-02-04 09:13:09 -07:00
Elliott Mitchell
1c5e687117 mlx5: purge EOL release compatibility
Remove FreeBSD 10 support code

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/603
Differential Revision: https://reviews.freebsd.org/D35560
2023-02-04 09:13:09 -07:00
Elliott Mitchell
026babd427 mlx4: purge EOL release compatibility
Remove FreeBSD 10 support code.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/603
Differential Revision: https://reviews.freebsd.org/D35560
2023-02-04 09:13:09 -07:00
Elliott Mitchell
b02a397789 hyperv: purge EOL release compatibility
Remove FreeBSD 11 and earlier support

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/603
Differential Revision: https://reviews.freebsd.org/D35560
2023-02-04 09:13:09 -07:00
Elliott Mitchell
5d1c658b47 hptmv: purge EOL release compatibility
Drop support for pre-FreeBSD 11

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/603
Differential Revision: https://reviews.freebsd.org/D35560
2023-02-04 09:13:09 -07:00
Elliott Mitchell
33f6a4e90f acpica: purge EOL release compatibility
Remove obsolete check for FreeBSD >= 11

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/603
Differential Revision: https://reviews.freebsd.org/D35560
2023-02-04 09:13:09 -07:00
Elliott Mitchell
21e0b50796 qlnxr: cleanup secondary effects from EOL purge
DEFINE_ALLOC_MR became unconditionally true, but it isn't used anywhere
now.  Several places depended upon DEFINE_IB_FAST_REG, but that is now
always false.
Similarly DEFINE_IB_UMEM_WITH_CHUNK became always false/undefined.
DEFINE_IB_AH_ATTR_WITH_DMAC is now unconditionally true.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/603
Differential Revision: https://reviews.freebsd.org/D35560
2023-02-04 09:13:09 -07:00
Elliott Mitchell
bbe35708ad qlnx: purge EOL release compatibility
Drop code that supproted FreeBSD 10 and 11.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/603
Differential Revision: https://reviews.freebsd.org/D35560
2023-02-04 09:13:08 -07:00
Elliott Mitchell
097e192a9c iavf: purge EOL release compatibility
Drop code that differentiated between FreeBSD 10 and 11

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/603
Differential Revision: https://reviews.freebsd.org/D35560
2023-02-04 09:13:08 -07:00