From nobody Mon Aug 10 02:31:34 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 4hJJfb4FRhz6pVRd for ; Mon, 10 Aug 2026 02:31:35 +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 4hJJfZ6mnXz40J6 for ; Mon, 10 Aug 2026 02:31:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1786329095; 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=wgS5DCrWaoa0d+hslk6WxdmOOyNgUVv2DO2u5qEHre4=; b=BRKqU7GrrhkRbUNC826dcRU0Jb1C+n2W1eZtGr1Zt4pXiWLtp1igyrx9lB9Q/6tpC3Hca+ Ak992v0+grxmmSOJe9R2L277Ss7c7viMvz1nxEVUyfALNZSLDWDE8kKxBJtIQzNy5ZdPQO IFDJO/h8kGVRz/ZX/6GYd04jBU17MHFYYt+OFcYgRtX39FbzOokKbsqOn+KsW+rc9hsukg 9BVOqQjd1HATxAo21Q0oKf/Odm/ittJJXj+3zgHJoLn+ByvouxgNctJA8DsVK4Aj0C9590 +ALPiIPtyStV9PJ5w/BLJX8OBNNzpsX0bUbniByVN2jR87cxHKS2uDV79+yH/w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1786329095; a=rsa-sha256; cv=none; b=L5KiI7VaGzyLVEJr/dSr1bCDJKVJnKR7iCFjtOJqCDXdu5CMeGpS2MYKKoF73kAzP9ovTm /3K5B5NgFaEXJYvhYhXcoL473/csjGyJTmtXx4JDvjbs6LKQcEgKku1SPXR4/ESakkN4Q8 C4bs8HVEUVBvXeas51FOccNVQ7W+HlU3uGhlgthSMjgonem/Yvzv7yH1XTJJptvIYEzmYT kPXOph5pRuDYIMw5efGkI486jD0auXVrIIXL4UNMod5SRLUdeYwBuWokY2pFJGnFWoee/u QPSMsdcaUtOouvDNkZ0jH8bRYwYKwTSQYHEq/x4CtKqME5bW+7z5cvMnNMia4A== 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=1786329095; 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=wgS5DCrWaoa0d+hslk6WxdmOOyNgUVv2DO2u5qEHre4=; b=sXjVTJjKz3k9OLn9Sm/xbcDblVShdwaSoNJEICuSVzbczCzslegu3Opiz8HgATEXkxqbK/ pGFh8oEzQxeJsfekWhH7e8vyOaqFinBDdkbQ+J4oTB03jMS/lsxvNGjYEpGwUyAOda7872 QGsux+V7//2wpYqsE61P3VumsMtivUkTxZOTMsTY96ArykpDS9ny6Nuk14CBk+UsC4ZuDK NOqE80jk992va4TEn8vWKjTlE5oC4I5/eIHCqg+zt6mFRRidv/MyUIo8dDkXKfa2ABTW6f VvMWwZmvpRgOUA/MsJtwIRNxGsc6KlgQ0K3dvqt5kYhwjcv6j7ZiV/CREv7KpA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hJJfZ5gSmzqjc for ; Mon, 10 Aug 2026 02:31:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1f869 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 10 Aug 2026 02:31:34 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jaeyoon Choi Subject: git: a33860b0a2b9 - main - ufshci: do not reset the device in the XPT_RESET_DEV handler 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: a33860b0a2b98caf32c2ff62707f254ca92773f4 Auto-Submitted: auto-generated Date: Mon, 10 Aug 2026 02:31:34 +0000 Message-Id: <6a793806.1f869.393a2657@gitrepo.freebsd.org> The branch main has been updated by jaeyoon: URL: https://cgit.FreeBSD.org/src/commit/?id=a33860b0a2b98caf32c2ff62707f254ca92773f4 commit a33860b0a2b98caf32c2ff62707f254ca92773f4 Author: Jaeyoon Choi AuthorDate: 2026-08-10 01:53:27 +0000 Commit: Jaeyoon Choi CommitDate: 2026-08-10 02:28:54 +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 --- 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;