From nobody Thu Nov 05 14:51:14 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 4jL4xv39Rcz706qk for ; Thu, 05 Nov 2026 14:51:15 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jL4xv01CMz3Dyf for ; Thu, 05 Nov 2026 14:51:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1793890275; 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=b0HQOP0ikFSnHsWbxIkGhmXk4P0q96oJtLL2UMHqUzg=; b=O/YE8outfn5laO5UvGDngkXDWll7xQMJe2L2TRl8WrBkgGF3SHZAPgbcEtkEV6k7phYEQk CK2RG7zV9F7MmqXkxs39c+lwamTFggp62mBsKO3uP1f7HIGGJzeslMPjNHSXKrchbG+EZ+ Swo9zJbOtEsJ2WdwPRWP918aYaZoZomYNXkanpfsToJ5LEvb+kv/SmltugWrfh8p1u9jKi rH/ClGDemJ41Bvr7r0lQuIVPpJ7v2yD90mpDRh003fu11qJxuvDI+Y91Di6E6arkYXmVzZ 8YWGLq8uQB1mzFX7ytGFjd49Qvfp5rgHeSzJNwJN5G9ow6h4L/feGcQiOp588g== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1793890275; b=VFIqnEwQcKBxPdgTmsZR/Dy71a+3KZtfBDA38H2X+W4K57F8aZGxm0tCw9E3HZsL7FtYl5 ltlSpM7ml8abSyPDFi+MS+0XQ5d3xnsOrIHuHR52esLvUmdf7A2/ar5F3qrAJhlOacN9v+ OgtqzMFQAgM8V2fxvuElKEblAMK80yBq77KuS2Crfd4qaXMfFnhIyhhPnaXKbDB7On5W2S /25S9Yg+U2MY0+/ofs/PTaurRf0HfhqViMtWPhpQpR6MhzSAsRaeM760VDoxju1Z6ehHTK LaKI6AyMsoO+Nra9xn+BZKWMO3ezLdG68Hc0PMKGIs/McmeZK6RhR4CVgCt87A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1793890275; 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=b0HQOP0ikFSnHsWbxIkGhmXk4P0q96oJtLL2UMHqUzg=; b=Lu5cRUt8uYObWoxzriJMF65gp6CRMTE+sWT7+9R2thABSqKiagQFW1ofZLVqKpZHNVuqdN u8d1ACZE0f/mI/WtuIvA/wZB8tG45Oi4DoAq/xUIo+vMbYYiieeBpneGYOLg8Hg73naHXn Zsz5Vs8rmp8KBJwJZ00NIhVDWztDobX+tBAIGDNETlgamLFJ2T7L1rFrV+BjPbN1LoGIAj y+LCkWuFcg2AOIVCB2vQt4uOwHkBB3Kkow8EPJ2haEeLwpsrjnt2Dr2+IJOKiB94klfi5u yvcnLsxkJ1GQlFx2YVn7rWx0iRs1Pb/PkLEHKEOi6sbsEXijYLf6pmc43Dgitw== 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 4jL4xt6kcYzv6y for ; Thu, 05 Nov 2026 14:51:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 23321 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 05 Nov 2026 14:51:14 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: bbb90912eb32 - main - sdhci: Defer XPT_SET_TRAN_SETTINGS to the slot taskqueue List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: Commit messages for all branches of the src repository 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: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bbb90912eb3260260ad5cb3fc2f4c5ad4c144d7e Auto-Submitted: auto-generated Date: Thu, 05 Nov 2026 14:51:14 +0000 Message-Id: <6aec97e2.23321.697daacb@gitrepo.freebsd.org> The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=bbb90912eb3260260ad5cb3fc2f4c5ad4c144d7e commit bbb90912eb3260260ad5cb3fc2f4c5ad4c144d7e Author: Emmanuel Vadot AuthorDate: 2026-10-27 18:12:53 +0000 Commit: Emmanuel Vadot CommitDate: 2026-11-05 14:50:51 +0000 sdhci: Defer XPT_SET_TRAN_SETTINGS to the slot taskqueue Only XPT_MMC_SET_TRAN_SETTINGS was handed to the slot taskqueue. XPT_SET_TRAN_SETTINGS, which mmc_xpt.c issues too, still called sdhci_cam_settran_settings() directly from the CAM done thread with the CAM device lock held. Changing the bus clock can sleep (clk_set_freq() takes the clock topology sx lock), which panics with "sleeping thread holds CAM device lock". Handle both opcodes the same way and complete the request from the taskqueue. Differential Revision: https://reviews.freebsd.org/D61013 --- sys/dev/sdhci/sdhci.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/sys/dev/sdhci/sdhci.c b/sys/dev/sdhci/sdhci.c index 5e2e868ccd7a..4de70fcd1393 100644 --- a/sys/dev/sdhci/sdhci.c +++ b/sys/dev/sdhci/sdhci.c @@ -2784,9 +2784,12 @@ sdhci_cam_action(struct cam_sim *sim, union ccb *ccb) ccb->ccb_h.status = CAM_REQ_CMP; break; } + case XPT_SET_TRAN_SETTINGS: case XPT_MMC_SET_TRAN_SETTINGS: if (sdhci_debug > 1) - slot_printf(slot, "Got XPT_MMC_SET_TRAN_SETTINGS\n"); + slot_printf(slot, "Got XPT_%sSET_TRAN_SETTINGS\n", + ccb->ccb_h.func_code == XPT_MMC_SET_TRAN_SETTINGS ? + "MMC_" : ""); if (slot->settran_ccb != NULL) { ccb->ccb_h.status = CAM_BUSY; break; @@ -2796,14 +2799,6 @@ sdhci_cam_action(struct cam_sim *sim, union ccb *ccb) slot->settran_ccb = ccb; taskqueue_enqueue(slot->tq, &slot->settran_task); return; - case XPT_SET_TRAN_SETTINGS: - if (sdhci_debug > 1) - slot_printf(slot, "Got XPT_SET_TRAN_SETTINGS\n"); - if (sdhci_cam_settran_settings(slot, ccb) != 0) - ccb->ccb_h.status = CAM_REQ_INVALID; - else - ccb->ccb_h.status = CAM_REQ_CMP; - break; case XPT_RESET_BUS: if (sdhci_debug > 1) slot_printf(slot, "Got XPT_RESET_BUS, ACK it...\n");