From nobody Wed Sep 07 15:10:04 2022 X-Original-To: dev-commits-src-all@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 4MN5K90Lmpz4bPDF; Wed, 7 Sep 2022 15:10:05 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4MN5K858XSz3XhW; Wed, 7 Sep 2022 15:10:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1662563404; 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=AsL8qbZ4WyjW3C9AotIU5rFQPddbx92HelKFHOXhnnI=; b=OxeRC4S6abK2YXFIB2RLRyi+MnWPRhgHHzzxAtwUn6uHNY2jeVKb2A36vO43K55O5uzoAd YnL6Ljh8uefkrMkiaCevLoJVK5ej4zTPt0o6qKrj2qCipgX76PtyifoepX9UY4vhGKoWHk 0PfgtkNJu31m34M5a8wWF0GDN2F9Kkjf0/tlfAPpRRUOF3G9/qWIKxtt9tneL4mvrwtRcs SXL1NDDFoCilPV7SHEfzxj5K0KCaC8RhJiN0z45mqtH4ki+aLV6jylotuMIzVa2exOi8JX ve51V8pLfyg1rzDoTv2VnVwEogtcDKRCQ3KJxsSsSIxLtla3V64tki5YraQcpQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4MN5K84GPMzZ6b; Wed, 7 Sep 2022 15:10:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 287FA4Jp019624; Wed, 7 Sep 2022 15:10:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 287FA4fr019622; Wed, 7 Sep 2022 15:10:04 GMT (envelope-from git) Date: Wed, 7 Sep 2022 15:10:04 GMT Message-Id: <202209071510.287FA4fr019622@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: d2210bd41a43 - stable/13 - linuxkpi: pci: Add more functions needed by drm List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d2210bd41a432b4ad186d78ec799b1603a451d46 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1662563404; 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=AsL8qbZ4WyjW3C9AotIU5rFQPddbx92HelKFHOXhnnI=; b=hCP76slexcG1O/RqxebyPEeiwr9o8GIGwFmL1H20qVBMbyqHMZpjqFQA/hykcZKOJQ43I7 gVm7T3vR+nJUe8lJ8FfEb8ObG2rCQ+ekMDBWRy03zT9ObEMxp2owYgURwLkiVwqUfmVbbI NYAGCjnXvOoKMgOuQ1atTaBQsDfBpVN52/337b1zMH12ga/8kWLJjmJzRM8napPJCmXUi+ HeSFScmDpjXhjGIWqGxrPSaSlfNZfRcfFp0mkqnCvZH85Ap+wfrj5qncMGTueSq33rlcFQ PXQjAMfmLXF19QFKacqz8l0efsMxrjA8OyGhAbMxfRaK4a6naxK4fB4TKcxzqA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1662563404; a=rsa-sha256; cv=none; b=ZX3ezoGajB/Li+aS9AKn8uIZa7ZpJvCw/kaizy9ao3lK/ZCoCKNoKd25/o/8wyzZ8eu04K 6xy+XLqm6VuKrc0Xso6SLGS9LJF51hpdrVR+6yDb89Js30V4IRGllb1Wg61iICFTGLVYRO uMxVuJ+ooVm6u/s25GNNWj8e/+uFlCwtL1icm+YJAA1pAD61eEr3ib2EZF9NU0H/yD/hzT AW3zN8V34S42ViyN95tZAbcXZGPcm6zGOdjh7dwuiVi2DBiL3y8bdqu8ojGEdrgjAD0ZMx Z9dJR66ALCFz4o0DQ6n07/UaemjazsiZGc0AkudOBmstkYCX3uRV+rJfGCpGhQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=d2210bd41a432b4ad186d78ec799b1603a451d46 commit d2210bd41a432b4ad186d78ec799b1603a451d46 Author: Emmanuel Vadot AuthorDate: 2022-07-26 08:07:39 +0000 Commit: Emmanuel Vadot CommitDate: 2022-09-07 15:09:03 +0000 linuxkpi: pci: Add more functions needed by drm Mostly stubs to satisfy building Reviewed by: hselasky Obtained from: drm-kmod Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D35938 (cherry picked from commit 6890e327a86da0c268f2b21637bce4891626ada0) --- sys/compat/linuxkpi/common/include/linux/pci.h | 30 ++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/pci.h b/sys/compat/linuxkpi/common/include/linux/pci.h index c5aeabbf1791..1734fb52baa9 100644 --- a/sys/compat/linuxkpi/common/include/linux/pci.h +++ b/sys/compat/linuxkpi/common/include/linux/pci.h @@ -1538,4 +1538,34 @@ linuxkpi_pcim_want_to_use_bus_functions(struct pci_dev *pdev) pdev->want_iomap_res = true; } +static inline bool +pci_is_thunderbolt_attached(struct pci_dev *pdev) +{ + + return (false); +} + +static inline void * +pci_platform_rom(struct pci_dev *pdev, size_t *size) +{ + + return (NULL); +} + +static inline void +pci_ignore_hotplug(struct pci_dev *pdev) +{ +} + +static inline int +pcie_get_readrq(struct pci_dev *dev) +{ + u16 ctl; + + if (pcie_capability_read_word(dev, PCI_EXP_DEVCTL, &ctl)) + return (-EINVAL); + + return (128 << ((ctl & PCI_EXP_DEVCTL_READRQ) >> 12)); +} + #endif /* _LINUXKPI_LINUX_PCI_H_ */