From nobody Fri Feb 27 02:29:35 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMXN00brxz6T7fm for ; Fri, 27 Feb 2026 02:29:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMXMz4T57z40dq for ; Fri, 27 Feb 2026 02:29:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159375; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wpebL4GkTgfM9QoAPdHCVViiPFPUyYsPJyXGT68bXso=; b=XR6ZdgPDWQu6dRRGPFmmalfGkv+/vWIigJSzvkWAUQvBDJHIgVYqt03qK+t7UVlsibRuoP iwuPp5T+0SBLFfToagYTfPIJFpo5Ebi/JKjZ6wXEPE+Z8tSVErd28b9Js6Iqvn3uayN9Qc 4LoX4tfkMFpFMLtDXOkHAfsm66dXK+YiaWbjbaf/VzcglhO4Pgy9GeMyBtD1Fla2Vn9RaR ydxfrGUJpZDb1VBB9R+EGvKzsGXmICmBibvp4VoeBpLuvFlo/Gw0SsKeUlFyFhJhngWdpt b5HZDms9DX0EiuXFmAd8YO67O92qmUzba9VOE/GuUaRfPL10hSMBn170B4AOqw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772159375; a=rsa-sha256; cv=none; b=WzZQxdqc1g0r+BonMrp5t3+WAKWWaGTbF4yhhgGj0Gzb+lc0Nzy+OaJArdWMXMqvla6rcJ kO95IoHo6gnD9HYaAekzTuYd53m9eZJcsBCUVeKvOzzn/3iS5uq50mR3Rzan+pPqn9LIRN F/ISYO23a0I4wxoXqP2geO4ivOAaKCyCYrdaKuQFkPPHwUU7zvw3uW5Lj7rwFw5N8n+V7i ewNAuR4rY5BTFo60yUBeUGrO40oDtxgYs6W/y+hw1pNEGK6N49iLCZz7wqRwjjGwRFm2R5 xsFwuW1cR08/po09kFgzcTiR8PJ6xG0LqbUQbnN3mxcRrXzxgei2PjrWbfdwLQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159375; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wpebL4GkTgfM9QoAPdHCVViiPFPUyYsPJyXGT68bXso=; b=Ky5cVpSR3xqZSPsPc2dKvd6ViiFgz8n5pUzZTlt57ZlLs6mj8Ou+qBs2TY8ZFppMPSmP+o vbGZzHKYVzwv+IKEQrx3tJn6m9BGe+vu0eKQEj0qxv2edMm0R2Is3axqgj1POwT9jLPYp5 TnavxvRMdzgIvEfi+yymrOHVMhsIyAxA6ik4DfhfVocdu3PpP2oI8KW1IMwnATLE+YBdOn Qc3gQO/BIEGO8MuvqeAuDv0nT1oCbk94dvS0BftyTbrJFxri2jDnhiGkwDd5ZKoFk5UcuV N2eF/AOeuaWkfe182xOu97Y8OBJUc1lPQj9gnvYbBBrQRcUZVknX1KwcJmSzyg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMXMz3pvCzyV6 for ; Fri, 27 Feb 2026 02:29:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 21017 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 02:29:35 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Bjoern A. Zeeb Subject: git: 7ff04e620c64 - stable/15 - mt76: sort bus attachments in module Makefiles for pci and usb List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 7ff04e620c64e93ee31f30caed037b0a0b822295 Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 02:29:35 +0000 Message-Id: <69a1018f.21017.1d62ffec@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=7ff04e620c64e93ee31f30caed037b0a0b822295 commit 7ff04e620c64e93ee31f30caed037b0a0b822295 Author: Bjoern A. Zeeb AuthorDate: 2026-02-02 01:23:10 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-02-26 23:00:54 +0000 mt76: sort bus attachments in module Makefiles for pci and usb With PCI enabled and USB still disabled add knobs to (i) enabled them manually in the common Makefile.inc and (ii) add bus attachment depend knobs where needed to enable them in individual drivers. For now the focus is in 7921 and 7925. Sponsored by: The FreeBSD Foundation (cherry picked from commit 201fc8a55a4832174b5943e17ac90800aebe5772) --- sys/modules/mt76/Makefile.inc | 6 ++++++ sys/modules/mt76/core/Makefile | 7 +++++++ sys/modules/mt76/mt7921/Makefile | 18 +++++++++++++----- sys/modules/mt76/mt7925/Makefile | 12 +++++++++--- 4 files changed, 35 insertions(+), 8 deletions(-) diff --git a/sys/modules/mt76/Makefile.inc b/sys/modules/mt76/Makefile.inc index e4369564237e..739c85c60dac 100644 --- a/sys/modules/mt76/Makefile.inc +++ b/sys/modules/mt76/Makefile.inc @@ -4,6 +4,12 @@ COMMONDIR= ${SRCTOP}/sys/contrib/dev/mediatek/mt76 .PATH: ${COMMONDIR} +# Bus attachments. +WITH_PCI= 1 +WITH_USB= 0 +WITH_SDIO= 0 + +# Options. WITH_CONFIG_PM= 0 WITH_DEBUGFS= 0 WITH_SOC_WED= 0 diff --git a/sys/modules/mt76/core/Makefile b/sys/modules/mt76/core/Makefile index c782bf218d93..589063a23229 100644 --- a/sys/modules/mt76/core/Makefile +++ b/sys/modules/mt76/core/Makefile @@ -1,3 +1,5 @@ +.include + KMOD= mt76_core # Basic stuff. @@ -6,10 +8,15 @@ SRCS+= channel.c scan.c wed.c #SRCS+= trace.c # Bus stuff. +# PCI parts; PCI needs to be compiled into the kernel and cannot be loaded. +.if defined(WITH_PCI) && ${WITH_PCI} > 0 && ${KERN_OPTS:MDEV_PCI} SRCS+= pci.c +.endif + .if defined(WITH_USB) && ${WITH_USB} > 0 SRCS+= usb.c # usb_trace.c .endif + #SRCS+= sdio.c sdio_txrx.c # Connac-Lib stuff. diff --git a/sys/modules/mt76/mt7921/Makefile b/sys/modules/mt76/mt7921/Makefile index d3f201997a2d..1b53df04357c 100644 --- a/sys/modules/mt76/mt7921/Makefile +++ b/sys/modules/mt76/mt7921/Makefile @@ -1,3 +1,5 @@ +.include + DEVDIR= ${SRCTOP}/sys/contrib/dev/mediatek/mt76/mt7921 .PATH: ${DEVDIR} @@ -7,14 +9,20 @@ KMOD= if_mt7921 # Common stuff. SRCS= init.c main.c mac.c mcu.c -# PCI stuff. +# PCI parts; PCI needs to be compiled into the kernel and cannot be loaded. +.if defined(WITH_PCI) && ${WITH_PCI} > 0 && ${KERN_OPTS:MDEV_PCI} SRCS+= pci.c pci_mac.c pci_mcu.c +.endif -# USB stuff. -#SRCS+= usb.c +# USB parts; USB can be loaded and is unconditional on any kernel config. +.if defined(WITH_USB) && ${WITH_USB} > 0 +SRCS+= usb.c +.endif -# SDIO stuff. -#SRCS+= sdio.c sdio_mac.c sdio_mcu.c +# SDIO parts; SDIO depends on an MMCCAM kernel. +.if defined(WITH_SDIO) && ${WITH_SDIO} > 0 && ${KERN_OPTS:MMMCCAM} +SRCS+= sdio.c sdio_mac.c sdio_mcu.c +.endif .if defined(WITH_DEBUGFS) && ${WITH_DEBUGFS} > 0 SRCS+= debugfs.c diff --git a/sys/modules/mt76/mt7925/Makefile b/sys/modules/mt76/mt7925/Makefile index dc6de5085d77..ee79f09dba1c 100644 --- a/sys/modules/mt76/mt7925/Makefile +++ b/sys/modules/mt76/mt7925/Makefile @@ -1,3 +1,5 @@ +.include + DEVDIR= ${SRCTOP}/sys/contrib/dev/mediatek/mt76/mt7925 .PATH: ${DEVDIR} @@ -7,11 +9,15 @@ KMOD= if_mt7925 # Common stuff. SRCS= init.c main.c mac.c mcu.c regd.c -# PCI stuff. +# PCI parts; PCI needs to be compiled into the kernel and cannot be loaded. +.if defined(WITH_PCI) && ${WITH_PCI} > 0 && ${KERN_OPTS:MDEV_PCI} SRCS+= pci.c pci_mac.c pci_mcu.c +.endif -# USB stuff. -#SRCS+= usb.c +# USB parts; USB can be loaded and is unconditional on any kernel config. +.if defined(WITH_USB) && ${WITH_USB} > 0 +SRCS+= usb.c +.endif .if defined(WITH_DEBUGFS) && ${WITH_DEBUGFS} > 0 SRCS+= debugfs.c