From nobody Wed Nov 16 03:23:13 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 4NBpKG578nz4hP41; Wed, 16 Nov 2022 03:23:14 +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 4NBpKG1BZsz4MYb; Wed, 16 Nov 2022 03:23:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1668568994; 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=3rd7ReQoBKle8jCI19sOi9oBlQL6eekX4R0PQ92t8tQ=; b=bR8u76v50PlFiechaWQcftAMDK6ny6yBgLzO9RYQ4pqzZ5AXrhmXppcqOBRW8pdA5li5dh UxbvVHeRRdyrkDkd/hymjmv9G9EjLMF/Q0ZeslL3JfLTNAwRRVuq5Vd9L8d7SfxYYVZXLf 927eTh95YTtYwYOr2gvqNta2FmKAY6MWClJNYqUEhVpZoee5UFOl7+xe/dTK2ajgO5z0TS HgZkAocdJcF6vGdAKDhGico/cT/UMnklfpC+pYM9so0GTYXmcpykzeDAyGZdLer1p644El WdQ7W6gsplNTUZMqH/ToE2W36VZBxhha97YU4r8wlM7iXUfNcqUa4euvjXRaLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1668568994; 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=3rd7ReQoBKle8jCI19sOi9oBlQL6eekX4R0PQ92t8tQ=; b=PXqcMILSxiHe06HCViHg0sUgLTUhXUuqGvoBfVIj/6ynplhKVpKiQOD7PDBc8d6VoCT3/c 19n03qPRUAN43qVssJHMMJwHTLA7Jk58kmTdqJIK4mIGQatJSxX8dloVShtbrbh5HImz+i iH7/sBvt0OhCZlxyd/BJZ5JbGp9EeFXLH24mLpRY7wAKYne0UNopZz6KVf6ytr00DjCwgG vSmfC4kadDMt1Dj3lw5xpgIllU8GYNoxbCxk2gYbN2WFHB2Ln9CLvVmbZr8pMiVNcg2SPF b5R7AppFRTdZ7mn3Qu0+DWSlDPE9ek6c3cso4tjJ1kpNfNqad+xeHly8n6pzVw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1668568994; a=rsa-sha256; cv=none; b=JCkRoFgxPA7f5S8jiRu8aDuT+6qdbvN6Uo9SH37eNizKUxObp77UqdM6RcKQaXVIAiJW2X sKLPPWqPLP9Jp7mpPyCKTUIxqHCy8VHSkDdb8nwl46YxuVek4wh1yq+tpbqX3pQTVTf2Oi zzTocK2Nn6GMPfnBFeC2Nlhug3qWP6raF2f+8CpgwiH1qJ0qPkF+84yzc+UFcBIeOqDnaM 7jvTH7FqYXi4yuEadUjODTQoAWwL7S/lPknxzWHghatGoBcs8ndiSc5Bwz/77OZtw5AkiG glDHm8bx97eZPgslXnjfsJMKKHtiDh6aljxe3zfDOH+yi+ADh0SAZQZK1yPQYg== 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 4NBpKG0JSqzmjR; Wed, 16 Nov 2022 03:23:14 +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 2AG3NDCD055820; Wed, 16 Nov 2022 03:23:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2AG3NDc1055819; Wed, 16 Nov 2022 03:23:13 GMT (envelope-from git) Date: Wed, 16 Nov 2022 03:23:13 GMT Message-Id: <202211160323.2AG3NDc1055819@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: fd104a6ebc35 - main - bhyve: Use XHCI_PORTREG_PTR in one place that open-coded it. 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fd104a6ebc35cfc9cadeb981b23200e805a88b3f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=fd104a6ebc35cfc9cadeb981b23200e805a88b3f commit fd104a6ebc35cfc9cadeb981b23200e805a88b3f Author: John Baldwin AuthorDate: 2022-11-16 03:19:35 +0000 Commit: John Baldwin CommitDate: 2022-11-16 03:19:35 +0000 bhyve: Use XHCI_PORTREG_PTR in one place that open-coded it. Reviewed by: corvink, markj Differential Revision: https://reviews.freebsd.org/D36888 --- 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 0d8122ee8c90..1f3d78a4cfea 100644 --- a/usr.sbin/bhyve/pci_xhci.c +++ b/usr.sbin/bhyve/pci_xhci.c @@ -2130,6 +2130,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; @@ -2148,7 +2149,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",