Commit Graph

142362 Commits

Author SHA1 Message Date
John Baldwin
2e7838ae84 vm_phys_early_alloc: mem_index is only used under #ifdef NUMA.
Possibly mem_index should just reuse biggestone since this loop is
already reusing biggestsize.
2022-04-08 17:25:13 -07:00
John Baldwin
a7e1a58554 uma_zfree_smr: uz_flags is only used if NUMA is defined. 2022-04-08 17:25:13 -07:00
John Baldwin
3b994db74b Use stub inline functions for no-op versions of tcp_fastopen*().
Inline functions "use" variables passed as arguments unlike empty
macros appeasing compiler warnings about unused variables.
2022-04-08 17:25:13 -07:00
John Baldwin
5cd9d25403 aac: Move sge64 declaration into the #ifdef __amd64__ block. 2022-04-08 17:25:13 -07:00
John Baldwin
d557e89abb pf: Workaround set but unused warning.
The RB_NEXT macro does not use its middle argument since commit
5fce408cc4 in 2004 (which ironically
fixed an "unused parameter" warning by introducing this warning in all
consumers).  RB_PREV has also copied this unfortunate behavior of an
unused argument.

This results in 'parent' not being used.  To workaround, inline the
value of 'parent' as the second argument to RB_NEXT.

Reviewed by:	kp
Differential Revision:	https://reviews.freebsd.org/D34833
2022-04-08 17:25:13 -07:00
John Baldwin
834533b9c5 mlx5: Remove unused variables.
Reviewed by:	hselasky
Differential Revision:	https://reviews.freebsd.org/D34827
2022-04-08 17:25:13 -07:00
John Baldwin
6d018c93ea mlx4: Remove unused variables.
Reviewed by:	hselasky
Differential Revision:	https://reviews.freebsd.org/D34826
2022-04-08 17:25:13 -07:00
John Baldwin
516243545e mlx4: Remove a variable only used in commented-out code.
Reviewed by:	hselasky
Differential Revision:	https://reviews.freebsd.org/D34825
2022-04-08 17:25:13 -07:00
Bjoern A. Zeeb
978f25e840 LinuxKPI: 802.11: add ieee80211_beacon_get_tim(), ieee80211_sn_sub()
Add a dummy implementation for ieee80211_beacon_get_tim().
Add the implementation for ieee80211_sn_sub().

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2022-04-08 21:05:06 +00:00
Rick Macklem
21de450aa1 nfscl: Add support for a NFSv4 AppendWrite RPC
For IO_APPEND VOP_WRITE()s, the code first does a
Getattr RPC to acquire the file's size, before it
can do the Write RPC.

Although NFS does not have an append write operation,
an NFSv4 compound can use a Verify operation to check
that the client's notion of the file's size is
correct, followed by the Write operation.

This patch modifies nfscl_wcc_data() to optionally
acquire the file's size, for use with an AppendWrite.
Although the "stuff" arguments are always NULL
(these were used for the Mac OSX port and should be
cleared out someday), make the argument to
nfscl_wcc_data() explicitly NULL for clarity.

This patch does not cause any semantics change until
the AppendWrite is added in a future commit.
2022-04-08 13:59:05 -07:00
Gordon Bergling
4d6883cbe2 tcp_bbr(4): Fix a typo in a sysctl description and a comment
- s/postive/positive/

MFC after:	5 days
2022-04-08 21:08:18 +02:00
John Baldwin
6a33ecdc2f Fix a typo in previous commit.
Reported by:	npn
Pointy hat to:	jhb
Fixes:		572edd3dae vmm: Re-quiet set but unused warnings.
2022-04-08 12:01:33 -07:00
Bjoern A. Zeeb
97f2e93a66 LinuxKPI: add ALIGN_DOWN()
Add ALIGN_DOWN as rounddown2() along ALIGN() which is implemented as
roundup2().

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
Reviewed by:	manu, hselasky (now with less ())
Differential Revision: https://reviews.freebsd.org/D34844
2022-04-08 18:27:49 +00:00
Chuck Silvers
3dc5f8e19d ffs: wait for trims earlier during unmount to avoid panic
All softdep processing is supposed to be completed by
softdep_flushfiles() and no more deps are supposed to be created after
that, but if a pending trim completes after softdep_flushfiles() and
before softdep_unmount() then the blkfree that is performed by
ffs_blkfree_trim_task() will create a dep when none should exist, and
if softdep_unmount() is called before that dep is freed then the
kernel will panic.  Prevent this by waiting for trims to complete
earlier in the unmount process, in ffs_flushfiles(), so that any deps
will be freed and any modified CG buffers will be flushed by the final
fsync of the devvp in ffs_flushfiles() as intended.

Reviewed by:	mckusick, kib
Sponsored by:	Netflix
Differential Revision:	https://reviews.freebsd.org/D34806
2022-04-08 10:19:40 -07:00
Mark Johnston
aa597d4049 i386: Fix the nodevice apic build
PR:		263124
Fixes:		62d09b46ad ("x86: Defer LAPIC calibration until after timecounters are available")
Reviewed by:	kib, jhb, emaste
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D34830
2022-04-08 11:47:52 -04:00
Mark Johnston
990a6d18b0 net: Fix memory leaks in lltable_calc_llheader() error paths
Also convert raw epoch_call() calls to lltable_free_entry() calls, no
functional change intended.  There's no need to asynchronously free the
LLEs in that case to begin with, but we might as well use the lltable
interfaces consistently.

Noticed by code inspection; I believe lltable_calc_llheader() failures
do not generally happen in practice.

Reviewed by:	bz
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D34832
2022-04-08 11:47:25 -04:00
Mark Johnston
dd91d84486 net: Fix LLE lock leaks
Historically, lltable_try_set_entry_addr() would release the LLE lock
upon failure.  After some refactoring, it no longer does so, but
consumers were not adjusted accordingly.

Also fix a leak that can occur if lltable_calc_llheader() fails in the
ARP code, but I suspect that such a failure can only occur due to a code
bug.

Reviewed by:	bz, melifaro
Reported by:	pho
Fixes:		0b79b007eb ("[lltable] Restructure nd6 code.")
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D34831
2022-04-08 11:46:19 -04:00
Bjoern A. Zeeb
3443476ca9 rtw88: downgrade rtw8822c firmware to 9.9.10
Firmware version 9.9.11 added support for hw_scan and is reportedly
causing more problems than 9.9.10 does.  Until we get a chance to
test this out downgrade the firmware in order to help people testing
more.

Sponsored by:	The FreeBSD Foundation
PR:		248235
MFC after:	2 days
X-MFC:		just to get the reminder with the original commit
X-MFC with:	73d4ebea35
2022-04-08 11:14:54 +00:00
Bjoern A. Zeeb
170acccf1e LinuxKPI: 802.11: further fix RSSI calculations
60970a328e did one half of the job
of making rssi relative to nf and numbers for radiotap were fine.
net80211 internally works with .5 dBm units thus we need to apply a
* 2 to the value we pass in to c_rssi;  leave a comment explaining.

Note: it is only ifconfig in user space which re-adjust it for printing
or contrib/wpa for calculations.  Other applications getting values
from kernel also have to apply the maths.

In collaboration with:	J.R. Oldroyd (fbsd opal.com)
Sponsored by:		The FreeBSD Foundation
MFC after:		3 days
2022-04-08 11:06:58 +00:00
John Baldwin
0c348b97eb zfs: Disable -Wunused-but-set-variable for a few files in zstd.
FSE_createCTable raises the warning because we stub out malloc() to
NULL in the kernel, so the passed in size is unused.

ZSTD_seqDecompressedSize has a variable whose value is only used in
assertions.

NB: These files are missing corresponding entries in sys/conf/files.
2022-04-07 17:01:29 -07:00
John Baldwin
0768536d19 vmci: Remove unused variables. 2022-04-07 17:01:29 -07:00
John Baldwin
a7d876f701 vmm amdvi: Move ctrl under #ifdef AMDVI_DEBUG_CMD. 2022-04-07 17:01:29 -07:00
John Baldwin
572edd3dae vmm: Re-quiet set but unused warnings.
__diagused is no longer used for KTR, so instead use #ifdef KTR or
expand KTR-only variables into their values in traces.
2022-04-07 17:01:29 -07:00
John Baldwin
197b9a2ef0 atp: Remove unused variable. 2022-04-07 17:01:29 -07:00
John Baldwin
7295403595 if_urtw: Remove unused variables. 2022-04-07 17:01:29 -07:00
John Baldwin
d62a6ff38b if_upgt: Remove unused variables. 2022-04-07 17:01:29 -07:00
John Baldwin
08ff11e524 tpm: Remove unused variables.
All of the legacy config stuff in tpm seems broken.  Nothing ever sets
tpm_enabled to a non-zero value and the legacy bits expect tpm_enabled
to be set to the base IO port address (I think).
2022-04-07 17:01:29 -07:00
John Baldwin
2d9ae66d02 splash_pcx: Remove unused variables. 2022-04-07 17:01:29 -07:00
John Baldwin
bdfc2fc0c4 pcm mss: Quiet unused variable warnings.
- Remove dummy variable for a register read.  Keep the register
  read despite the dubious comment.

- Move all references to set_res under #if 0.
2022-04-07 17:01:29 -07:00
John Baldwin
eda611e45e pcm via82c686: Remove unused variables. 2022-04-07 17:01:29 -07:00
John Baldwin
11fd7ec044 pcm hdspe: Remove unused variable. 2022-04-07 17:01:29 -07:00
John Baldwin
92e7c96648 pcm envy24: Remove some dead code and associated unused variables.
The dead code was commented out in the initial import and hasn't
changed since.
2022-04-07 17:01:29 -07:00
John Baldwin
0025422091 pcm emu10k1: Remove dead code in channel_setblocksize callbacks. 2022-04-07 17:01:29 -07:00
John Baldwin
3e4aa9c629 pcm atiixp: Remove dead variable.
The Linux driver clears ATI_REG_CMD_AC_RESET and sets
ATI_REG_CMD_POWERDOWN, so writing the calculated value that sets both
would seem to be wrong.  This could be updated to match Linux's
behavior, but instead I've just left it as-is.
2022-04-07 17:01:28 -07:00
John Baldwin
771e4a8613 smbfs: Remove unused variable. 2022-04-07 17:01:28 -07:00
John Baldwin
9fe2867ce4 smbfs_rename: Move all references to flags under #ifdef notnow. 2022-04-07 17:01:28 -07:00
John Baldwin
3797f43e91 sgx: Remove unused variable. 2022-04-07 17:01:28 -07:00
John Baldwin
74f1cd7bd6 sfxge: Remove unused variables. 2022-04-07 17:01:28 -07:00
John Baldwin
50e3b6aa48 rtwn: Restore RF_ENV control type after initializing RF.
Both rwlwifi in Linux and rtwn in OpenBSD restore this register,
and the existing code was saving the value and not using it.

Reported by:	-Wunused-but-set-variable
Reviewed by:	imp
Obtained from:	OpenBSD
Differential Revision:	https://reviews.freebsd.org/D34838
2022-04-07 17:01:28 -07:00
John Baldwin
6d0a82ffc7 krping: Remove unused variable. 2022-04-07 17:01:28 -07:00
John Baldwin
5bf982c162 qlxge: Remove unused variables. 2022-04-07 17:01:28 -07:00
John Baldwin
9fa72d33d9 qlxgbe: Remove unused variables. 2022-04-07 17:01:28 -07:00
John Baldwin
10e3e53dd4 qlxgbe: Use select_value_count variable. 2022-04-07 17:01:28 -07:00
John Baldwin
ec86afafbb qlxgb: Remove unused variables. 2022-04-07 17:01:28 -07:00
John Baldwin
c9bbf99be0 qlnx: Disable unused by set warnings for ecore_ll2.c.
The OSAL_SPIN_LOCK_IRQSAVE macros take a flags argument that is unused
on FreeBSD (but used on other platforms).
2022-04-07 17:01:28 -07:00
John Baldwin
eb147f78a4 qlnx: Mark variables only used in debug traces as unused. 2022-04-07 17:01:28 -07:00
John Baldwin
ee07d71213 qlnx: Return error from qlnxr_mod_load if it fails.
Fix qlnx_rdma_register_if return ENXIO rather than -1 on error and
propagate that error to the caller in qlnxr_mod_load.
2022-04-07 17:01:27 -07:00
John Baldwin
885db9301e qlnx: Comment out remaining references to tx_data_bd. 2022-04-07 17:01:27 -07:00
John Baldwin
3415775dfa qlnx: Move all references to total_rx_count under #ifdef QLNX_SOFT_LRO. 2022-04-07 17:01:27 -07:00
John Baldwin
91aa93eb67 qlnx: Remove unused variables. 2022-04-07 17:01:27 -07:00