From nobody Wed Mar 30 15:49:45 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 90FBA1A5458F; Wed, 30 Mar 2022 15:49:45 +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 4KT9qF3K8mz3kHp; Wed, 30 Mar 2022 15:49:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1648655385; 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=vYp9Km8RCQSEAm5I7/W5oF9UlKJz0jlmRkI14rVzoR8=; b=tTaLOW/DalMnvXEWyASKkf1pV7MEnzmP8RbI70sO0xDhoCZDt6TLmqoXLJ0HRdr1QjJgZh eBgyB1VZijOOZH+ksFek+VAqT7PpVwqTttkM9CBwziwAedVY1qi+gIzWyJSKViFfO7tlyw D1boW9ePonmYb0hUe49tBtQDG29H/zkF6Nm0xmOP2kl0KQaX/qt0ejR5GEwTnSxQaLLz+p rat79UnEnBOnWjBPE8HcFDfXxhHq4sivna8c9KnZFiF0+VaWVzzV+AaOS+sQ6u2P1dO+1P J4XThAKoEXtgSlGET7B38vaSRUnLhr2zcYmJkdtCgqjDYxZQjR5tywsU0KTtAg== 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 45B0E16184; Wed, 30 Mar 2022 15:49:45 +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 22UFnjHB019282; Wed, 30 Mar 2022 15:49:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 22UFnjDH019281; Wed, 30 Mar 2022 15:49:45 GMT (envelope-from git) Date: Wed, 30 Mar 2022 15:49:45 GMT Message-Id: <202203301549.22UFnjDH019281@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 63ec5947474a - releng/13.1 - LinuxKPI: allow bsddriver name to be set for PCI 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.1 X-Git-Reftype: branch X-Git-Commit: 63ec5947474a545bb2733647e8a88d5da5e4cde9 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1648655385; 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=vYp9Km8RCQSEAm5I7/W5oF9UlKJz0jlmRkI14rVzoR8=; b=npezVOjlh9mp+aeDqh4CaX9Dlg5LzF+vZqx1MtNH5Pi8Vu7/IAuJhsYSda2DnDGOUXz6sA CUhVOs4If93J+fjEmAlPMdC8Phb8VESuxEqaYtYbc1TGG0cfDdxdGrwgGESleHHMj6trvp 5bSG+ui6erPyimGIJQCIQMev/nHuePhI0pAO5nheF+SDPnpP53nxif9rslZslmG45mA6Sq PYRozfO7VFNhXuOfAhi+t2qie04vTWkWCZf8XM0g46Al2KazDvhTZDvzV0jVInCuZbyKtn J6udD/ogeTRRU3f2oYtssJPWyodnxIDbRPX9bKvrfSYVS0HavDAtiRHJaju3yw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1648655385; a=rsa-sha256; cv=none; b=hn0LkgqKXc2s8TGDTe63f5DqEx3qlp1pe7hHWhzhzSv+JKAR18NFxJHDK+Dz2QcJ9Jyq1H aNBkMsV8DQWMnt3De+z5PytkxyWXHD6V8zZXixa3PJz9Yn8MLjH94yKaOZz0tnfclce/dj M51/UrNInOcdlu7DblAqUj0aOWvlqaKFlV8mMScYQAj+ns0DWsEcZFjB2oBlNmotqVhsZj iv5OUE5rOsvJ7eLqitbbhNPPsbruivSujWkMeTiiSKeVqDKD0Yd+NjRwxN312tlfktE2e8 acvEV5tnY2xKRy7NyMyN9HyFVO22NGCdQAh+uHQUUOfKKPkqCwKzHby/xnw3Ag== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch releng/13.1 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=63ec5947474a545bb2733647e8a88d5da5e4cde9 commit 63ec5947474a545bb2733647e8a88d5da5e4cde9 Author: Bjoern A. Zeeb AuthorDate: 2022-03-24 01:45:36 +0000 Commit: Bjoern A. Zeeb CommitDate: 2022-03-30 15:47:18 +0000 LinuxKPI: allow bsddriver name to be set for PCI Allow a driver to overwrite the bsddriver name (we use for pci and for wlan parent devices). This allows us to to set .bsddriver.name in struct pci_driver passed to module_pci_driver() and with that set the BSD driver name while retaining the Linux .name one. This is helpful for divers which have different parts depending on chipset and with that would change driver names which is highly confusing especially for configuration. One example is an upcoming rtw88 driver which would be rtw_8822be or rtw_8822ce depending on chipset. Approved by: re (gjb) Sponsored by: The FreeBSD Foundation Reviewed by: emaste, hselasky Differential Revision: https://reviews.freebsd.org/D34653 (cherry picked from commit 81d058df6d255b7f551564f6d29a03692b51fe5a) (cherry picked from commit 00450eeab2465d6dc800680158b2cc67c1a7d9fc) --- sys/compat/linuxkpi/common/src/linux_pci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/src/linux_pci.c b/sys/compat/linuxkpi/common/src/linux_pci.c index bc169425c6a8..0734acac60ac 100644 --- a/sys/compat/linuxkpi/common/src/linux_pci.c +++ b/sys/compat/linuxkpi/common/src/linux_pci.c @@ -654,7 +654,8 @@ _linux_pci_register_driver(struct pci_driver *pdrv, devclass_t dc) spin_lock(&pci_lock); list_add(&pdrv->node, &pci_drivers); spin_unlock(&pci_lock); - pdrv->bsddriver.name = pdrv->name; + if (pdrv->bsddriver.name == NULL) + pdrv->bsddriver.name = pdrv->name; pdrv->bsddriver.methods = pci_methods; pdrv->bsddriver.size = sizeof(struct pci_dev);