From nobody Thu Apr 25 04:00:45 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 4VQ2Fp3xDrz5JpXM; Thu, 25 Apr 2024 04:00:46 +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 4VQ2Fn5GJfz4LZs; Thu, 25 Apr 2024 04:00:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1714017645; 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=RYgmJUwxhsTFzw9h41DfssOtwLu/PuiLJ6kvQkA3Ccg=; b=V7KD7AN3lX6ZN81+UXCsKjXThE4JiJL032QYYM9ub33TaTtsEQIGBqBHDJQBoP3rPwaNK2 Op2TY7Hga/UrnKCA84e4BllHG4FpO7WN+grDcaLNVGXq3ESphHL8M19BkZl0/wuptKbBcm tagNXYC3HlAtc2nTGYxbrUiWJq4nGnX7AzPAZtv3rwYrpwERTC4h1xFR8Jg5Iaz3greT4d Gq7dNzTTv35dfpPPgNnjSaHd/z1T6O6Rlp3n3cyJnp4YhbGC0gLdMX2OGCR5pKCXLlbY0P 6z6kYDO4f6w2po+wS3AFog2dHnL7dUeXyITQH2njePOKIaUMqsLnjSQAcq0zFg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1714017645; a=rsa-sha256; cv=none; b=vyZSKHaidpf2YMzAlQX1AhYMpcji8x2LHx5H2hDKJT8BQfbxXtNYiNccr/P9wrB2YiTXCU 2pRDubolad4pu1X00NVHzZgbVk1AwT0eI2c1EtpIzQ80TWQY+uLFWQHLzjeanOWigPUQNl oq4AZrUfkFYcFUGvPl5lHVOYJWHAp5huzlNcbHj3GNfWDNpWNtsIIFJY+N2yMGi2piwSbD lwOo1go5qTzkd0gCt4F2PtkXxEq5RSpAbCbGof/4WfdEY3cR62kufhGn3VIQhibmn0/mnU KyIGnfBATq/MgZaJrRNmhyhGd78UcjHUDVL6eASHFLOluwaut390z8koT0WutQ== 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=1714017645; 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=RYgmJUwxhsTFzw9h41DfssOtwLu/PuiLJ6kvQkA3Ccg=; b=A+AHCMkfwm0/FcO+DTIRlXonI9jsKIr2Hs5+qH7Kkfp47yNTBeXDVChykkKy/7XFt/zts7 VGpf3SqUyYXjSoFBI5S03DGsigR7o/lLnWGeST+RSBtOtaxsC2nrG9rcEoKzNkTf+Jjf1G CYo5L7z/UsGEMa39CuGHtZrsf0zMi8PGPotJBUx9MuHEe3FqePo6gDsZqXEjZ1orHgVUG6 Gw5/tH/KUa18uZn2AamwH0UChYXNNvyoEPGZx6q2b1w51LcE8kM7V9Wqyr2u53DZlwANhL c2WKvz3o7MK41S5Qz41V9eSomSDdo2B6Ze+g9AIbNY0jX+YFwUUvo0oyTXMOpw== 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 4VQ2Fn4st3zkX5; Thu, 25 Apr 2024 04:00:45 +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 43P40jV8056177; Thu, 25 Apr 2024 04:00:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43P40jO8056174; Thu, 25 Apr 2024 04:00:45 GMT (envelope-from git) Date: Thu, 25 Apr 2024 04:00:45 GMT Message-Id: <202404250400.43P40jO8056174@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: fac45b6b9a58 - stable/13 - 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/13 X-Git-Reftype: branch X-Git-Commit: fac45b6b9a58911a13c2709407863dbf8b7fd5b7 Auto-Submitted: auto-generated The branch stable/13 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=fac45b6b9a58911a13c2709407863dbf8b7fd5b7 commit fac45b6b9a58911a13c2709407863dbf8b7fd5b7 Author: Kyle Evans AuthorDate: 2024-04-21 03:04:04 +0000 Commit: Kyle Evans CommitDate: 2024-04-25 03:59:20 +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 91bc68121067..141a0b526c97 100644 --- a/sys/dev/aic7xxx/aic7xxx.c +++ b/sys/dev/aic7xxx/aic7xxx.c @@ -4937,7 +4937,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 ***********************************/