From nobody Mon Aug 10 02:31:17 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 4hJJfF5FJlz6pVW3 for ; Mon, 10 Aug 2026 02:31:17 +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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4hJJfF3DQ8z3xy0 for ; Mon, 10 Aug 2026 02:31:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1786329077; 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=kNpwCSIHWGIDmTlxy/CQgeY34wjao0zaMQ9qh7bqZJQ=; b=BXYxV8RA9BcxbMi+GFA2oX515e0oifq9+jlT2djOPWOiH3i6YuRbibwlHrCjwFLNIuTHmq OHxmcAKQsl0DCInUAqSAge6pP7VL9jD4WLTND57OlXLQWcdblmwHH8cmV2FZ3jthpyDnl3 7SJJq5vDvDdoLkPb0IY1f3/vH5nAOvkIvXjLPLMLccz7htdfep4b5t7zWZPfs3j0MOF6v0 DL7zpBF3ygUhE0e5uAGxNks+xjliHM4dKyOfsleFKC+OrnOO1/P4kibsCwEpU3oMBLLFBJ f0RGx8qKyZqZUWJy+slcaShcD3M1tRz1fFFjcy/lZCdLLtFBUmzaiiAisxd05w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1786329077; a=rsa-sha256; cv=none; b=Wsq/g6eie/R//fRk+B1TkZ7MRdK/emWHM2pudKoj97Q/pjvEm2K9MKEi9Azt6+cNchz63Z x1udncZHSVP/jYm7gO7dh9GzlxWp5ovSS5dVFKQKpgC0v5PCv4phTBJTVuPkFzPyS6uCEA PVABiawAhoT0lvj9PO2rGFPnwfVX3HxWMMfN4dsWaPjn3PrSLrk9ugPwiwTCNr4CPizakh lXpnqTN1ixFbOBHQx9rfzYLmWioanQAUl7X8ggYGDyf3LJK8KtTESHn9bNKaoEVfp+sOaE lOAiOFSL/0rw1TxpeHwb/RnsVSgL2jo6Hq4RofCnAlkvu+QiQtljZXeGgWn2tQ== 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=1786329077; 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=kNpwCSIHWGIDmTlxy/CQgeY34wjao0zaMQ9qh7bqZJQ=; b=ZTrkgRdYYeO9v/6Hup+DLTQ/1ktJgHNu6tRnoplnhKKtFbxLqEgNC1o2GzbvzCv/7vh7Ua MWexozFwpivbu1z0Ag2RrE+vlLIG4fYeszYfXG9vX0FjdDILdZhN4Aaeux799myoBO/8v6 OA660pQ3b4xPPyeWXs6lst/NtOsiGL5YaU3jaGfTJEKF8hWdx6S5jr2E+omYB/ZeR3M6np lnuE63u/tSBkCDW/IPDgpoWrIy0V6ssfAjiFEBDpIELVE/mq+HHcGnEK/93P/8gZm9ND1V dL5XtTcLi0H6au3KcD3tICopWq1B0tNmV86Pd/m3jGRdXQPaY7XRFmyafxlZnQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hJJfF1qC4zqnh for ; Mon, 10 Aug 2026 02:31:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1f119 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 10 Aug 2026 02:31:17 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jaeyoon Choi Subject: git: 154e335cd635 - main - ufshci: fail attribute reads on a non-zero config result code 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/main X-Git-Reftype: branch X-Git-Commit: 154e335cd635436c69ad98723e25988852bd11db Auto-Submitted: auto-generated Date: Mon, 10 Aug 2026 02:31:17 +0000 Message-Id: <6a7937f5.1f119.2c6ed34@gitrepo.freebsd.org> The branch main has been updated by jaeyoon: URL: https://cgit.FreeBSD.org/src/commit/?id=154e335cd635436c69ad98723e25988852bd11db commit 154e335cd635436c69ad98723e25988852bd11db Author: Jaeyoon Choi AuthorDate: 2026-08-10 01:33:00 +0000 Commit: Jaeyoon Choi CommitDate: 2026-08-10 02:28:47 +0000 ufshci: fail attribute reads on a non-zero config result code ufshci_uic_send_cmd() only logged the error code and returned success, so a failed DME_GET gave its caller a stale value as if it were valid. The gear and lane settings could then be programmed from that garbage. Return ENXIO for reads instead. Writes keep logging and continuing, because a device may reject an optional attribute and that must not fail bring-up. Sponsored by: Samsung Electronics Reviewed by imp (mentor) Differential Revision: https://reviews.freebsd.org/D58654 --- sys/dev/ufshci/ufshci_uic_cmd.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sys/dev/ufshci/ufshci_uic_cmd.c b/sys/dev/ufshci/ufshci_uic_cmd.c index c6e6afe3f688..03ea8b2ba9f1 100644 --- a/sys/dev/ufshci/ufshci_uic_cmd.c +++ b/sys/dev/ufshci/ufshci_uic_cmd.c @@ -199,6 +199,14 @@ ufshci_uic_send_cmd(struct ufshci_controller *ctrlr, "Failed to send UIC command (Opcode: 0x%x" ", config result code = 0x%x)\n", uic_cmd->opcode, config_result_code); + /* + * Reads fail here: there is no valid result to return. + * Writes only log the error, so that a rejected optional + * attribute does not fail bring-up. + */ + if (return_value != NULL) + return (ENXIO); + return (0); } if (return_value != NULL)