From nobody Tue Oct 06 07:51:20 2026 X-Original-To: dev-commits-src-branches@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 4hzT3F0BNkz6cW4T for ; Tue, 06 Oct 2026 07:51:21 +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 4hzT3D25jYz4Gpn for ; Tue, 06 Oct 2026 07:51:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1791273080; 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=rUfN1w4VY99Nk31FHj/S9EBgS7VM98R19EBS/DZHfwA=; b=mFBU21WL5rhYr77QrmuaLjzzWc+DT9mGaJOwUflH4Kydw2LKXZerD4513QtwzSZ9B+dbMb eSePuhq3hsFV6hLqVdWgbgN6LzS0+qJGLLaAbvWnDDhEDKpz2sBKx0NBlkCGyJDTMzPI1s YrZHwS59hIUrOCi34rVYhbgxiuWd/ukdHtw/iKBf6e0p5MPCa2Jr0imQ0mn73M0AVPrApd lzpOpV+FBg6lYlrKbq8ZTYmVn90etuzVPyzq1ZlV42i14zEfHIX+Xc8q1xvri9yrFWlrg9 w7mYcX8yGZkLa8KBjSYjQDK+E5I1tdOb3xSiuCZCkUrNL2V/cyvJZtd9D5RuTA== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1791273080; b=RZcMjwbK+B/Ovo/Ec6cbyoIArKGpHHuPVFG0xbJq1VhMdKiumHcF3V4IiqJ/ifVtDEN9qw DGGBUE/6mP+WAnX+GXh8oLRFsK259lyeEudNCzRRnNfVNSijG73kKvEhFu8gyA6+mM81IH 4swWCNt7XCxjf0Pa0VcB3oto/fq0d2w9d3EXt5Hhg9a2rgIuO29Y73E9Nhv89t/GDWuoN5 jHgge67aq6VdyJlWaGeVyvFMBvlRSvw8DamYJtGxz9m8as7kRHnihS66/9PrnUW1P4RB39 P80w0rFlgTUACn4JZLLU1ZkiIMQ+RQkah0pdlZRKxCfzlWjH1sJBJbn02gog1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1791273080; 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=rUfN1w4VY99Nk31FHj/S9EBgS7VM98R19EBS/DZHfwA=; b=EBt9C1XywBFL3Q1rp98aPySKGTBSyyZ19m1MbM8GbYZRYWgIp9KZgDs1VPvPksRXQ6BooX L02SOdaSNev60Tdflr/3gPzVI1+Ce3rwnhGJG43xYFFDUyaj7ypciqf1ewI9mqWNBWse9Q vvkCDWYwyyUf2+eHsrJTrvyeh0y8RrgEHz2BjglK5Yo5EGNOgfya/cVFDBWT+0uv2l5TIK jFddM9vhq2PoVdFNeznOxyiOr818iig6gZaaAY2P8xgmcddb7OgQz/6RslGMUUzlSPLBM3 STBkLv890ZCgi1kw2FxSDEf/tDlPKuBbELOei1Rr+Opfcd3oaJur2bpyHZOoJw== 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 4hzT3D0ltlzxZK for ; Tue, 06 Oct 2026 07:51:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 47735 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 06 Oct 2026 07:51:20 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jaeyoon Choi Subject: git: b3f313e26e87 - stable/15 - ufshci: do not reset the device in the XPT_RESET_DEV handler List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@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: b3f313e26e878904fd39722b09520d68e0c8a167 Auto-Submitted: auto-generated Date: Tue, 06 Oct 2026 07:51:20 +0000 Message-Id: <6ac4a878.47735.6eb1e283@gitrepo.freebsd.org> The branch stable/15 has been updated by jaeyoon: URL: https://cgit.FreeBSD.org/src/commit/?id=b3f313e26e878904fd39722b09520d68e0c8a167 commit b3f313e26e878904fd39722b09520d68e0c8a167 Author: Jaeyoon Choi AuthorDate: 2026-08-10 01:53:27 +0000 Commit: Jaeyoon Choi CommitDate: 2026-10-06 06:28:01 +0000 ufshci: do not reset the device in the XPT_RESET_DEV handler CAM calls the SIM action callback with the SIM lock and the CAM device lock held. The XPT_RESET_DEV handler called ufshci_dev_reset(), which sleeps on device commands. Sleeping there panics when another thread contends for the lock: "panic: sleeping thread holds CAM device lock". Report success without touching the device, as nvme_sim(4) does. A real device reset needs the controller reset path. That rework is planned together with in-flight request recovery. Sponsored by: Samsung Electronics Reviewed by: imp (mentor) Differential Revision: https://reviews.freebsd.org/D58671 (cherry picked from commit a33860b0a2b98caf32c2ff62707f254ca92773f4) --- sys/dev/ufshci/ufshci_sim.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/sys/dev/ufshci/ufshci_sim.c b/sys/dev/ufshci/ufshci_sim.c index e40079b23354..f969d9c8311b 100644 --- a/sys/dev/ufshci/ufshci_sim.c +++ b/sys/dev/ufshci/ufshci_sim.c @@ -288,13 +288,14 @@ ufshci_cam_action(struct cam_sim *sim, union ccb *ccb) break; } case XPT_RESET_BUS: - ccb->ccb_h.status = CAM_REQ_CMP; - break; case XPT_RESET_DEV: - if (ufshci_dev_reset(ctrlr)) - ccb->ccb_h.status = CAM_REQ_CMP_ERR; - else - ccb->ccb_h.status = CAM_REQ_CMP; + /* + * This callback cannot sleep: CAM calls it with the SIM + * lock and the CAM device lock held. It cannot reset the + * device here. Report success so CAM keeps going, like + * nvme_sim(4) does. + */ + ccb->ccb_h.status = CAM_REQ_CMP; break; case XPT_ABORT: ccb->ccb_h.status = CAM_FUNC_NOTAVAIL;