From nobody Tue Oct 06 07:51:25 2026 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 4hzT3L1Y51z6cWQj for ; Tue, 06 Oct 2026 07:51:26 +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 "YR2" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4hzT3K5r5sz4H82 for ; Tue, 06 Oct 2026 07:51:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1791273085; 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=GPOzOdGSdQFltDyJBSaZ0swklIoXSD9+A+z88zVeJfQ=; b=jmTZkL5ahusOdRC+mtfegDpxW/OQ2JQkb6GcHOMJ1ojLGge4mecQeCuwFTT12VvjE8ioXi /bRMlJ0hDiCku5oYutHx49Ktcz9pjUn5qiOo7QMWbVA6nLp+3d0SEWFmVmDoPj8+GC1ES0 Lvu3SKM3c8qGrVe5kQxut9SPheBq+sZKh565okVNgzSRo9Bd4O0IFcMXCXP1kEpRC0D/BK L2oKqXi3An54O8UjnH618kzBX4uV7FvrhaWhVXDLpr1wHru7+aPKFqjoP83Nm0KV9ZfAiW Q2RP5uSgH+n9gTEtk9PutwEJS2V1zDgR7TJDlWEfFEU3Nzkhx6FOlCTZaRQoEw== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1791273085; b=pUMla49cbGt8EdVdD1UK3/yM5ekHwVrmVcvWIZf3+EAll5B1r0sacO+CPGYsxsTKv8p7Sq 010F0nhEHD+XXLq62PXZjAtCCEi4FJGP1tz5sEkk3roc1qBIUo0jKRkMc98Ak3P/ZzjOof ET6kyWLH4rubpFUjnI/SLXU78TehyK5YfiLDXh6I8CAgQnuTFz23kY9gXfHauNGdJzhV2p Uwrbm/xbBUnpqXs88eIi75vrYXaiUZfX+0A5kohhB1O1FUTQfxzg4MucuXZNUdn+/GPaYX uumcuDpG2Gv4DTvvGXnPMi+33Mkbdh9zIo3Wd4hz9hoaunBLAwEGHuxgCm2XRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1791273085; 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=GPOzOdGSdQFltDyJBSaZ0swklIoXSD9+A+z88zVeJfQ=; b=Z4zSJ5TKe4mf3EOLd+GzEzKB2/E894CCcnqlsUcflVJu4mgHyvqUEpA7eFdNya3cLb7FJX 3dUUVApTrBmLn3qtO6qRz1NGLz4SjWt+cL4893Qh1bkpRXfCweKpgoq+1C1885aCYuDtPC EIfnOSgQQ9cGxeczfc4IVCxhclwzhI00n/pFoNNuykRG6QIvpMD8WiR3t+KEd4KjB3HXtO OeiRVeUsRkfh2spmaPPb59KZRVgIBg9pSg4sUThm8062fgRadgtdaPHBFivC3DBgTAOh8U Kl7RcZxsTZCQ7WFavbQ3TnGhksAch5jnKrhaYlaDqvpUoOxi8DYGSJ+KK4g5oQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hzT3K4pj1zxpL for ; Tue, 06 Oct 2026 07:51:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 477f0 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 06 Oct 2026 07:51:25 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jaeyoon Choi Subject: git: a078bf6669da - stable/15 - ufshci: correct the crypto/config register offsets and HCMID fields 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 List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jaeyoon X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: a078bf6669da860792fd2867beba5f5076b78bcd Auto-Submitted: auto-generated Date: Tue, 06 Oct 2026 07:51:25 +0000 Message-Id: <6ac4a87d.477f0.1fc977c1@gitrepo.freebsd.org> The branch stable/15 has been updated by jaeyoon: URL: https://cgit.FreeBSD.org/src/commit/?id=a078bf6669da860792fd2867beba5f5076b78bcd commit a078bf6669da860792fd2867beba5f5076b78bcd Author: Jaeyoon Choi AuthorDate: 2026-08-18 05:06:54 +0000 Commit: Jaeyoon Choi CommitDate: 2026-10-06 06:28:03 +0000 ufshci: correct the crypto/config register offsets and HCMID fields The reserved array after CCAP must be 508, but it was 511. This pushed the config, MCQ config, and ESI registers from 0x300 and 0x380 up to 0x900. None of these registers are used yet, so nothing broke. Also fix the HCMID bank index field. The spec places it at bits [23:16], but it was defined on top of the manufacturer code at [15:0]. Reviewed by: imp (mentor) Sponsored by: Samsung Electronics Differential Revision: https://reviews.freebsd.org/D58819 (cherry picked from commit 34518292a3e077efe239b61f64b9d860bbfb2960) --- sys/dev/ufshci/ufshci_reg.h | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/sys/dev/ufshci/ufshci_reg.h b/sys/dev/ufshci/ufshci_reg.h index 6d5768505102..87b4bee64b0a 100644 --- a/sys/dev/ufshci/ufshci_reg.h +++ b/sys/dev/ufshci/ufshci_reg.h @@ -61,7 +61,7 @@ struct ufshci_registers { uint8_t vendor[64]; /* Vendor Specific Registers */ /* Crypto (100h) */ uint32_t ccap; /* Crypto Capability */ - uint32_t reserved7[511]; + uint8_t reserved7[508]; /* Config (300h) */ uint32_t config; /* Global Configuration */ uint8_t reserved9[124]; @@ -74,6 +74,23 @@ struct ufshci_registers { /* TODO: Need to define SQ/CQ registers */ }; +_Static_assert(__offsetof(struct ufshci_registers, is) == 0x20, + "operation and runtime section must start at 20h"); +_Static_assert(__offsetof(struct ufshci_registers, utrlba) == 0x50, + "UTP transfer section must start at 50h"); +_Static_assert(__offsetof(struct ufshci_registers, utmrlba) == 0x70, + "UTP task management section must start at 70h"); +_Static_assert(__offsetof(struct ufshci_registers, uiccmd) == 0x90, + "UIC command section must start at 90h"); +_Static_assert(__offsetof(struct ufshci_registers, vendor) == 0xC0, + "vendor specific section must start at C0h"); +_Static_assert(__offsetof(struct ufshci_registers, ccap) == 0x100, + "crypto section must start at 100h"); +_Static_assert(__offsetof(struct ufshci_registers, config) == 0x300, + "config section must start at 300h"); +_Static_assert(__offsetof(struct ufshci_registers, mcqconfig) == 0x380, + "MCQ configuration section must start at 380h"); + /* Register field definitions */ #define UFSHCI__REG__SHIFT (0) #define UFSHCI__REG__MASK (0) @@ -155,8 +172,8 @@ struct ufshci_registers { */ #define UFSHCI_HCMID_REG_MIC_SHIFT (0) #define UFSHCI_HCMID_REG_MIC_MASK (0xFFFF) -#define UFSHCI_HCMID_REG_BI_SHIFT (8) -#define UFSHCI_HCMID_REG_BI_MASK (0xFFFF) +#define UFSHCI_HCMID_REG_BI_SHIFT (16) +#define UFSHCI_HCMID_REG_BI_MASK (0xFF) /* * UFSHCI 4.1, section 5.2.7, Offset 18h: AHIT