From nobody Tue Aug 05 20:32:20 2025 X-Original-To: dev-commits-src-main@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 4bxQ8S4N3Xz63gqG; Tue, 05 Aug 2025 20:32:24 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (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 "smtp.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bxQ8S2HjWz42hR; Tue, 05 Aug 2025 20:32:24 +0000 (UTC) (envelope-from bz@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1754425944; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Mr3CgSGMPpk3U6Ib31015xFpynPd92DTBddeXkIM+8Q=; b=u5QoiPJhsZQnyRAlzQEJCnaxn6yuzGrwkDynm6h1o/GrpdcZzFCPJKJJmvi8i41qW8j6jq vX+kgapr/B9I4nUpmzL3ljS53xttQo/fKVk5HPdRMRlhPkZCe2nQz3LeFYLfOB/gMV8Mye 8rNRbGJQzpm3U0CeovFWTtHsddpiI4z4fIxeBsh8WsnOreWJ5pvmaa5AYhBn/qAsJDVe+v E+mmhgCOCZyqfgyzfyMc1lNP5T7jLaR0cx5SaYFYPY+R+JVy2zT0Hqi6CmAavu+FgeCUTb aqSwGrjjYn47tBPZscEfi9bXncUQje8otdXM1kL4vn40aM3e6a5nEkRRExfZ3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1754425944; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Mr3CgSGMPpk3U6Ib31015xFpynPd92DTBddeXkIM+8Q=; b=ICLoEhq+9NU9qKsAng4EFnfXgmJ3y0/YiPyO2Jpf3DITR3VtedzZqGDcKMoOUMpiyejoeZ Wo7bz9RIqY9hwDZBS76BMEqI/cxlp7C5UAHNVo/ZLfBNfv/pVpC4b0KnQdolw5ExUXmi3G FLH8LTkydOfXvVyLWwKWWgqjybrqZkPQeQhAlzsLp+HUNUiv1x/LAi9ubdFQJ1fShq0Lhw 5bRKtmJh9Aoq+Uhp9UHUCElrp1rnqq3DiIi79zbllpnl3ptY+ag8VaRsdbtPjaa7Xr68la YYf5rUPLtVk16SoLBXNIWaxk+u/4NWPrd6r1GWT60dNKWnYPVC5kC5gtCD7ZyA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1754425944; a=rsa-sha256; cv=none; b=M7sOGYBL761HkqrkBe+TebKqpJsceuVpDno46m98fSdlBtEP5tbsD6r5Q/ZbYwUiT8yj+R bkM5k5m8GuTHDTpa2vhYRRDsHy7zpD8sJOEtI1UCMjRcOUOgyxqDygLEsEmESmNP9JbMu9 GhyeNLYfmjg6rNgPTepxWVBkwpyj/PqRWli0H9N2BwphRGx/uagXTCh/7BTSnvwez14qPY HDGQJrb/OaLSg47p4np+yHg5CQK2Gy+rxnfYA6CDt9CH/aDKWy+i9EvJ97bxB1+YHQN5a4 14qKJrBpq0iIs7Y8UQ0XgQtpovKkLeK2Fmxcc1sW67GC23NJcjREVrYhqk4QXA== Received: from mx-01.divo.sbone.de (mx-01.divo.sbone.de [IPv6:2003:a:140a:2200:6:594:fffe:19]) (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 ECDSA (prime256v1) client-digest SHA256) (Client CN "mx-01.divo.sbone.de", Issuer "E5" (verified OK)) (Authenticated sender: bz/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4bxQ8S0tgfz15mj; Tue, 05 Aug 2025 20:32:24 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:1025]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by mx-01.divo.sbone.de (Postfix) with ESMTPS id E6CA1A64808; Tue, 05 Aug 2025 20:32:16 +0000 (UTC) Received: from content-filter.t4-02.sbone.de (content-filter.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:2742]) (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 mail.sbone.de (Postfix) with ESMTPS id 3DDCA2D029E1; Tue, 5 Aug 2025 20:32:22 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:4902:0:7404:2:1025]) by content-filter.t4-02.sbone.de (content-filter.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:2742]) (amavisd-new, port 10024) with ESMTP id jNmC1oAdWZB4; Tue, 5 Aug 2025 20:32:21 +0000 (UTC) Received: from strong-iwl0.sbone.de (strong-iwl0.sbone.de [IPv6:fde9:577b:c1a9:4902:a66b:b6ff:fe40:39a9]) (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 mail.sbone.de (Postfix) with ESMTPSA id DE3592D029D8; Tue, 5 Aug 2025 20:32:20 +0000 (UTC) Date: Tue, 5 Aug 2025 20:32:20 +0000 (UTC) From: "Bjoern A. Zeeb" To: Andriy Gapon cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 6eb503116e88 - main - sdio: don't use CAM_PRIORITY_NONE for queued CCB-s In-Reply-To: <202508051629.575GTBYK035918@gitrepo.freebsd.org> Message-ID: <030509rq-32n5-3rn0-98nq-o154pqo676s9@SerrOFQ.bet> References: <202508051629.575GTBYK035918@gitrepo.freebsd.org> X-OpenPGP-Key-Id: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed On Tue, 5 Aug 2025, Andriy Gapon wrote: > The branch main has been updated by avg: > > URL: https://cgit.FreeBSD.org/src/commit/?id=6eb503116e88cc430c2c9f01f48aa979fb0a7e1b > > commit 6eb503116e88cc430c2c9f01f48aa979fb0a7e1b > Author: Andriy Gapon > AuthorDate: 2025-08-05 14:40:21 +0000 > Commit: Andriy Gapon > CommitDate: 2025-08-05 16:27:12 +0000 > > sdio: don't use CAM_PRIORITY_NONE for queued CCB-s > > This is similar to changes done in other CAM drivers and fixes a panic > because of a sanity check added in b4b166b8c46b. > > While here, remove unneeded ccb setup in sdiobdiscover. > It's possible that ccb allocation in that function is not needed as > well, but I wasn't sure about that. I have a lot more changes to sdio here; I would appreciate if they go through review if you have more. Are you testing this with any device? > MFC after: 1 week > --- > sys/dev/sdio/sdiob.c | 7 ++----- > 1 file changed, 2 insertions(+), 5 deletions(-) > > diff --git a/sys/dev/sdio/sdiob.c b/sys/dev/sdio/sdiob.c > index 4ec2058fa2e4..cb2cc0da6b77 100644 > --- a/sys/dev/sdio/sdiob.c > +++ b/sys/dev/sdio/sdiob.c > @@ -150,7 +150,7 @@ sdiob_rw_direct_sc(struct sdiob_softc *sc, uint8_t fn, uint32_t addr, bool wr, > sc->ccb = xpt_alloc_ccb(); > else > memset(sc->ccb, 0, sizeof(*sc->ccb)); > - xpt_setup_ccb(&sc->ccb->ccb_h, sc->periph->path, CAM_PRIORITY_NONE); > + xpt_setup_ccb(&sc->ccb->ccb_h, sc->periph->path, CAM_PRIORITY_NORMAL); > CAM_DEBUG(sc->ccb->ccb_h.path, CAM_DEBUG_TRACE, > ("%s(fn=%d, addr=%#02x, wr=%d, *val=%#02x)\n", __func__, > fn, addr, wr, *val)); > @@ -250,7 +250,7 @@ sdiob_rw_extended_cam(struct sdiob_softc *sc, uint8_t fn, uint32_t addr, > sc->ccb = xpt_alloc_ccb(); > else > memset(sc->ccb, 0, sizeof(*sc->ccb)); > - xpt_setup_ccb(&sc->ccb->ccb_h, sc->periph->path, CAM_PRIORITY_NONE); > + xpt_setup_ccb(&sc->ccb->ccb_h, sc->periph->path, CAM_PRIORITY_NORMAL); > CAM_DEBUG(sc->ccb->ccb_h.path, CAM_DEBUG_TRACE, > ("%s(fn=%d addr=%#0x wr=%d b_count=%u blksz=%u buf=%p incr=%d)\n", > __func__, fn, addr, wr, b_count, blksz, buffer, incaddr)); > @@ -977,9 +977,6 @@ sdiobdiscover(void *context, int pending) > > if (sc->ccb == NULL) > sc->ccb = xpt_alloc_ccb(); > - else > - memset(sc->ccb, 0, sizeof(*sc->ccb)); > - xpt_setup_ccb(&sc->ccb->ccb_h, periph->path, CAM_PRIORITY_NONE); This likely just made a problem worse of ccb re-use. I have locally changed them to be allocated/freed per transaction now. > /* > * Read CCCR and FBR of each function, get manufacturer and device IDs, > -- Bjoern A. Zeeb r15:7