aboutsummaryrefslogtreecommitdiff
path: root/sys
Commit message (Collapse)AuthorAgeFilesLines
* hwreset: Move reset code in dev/hwresetEmmanuel Vadot2024-01-1087-90/+90
| | | | | | | | | | | We've removed kernel option EXT_RESOURCES almost two years ago. While it was ok to have some code under a common 'extres' subdirectory at first, we now have a lot of consumer of it and we made it mandatory so no need to have it under a cryptic name. Reviewed by: imp Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D43192
* clk: Move clock code in dev/clkEmmanuel Vadot2024-01-10263-398/+400
| | | | | | | | | | | We've removed kernel option EXT_RESOURCES almost two years ago. While it was ok to have some code under a common 'extres' subdirectory at first, we now have a lot of consumer of it and we made it mandatory so no need to have it under a cryptic name. Reviewed by: mhorne Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D43191
* usb: dwc3: Move driver under a subdirectoryEmmanuel Vadot2024-01-106-7/+7
| | | | | | | | | dwc3 is big enough to have its own subdirectory. While here only make it depend on kernel option dwc3 and rk_dwc3 without any SOC options. Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D43190
* clk: Move rockchip driver into the common directoryEmmanuel Vadot2024-01-1023-45/+45
| | | | | | | | No need to keep it under sys/arm64/rockchip/clk It's easier to find which controller we support by looking under one directory. Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D43189
* clk: Move allwinner driver into the common directoryEmmanuel Vadot2024-01-1038-73/+73
| | | | | | | | | No need to keep it under sys/arm/allwinner/clkng It's easier to find which controller we support by looking under one directory. It will also be shared with Allwinner RiscV SoC. Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D43188
* pwm: Move allwinner driver into the common directoryEmmanuel Vadot2024-01-103-2/+2
| | | | | | | | No need to keep it under sys/arm/allwinner It's easier to find which controller we support by looking under one directory. Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D43187
* pwm: Move rockchip driver into the common directoryEmmanuel Vadot2024-01-103-2/+3
| | | | | | | | No need to keep it under sys/arm64/rockchip It's easier to find which controller we support by looking under one directory. Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D43186
* spibus: Move allwinner driver into the common directoryEmmanuel Vadot2024-01-103-2/+2
| | | | | | | | No need to keep it under sys/arm/allwinner It's easier to find which controller we support by looking under one directory. Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D43185
* spibus: Move rockchip driver into the common directoryEmmanuel Vadot2024-01-103-2/+3
| | | | | | | No need to keep it under sys/arm64/rockchip It's easier to find which controller we support by looking under one directory. Sponsored by: Beckhoff Automation GmbH & Co. KG
* iicbus: Move rockchip driver into the common directoryEmmanuel Vadot2024-01-104-3/+3
| | | | | | | | | | No need to keep it under sys/arm64/rockchip It's easier to find which controller we support by looking under one directory. While here remove the condition on SOC option, device rk_i2c is enough as all Rockchip SoC that we support have this controller. Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D43184
* cr_bsd_visible(): Style fixesOlivier Certner2024-01-101-3/+6
| | | | | | | | | | | | Explicitly test for non-zero return codes. Separate assignment and testing of 'error' in distinct lines. Reviewed by: emaste, kib Approved by: emaste (mentor) MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D43335
* zfs: merge openzfs/zfs@a382e2119Martin Matuska2024-01-1012-39/+233
| | | | | | | | | | | Notable upstream pull request merges: #15693 a382e2119 Add Gotify notification support to ZED #15732 e78aca3b3 Fix livelist assertions for dedup and cloning #15733 7ecaa0758 make zdb_decompress_block check decompression reliably #15735 255741fc9 Improve block sizes checks during cloning Obtained from: OpenZFS OpenZFS commit: a382e21194c1690951d2eee8ebd98bc096f01c83
* tcpsso: fix when used without -i optionMichael Tuexen2024-01-101-16/+13
| | | | | | | | | | | | | | Since fdb987bebddf it is not possible anymore to use inp_next iterator for bound, but unconnected sockets. This applies to TCP listening sockets. Therefore the metioned commit broke tcpsso on listening sockets if the -i option was not used. Fix this by iterating through all endpoints instead of only through the bound, but unconnected ones. Reviewed by: markj Fixes: fdb987bebddf ("inpcb: Split PCB hash tables") Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D43353
* igb(4): Remove disconnected SYSCTLMarius Strobl2024-01-092-11/+0
| | | | | | | | | The global hw.igb.rx_process_limit knob never was adhered to by the in-tree version of this driver but similar functionality is available via the device-specific dev.igb.N.iflib.rx_budget. While at it, remove the - besides initialization of tx_process_limit - unused {r,t}x_process_limit members.
* e1000(4): Remove disconnected SYSCTLMarius Strobl2024-01-092-13/+0
| | | | | | | | The global hw.em.rx_process_limit knob has been replaced by the device- specific dev.IF.N.iflib.rx_budget along with the conversion to iflib(4). While at it, remove the - besides initialization of tx_process_limit - unused {r,t}x_process_limit members.
* cxgbe(4): Use the correct size for the CIM LA on the T6.Navdeep Parhar2024-01-093-3/+8
| | | | | | | | The logic analyzer in the T6 CIM block has a different capture size than previous chips. MFC after: 1 week Sponsored by: Chelsio Communications
* apei: Mark ReadAckRegister resource as shareableAndrew Gallatin2024-01-091-1/+1
| | | | | | | | | | | | Work around vendors who use the same address for multiple ReadAckRegisters in their ACPI HEST table. This allows apei to attach cleanly on Ampere Altra servers. Note the issue is not specific to Ampere, I've run into it with at least one other vendor (whose server is not yet released). Sponsored by: Netflix Reviewed by: jhb
* netlink: fix regression with group writersGleb Smirnoff2024-01-094-7/+11
| | | | | | | | | Refactoring of argument list to nl_send_one() led to derefercing wrong union member. Rename nl_send_one() to a more generic name, isolate anew nl_send_one() as the callback only for the normal writer and provide correct argument to nl_send() from nl_send_group(). Fixes: ff5ad900d2a0793659241eee96be53e6053b5081
* powerpc_mmu_radix: add leaf page for wired mappings when pmap_enter(psind=1)Robert Wing2024-01-091-0/+32
| | | | | | | | | | This applies the fix to powerpc's pmap as was done in commit aa3bcaad51076ceb and d0941ed9b5c39d92 for amd64 and riscv pmaps, respectively. Reported by: Jenkins Reviewed by: bojan.novkovic_fer.hr, markj Fixes: e4078494f344bcba8709216bd601efa3dd05f6b3 Differential Revision: https://reviews.freebsd.org/D43339
* acpi: Only reserve resources enumerated via _CRSJohn Baldwin2024-01-092-37/+0
| | | | | | | | | | | | | | | | | | | | | | | In particular, don't reserve resources added by drivers via other means (e.g. acpi_bus_alloc_gas which calls bus_alloc_resource right after adding the resource). The intention of reserved resources is to ensure that a resource range that a bus driver knows is assigned to a device is reserved by the system even if no driver is attached to the device. This prevents other "wildcard" resource requests from conflicting with these resources. For ACPI, the only resources the bus driver knows about for unattached devices are the resources returned from _CRS. All of these resources are already reserved now via acpi_reserve_resources called from acpi_probe_children. As such, remove the logic from acpi_set_resource to try to reserve resources when they are set. This permits RF_SHAREABLE to work with acpi_bus_alloc_gas without requiring hacks like the current one for CPU device resources in acpi_set_resource. Reported by: gallatin (RF_SHAREABLE not working) Diagnosed by: jrtc27
* memdesc: Helper function to construct mbuf chain backed by memdesc bufferJohn Baldwin2024-01-092-0/+510
| | | | | | | | | | | | | | | memdesc_alloc_ext_mbufs constructs a chain of external (M_EXT or M_EXTPG) mbufs backed by a data buffer described by a memory descriptor. Since memory descriptors are not an actual buffer just a description of a buffer, the caller is required to supply a couple of helper routines to manage allocation of the raw mbufs and associating them with a reference to the underlying buffer. Reviewed by: markj Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D42933
* sys: Use mbufq_empty instead of comparing mbufq_len against 0John Baldwin2024-01-098-12/+12
| | | | | | Reviewed by: bz, emaste Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D43338
* mbuf: Add mbufq_emptyJohn Baldwin2024-01-091-0/+6
| | | | | | | | Complement to the existing mbufq_full Reviewed by: bz Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D43337
* net80211 amdpu: Simplify a few loops that drain an mbufqJohn Baldwin2024-01-091-2/+2
| | | | | | | | | | These loops already handled a NULL return from mbufq_dequeue when the queue was empty, so remove a redundant check of mbufq_len before dequeueing. Reviewed by: bz Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D43336
* Intel FPGA: Support programming larger bitfiles.Ruslan Bukin2024-01-091-23/+59
| | | | | | | | | Issue data claim command after every chunk of data programmed, so we can reuse the SVC buffer for the next chunk. Tested on Terasic DE10 Pro. Sponsored by: UKRI
* sockets: on shutdown(2) do sorflush() only in case of generic sockbufGleb Smirnoff2024-01-091-1/+1
| | | | | | | | | | | | | This is a quick plug to fix panic with Netlink which has protocol specific buffers. Note that PF_UNIX/SOCK_DGRAM, which also has its own buffers, avoids the panic due to being SOCK_DGRAM. A correct but more complicated fix that needs to be done is to merge pr_shutdown, pr_flush and dom_dispose into one protocol method that may call sorflush for generic sockets or do their own stuff for protocol which has own buffers. Reviewed by: tuexen Differential Revision: https://reviews.freebsd.org/D43367 Reported-by: syzbot+a58e1615881c01a51653@syzkaller.appspotmail.com
* netlink: just return EOPNOTSUPP on shutdown(2)Gleb Smirnoff2024-01-091-10/+0
| | | | | | | This matches what Linux does. Reviewed by: melifaro, tuexen Differential Revision: https://reviews.freebsd.org/D43366
* cxgbe(4): Add support for netmap offsets.Navdeep Parhar2024-01-081-3/+11
| | | | | | PR: 253069 MFC after: 1 week Sponsored by: Chelsio Communications
* netlink: Add sysctl descriptions for net.netlink treeEd Maste2024-01-081-2/+4
| | | | | | Reviewed by: markj, melifaro Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D43368
* tcp: clean PRR state after ECN congestion recovery.Richard Scheffenegger2024-01-082-0/+3
| | | | | | | | | | PRR state was not properly reset on subsequent ECN CE events. Clean up after local transmission failures too. Reviewed by: tuexen, cc, #transport MFC after: 3 days Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D43170
* tcp: prevent spurious empty segments and fix uncommon panicRichard Scheffenegger2024-01-081-1/+9
| | | | | | | | | | | | | | | | Only try sending more data on pure ACKs when there is more data available in the send buffer. In the case of a retransmitted SYN not being sent due to an internal error, the snd_una/snd_nxt accounting could be off, leading to a panic. Pulling snd_nxt up to snd_una prevents this from happening. Reported by: fengdreamer@126.com Reviewed by: cc, tuexen, #transport MFC after: 1 week Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D43343
* ath10k/rtw89: make compile again after LinuxKPI changesBjoern A. Zeeb2024-01-082-0/+4
| | | | | | | | | | | | | | | Both drivers are not yet attached to the build so this change is for people currently trying them out. In 96ab16ebab6319dce9b3041961b0ab6e20a4fecc the sys/rman.h include was removed. In various wireless drivers we prefer to directly use bus_dma functions rather than io* LinuxKPI once. In order to cast the pointer we need sys/rman.h back for our native 'struct resource' in their pci.c implementations. Long-term we should consider providing some lkpi_-FreeBSD-specific wrapper functions to avoid this problem. MFC after: 3 days
* rtw89: improve debugging and fix a sleep issueBjoern A. Zeeb2024-01-082-0/+13
| | | | | | | | | Improve log messages to be more helpful in error cases. Change one LinuxKPI sleep function as we cannot call the original one from a context we cannot sleep. Both cases were hit during testing. MFC after: 3 days
* mii: Fix memory leak in micphy.Jiahao LI2024-01-081-0/+2
| | | | | PR: 270040 MFC after: 1 week
* puc: Add support for Exar XR17V354 Quad PCI Express UART.Teerayut Hiruntaraporn2024-01-081-0/+7
| | | | | PR: 257207 MFC after: 1 week
* ffs/ffs_rawread.c: clean up includesKonstantin Belousov2024-01-081-12/+9
| | | | | Sponsored by: The FreeBSD Foundation MFC after: 1 week
* dtrace/profile: Set t_dtrace_trapframe for profile probesMark Johnston2024-01-071-1/+6
| | | | | | | | | | profile provider probes fire in the context of a timer interrupt. Thus, the "regs" action can make use of the interrupt trap frame to get register values when the interrupt happened in kernel mode. Make that trap frame available when possible so that "regs" works more or less as it already does with the fbt and kinst providers. MFC after: 1 week
* tcp: do not purge SACK scoreboard on first RTORichard Scheffenegger2024-01-064-3/+28
| | | | | | | | | | | | Keeping the SACK scoreboard intact after the first RTO and retransmitting all data anew only on subsequent RTOs allows a more timely and efficient loss recovery under many adverse cirumstances. Reviewed By: tuexen, #transport MFC after: 10 weeks Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D42906
* tcp: Make use of enum for sack_changedRichard Scheffenegger2024-01-061-1/+2
| | | | | | | | | No functional change. Reviewed By: tuexen, #transport MFC after: 3 days Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D43346
* tcp: limit visibility of symbolsMichael Tuexen2024-01-061-6/+12
| | | | | | | | | Put most symbols under __BSD_VISIBLE and limit the namespace of tcp_[gs]et_flags. Reviewed by: kib, karels, rscheff Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D43245
* Revert "kern: console: make /dev/console backing console more predictable"Kyle Evans2024-01-051-19/+5
| | | | | | | This accidentally snuck into a different branch, and has not been reviewed for sanity yet.. This reverts commit 8ec6d7be2e27622b8b9e192b4da9ce88a4118636.
* kern: console: make /dev/console backing console more predictableKyle Evans2024-01-051-5/+19
| | | | | | | | | | | | | | | | | | | Specifically, altering the console list with conscontrol has some weird behavior: 1. If you remove the first configured console, /dev/console will become unconfigured 2. Any console added becomes the /dev/console In a multicons situation, #1 is clearly a bug and #2 is perhaps slightly less clear. If we have ttyu0, ttyv0, then it seems obvious that one would want ttyv0 to take over the console if ttyu0 is removed. If we add ttyu0 back in, then it's debatable whether it should take over the console or not. Fix it now to make the /dev/console selection more FIFO-ish, with respect to how conscontrol affects it. A `primary` verb for conscontrol(8) might be a good addition.
* jail: add security.jail.mlock_allowedBaptiste Daroussin2024-01-051-0/+4
| | | | | | | | | | when the parameter allow.mlock was added a way for jails to check if the parameter was set or now has not been added, this change covers it. MFC After: 3 days Reviewed by: jamie@ Differential Revision: https://reviews.freebsd.org/D43314
* nfsclient: limit situations when we do unlocked read-ahead by nfsiodKonstantin Belousov2024-01-051-2/+9
| | | | | | | | | | | If there were or are writeable mappings, read-ahead might overwrite the dirty pages data that is not yet reflected as a delayed write in the matching buffer state. Noted by: rmacklem Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week
* vtruncbuf: improve the check for meta bufferKonstantin Belousov2024-01-051-1/+1
| | | | | | | | | | | | | | Revision e99215a614675 reorganized the code in vtruncbuf(), and moved the logic to flush meta buffers into a dedicated loop. While doing it, the condition was changed from bp->b_lblkno < 0 (to handle) into bp->b_lblkno > 0 (to skip), which causes buffer at lblkno to needlessly flush. Reviewed by: chs, markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D43261
* vtruncbuf: add a comment explaining the purpose of the loopKonstantin Belousov2024-01-051-0/+3
| | | | | | | Reviewed by: chs, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D43261
* nfsclient: eliminate ncl_writebp()Konstantin Belousov2024-01-055-75/+2
| | | | | | | | | | | | Use plain bufwrite() instead. ncl_writebp() evolved to mostly repeat bufwrite() code with some ommisions, most notably runningbufspace accounting. Reviewed by: imp, markj, rmacklem Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D43249
* nfsclient: flush dirty pages of the vnodeKonstantin Belousov2024-01-051-6/+39
| | | | | | | | | | | | | | | | | before ncl_flush() when done to ensure that the server sees our cached data, because it potentially changes the server response. This is relevant for copy_file_range(), seek(), and allocate(). Convert LK_SHARED invp lock into LK_EXCLUSIVE if needed to properly call vm_object_page_clean(). Reported by: asomers PR: 276002 Noted and reviewed by: rmacklem Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D43250
* nfsclient copy_file_range(): flush dst vnode dataKonstantin Belousov2024-01-051-1/+1
| | | | | | | | | | | | | Otherwise server-side copy makes the client cache inconsistent with the server data. Reported by: asomers PR: 276002 Reviewed by: rmacklem Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D43250
* mlx5(4): only detach IOV children if iov was successfully initializedKonstantin Belousov2024-01-052-3/+10
| | | | | | Reported by: jwd Sponsored by: NVidia networking MFC after: 1 week