Commit Graph

277654 Commits

Author SHA1 Message Date
Konrad Sewiłło-Jopek
31ee3a33aa TPM: do not set device description if probe fails
device_set_desc should be called only if driver probes successfully.

Approved by:	mw(mentor)
Reviewed by:	mw, kd
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D35998
2022-08-16 11:07:12 +02:00
Navdeep Parhar
a8dc67388a cxgbe(4): Add a knob to request that clocks be gated on suspend.
MFC after:	3 months
Sponsored by:	Chelsio Communications
2022-08-16 01:08:35 -07:00
Navdeep Parhar
a7d081a8ce cxgbe(4): Decode and display some more bits in the PL interrupt handler.
MFC after:	1 week
Sponsored by:	Chelsio Communications
2022-08-16 01:07:36 -07:00
Navdeep Parhar
2bb28b5f8c cxgbe(4): Update firmwares to 1.27.0.0.
Changes since 1.26.6.0 are listed here.  This list comes from the
Release Notes for "Chelsio Unified Wire 3.17.0.0 for Linux" dated
2022-07-29.

Fixes
-----

BASE:
- Enabled all MA parity interrupt bits.
- Use config file value to override number of rx channel. nrxch=1 was not
  handled in the firmware.
- Replaced read only registers with new registers EDC_H_BIST_USER_WDATA0,
  EDC_H_BIST_USER_WDATA1 and EDC_H_BIST_CMD_LEN to dump the uP memory parity
  error status registers.
- 10G simplex module support enabled.

Obtained from:	Chelsio Communications
MFC after:	1 month
Sponsored by:	Chelsio Communications
2022-08-16 01:06:32 -07:00
Søren Schmidt
66a3e51341 Add RockChip rk809/rk817 pmic support to existing
RockChip pmic drivers.

Reviewed by:	manu
Differential Revision:	https://reviews.freebsd.org/D36149
2022-08-16 07:55:18 +00:00
Li-Wen Hsu
b80572fe3b
libc/locale tests: temporarily skip lib.libc.locale.c16rtomb_test.c16rtomb_utf_8_test
This test case starts failing after iconv changes on 2022-08-11.

PR:		265871
Sponsored by:	The FreeBSD Foundation
2022-08-16 13:18:15 +08:00
Philip Paeps
5f33eb7266 contrib/tzdata: import tzdata 2022c
Changes: https://github.com/eggert/tz/blob/2022c/NEWS

MFC after:	1 day
2022-08-16 10:54:37 +08:00
Herbert J. Skuhra
f5d5282cf7 ObsoleteFiles: don't delete zoneinfo/GMT
The tzdata2022b import restored the zoneinfo/GMT link.
Don't delete it again with 'make delete-old'.

MFC after:	1 day
2022-08-16 10:53:08 +08:00
Philip Paeps
adf59137a1 Import tzdata 2022c 2022-08-16 10:34:28 +08:00
Kirk McKusick
82493ff700 Add a description of soft updates journaling to tunefs(8).
Add a descrition to the tunefs(8) -j (journal enablement) flag
that explains what soft updates journaling does, the tradeoffs
to using it, and the limitations that it imposes.

Requested by: Graham Perrin
PR:           261944
Sponsored by: The FreeBSD Foundation
2022-08-15 13:45:48 -07:00
Mateusz Guzik
88a782fc84 routing: G/C rt_exportinfo declaration
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2022-08-15 20:38:31 +00:00
Jens Schweikhardt
20f68c5f2d Indicate that xrefs to *roff,tbl,eqn et al are found in ports/textproc/groff. 2022-08-15 22:15:18 +02:00
Dimitry Andric
da36b5d244 Adjust function definition in riscv's db_trace.c to avoid clang 15 warning
With clang 15, the following -Werror warning is produced:

    sys/riscv/riscv/db_trace.c:56:23: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
    db_md_list_watchpoints()
                          ^
                           void

This is because db_md_list_watchpoints() is declared with a (void)
argument list, but defined with an empty argument list. Make the
definition match the declaration.

MFC after:	3 days
2022-08-15 20:48:35 +02:00
Dimitry Andric
02dd51c9bc Adjust function definitions in mp_cpudep.c.c to avoid clang 15 warnings
With clang 15, the following -Werror warnings are produced:

    sys/powerpc/booke/mp_cpudep.c:54:20: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
    cpudep_ap_bootstrap()
                       ^
                        void
    sys/powerpc/booke/mp_cpudep.c:97:16: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
    cpudep_ap_setup()
                   ^
                    void

This is because cpudep_ap_bootstrap() and cpudep_ap_setup() are declared
with (void) argument lists, but defined with empty argument lists. Make
the definitions match the declarations.

MFC after:	3 days
2022-08-15 20:48:35 +02:00
Dimitry Andric
ff490346fd Adjust function definition in moea64_native.c to avoid clang 15 warning
With clang 15, the following -Werror warning is produced:

    sys/powerpc/aim/moea64_native.c:306:22: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
    moea64_install_native()
                         ^
                          void

This is because moea64_install_native() is declared with a (void)
argument list, but defined with an empty argument list. Make the
definition match the declaration.

MFC after:	3 days
2022-08-15 20:48:35 +02:00
Dimitry Andric
3446738e8d Fix unused variable warning in mmu_radix.c
With clang 15, the following -Werror warning is produced:

    sys/powerpc/aim/mmu_radix.c:5409:22: error: variable 'freed' set but not used [-Werror,-Wunused-but-set-variable]
            int allfree, field, freed, idx;
                                ^

The 'freed' variable is only used when PV_STATS is defined. Ensure it is
only declared and set in that case.

MFC after:	3 days
2022-08-15 20:48:34 +02:00
Dimitry Andric
fb203abd9d Adjust function definitions in mmu_radix.c to avoid clang 15 warnings
With clang 15, the following -Werror warnings are produced:

    sys/powerpc/aim/mmu_radix.c:786:20: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
    mmu_radix_tlbie_all()
                       ^
                        void
    sys/powerpc/aim/mmu_radix.c:3615:15: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
    mmu_radix_init()
                  ^
                   void
    sys/powerpc/aim/mmu_radix.c:6081:20: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
    mmu_radix_scan_init()
                       ^
                        void

This is because mmu_radix_tlbie_all(), mmu_radix_init(), and
mmu_radix_scan_init() are declared with (void) argument lists, but
defined with empty argument lists. Make the definitions match the
declarations.

MFC after:	3 days
2022-08-15 20:48:34 +02:00
Dimitry Andric
7a98c884f2 Adjust function definitions in mmu_oea64.c to avoid clang 15 warnings
With clang 15, the following -Werror warnings are produced:

    sys/powerpc/aim/mmu_oea64.c:1947:12: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
    moea64_init()
               ^
                void
    sys/powerpc/aim/mmu_oea64.c:3257:17: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
    moea64_scan_init()
                    ^
                     void

This is because moea64_init() and moea64_scan_init() are declared with
(void) argument lists, but defined with empty argument lists. Make the
definitions match the declarations.

MFC after:	3 days
2022-08-15 20:48:34 +02:00
Dimitry Andric
06fce030e7 Adjust function definition in aim_machdep.c to avoid clang 15 warning
With clang 15, the following -Werror warning is produced:

    sys/powerpc/aim/aim_machdep.c:750:14: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
    mpc745x_sleep()
                 ^
                  void

This is because mpc745x_sleep() is declared with a (void) argument list,
but defined with an empty argument list. Make the definition match the
declaration.

MFC after:	3 days
2022-08-15 20:48:34 +02:00
Dimitry Andric
b33bfe6e15 Fix unused variable warnings in tcp_hpts.c
With clang 15, the following -Werror warning is produced:

    sys/netinet/tcp_hpts.c:1114:10: error: variable 'paced_cnt' set but not used [-Werror,-Wunused-but-set-variable]
            int32_t paced_cnt = 0;
                    ^
    sys/netinet/tcp_hpts.c:1112:11: error: variable 'total_slots_processed' set but not used [-Werror,-Wunused-but-set-variable]
            uint64_t total_slots_processed = 0;
                     ^

The 'paced_cnt' variable was in tcp_hpts.c when it was first added, and
the 'total_slots_processed' variable was added in d7955cc0ff, but
both appear to have been debugging aids that have never been used, so
remove them.

MFC after:	3 days
2022-08-15 20:48:34 +02:00
Dimitry Andric
db6b32867d Adjust function definition in tcp_hpts.c to avoid clang 15 warning
With clang 15, the following -Werror warning is produced:

    sys/netinet/tcp_hpts.c:1594:23: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
    tcp_choose_hpts_to_run()
                          ^
                           void

This is because tcp_choose_hpts_to_run() is declared with a (void)
argument list, but defined with an empty argument list. Make the
definition match the declaration.

MFC after:	3 days
2022-08-15 20:48:33 +02:00
Dimitry Andric
9407408915 Adjust function definition in arm64's db_trace.c to avoid clang 15 warning
With clang 15, the following -Werror warning is produced:

    sys/arm64/arm64/db_trace.c:53:23: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
    db_md_list_watchpoints()
                          ^
                           void

This is because db_md_list_watchpoints() is declared with a (void)
argument list, but defined with an empty argument list. Make the
definition match the declaration.

MFC after:	3 days
2022-08-15 20:48:33 +02:00
Dimitry Andric
402dbdd98a Adjust function definition in arm's mv_common.c to avoid clang 15 warning
With clang 15, the following -Werror warning is produced:

    sys/arm/mv/mv_common.c:414:20: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
    mv_check_soc_family()
                       ^
                        void

This is because mv_check_soc_family() is declared with a (void) argument
list, but defined with an empty argument list. Make the definition match
the declaration.

MFC after:	3 days
2022-08-15 20:48:33 +02:00
Warner Losh
729c458bf7 stand: Abstract out fstab creation
Now that all the fstabs are the same, abstract it out into a function.

Sponsored by:		Netflix
2022-08-15 12:46:31 -06:00
Warner Losh
26a241a0e2 stand: Update GELI UFS cases to use ufs labels
GELI images are created in a different manner than non-GELI
images. Update them to set the label of 'root' on the UFS partition and
use that in fstab. Drop comments about needing to do this, as well as
the 'dev' variable now that it's unused.

Sponsored by:		Netflix
2022-08-15 12:38:32 -06:00
Warner Losh
159b158a1d stand: Update testing harness to start to use UFS labels
Minor changes to the non-geli UFS targets: migrate to using ufs labels
so we don't need to know the name of the device we booted off of. This
doesn't change the GELI test cass just yet since I've not tested them.
ZFS doesn't need these changes since we don't need to encode the device
for it.

Sponsored by:		Netflix
2022-08-15 12:38:32 -06:00
Warner Losh
aff95057bc stand: Update testing script for arch retirement
And catch up to changes in booting methods currently supported. Add
riscv.

Sponsored by:		Netflix
2022-08-15 12:38:32 -06:00
Toomas Soome
d98de74405 loader: zfs reader should only store devdesc in f_devdata
Use d_opendata for device specific data.

PR:		265825
Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D36202
2022-08-15 21:07:23 +03:00
En-Wei Wu
c0b65123d0 wtap: Implement IBSS mode on wtap(4)
For TSF and beacon generation, each STA has to start its local TSF timer
and sends beacon frames when it reaches the state IEEE80211_S_RUN.
The TSF timer will be used for IBSS merge and beacon frame transmission.

The TSF timer is kept in the HAL of wtap(4). It is working by
continuously updating its value on timer interrupt simulated
by callout_reset().

When receiving beacons, the STA will be merged into the IBSS if
- the STA has the same SSID as the beacon sender
- the STA's TSF timer is smaller than the beacon sender's TSF timer.

After the merging process, the younger STA will be in the IBSS
created by the older STA and the younger STA stops sending beacon
frames.  So beacon frames will always be sent by the oldest STA
in IBSS.

Sponsored by:	Google, Inc. (GSoC 2022)
Reviewed By:	lwhsu, adrian
Differential Revision: https://reviews.freebsd.org/D35841
2022-08-15 16:35:36 +00:00
Konstantin Belousov
c9e4d25052 iommu_gas: add iommu_gas_remove()
The function removes the range of addresses from GAS.  Right now it is
unused.

The initial version of the patch was extracted from the stalled work for
integration of DMAR and bhyve, see D25672. Having the function in the
main tree would allow it to co-evolve with other active changes to the
IOMMU driver.

Requested by:	alc
Reviewed by:	alc, dougm
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D36001
2022-08-15 17:54:57 +03:00
Franco Fichtner
c9be47b34d rc: add ${name}_setup script support
Run a service-based setup script before running the start command.
Useful for automatic configuration file generation.

Reviewed by:	https://reviews.freebsd.org/D36006
2022-08-15 16:43:12 +02:00
Søren Schmidt
530d5f8338 Add RockChip RK356X support to existing RockChip iodomain driver. 2022-08-15 12:03:28 +00:00
Wei Hu
fa2d4a22fa mana: add rmb load fence to comply with hw spec
To ensure software reads fresh data after observing ownership bits.

Sponsored by:	Microsoft
2022-08-15 07:39:15 +00:00
Wei Hu
795a997414 Hyper-V: storvsc: Call bus_dmamap_sync() for dma operations
Call bus_dmamap_sync() for related dma operations. This is required
on ARM64 architecture.

Tested by:	Souradeep Chakrabarti <schakrabarti@microsoft.com>
MFC after:	2 weeks
Sponsored by:	Microsoft
2022-08-15 07:05:43 +00:00
Alexander V. Chernikov
036f1bc613 routing: retire rib_lookup_info()
This function was added in pre-epoch era ( 9a1b64d5a0 ) to
 provide public rtentry access interface & hide rtentry internals.
The implementation is based on the large on-stack copying and
 refcounting of the referenced objects (ifa/ifp).
It has become obsolete after epoch & nexthop introduction. Convert
 the last remaining user and remove the function itself.

Differential Revision: https://reviews.freebsd.org/D36197
2022-08-15 06:46:30 +00:00
Mark Johnston
35b587464a makefs tests: Skip a ZFS regression test in CI
It triggers panics after the latest OpenZFS import.

PR:		265849
2022-08-14 21:37:41 -04:00
Dimitry Andric
57cdd13d07 Suppress unused variable warning in tcp_stacks's rack.c
With clang 15, the following -Werror warning is produced:

    sys/netinet/tcp_stacks/rack.c:17405:12: error: variable 'outstanding' set but not used [-Werror,-Wunused-but-set-variable]
                    uint32_t outstanding;
                             ^

The 'outstanding' variable was used later in the rack_output() function,
but refactoring in 35c7bb3407 removed the usage. To avoid too much
code churn, mark the variable unused to supress the warning.

MFC after:	3 days
2022-08-14 21:27:35 +02:00
Dimitry Andric
e967183cb0 Fix unused variable warning in tcp_stacks's rack.c
With clang 15, the following -Werror warning is produced:

    sys/netinet/tcp_stacks/rack.c:16148:6: error: variable 'cnt_thru' set but not used [-Werror,-Wunused-but-set-variable]
            int cnt_thru = 1;
                ^

The 'cnt_thru' variable is only used when TCP_ACCOUNTING is defined.
Ensure it is only declared and set in that case.

MFC after:	3 days
2022-08-14 21:27:34 +02:00
Dimitry Andric
7624896571 Fix unused variable warning in tcp_stacks's bbr.c
With clang 15, the following -Werror warning is produced:

sys/netinet/tcp_stacks/bbr.c:11925:11: error: variable 'rtr_cnt' set but not used [-Werror,-Wunused-but-set-variable]
        uint32_t rtr_cnt = 0;
                 ^

The 'rtr_cnt' variable was in bbr.c when it was first added, but it
appears to have been a debugging aid that has never been used, so remove
it.

MFC after:	3 days
2022-08-14 21:27:34 +02:00
Dimitry Andric
9762d48b7f Adjust function definition in kern_poll.c to avoid clang 15 warning
With clang 15, the following -Werror warning is produced:

    sys/kern/kern_poll.c:374:16: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
    netisr_pollmore()
                   ^
                    void

This is because netisr_pollmore() is declared with a (void) argument
list, but defined with an empty argument list. Make the definition match
the declaration.

MFC after:	3 days
2022-08-14 21:27:34 +02:00
Dimitry Andric
7a7bbe1021 Adjust function definition in drm_fb_helper.c to avoid clang 15 warning
With clang 15, the following -Werror warning is produced:

    sys/dev/drm2/drm_fb_helper.c:86:18: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
    framebuffer_alloc()
                     ^
                      void

This is because framebuffer_alloc() is declared with a (void) argument
list, but defined with an empty argument list. Make the definition match
the declaration.

MFC after:	3 days
2022-08-14 21:27:34 +02:00
Dimitry Andric
0beb88a242 Adjust function definition in riscv's dtrace_subr.c to avoid clang 15 warning
With clang 15, the following -Werror warning is produced:

    sys/cddl/dev/dtrace/riscv/dtrace_subr.c:165:17: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
    dtrace_gethrtime()
                    ^
                     void

This is because dtrace_gethrtime() is declared with a (void) argument
list, but defined with an empty argument list. Make the definition match
the declaration.

MFC after:	3 days
2022-08-14 21:27:34 +02:00
Dimitry Andric
7701f30159 Adjust function definition in powerpc's dtrace_subr.c to avoid clang 15 warning
With clang 15, the following -Werror warning is produced:

    sys/cddl/dev/dtrace/powerpc/dtrace_subr.c:237:17: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
    dtrace_gethrtime()
                    ^
                     void

This is because dtrace_gethrtime() is declared with a (void) argument
list, but defined with an empty argument list. Make the definition match
the declaration.

MFC after:	3 days
2022-08-14 21:27:34 +02:00
Dimitry Andric
7357c2e5a6 Adjust function definition in arm's dtrace_subr.c to avoid clang 15 warning
With clang 15, the following -Werror warning is produced:

    sys/cddl/dev/dtrace/arm/dtrace_subr.c:174:17: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
    dtrace_gethrtime()
                    ^
                     void

This is because dtrace_gethrtime() is declared with a (void) argument
list, but defined with an empty argument list. Make the definition match
the declaration.

MFC after:	3 days
2022-08-14 21:27:34 +02:00
Dimitry Andric
0fe8ab6851 Fix unused variable warning in rockchip's rk_spi.c
With clang 15, the following -Werror warning is produced:

    sys/arm64/rockchip/rk_spi.c:229:6: error: variable 'cnt' set but not used [-Werror,-Wunused-but-set-variable]
            int cnt = 0;
                ^

The 'cnt' variable was in rk_spi.c when it was first added, but it
appears to have been a debugging aid that has never been used, so remove
it.

MFC after:	3 days
2022-08-14 21:27:34 +02:00
Jessica Clarke
762dcf1064 goldfish_rtc: Fix handling a local time RTC
The default QEMU config is to have the RTC in UTC. However, if run with
-rtc base=localtime (and wall_cmos_clock is set to match), the driver
fails to account for adjkerntz due to the use of CLOCKF_SETTIME_NO_ADJ.
Copy the same code used by other CLOCKF_SETTIME_NO_ADJ-using drivers
to fix this, namely manually subtracting utc_offset().

Fixes:		d63a631e72 ("Add Goldfish RTC device driver for RISC-V")
MFC after:	1 week
2022-08-14 19:50:22 +01:00
Wanpeng Qian
9f678cfcb4 bhyve nvme: Fix firmware read only initialization
Summary:
Code was using the mask value without the shift.

Test Plan: Within FreeBSD/Linux guest, Identify NVMe controller to check the result.

Reviewed by:	chuck, imp
MFC after:	2 weeks
Signed-off-by:	Wanpeng Qian <wanpengqian@gmail.com>
Differential Revision: https://reviews.freebsd.org/D32659
2022-08-14 09:59:36 -07:00
WanpengQian
3cae10048d bhyve nvme: Fix Active Firmware Info
Summary:
Currently Active Firmware Info is not initialized.

Fix is to initialize the Active Firmware Info to Slot 1.

Test Plan: Within FreeBSD/Linux guests, show the Firmware Logpage to confirm.

Reviewed By:	chuck
MFC after:	2 weeks
Differential Revision: https://reviews.freebsd.org/D32658
2022-08-14 09:59:36 -07:00
WanpengQian
eae0210cdd bhyve: Fix Number of Power States Supported value
Summary:
Set Number of Power States Supported to indicate 1 power state. Keep the
Power State Descriptor data structures as zero to indicate "Not
reported".

Test Plan:
Within FreeBSD/Linux guests, list the number of power states and check
the Max Power value.

Reviewed By:	markj, chuck
MFC after:	2 weeks
Signed-off-by:	Wanpeng Qian <wanpengqian@gmail.com>
Differential Revision: https://reviews.freebsd.org/D32657
2022-08-14 09:59:36 -07:00
Adrian Chadd
2889cbe29e net80211: add an IEEE80211_IS_PROTECTED() macro
Summary: This returns whether the given 802.11 frame has the protected bit set.

Test Plan:
* tested in AP/STA mode
* STA mode - local athp/ath10k driver
* AP mode - in tree ath driver

Subscribers: imp, melifaro, glebius
Reviewed by: bz
Approved by: bz

Differential Revision: https://reviews.freebsd.org/D36183
2022-08-14 09:48:06 -07:00