From nobody Fri Jan 16 19:41:07 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 4dt9Fb41jMz6NlkK for ; Fri, 16 Jan 2026 19:41:07 +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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dt9Fb1mLQz3xWd for ; Fri, 16 Jan 2026 19:41:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768592467; 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=5fezxMhUn0xUr86T/mS4gCbJ93glKU8MgDwd1OP98IE=; b=eqSt4CnJzbm+cUt9OAt7f+1srDvc1k3geH/I9XNJnkCBMxgpn8tFTtglaR2n1Pp7t8D4Io gKeO0kLKBZrNXzi5iZM1ZWAuw+6R63lpN6AWZyVwVE7SLzTwm2UtZ7UZbdBg4FPEdXdvMK KX1SUfn/dC9pU/+zLPgwCaFEpsUqlzw4NOXzRpbIhqTfi7ucrnerUkPlRfeqkFlsO9cHxG BHAKW8bWkOI4saozSCVTbJ2wkbFJCZSfvEyWyxY+IiibCyAjBnF7HjPztvEdxCTA1mgFsH /JVxilDPCDQB1C1Ce6j+mn6eXMYG9nRJiJJFIYJHbCG/f3RKE+dSbvKbsfNUvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768592467; 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=5fezxMhUn0xUr86T/mS4gCbJ93glKU8MgDwd1OP98IE=; b=D1I4Nrv8Qp8clRAmeb1Q/nrwF4kCNrjn/LsoUnPK2Ty8Wif0P1TuGnFJz+NgQZUYeDpxtJ lsanhm/E70u9kmfhEoha6HJu9tY04MgL/aIaP5q39IgCRR1LAa3szDqpnZhSTSF4JkSXAD bG/DtTyVVb6fHXHcUObu0xukOCunAtWKSgDd29FGer2YE5OJ8s/dkVdh6HxUb6NvpZq8yT an+5gb1V186rUCD+IClI7w2jwP+D0PU55iW/CTo+FRv5YAI2aCzPGZh2IQCzhHPPcug5ov JXkf+CYAE8Bi1eByV244LGU63+Wn3drJwW6kAlzfRNOvujrIuq1NmbiDN+4m9w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768592467; a=rsa-sha256; cv=none; b=RBEwHB6JF0HSyTW4EU0XpxmYYW2nvn/BoerLSQ5vdHnxsPLQFFSabUzfQXhV1coeXZ/i5h jRO7ssoiAQCsEcUkR/EgQgoTe3CV2mUfQDNCZHKd4LGcd68uSBv8Nj8Ot/e/5FbXW36/Ee bL+X6LCGXYTfK4UjRaQ2GDOtavQUvZbCD2ninMO2IVr92b8fHHi2r5kFZVjeL5wMNn+PtE Ch9d487SRu4fuV/F259hNNc6N659g/3JfLR+fSYcAd46/6jXmWrTcL8Vz5jDfyVGCCeCYD GRCaotVXw/RIvh0Fqe4EcooxKvN4fm4/saj3kkOqFQ93x54+ikiSTDpF8Zhv0w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dt9Fb1JM7zCbc for ; Fri, 16 Jan 2026 19:41:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id e1a4 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 16 Jan 2026 19:41:07 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Bjoern A. Zeeb Subject: git: 8d76cbe16b42 - stable/14 - LinuxKPI: pci: implementation of [lkpi_]pci_get_slot() 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/14 X-Git-Reftype: branch X-Git-Commit: 8d76cbe16b42749336cf369fbba850bfb30e5cd6 Auto-Submitted: auto-generated Date: Fri, 16 Jan 2026 19:41:07 +0000 Message-Id: <696a9453.e1a4.5d331292@gitrepo.freebsd.org> The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=8d76cbe16b42749336cf369fbba850bfb30e5cd6 commit 8d76cbe16b42749336cf369fbba850bfb30e5cd6 Author: Bjoern A. Zeeb AuthorDate: 2025-09-04 20:19:48 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-01-16 19:37:50 +0000 LinuxKPI: pci: implementation of [lkpi_]pci_get_slot() Like lkpi_pci_get_domain_bus_and_slot() implement lkpi_pci_get_slot() using pci_find_bsf() instead of pci_find_dbsf() (no domain). This is needed for a wireless driver. Unfortunately the name [pci_get_slot()] collides with the native PCI function. Add a guard around it and disable the use when the native version is required (in lkpifill_pci_dev() and in bnxt/bnxt_en; if the latter gets fixed we can probably also fix work around it in the former; further conflicts in drm-kmod 6.1-lts, 6.6-lts, and master were resolved). Sponsored by: The FreeBSD Foundation (initially) Reviewed by: dumbbell Differential Revision: https://reviews.freebsd.org/D52065 (cherry picked from commit 4179e6b78297369f0cf0eae1076e01e5151c5cbe) (cherry picked from commit 62c3b77d1d1084dc46663eed52e288307b5c7e64) --- sys/compat/linuxkpi/common/include/linux/pci.h | 6 ++++++ sys/compat/linuxkpi/common/src/linux_pci.c | 15 +++++++++++++++ sys/dev/bnxt/bnxt_en/if_bnxt.c | 1 + 3 files changed, 22 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/pci.h b/sys/compat/linuxkpi/common/include/linux/pci.h index c22a4403a823..da0a713dbee8 100644 --- a/sys/compat/linuxkpi/common/include/linux/pci.h +++ b/sys/compat/linuxkpi/common/include/linux/pci.h @@ -1311,6 +1311,12 @@ struct pci_dev *lkpi_pci_get_domain_bus_and_slot(int domain, #define pci_get_domain_bus_and_slot(domain, bus, devfn) \ lkpi_pci_get_domain_bus_and_slot(domain, bus, devfn) +struct pci_dev *lkpi_pci_get_slot(struct pci_bus *, unsigned int); +#ifndef WANT_NATIVE_PCI_GET_SLOT +#define pci_get_slot(_pbus, _devfn) \ + lkpi_pci_get_slot(_pbus, _devfn) +#endif + static inline int pci_domain_nr(struct pci_bus *pbus) { diff --git a/sys/compat/linuxkpi/common/src/linux_pci.c b/sys/compat/linuxkpi/common/src/linux_pci.c index 1e6278418c83..4745e0416067 100644 --- a/sys/compat/linuxkpi/common/src/linux_pci.c +++ b/sys/compat/linuxkpi/common/src/linux_pci.c @@ -68,6 +68,7 @@ #include #include #include +#define WANT_NATIVE_PCI_GET_SLOT #include #include @@ -468,6 +469,20 @@ lkpi_pci_get_domain_bus_and_slot(int domain, unsigned int bus, return (pdev); } +struct pci_dev * +lkpi_pci_get_slot(struct pci_bus *pbus, unsigned int devfn) +{ + device_t dev; + struct pci_dev *pdev; + + dev = pci_find_bsf(pbus->number, PCI_SLOT(devfn), PCI_FUNC(devfn)); + if (dev == NULL) + return (NULL); + + pdev = lkpinew_pci_dev(dev); + return (pdev); +} + static int linux_pci_probe(device_t dev) { diff --git a/sys/dev/bnxt/bnxt_en/if_bnxt.c b/sys/dev/bnxt/bnxt_en/if_bnxt.c index 169255c9433e..a8c353e1c406 100644 --- a/sys/dev/bnxt/bnxt_en/if_bnxt.c +++ b/sys/dev/bnxt/bnxt_en/if_bnxt.c @@ -49,6 +49,7 @@ #include #include +#define WANT_NATIVE_PCI_GET_SLOT #include #include #include