From nobody Tue Jan 24 05:43:19 2023 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 4P1G934jNyz3bNNR; Tue, 24 Jan 2023 05:43:19 +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 4P1G9347GWz4TJ1; Tue, 24 Jan 2023 05:43:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674538999; 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=voY2Ma2IT2Ni+qiY1a9GAeJbByIL++9Bpdd0+aKZtNs=; b=HgiNhD5+js6UosMpD6UTYV01OFZRXqEcKtWmbovm3K+zuADSgUwnCPpvc8BonQGCZhExkD nyR9yxcLZujkeCY0Vv4OIeY5TsTOb9kV6ULLy3R2hdHSV2FrQj9T0Rc7BKZmQrAu6gISg1 rng6bkAKZtrGqCR7V0Z2ardiy8RJb+/aaYI0f7WSwebnIEcUh95TxcapCFwtj0n9RkBcdV vtrPi3WhkJCHMJ4Td2KVPxLQ+gdZjzVGrmh+0jMfxloWi1TZXkdxcOtLwHYIE88VkfeR/T 3NhFkM+ZH6+kVheRyMeYJ+FKQ5Lg1HNrRCg5+h1Hm7lqnefq4dWpe0sCrEgdWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674538999; 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=voY2Ma2IT2Ni+qiY1a9GAeJbByIL++9Bpdd0+aKZtNs=; b=ARZUFDM5dpWOm6+pCuan0erpwcGtCrhTGX6Z7J6i/TJjv/2IBVBesg34Mn+5zSDpNrpoie BsGyLPADPnEx3f8rqxQRga2S48otzyo0KT7bYGebZ5NK3NiKXz+2I8HJaqRRfIaJjnq4sQ pnQPSJdvmxhX5gz7uR7q4Q503q84wi6m+MqRJwcth12g9sGIMvW+NdjjdSVzqH2XBtmZWI pYqmjQDYTpvWJSsNJar40VQdDc0eWLLS09Pp6N3NOd0vhrRDf0JizFuJGYeFHn/YjlRYKN SGmAn+Lie3b4Npbxa9rYMhjPo24+M3zvrsjZ2zwRf7W8C5Uw3F3HyNkfzQ3lGA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674538999; a=rsa-sha256; cv=none; b=c8U17GibcU0tPOnZUAO6hX16Ihd+sewSbFkh1qqgV4Z6eKC3D3+u/k5rhyOyg7nXowZAgP iub5KjcSWmvramjWJ2IPqOf0ExHQzr2pK1dpKjDJIWSlY2eg1wYYUMEWF/PU4zfNGZ5FXc J2ixDc8opsNlGNU/KIKNNebWUczmDmFkB8gert0mtbZBy3vjvbr+/rDyc8xBgu3PwXj2wq k7tANBBoSDvFodpMXpQtV5Hblu+jZyXhw1eQd/JYlqTDMjStaH4BArhb8DGzb3rC+TbUGH R3ppi2jGoEskswHrEpCkwOoRindShn1Y5gCUosfwAHkDZw/xb1uhI47oYaQumQ== 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 4P1G933DzyzyHR; Tue, 24 Jan 2023 05:43:19 +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 30O5hJoS061911; Tue, 24 Jan 2023 05:43:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30O5hJOa061910; Tue, 24 Jan 2023 05:43:19 GMT (envelope-from git) Date: Tue, 24 Jan 2023 05:43:19 GMT Message-Id: <202301240543.30O5hJOa061910@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 1154290b4646 - stable/13 - bhyve: Use XHCI_PORTREG_PTR in one place that open-coded it. 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: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 1154290b4646ab9ac9686e65c41729fdb078b58f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=1154290b4646ab9ac9686e65c41729fdb078b58f commit 1154290b4646ab9ac9686e65c41729fdb078b58f Author: John Baldwin AuthorDate: 2022-11-16 03:19:35 +0000 Commit: John Baldwin CommitDate: 2023-01-24 05:13:55 +0000 bhyve: Use XHCI_PORTREG_PTR in one place that open-coded it. Reviewed by: corvink, markj Differential Revision: https://reviews.freebsd.org/D36888 (cherry picked from commit fd104a6ebc35cfc9cadeb981b23200e805a88b3f) --- usr.sbin/bhyve/pci_xhci.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/usr.sbin/bhyve/pci_xhci.c b/usr.sbin/bhyve/pci_xhci.c index 5502f95c3b46..13fc3a3b1bb4 100644 --- a/usr.sbin/bhyve/pci_xhci.c +++ b/usr.sbin/bhyve/pci_xhci.c @@ -2131,6 +2131,7 @@ pci_xhci_rtsregs_write(struct pci_xhci_softc *sc, uint64_t offset, static uint64_t pci_xhci_portregs_read(struct pci_xhci_softc *sc, uint64_t offset) { + struct pci_xhci_portregs *portregs; int port; uint32_t *p; @@ -2149,7 +2150,8 @@ pci_xhci_portregs_read(struct pci_xhci_softc *sc, uint64_t offset) offset = (offset - 0x3F0) % 0x10; - p = &sc->portregs[port].portsc; + portregs = XHCI_PORTREG_PTR(sc, port); + p = &portregs->portsc; p += offset / sizeof(uint32_t); DPRINTF(("pci_xhci: portregs read offset 0x%lx port %u -> 0x%x",