summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2026-07-21Merge branch 'pds_core-fix-use-after-free-on-workqueue-during-remove'Jakub Kicinski2-9/+17
Nikhil P. Rao says: ==================== pds_core: fix use-after-free on workqueue during remove This series fixes a use-after-free on the workqueue during driver remove. Patch 1 fixes a pre-existing deadlock between the PCI reset worker and pdsc_remove() that was identified during review of v1. Patch 2 is the reworked UAF fix that moves destroy_workqueue() after pdsc_teardown() and adds proper work synchronization. ==================== Link: https://patch.msgid.link/20260714180223.1642792-1-nikhil.rao@amd.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-07-21pds_core: fix use-after-free on workqueue during removeNikhil P. Rao2-6/+13
In pdsc_remove(), the workqueue is destroyed before pdsc_teardown() is called. This ordering allows two paths to queue work on the destroyed workqueue: 1. If pdsc_teardown() -> pdsc_devcmd_reset() times out, the error path in pdsc_devcmd_locked() queues health_work. 2. A NotifyQ event can trigger the ISR and queue work before free_irq() is called in pdsc_teardown(). Fix by moving destroy_workqueue() after pdsc_teardown() so the workqueue outlives every queuer; destroy_workqueue() then flushes any work still pending. Draining the queued work also requires ordering the teardown so the resources that work touches are freed last: - In pdsc_qcq_free(), after freeing the interrupt, cancel_work_sync() the queue's work and only then clear qcq->intx, so pdsc_process_adminq()'s read of qcq->intx for interrupt-credit return cannot race with the clear. - Free adminqcq before notifyqcq: the shared adminq ISR is released when adminqcq is freed, and the adminq work accesses notifyqcq, so both must be stopped before notifyqcq is freed. Fixes: 01ba61b55b20 ("pds_core: Add adminq processing and commands") Reported-by: sashiko-bot <sashiko-bot@kernel.org> Closes: https://patchwork.kernel.org/comment/27002369/ Signed-off-by: Nikhil P. Rao <nikhil.rao@amd.com> Link: https://patch.msgid.link/20260714180223.1642792-3-nikhil.rao@amd.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-07-21pds_core: fix deadlock between reset thread and removeNikhil P. Rao1-3/+4
pci_reset_function() acquires device_lock before performing the reset. pdsc_remove() is called by the PCI core with device_lock already held. If pdsc_pci_reset_thread() is running when pdsc_remove() is called, destroy_workqueue() will block waiting for the work to complete, while the work is blocked waiting for device_lock - deadlock. Use pci_try_reset_function() which uses pci_dev_trylock() internally. This acquires both the device lock and the PCI config access lock without blocking - if either lock is contended, it returns -EAGAIN immediately. This avoids the deadlock while also ensuring proper config space access serialization during the reset. The pci_dev_get/put calls are also removed as they were unnecessary - the driver-owned workqueue is destroyed in pdsc_remove(), guaranteeing the work completes before remove returns. The PCI core holds its reference to pci_dev throughout the entire unbind sequence. Fixes: 81665adf25d2 ("pds_core: Fix pdsc_check_pci_health function to use work thread") Reported-by: sashiko-bot <sashiko-bot@kernel.org> Closes: https://patchwork.kernel.org/comment/27002369/ Signed-off-by: Nikhil P. Rao <nikhil.rao@amd.com> Reviewed-by: Harshitha Ramamurthy <hramamurthy@google.com> Link: https://patch.msgid.link/20260714180223.1642792-2-nikhil.rao@amd.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-07-21mailmap: fix wrong canonical name for mgr@kernel.orgMichael Grzeschik1-2/+2
After picking up some pending patches for the kernel to work on, I realized my name in the mailmap file somehow got mixed up. When switching to my kernel.org Address some time ago, I had never the intention to use a scrambled variant of Polish and German used for my first name to be found in this file. However, so here we are. Lets fix it for good. Signed-off-by: Michael Grzeschik <mgr@kernel.org> Link: https://patch.msgid.link/20260713-mailmap-v1-1-cb40979cb190@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-07-21sctp: fix auth_chunk_list capacity check in sctp_auth_ep_add_chunkidHanQuan1-1/+1
sctp_auth_ep_add_chunkid() uses SCTP_NUM_CHUNK_TYPES (20) as the capacity limit for ep->auth_chunk_list, allowing it to hold up to 20 chunk entries (param_hdr.length up to 24). However, the copy destination asoc->c.auth_chunks in struct sctp_cookie is only SCTP_AUTH_MAX_CHUNKS (16) entries (20 bytes). When more than 16 chunks are added, sctp_association_init() memcpy overflows the destination by up to 4 bytes. Fix by using SCTP_AUTH_MAX_CHUNKS as the capacity limit, matching the destination capacity. Fixes: 1f485649f529 ("[SCTP]: Implement SCTP-AUTH internals") Signed-off-by: HanQuan <eilaimemedsnaimel@gmail.com> Acked-by: Xin Long <lucien.xin@gmail.com> Link: https://patch.msgid.link/20260713032021.3491702-1-zhoujian.zja@antgroup.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-07-21ACPI: NHLT: Remove always included kconfig.hAndy Shevchenko1-1/+0
The inclusion of <linux/kconfig.h> is unneeded as it's guaranteed by the build starting from the commit 2a11c8ea20bf ("kconfig: Introduce IS_ENABLED(), IS_BUILTIN() and IS_MODULE()"). Remove it here. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20260717171635.1783543-1-andriy.shevchenko@linux.intel.com Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2026-07-21Merge branch 'align-ipv4-teardown-with-ipv6-and-fix-driver-regressions'Jakub Kicinski3-9/+5
Yuyang Huang says: ==================== align IPv4 teardown with IPv6 and fix driver regressions This series aligns the IPv4 address teardown sequence with IPv6 by clearing dev->ip_ptr early in inetdev_destroy() before freeing the multicast list and individual IP addresses. This prevents RCU readers from accessing a partially destroyed in_device structure. However, clearing dev->ip_ptr early causes __in_dev_get_rtnl() to return NULL during the notifier loop in inetdev_destroy(). This causes regressions in some drivers (prestera and mac80211) that use this lookup helper in their inetaddr notifier callbacks. To prevent regressions and maintain bisectability, this series first fixes the affected drivers (Patch 1 and 2) before applying the core IPv4 change (Patch 3). An audit was performed on all other registered inetaddr and inet6addr notifier listeners, and no other drivers were found to be affected. ==================== Link: https://patch.msgid.link/20260711005405.2861680-1-yuyanghuang@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-07-21net: ipv4: clear dev->ip_ptr before destroying inetdevYuyang Huang1-2/+2
To prevent RCU readers from accessing a partially destroyed in_device, clear dev->ip_ptr early in inetdev_destroy() before freeing the multicast list and individual IP addresses. This aligns the IPv4 teardown sequence with the IPv6 implementation. Cc: Kuniyuki Iwashima <kuniyu@google.com> Signed-off-by: Yuyang Huang <yuyanghuang@google.com> Reviewed-by: Ido Schimmel <idosch@nvidia.com> Link: https://patch.msgid.link/20260711005405.2861680-4-yuyanghuang@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-07-21wifi: mac80211: use ifa_dev from event argumentYuyang Huang1-3/+1
During address teardown, the netdevice's ip_ptr might be cleared before the inetaddr notifier is called. In this case, __in_dev_get_rtnl() returns NULL, causing the notifier to abort early and fail to update the ARP filter. Fix this by using the in_device pointer from the event argument (ifa->ifa_dev) which is guaranteed to be valid. Cc: Ido Schimmel <idosch@nvidia.com> Cc: Kuniyuki Iwashima <kuniyu@google.com> Signed-off-by: Yuyang Huang <yuyanghuang@google.com> Link: https://patch.msgid.link/20260711005405.2861680-3-yuyanghuang@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-07-21net: prestera: ignore duplicate RIF destruction eventsYuyang Huang1-4/+2
During address teardown, the inetaddr notifier may be called multiple times for the same interface. Ignore NETDEV_DOWN events if the RIF has already been destroyed, rather than returning -EEXIST, which aborts the notifier chain. Cc: Ido Schimmel <idosch@nvidia.com> Cc: Kuniyuki Iwashima <kuniyu@google.com> Signed-off-by: Yuyang Huang <yuyanghuang@google.com> Link: https://patch.msgid.link/20260711005405.2861680-2-yuyanghuang@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-07-21net: txgbe: fix FDIR filter leak on removeChenguang Zhao1-0/+1
Perfect FDIR filters can be added while the interface is down and are kept on the software list for later restore. unregister_netdev() only calls ndo_stop when the device is up, so txgbe_fdir_filter_exit() in txgbe_close() is skipped in that case and the filters are leaked on driver remove. Free the filter list from txgbe_remove() as well. Fixes: 4bdb441105dc ("net: txgbe: support Flow Director perfect filters") Signed-off-by: Chenguang Zhao <zhaochenguang@kylinos.cn> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com> Link: https://patch.msgid.link/20260713091911.1614795-1-chenguang.zhao@linux.dev Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-07-21ACPI: fan: Update ACPI fan IDs to follow modern styleAndy Shevchenko1-11/+11
Follow modern style of defining ACPI IDs by using C99 initialisers. This is a missing part to bigger rework that's ongoing in the kernel. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Armin Wolf <W_Armin@gmx.de> Link: https://patch.msgid.link/20260717170951.1782863-3-andriy.shevchenko@linux.intel.com Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2026-07-21ACPI: fan: Don't use "proxy" headersAndy Shevchenko1-1/+2
Update header inclusions to follow IWYU (Include What You Use) principle. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Armin Wolf <W_Armin@gmx.de> Link: https://patch.msgid.link/20260717170951.1782863-2-andriy.shevchenko@linux.intel.com Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2026-07-21Merge branch 'riscv-bpf-add-support-for-signed-operations-and-32-bit-atomics'Kumar Kartikeya Dwivedi1-16/+95
Kuan-Wei Chiu says: ==================== riscv, bpf: Add support for signed operations and 32-bit atomics Add support for missing signed operations and 32-bit atomics in the RV32 BPF JIT compiler. The current implementation lacks support for BPF_SDIV, BPF_SMOD, and BPF_MOVSX, ignoring the instruction offset field and treating them as unsigned or zero-extended. Introduce support for these operations by checking the offset field and emitting the corresponding instructions. Additionally, we leverage the mandatory A extension to natively support 32-bit BPF atomics (and, or, xor, xchg) by mapping them directly to amo*.w instructions. BPF_CMPXCHG continues to fall back to the interpreter. As a result, test_bpf.ko now runs with 0 failures, and the total number of successfully JIT'ed test cases increases from 843 to 902. Tested-by: Pu Lehui <pulehui@huawei.com> --- Changes in v4: - Add a 'dst' param to emit_bpf_atomic(). Changes in v3: - Pass insn directly to emit_alu_r32(). - Remove the Fixes: tag and update title. - Consolidate size, mode, and off into insn for emit_store_r64(). Changes in v2: - Add missing Fixes tags. - Fix memory ordering by emitting aq=1, rl=1 Kuan-Wei Chiu (3): riscv, bpf: Add support for BPF_SDIV and BPF_SMOD in RV32 JIT riscv, bpf: Add support for BPF_MOVSX in RV32 JIT riscv, bpf: Add 32 bit atomic operations to RV32 JIT arch/riscv/net/bpf_jit_comp32.c | 111 +++++++++++++++++++++++++++----- 1 file changed, 95 insertions(+), 16 deletions(-) ==================== Link: https://patch.msgid.link/20260714002451.4091139-1-visitorckw@gmail.com Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
2026-07-21riscv, bpf: Add 32 bit atomic operations to RV32 JITKuan-Wei Chiu1-11/+53
The RV32 BPF JIT compiler currently only supports the BPF_ADD atomic operation. Other 32 bit atomic operations (and, or, xor, xchg) and their BPF_FETCH variants are not supported and gracefully fall back to the interpreter. Since the RISC-V A extension is required for Linux on RV32, we can natively support these 32-bit BPF atomic operations by mapping them directly to the corresponding RISC-V amo*.w instructions. Implement BPF_ADD, BPF_AND, BPF_OR, BPF_XOR, and BPF_XCHG with and without BPF_FETCH. BPF_CMPXCHG requires a more complex lr.w/sc.w loop and is left to fall back to the interpreter. Before this patch: [ 138.862161] test_bpf: Summary: 1054 PASSED, 0 FAILED, [843/1042 JIT'ed] After this patch: [ 157.024124] test_bpf: Summary: 1054 PASSED, 0 FAILED, [902/1042 JIT'ed] Signed-off-by: Kuan-Wei Chiu <visitorckw@gmail.com> Reviewed-by: Pu Lehui <pulehui@huawei.com> Link: https://lore.kernel.org/bpf/20260714002451.4091139-4-visitorckw@gmail.com Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
2026-07-21riscv, bpf: Add support for BPF_MOVSX in RV32 JITKuan-Wei Chiu1-0/+32
The current rv32 bpf jit compiler incorrectly treats BPF_MOVSX as a standard zero-extended move operation. The bpf instruction set allows sign-extension moves by reusing the BPF_MOV opcode with the instruction offset set to 8, 16, or 32. Update the bpf_jit_emit_insn() function to check the offset field for both ALU and ALU64 MOV operations. If the offset is non-zero, emit the correct slli and srai instructions to perform the sign extension. Before this patch: [ 19.549705] test_bpf: #82 ALU_MOVSX | BPF_B jited:1 ret 2 != 1 (0x2 != 0x1)FAIL (1 times) [ 19.551354] test_bpf: #83 ALU_MOVSX | BPF_H jited:1 ret 2 != 1 (0x2 != 0x1)FAIL (1 times) [ 19.552576] test_bpf: #84 ALU64_MOVSX | BPF_B jited:1 ret 2 != 1 (0x2 != 0x1)FAIL (1 times) [ 19.553542] test_bpf: #85 ALU64_MOVSX | BPF_H jited:1 ret 2 != 1 (0x2 != 0x1)FAIL (1 times) [ 19.554807] test_bpf: #86 ALU64_MOVSX | BPF_W jited:1 ret 2 != 1 (0x2 != 0x1)FAIL (1 times) After this patch: [ 17.931172] test_bpf: #82 ALU_MOVSX | BPF_B jited:1 125 PASS [ 17.932198] test_bpf: #83 ALU_MOVSX | BPF_H jited:1 124 PASS [ 17.933039] test_bpf: #84 ALU64_MOVSX | BPF_B jited:1 124 PASS [ 17.933918] test_bpf: #85 ALU64_MOVSX | BPF_H jited:1 124 PASS [ 17.934751] test_bpf: #86 ALU64_MOVSX | BPF_W jited:1 122 PASS Signed-off-by: Kuan-Wei Chiu <visitorckw@gmail.com> Reviewed-by: Pu Lehui <pulehui@huawei.com> Link: https://lore.kernel.org/bpf/20260714002451.4091139-3-visitorckw@gmail.com Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
2026-07-21riscv, bpf: Add support for BPF_SDIV and BPF_SMOD in RV32 JITKuan-Wei Chiu1-5/+10
The current rv32 bpf jit compiler incorrectly treats BPF_SDIV and BPF_SMOD as unsigned operations. The BPF instruction set allows signed division and modulo by reusing the BPF_DIV and BPF_MOD opcodes with the instruction offset set to 1. Update the emit_alu_r32() function to accept an 'is_sdiv' variable and emit the correct div and rem instructions when the offset is 1. Before this patch: [ 44.161771] test_bpf: #165 ALU_SDIV_X: -6 / 2 = -3 jited:1 ret 2147483645 != -3 (0x7ffffffd != 0xfffffffd)FAIL (1 times) [ 44.167385] test_bpf: #166 ALU_SDIV_K: -6 / 2 = -3 jited:1 ret 2147483645 != -3 (0x7ffffffd != 0xfffffffd)FAIL (1 times) [ 44.171053] test_bpf: #169 ALU_SMOD_X: -7 % 2 = -1 jited:1 ret 1 != -1 (0x1 != 0xffffffff)FAIL (1 times) [ 44.172081] test_bpf: #170 ALU_SMOD_K: -7 % 2 = -1 jited:1 ret 1 != -1 (0x1 != 0xffffffff)FAIL (1 times) After this patch: [ 16.002192] test_bpf: #165 ALU_SDIV_X: -6 / 2 = -3 jited:1 95 PASS [ 16.002983] test_bpf: #166 ALU_SDIV_K: -6 / 2 = -3 jited:1 1059 PASS [ 16.017167] test_bpf: #169 ALU_SMOD_X: -7 % 2 = -1 jited:1 136 PASS [ 16.023002] test_bpf: #170 ALU_SMOD_K: -7 % 2 = -1 jited:1 109 PASS Signed-off-by: Kuan-Wei Chiu <visitorckw@gmail.com> Reviewed-by: Pu Lehui <pulehui@huawei.com> Link: https://lore.kernel.org/bpf/20260714002451.4091139-2-visitorckw@gmail.com Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
2026-07-21ASoC: mediatek: preparation for Card capsulingMark Brown4-12/+10
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> says: I will post Card capsuling patch. To makes its review easy, tidyup mediatek drivers to reduce un-related diff as preparation. No functional change, but is preparation for cleanup driver. Link: https://patch.msgid.link/8733xdjfdq.wl-kuninori.morimoto.gx@renesas.com
2026-07-21ASoC: mediatek: mt8365-mt6357: remove useless assignmentKuninori Morimoto1-1/+0
static int mt8365_mt6357_dev_probe(...) { ... struct device *dev = card->dev; ... => card->dev = dev; ... } This is useless. Remove it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://patch.msgid.link/87wlupi0sg.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-21ASoC: mediatek: mt8196-nau8825: remove unnecessary declarationKuninori Morimoto1-2/+0
No need to declarate mt8196_nau8825_soc_card. Remove it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://patch.msgid.link/87y0f5i0sl.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-21ASoC: mediatek: common/mtk-dsp-sof-common: use for_each_card_prelinks()Kuninori Morimoto1-3/+4
We already have for_each_card_prelinks(). Let's use it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://patch.msgid.link/87zezli0sp.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-21ASoC: mediatek: mt8192-mt6359-rt1015-rt5682: use *dev in ↵Kuninori Morimoto1-6/+6
mt8192_mt6359_card_set_be_link() use *dev, instead of card->dev. No functional change, but is preparation for cleanup driver. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://patch.msgid.link/871pcxjfd9.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-21ACPI: sysfs: Properly map BERT and CCEL data to their ACPI tablesThomas Renninger1-4/+5
In the case of multiple BERT ACPI tables, one gets: sysfs: cannot create duplicate filename '/firmware/acpi/tables/data/BERT' This is because both: /firmware/acpi/tables/BERT1 /firmware/acpi/tables/BERT2 are attempted to be mapped to the same data table: /firmware/acpi/tables/data/BERT Address this problem by passing and using the same filename for data tables. Signed-off-by: Thomas Renninger <trenn@suse.de> Reported-by: Michal Suchanek <msuchanek@suse.com> Closes: https://bugzilla.suse.com/show_bug.cgi?id=1270211 [ rjw: Subject and changelog edits ] Link: https://patch.msgid.link/20260717065129.72924-3-trenn@suse.de Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2026-07-21ACPI: Use correct region struct for BERT region size checkThomas Renninger1-1/+1
The structure representing BERT data is struct acpi_bert_region, so its size should be used in the BERT region size check. Update the code in question accordingly. Signed-off-by: Thomas Renninger <trenn@suse.de> [ rjw: Changelog edits ] Link: https://patch.msgid.link/20260717065129.72924-2-trenn@suse.de Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2026-07-21rds: Fix inet6_addr_lst NULL dereference when IPv6 is disabledIlia Gavrilov3-3/+13
When booting with the 'ipv6.disable=1' parameter, inet6_addr_lst is never initialized because inet6_init() exits before addrconf_init() is called to initialize it. An attempt to bind an RDS socket to an ipv6 address results in a crash in __ipv6_chk_addr_and_flags() KASAN: null-ptr-deref in range [0x0000000000000008-0x000000000000000f] RIP: 0010:__ipv6_chk_addr_and_flags+0x1df/0x7e0 Call Trace: <TASK> ipv6_chk_addr+0x3b/0x50 rds_tcp_laddr_check+0x155/0x3b0 [rds_tcp] rds_trans_get_preferred+0x15d/0x2d0 [rds] ? trace_hardirqs_on+0x2d/0x110 rds_bind+0x1433/0x1d60 [rds] ? rds_remove_bound+0xd50/0xd50 [rds] ? aa_af_perm+0x250/0x250 ? __might_fault+0xde/0x190 ? __sys_bind+0x1dc/0x210 __sys_bind+0x1dc/0x210 ? __ia32_sys_socketpair+0x100/0x100 ? restore_fpregs_from_fpstate+0x53/0x100 __x64_sys_bind+0x73/0xb0 ? syscall_enter_from_user_mode+0x1c/0x50 do_syscall_64+0x34/0x80 entry_SYSCALL_64_after_hwframe+0x6e/0xd8 RIP: 0033:0x7f47f8269ea9 </TASK> The following code reproduces the issue: struct sockaddr_in6 addr; s = socket(PF_RDS, SOCK_SEQPACKET, 0); memset(&addr, 0, sizeof(addr)); inet_pton(AF_INET6, ADDRESS, &addr.sin6_addr); addr.sin6_family = AF_INET6; addr.sin6_port = htons(PORT); bind(s, &addr, sizeof(addr)); Found by InfoTeCS on behalf of Linux Verification Center (linuxtesting.org) with Syzkaller. Fixes: eee2fa6ab322 ("rds: Changing IP address internal representation to struct in6_addr") Fixes: 1e2b44e78eea ("rds: Enable RDS IPv6 support") Signed-off-by: Ilia Gavrilov <Ilia.Gavrilov@infotecs.ru> Reviewed-by: Allison Henderson <achender@kernel.org> Link: https://patch.msgid.link/20260709162723.367523-1-Ilia.Gavrilov@infotecs.ru Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-07-21net: txgbe: fix heap overflow when reading module EEPROMChenguang Zhao1-2/+4
txgbe_read_eeprom_hostif() always copies round_up(length, 4) bytes into the caller buffer, which ethtool allocates with exactly 'length' bytes. A non-4-aligned length therefore causes an out-of-bounds write. Copy only the remaining bytes on the final dword instead. Signed-off-by: Chenguang Zhao <zhaochenguang@kylinos.cn> Reviewed-by: Jiawen Wu <jiawenwu@trustnetic.com> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com> Fixes: 9b97b6b5635b ("net: txgbe: support getting module EEPROM by page") Link: https://patch.msgid.link/20260713085111.1481884-1-chenguang.zhao@linux.dev Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-07-21mailmap: update entry for Alice MikityanskaAlice Mikityanska1-2/+5
Map all my corporate and old emails and update my name. Signed-off-by: Alice Mikityanska <alice.kernel@fastmail.im> Link: https://patch.msgid.link/20260710234319.328687-1-alice.kernel@fastmail.im Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-07-21tipc: serialize udp bearer replicast list updatesWeiming Shi1-29/+27
tipc_udp_rcast_add() and cleanup_bearer() both update ub->rcast.list with list_add_rcu() / list_del_rcu(), but nothing serializes them. The add runs from the encap receive softirq (via tipc_udp_rcast_disc()) without rtnl_lock(), so it can race the cleanup delete and corrupt the list: list_del corruption. prev->next should be ffff8880298d7ab8, but was ffff88802449ad38. (prev=ffff888027e3ec98) kernel BUG at lib/list_debug.c:62! RIP: __list_del_entry_valid_or_report+0x17a/0x200 Workqueue: events cleanup_bearer Call Trace: cleanup_bearer (net/tipc/udp_media.c:811) process_one_work (kernel/workqueue.c:3302) worker_thread (kernel/workqueue.c:3466) The bearer can be enabled from an unprivileged user namespace, as the TIPCv2 generic-netlink ops carry no GENL_ADMIN_PERM. Add a spinlock to struct udp_bearer and take it around the list_add_rcu() in tipc_udp_rcast_add() and the list_del_rcu() loop in cleanup_bearer() so the two writers can no longer corrupt the list. Reject a duplicate peer under the same lock before allocating, and remove tipc_udp_is_known_peer(). The old lockless pre-check in tipc_udp_rcast_disc() was racy: two softirqs discovering the same peer could both find it absent and add it twice. cleanup_bearer() runs from a workqueue after tipc_udp_disable() clears the bearer's up bit, so an encap softirq can still reach tipc_udp_rcast_add() and add a peer after cleanup_bearer() has already emptied the list, leaking that entry when the bearer is freed. Mark the bearer disabled under rcast_lock once the list is emptied and refuse further additions. Fixes: ef20cd4dd163 ("tipc: introduce UDP replicast") Reported-by: Xiang Mei <xmei5@asu.edu> Suggested-by: Tung Nguyen <tung.quang.nguyen@est.tech> Signed-off-by: Weiming Shi <bestswngs@gmail.com> Reviewed-by: Tung Nguyen <tung.quang.nguyen@est.tech> Link: https://patch.msgid.link/20260716025203.9332-2-bestswngs@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-07-21Merge tag 'nfsd-7.2-2' of ↵Linus Torvalds1-1/+2
git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux Pull nfsd fix from Chuck Lever: - Fix issue with NLMv3 GRANTED_MSG introduced in v7.2 * tag 'nfsd-7.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux: lockd: fix NLMv3 GRANTED_MSG handling
2026-07-21rtase: Workaround for TX hang caused by hardware packet parsingJustin Lai2-0/+205
The hardware performs packet parsing before packet transmission. Parsing incomplete IPv4, IPv6, TCP, or UDP headers may trigger a TX hang because the hardware parser expects additional protocol header data that is not present in the packet. The hardware performs additional PTP parsing on UDP packets identified by destination ports 319/320 at the expected UDP destination port offset. If such a packet has transport data smaller than RTASE_MIN_PAD_LEN, the hardware parser expects additional packet data and may trigger a TX hang. To avoid these hardware issues, the driver applies the following workarounds. Drop malformed packets that may trigger this hardware issue before transmission. For IPv4 non-initial fragments, the hardware does not check the fragment offset before parsing the expected transport header location. As a result, these packets are still subject to transport header parsing even though they do not contain a transport header. If the transport data is shorter than the minimum transport header required by the hardware parser, pad the transport data to the minimum transport header length required by the hardware parser. Packets that also match the hardware PTP parsing conditions continue to follow the corresponding workaround. For IPv6 fragmented packets, neither of the above hardware issues occurs because the hardware only continues packet parsing when the IPv6 Base Header Next Header field directly indicates UDP. Packets carrying a Fragment Header do not continue through the subsequent packet parsing stages. For packets identified for hardware PTP parsing, pad the transport data so it reaches RTASE_MIN_PAD_LEN before transmission. Fixes: d6e882b89fdf ("rtase: Implement .ndo_start_xmit function") Cc: stable@vger.kernel.org Signed-off-by: Justin Lai <justinlai0215@realtek.com> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20260709103456.83789-1-justinlai0215@realtek.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-07-21KVM: arm64: Sync SCTLR_EL1 when injecting an exception into a pVMFuad Tabba1-2/+3
When pKVM injects a synchronous exception into a protected guest, enter_exception64() reads SCTLR_EL1 to set the new PSTATE's PAN and SSBS bits. pKVM refreshes VBAR_EL1 from the live value before injecting but not SCTLR_EL1, which is untrapped for protected guests, so a guest that updates it and then traps takes the exception with stale PAN/SSBS. Sync SCTLR_EL1 alongside VBAR_EL1. Fixes: 798eb5978700 ("KVM: arm64: Sync protected guest VBAR_EL1 on injecting an undef exception") Signed-off-by: Fuad Tabba <fuad.tabba@linux.dev> Link: https://patch.msgid.link/20260721161624.3983041-1-fuad.tabba@linux.dev Signed-off-by: Oliver Upton <oupton@kernel.org>
2026-07-21bpf, riscv: Fix extable handling for arena load_acquireFeng Jiang1-1/+6
emit_atomic_ld_st() returns 1 to have build_body() skip the zext after a sub-word load_acquire. The caller does "ret = ret ?: add_exception_handler(...)", which skips add_exception_handler() on any non-zero ret, so the extable entry is missing and a faulting PROBE_ATOMIC load_acquire oopses. REG_DONT_CLEAR_MARKER leaves rd stale on fault, and the verifier still thinks the load overwrote it, so a program can leak it through a map. Check ret >= 0 before calling add_exception_handler(), and pass rd for LOAD_ACQ so the fault zeroes rd like a PROBE_MEM load. Return ret unchanged for the zext skip. Fixes: fb7cefabae81 ("riscv, bpf: Add support arena atomics for RV64") Suggested-by: Pu Lehui <pulehui@huawei.com> Signed-off-by: Feng Jiang <jiangfeng@kylinos.cn> Reviewed-by: Pu Lehui <pulehui@huawei.com> Reviewed-by: Björn Töpel <bjorn@kernel.org> Acked-by: Björn Töpel <bjorn@kernel.org> Link: https://lore.kernel.org/bpf/20260720-bpf-riscv-fix-extable-v4-1-165c0b3b07d5@kylinos.cn Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
2026-07-21net: dsa: yt921x: Fix external port detectionChukun Pan1-1/+1
The YT921x switch has two MAC ports: 8 and 9. Currently, the driver only allows port 8 as an external port, while port 9 is not working: yt921x mdio-bus:1d: Wrong mode 23 on port 9 yt921x mdio-bus:1d: Failed to config port 9: -22 Update the external port detection logic to enable the external PHY connected to port 9. Cc: stable+noautosel@kernel.org # never worked Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn> Link: https://patch.msgid.link/20260710100000.3018614-1-amadeus@jmu.edu.cn Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-07-21Merge branch 'mixing-bpf2bpf-and-tailcalls-for-rv64'Kumar Kartikeya Dwivedi6-72/+72
Pu Lehui says: ==================== Mixing bpf2bpf and tailcalls for RV64 In the current RV64 JIT, if we just don't initialize the TCC in subprog, the TCC can be propagated from the parent process to the subprocess, but the updated TCC of the parent process cannot be restored when the subprocess exits. Since the RV64 TCC is initialized before saving the callee saved registers into the stack, we cannot use the callee saved register to pass the TCC, otherwise the original value of the callee saved register will be destroyed. So we implemented mixing bpf2bpf and tailcalls similar to x86_64, i.e. using a non-callee saved register to transfer the TCC between functions, and saving that register to the stack to protect the TCC value. As for the tailcall hierarchy issue, inspired by the s390's low-overhead approach, we store TCC from RV_REG_TCC back to stack after calling bpf2bpf call or calling orig bpf func in bpf trampoline. In addition, some code cleans are also attached to this patchset. Tests test_bpf.ko and test_verifier have passed, as well as the relative testcases of test_progs*. v6: - Add new patch to fix memory leak in bpf_jit_free. (Sashiko) v5: https://lore.kernel.org/bpf/20260707142219.2871758-1-pulehui@huaweicloud.com - Fix TCC value was not restored to RV_REG_TCC upon trampoline exit, resulting in an infinite tail call. (Sashiko) - Fix epilogue not restored TCC value to RV_REG_TCC, resulting in leaf tailcall callee may clobbered RV_REG_TCC. (Sashiko) - Remove patch of `Remove ctx->offset initialization` as it would hit some corner case. (Sashiko) - Fix double-count kcfi insn when tailcall to target. (Sashiko) - Add detail for selftest commit message. (BPF BOT) v4: https://lore.kernel.org/bpf/20260629140048.733346-1-pulehui@huaweicloud.com - Fix tailcall hierarchy issue. - use is_struct_ops_tramp helper in bpf trampoline v3: https://lore.kernel.org/bpf/20240201083351.943121-1-pulehui@huaweicloud.com - Remove duplicate RV_REG_TCC load in epiloguei. (Björn Töpel) v2: https://lore.kernel.org/bpf/20240130040958.230673-1-pulehui@huaweicloud.com - Fix emit restore RV_REG_TCC double times when `flags & BPF_TRAMP_F_CALL_ORIG` - Use bpf_is_subprog helper v1: https://lore.kernel.org/bpf/20230919035711.3297256-1-pulehui@huaweicloud.com ==================== Link: https://patch.msgid.link/20260708064436.2971933-1-pulehui@huaweicloud.com Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
2026-07-21selftests/bpf: Remove tailcalls tests from DENYLIST.riscv64Pu Lehui1-1/+0
The RV64 BPF JIT now supports mixing bpf2bpf and tailcalls. Therefore, the tailcall_bpf2bpf tests can be safely removed from the riscv64 denylist. Signed-off-by: Pu Lehui <pulehui@huawei.com> Reviewed-by: Björn Töpel <bjorn@kernel.org> Acked-by: Björn Töpel <bjorn@kernel.org> Link: https://lore.kernel.org/bpf/20260708064436.2971933-8-pulehui@huaweicloud.com Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
2026-07-21riscv, bpf: Mixing bpf2bpf and tailcallsPu Lehui2-55/+54
In the current RV64 JIT, if we just don't initialize the TCC in subprog, the TCC can be propagated from the parent process to the subprocess, but the updated TCC of the parent process cannot be restored when the subprocess exits. Since the RV64 TCC is initialized before saving the callee saved registers into the stack, we cannot use the callee saved register to pass the TCC, otherwise the original value of the callee saved register will be destroyed. So we implemented mixing bpf2bpf and tailcalls similar to x86_64, i.e. using a non-callee saved register to transfer the TCC between functions, and saving that register to the stack to protect the TCC value. As for the tailcall hierarchy issue, inspired by the s390's low-overhead approach, we store TCC from RV_REG_TCC back to stack after calling bpf2bpf call or calling orig bpf func in bpf trampoline. Tests test_bpf.ko and test_verifier have passed, as well as the relative testcases of test_progs*. Signed-off-by: Pu Lehui <pulehui@huawei.com> Reviewed-by: Björn Töpel <bjorn@kernel.org> Acked-by: Björn Töpel <bjorn@kernel.org> Link: https://lore.kernel.org/bpf/20260708064436.2971933-7-pulehui@huaweicloud.com Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
2026-07-21riscv, bpf: Add RV_TAILCALL_OFFSET macro to format tailcall offsetPu Lehui1-4/+4
Add RV_TAILCALL_OFFSET macro to format tailcall offset, and correct the relevant comments. Signed-off-by: Pu Lehui <pulehui@huawei.com> Reviewed-by: Björn Töpel <bjorn@kernel.org> Acked-by: Björn Töpel <bjorn@kernel.org> Link: https://lore.kernel.org/bpf/20260708064436.2971933-6-pulehui@huaweicloud.com Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
2026-07-21Merge branch 'net-fix-stale-tx-skb-pointers-on-dma-map-failure'Jakub Kicinski3-3/+5
Xuanqiang Luo says: ==================== net: fix stale TX skb pointers on DMA map failure From: Xuanqiang Luo <luoxuanqiang@kylinos.cn> While I was backporting commit 1a303baa715e6 ("ice: fix double-free of tx_buf skb"), an AI-assisted scan identified several suspected TX error paths. I reviewed the results and found this issue in the three drivers fixed here. The drivers differ, but the bug is the same. On a DMA mapping failure, the TX path frees an skb while its ring entry still points to it. A later transmission normally overwrites the entry. If the interface is stopped first, teardown can instead access or free the skb again. I do not have these adapters, so I have not tested the drivers on hardware. I checked the error and teardown paths by inspection. Still, these small fixes seem worth posting for review. They are independent, but are sent as one series because they address the same issue. ==================== Link: https://patch.msgid.link/20260710090527.58354-1-xuanqiang.luo@linux.dev Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-07-21riscv, bpf: Fix kernel stack corruption in tailcall with CFIPu Lehui1-3/+4
When CONFIG_CFI_CLANG is enabled, prog->bpf_func already skips the kcfi instruction during setup. Including it again in the tailcall jump offset causes it to jump over an extra 4 bytes, skipping the stack pointer adjustment, which will result in kernel stack corruption. Fixes: 30a59cc79754 ("riscv, bpf: Fix possible infinite tailcall when CONFIG_CFI_CLANG is enabled") Reported-by: Sashiko <sashiko-bot@kernel.org> Signed-off-by: Pu Lehui <pulehui@huawei.com> Reviewed-by: Björn Töpel <bjorn@kernel.org> Acked-by: Björn Töpel <bjorn@kernel.org> Link: https://lore.kernel.org/bpf/20260708064436.2971933-5-pulehui@huaweicloud.com Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
2026-07-21net: hibmcge: fix double-free of tx skb on DMA mapping failureXuanqiang Luo1-0/+1
If hbg_dma_map() fails, hbg_net_start_xmit() frees the skb, but buffer->skb is left pointing to it. ring->ntu is not advanced, so the buffer is not visible to the TX cleanup path. A subsequent transmit normally overwrites the buffer. However, if the interface is brought down first, hbg_ring_uninit() calls hbg_buffer_free(). It sees the stale pointer, attempts to unmap the failed mapping, and frees the skb again. Clear buffer->skb before freeing the skb in the error path, preventing hbg_buffer_free() from treating it as an outstanding TX buffer. Cc: stable+noautosel@kernel.org # untested fix to unlikely driver error path Signed-off-by: Xuanqiang Luo <luoxuanqiang@kylinos.cn> Reviewed-by: Jijie Shao <shaojijie@huawei.com> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20260710090527.58354-4-xuanqiang.luo@linux.dev Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-07-21riscv, bpf: Using kvzalloc_objs to allocate cache bufferPu Lehui2-5/+5
It is unnecessary to allocate continuous physical memory for cache buffer, and when ebpf program is too large, it may cause memory allocation failure. Signed-off-by: Pu Lehui <pulehui@huawei.com> Reviewed-by: Björn Töpel <bjorn@kernel.org> Acked-by: Björn Töpel <bjorn@kernel.org> Link: https://lore.kernel.org/bpf/20260708064436.2971933-4-pulehui@huaweicloud.com Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
2026-07-21riscv, bpf: Fix memory leak in bpf_jit_freePu Lehui1-0/+1
When bpf_int_jit_compile() is called for subprograms, it returns early during the first pass (!prog->is_func || extra_pass is false), keeping ctx->offset alive for the subsequent extra pass. If JIT compilation fails for a later subprogram, the BPF core aborts and calls bpf_jit_free() to clean up the first subprogram. However, bpf_jit_free() fails to free jit_data->ctx.offset, which causes a memory leak of the JIT context offsets array. Fix this by adding the missing kfree(jit_data->ctx.offset) in bpf_jit_free(). Fixes: 48a8f78c50bd ("bpf, riscv: use prog pack allocator in the BPF JIT") Reported-by: Sashiko <sashiko-bot@kernel.org> Signed-off-by: Pu Lehui <pulehui@huawei.com> Reviewed-by: Björn Töpel <bjorn@kernel.org> Acked-by: Björn Töpel <bjorn@kernel.org> Link: https://lore.kernel.org/bpf/20260708064436.2971933-3-pulehui@huaweicloud.com Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
2026-07-21ALSA: hda: Add AW88399 HDA side codec driver for Lenovo LegionMark Brown436-4380/+8653
Marco Giunta <marco_giunta@outlook.it> says: Several Lenovo Legion laptops (Pro 7i 16IAX10H, Y9000P IAX10, Pro 7 16AFR10H, R9000P ADR10) use AWINIC AW88399 smart amplifiers to drive their bass woofers, connected via I2C as side codecs to a Realtek ALC287 HDA codec. Without a driver for these amplifiers, only the tweeters produce sound, resulting in quiet and tinny audio. An ASoC driver for the AW88399 already exists in-tree (sound/soc/codecs/aw88399.c), contributed by AWINIC, but it targets ASoC topologies and cannot drive the chip when it sits behind an HDA controller. This series adds a proper HDA side codec driver, following the established pattern used by the CS35L41, CS35L56, and TAS2781 drivers. Patch 1 extracts the device-level functions from the existing ASoC driver into a shared library module (SND_SOC_AW88399_LIB) with a shared header at include/sound/aw88399.h, following the CS35L41 precedent (SND_SOC_CS35L41_LIB / include/sound/cs35l41.h). This avoids a build-time dependency on the full ASoC codec module and ensures clean separation between the ASoC and HDA drivers. Patches 2 through 5 prepare the shared library for use on ACPI-based HDA systems: patch 2 extends channel assignment to work without Device Tree properties, patch 3 adds a per-instance flag to bypass an unreliable hardware status bit on certain boards, patch 4 adds a firmware reload flag so that the HDA driver can signal that DSP firmware needs to be re-uploaded after system sleep, and patch 5 adds a channel setter so that the HDA driver can configure the amplifier without depending on ASoC-internal device headers. NOTE ON FIRMWARE: This driver requires the firmware file aw88399_acf.bin, which uses the same format and request path as the existing ASoC driver. This firmware is not yet available in the linux-firmware repository. We intend to coordinate with the AWINIC maintainers (CC'd) to arrange its inclusion. In the meantime, users can extract the firmware from the Windows driver and place it in /lib/firmware/. This work builds on the initial driver development by Yakov Till ("Lyapsus") and the bounty effort organized by Nadim Kobeissi: https://github.com/nadimkobeissi/16iax10h-linux-sound-saga Link: https://patch.msgid.link/DS7PR19MB77247D9AD698CF0FF37DB58BFCC62@DS7PR19MB7724.namprd19.prod.outlook.com
2026-07-21hinic3: fix use-after-free on DMA mapping failureXuanqiang Luo1-2/+3
If hinic3_tx_map_skb() fails in hinic3_send_one_skb(), the skb is freed, but tx_info->skb was set before the mapping attempt and is not cleared. The SQ producer index is rolled back, so later transmissions normally overwrite the entry. If the interface is brought down first, hinic3_free_txqs_res() calls free_all_tx_skbs(). It scans the entire tx_info array and finds the stale pointer. hinic3_tx_unmap_skb() then dereferences the freed skb in skb_shinfo(), before it is freed again. Set tx_info->skb and its WQEBB count only after DMA mapping succeeds, preventing the stale pointer from reaching free_all_tx_skbs(). Cc: stable+noautosel@kernel.org # untested fix to unlikely driver error path Signed-off-by: Xuanqiang Luo <luoxuanqiang@kylinos.cn> Reviewed-by: Fan Gong <gongfan1@huawei.com> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20260710090527.58354-3-xuanqiang.luo@linux.dev Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-07-21bna: fix use-after-free on DMA mapping failureXuanqiang Luo1-1/+1
If dma_map_single() fails in bnad_start_xmit(), the skb is freed, but head_unmap->skb was set before the mapping attempt and is not cleared. The producer index is not advanced, so later transmissions normally overwrite the entry. However, if the interface is brought down first, bnad_txq_cleanup() scans the entire unmap queue, finds the stale pointer, and calls bnad_tx_buff_unmap() on it. That function dereferences the freed skb in skb_headlen(). Its zero nvecs count is decremented to -1, causing its while (nvecs) loop to repeatedly unmap entries around the TX ring and potentially hang cleanup. Set head_unmap->skb after the first DMA mapping succeeds. This prevents the stale entry from reaching bnad_tx_buff_unmap(). Cc: stable+noautosel@kernel.org # untested fix to unlikely error path Signed-off-by: Xuanqiang Luo <luoxuanqiang@kylinos.cn> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20260710090527.58354-2-xuanqiang.luo@linux.dev Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-07-21bpf: Extract the is_struct_ops_tramp helperPu Lehui3-7/+7
Extract the is_struct_ops_tramp helper, and use it in riscv as the current checks are somewhat hacky. Signed-off-by: Pu Lehui <pulehui@huawei.com> Reviewed-by: Björn Töpel <bjorn@kernel.org> Acked-by: Björn Töpel <bjorn@kernel.org> Link: https://lore.kernel.org/bpf/20260708064436.2971933-2-pulehui@huaweicloud.com Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
2026-07-21ASoC: aw88399: add channel setter for HDA side codecMarco Giunta2-0/+7
Add aw88399_dev_set_channel() to the shared library so that the HDA side codec driver can set the amplifier's channel assignment without including the aw88395 device header directly. The AW88399's struct aw_device is defined in aw88395_device.h, which lives under sound/soc/codecs/aw88395/. Without this accessor, the HDA driver would need a cross-subsystem relative include path to access the channel field. Providing a setter in the library keeps the interface clean and avoids coupling the HDA driver to ASoC-internal headers. Tested-by: Nadim Kobeissi <nadim@symbolic.software> Tested-by: Xia Yun'an <imitoy@imitoy.top> Tested-by: Munzir Taha <munzirtaha@gmail.com> Signed-off-by: Marco Giunta <marco_giunta@outlook.it> Link: https://patch.msgid.link/DS7PR19MB7724E8A1AD36D1E623FA2A0AFCC62@DS7PR19MB7724.namprd19.prod.outlook.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-21ASoC: aw88399: add firmware reload flag for resumeMarco Giunta2-1/+5
Add a fw_needs_reload flag to struct aw88399 that, when set, causes aw88399_start to perform a full DSP firmware upload instead of assuming the firmware binary is already present in memory. After system sleep, the AW88399 loses its memory contents. The existing start sequence assumes the firmware binary persists from initialization and only uploads register configuration and DSP config (AW88399_DSP_FW_UPDATE_OFF). When memory is empty, this causes the subsequent CRC check to fail, triggering the retry mechanism in aw88399_start_pa which re-uploads the firmware on the second attempt. While the retry mechanism recovers correctly, it produces misleading error-level log messages on every resume cycle. The fw_needs_reload flag allows the HDA side codec driver to signal that a full firmware reload is needed after resume, eliminating the spurious CRC failures. The flag defaults to false via kzalloc, preserving the original behavior for existing ASoC users. No existing code path sets this flag; it will be set by the HDA side codec driver's system suspend handler. Tested-by: Nadim Kobeissi <nadim@symbolic.software> Tested-by: Xia Yun'an <imitoy@imitoy.top> Tested-by: Munzir Taha <munzirtaha@gmail.com> Signed-off-by: Marco Giunta <marco_giunta@outlook.it> Link: https://patch.msgid.link/DS7PR19MB77240CB79188C0B7AE243829FCC62@DS7PR19MB7724.namprd19.prod.outlook.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-21ASoC: aw88399: add per-instance BSTS status bypass flagMarco Giunta2-2/+12
Add a bsts_unreliable flag to struct aw88399 that, when set, causes the startup status check (aw_dev_check_sysst) to skip the BSTS (boost startup finished) requirement. On some hardware, the BSTS bit in the SYSST register (0x01, bit 9) does not reliably assert even during normal audio playback. Register inspection on affected Lenovo Legion hardware shows both amplifiers reporting BSTS=0 on both channels despite clean audio output. Per the AW88399 datasheet, BSTS indicates boost startup completion. If BSTS never reliably sets to 1, the chip is never allowed to start by aw_dev_check_sysst, regardless of whether the boot failure is genuine. The new flag defaults to false via kzalloc, preserving the original check behavior for all existing users. No existing code path sets this flag; it will be set by the forthcoming HDA side codec property driver for affected hardware. Tested-by: Nadim Kobeissi <nadim@symbolic.software> Tested-by: Xia Yun'an <imitoy@imitoy.top> Tested-by: Munzir Taha <munzirtaha@gmail.com> Signed-off-by: Marco Giunta <marco_giunta@outlook.it> Link: https://patch.msgid.link/DS7PR19MB77242B8E5BB8BFB5E69816E9FCC62@DS7PR19MB7724.namprd19.prod.outlook.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-21ASoC: aw88399: derive channel from I2C address on ACPI systemsMarco Giunta1-1/+13
Extend aw88399_parse_channel_dt to derive the audio channel from the I2C address when the Device Tree property "awinic,audio-channel" is absent. The original code calls of_property_read_u32 without checking the return value. On ACPI systems, the DT property is never present, and channel_value is used uninitialized in the assignment to aw_dev->channel. Add a fallback that computes the channel as (i2c_addr - 0x34), where 0x34 is the AW88399's base I2C address per the datasheet (valid range 0x34-0x37). This channel assignment may be subsequently overridden by the HDA side codec's property driver on systems that require it. No change on Device Tree systems where the property is present. Tested-by: Nadim Kobeissi <nadim@symbolic.software> Tested-by: Xia Yun'an <imitoy@imitoy.top> Tested-by: Munzir Taha <munzirtaha@gmail.com> Co-developed-by: Yakov Till <yakov.till@gmail.com> Signed-off-by: Yakov Till <yakov.till@gmail.com> Signed-off-by: Marco Giunta <marco_giunta@outlook.it> Link: https://patch.msgid.link/DS7PR19MB772468BB9F4D6925DC4E8E3EFCC62@DS7PR19MB7724.namprd19.prod.outlook.com Signed-off-by: Mark Brown <broonie@kernel.org>