From nobody Thu Apr 25 04:00:43 2024 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 4VQ2Fl3Wlmz5Jpcn; Thu, 25 Apr 2024 04:00:43 +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 4VQ2Fl1Wszz4LXS; Thu, 25 Apr 2024 04:00:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1714017643; 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=bT3knw5r1IMG/RmLrp1P0EQhzNVpprd6Cvz7tBCJFgQ=; b=p+9dIbjEDpq1qeBfEI4xwJCl3R+aji0eCkfuk4nVgHiSL/4APsOKVq9+2HEKR4d++erem7 Vtl6HoP46Inb9jTYDP/IrwnlV0IDusXJ+7csmL/mvBxePzKCClT1saSVzOEPgREUrsOUXH S31rNVoKx5e8Ta3eAA2QR69r2MDEqGJzPdqmcdMNaUquhJ3jtE87Oy+E6NjbPmIJ1egD2t 7WL8zrKPird4PwHuQzKvZ6/nNRiDMxHY05EKRJBs9m24ObNr+1KrKMpom4ahhijF/Ld/r+ Ts3IN3vlxTHngxsL8oWJAsCrKo+Zb5+OCzmprL2gZq7pevllD3Qgq6HiwO7/AA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1714017643; a=rsa-sha256; cv=none; b=v3bFshO8ZhEPmzDSS7R2uG6ldIGynQpwEhMviT3eQH0jErd4e0V2PN3Yqv5x2/Tijtr2/G TOQR94UYM8n3RKFqv0PYyFLeDD+Frw1Zrmso6erNuzXpS+6U9PvPXjwaxtWrxjgE+vZ6Xo PbgxQfWcTa5XkgHpjW1RDH7CQCBcPYnL4hm6z6b/RuGpXulMwTXuE3vSZw48DHi692YGCg dQLOaL3b94Pq3yqNtPdDvM0xZnDPSMbUAkMxdURiM+nUa7AwnrQPgHsP/5ab4EHEvUxcoL 4Vo1nuyWgjMge2QKHLiEZNlGxKA9dQh3T5aXmeWtIPJeERyIZc8wDxPxGAdSCw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1714017643; 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=bT3knw5r1IMG/RmLrp1P0EQhzNVpprd6Cvz7tBCJFgQ=; b=WX3CcKogZxHl3KA47uln1OynIJfAR7EELes5BJnMmZ0nDkpSe1JgjDt3jLvcU8DWSaifA8 ClHJ6OVULm6n58QauXRX4pHL7EpdvGXc93HQXYcYgUSBmMK/HhdRxiw4GI4qZ2bPRu8dJI QXSUj/ihyRV+KEoQ8fscUgpVzQWGWDVh5KboOUooQwXIzwQcKYZ+wPvICFvuYzmHSkfuyi kl04X8lrWnfmN+lWwCgwRPCgH0NJDWcPaUDk6jNXUZNMxhF8TcF4Km4IFp9V9Xm0F3aM2f dcq6cSoY3nNMiXZQ85qubt1+h9IBXL5Log+WvFsbF8jVuHtBYbYXuBH0RDL7Tw== 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 4VQ2Fl12yPzk8L; Thu, 25 Apr 2024 04:00:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43P40hGr055991; Thu, 25 Apr 2024 04:00:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43P40hTB055988; Thu, 25 Apr 2024 04:00:43 GMT (envelope-from git) Date: Thu, 25 Apr 2024 04:00:43 GMT Message-Id: <202404250400.43P40hTB055988@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 60a4a8532b74 - stable/14 - ahc(4): resolve some minor nits 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 60a4a8532b74e01c26d6f9d9b2d46e42f410e7b1 Auto-Submitted: auto-generated The branch stable/14 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=60a4a8532b74e01c26d6f9d9b2d46e42f410e7b1 commit 60a4a8532b74e01c26d6f9d9b2d46e42f410e7b1 Author: Kyle Evans AuthorDate: 2024-04-21 03:04:04 +0000 Commit: Kyle Evans CommitDate: 2024-04-25 03:59:03 +0000 ahc(4): resolve some minor nits In ahc_init(), qoutfifo is already assigned to effectively the same value a couple lines up, except in the first assignment it uses the proper definition; keep the more descriptive assignment. ahc_targetcmd_offset() gets the offset wrong entirely; as per the area of ahc_init() this diff also touches, targetcmds is laid out first in the shared map and it's followed by the qoutfifo. As a result, we'd generally be getting negative offsets here. We can't actually do a partial sync anyways, so there was no consequence to getting this wrong. Reviewed by: imp, mav (cherry picked from commit b5e0cc2fa44f52f16fc0b9c3f1709bc0f43fe2d0) --- sys/dev/aic7xxx/aic7xxx.c | 1 - sys/dev/aic7xxx/aic7xxx_inline.h | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/dev/aic7xxx/aic7xxx.c b/sys/dev/aic7xxx/aic7xxx.c index 9934fbcc41bb..4d97d8ee6367 100644 --- a/sys/dev/aic7xxx/aic7xxx.c +++ b/sys/dev/aic7xxx/aic7xxx.c @@ -4931,7 +4931,6 @@ ahc_init(struct ahc_softc *ahc) for (i = 0; i < AHC_TMODE_CMDS; i++) ahc->targetcmds[i].cmd_valid = 0; ahc_sync_tqinfifo(ahc, BUS_DMASYNC_PREREAD); - ahc->qoutfifo = (uint8_t *)&ahc->targetcmds[256]; } ahc->qinfifo = &ahc->qoutfifo[256]; diff --git a/sys/dev/aic7xxx/aic7xxx_inline.h b/sys/dev/aic7xxx/aic7xxx_inline.h index ac043ddb8bbd..6a6501b72c13 100644 --- a/sys/dev/aic7xxx/aic7xxx_inline.h +++ b/sys/dev/aic7xxx/aic7xxx_inline.h @@ -217,7 +217,7 @@ ahc_sync_sglist(struct ahc_softc *ahc, struct scb *scb, int op) static __inline uint32_t ahc_targetcmd_offset(struct ahc_softc *ahc, u_int index) { - return (((uint8_t *)&ahc->targetcmds[index]) - ahc->qoutfifo); + return (((uint8_t *)&ahc->targetcmds[index]) - (uint8_t *)ahc->targetcmds); } /******************************** Debugging ***********************************/