From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 18BE9625 for ; Fri, 15 May 2026 08:33:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778833989; cv=none; b=scaHG82rId4XVte4AluhNC2Ht7ijZnxJoCp3w7hMmr2z2PPPr7ydXmNC0JpF/SZUgAlBNOA088L18La0wnO4fOWAR1wDPYPl2cNOAkzZ2JCrA/TdcjjHJLKeflq9k11OAiEgNF6RDDHdlwSaYWXaPVTZQlM2OLYsAfuKY2f310s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778833989; c=relaxed/simple; bh=5C2w7f8Fv/vVJClWPrhugoRkeINlOk9QOS7Nka1XV5g=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=QkFf08/MIxdHoRDNfB1RxB6il1WZUq2Ld1edW3upKX82evqLsUcPcweT4rvZ9cbxBbGqmSTjKP2VZzVe9fjXyWD5e0gaKHeeWA3LGqqmHLy/wPaxvzH7c5UCIAiRgSBce+AKem9vNo9KljGo3MelmJf8AM64cCZCDiiXnlPSfEU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=KHgQ+9Ao; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="KHgQ+9Ao" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9DAEAC2BCB0; Fri, 15 May 2026 08:33:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1778833989; bh=5C2w7f8Fv/vVJClWPrhugoRkeINlOk9QOS7Nka1XV5g=; h=Subject:To:Cc:From:Date:From; b=KHgQ+9Aodv0p7ixoIqmaFzdbKnyLnEPDedz2cq6rD+f8bymYuejCggy4MUd9jqX0T Dh7qLjkR03ds+wGTG+wEpxS3d4vV+JTxDJdcLM2thskwSFyEp7Y2waMNDtTC/S5Nll DlKZWIfi33A0RRHB0BYxOYYEnagHJFe9HkK5P5C4= Subject: FAILED: patch "[PATCH] spi: cadence-quadspi: fix controller deregistration" failed to apply to 6.18-stable tree To: johan@kernel.org,broonie@kernel.org,khairul.anuar.romli@altera.com Cc: From: Date: Fri, 15 May 2026 10:33:13 +0200 Message-ID: <2026051513-arbitrate-portfolio-bd8f@gregkh> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit The patch below does not apply to the 6.18-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . To reproduce the conflict and resubmit, you may use the following commands: git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.18.y git checkout FETCH_HEAD git cherry-pick -x 964ee9793760e825b5c011741b4e3cfe06c87efc # git commit -s git send-email --to '' --in-reply-to '2026051513-arbitrate-portfolio-bd8f@gregkh' --subject-prefix 'PATCH 6.18.y' HEAD^.. Possible dependencies: thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From 964ee9793760e825b5c011741b4e3cfe06c87efc Mon Sep 17 00:00:00 2001 From: Johan Hovold Date: Tue, 14 Apr 2026 15:43:13 +0200 Subject: [PATCH] spi: cadence-quadspi: fix controller deregistration Make sure to deregister the controller before dropping the reference count that allows new operations to start to allow SPI drivers to do I/O during deregistration. Fixes: 7446284023e8 ("spi: cadence-quadspi: Implement refcount to handle unbind during busy") Cc: stable@vger.kernel.org # 6.17 Cc: Khairul Anuar Romli Signed-off-by: Johan Hovold Link: https://patch.msgid.link/20260414134319.978196-3-johan@kernel.org Signed-off-by: Mark Brown diff --git a/drivers/spi/spi-cadence-quadspi.c b/drivers/spi/spi-cadence-quadspi.c index 2ead419e896e..50ef65fc5ded 100644 --- a/drivers/spi/spi-cadence-quadspi.c +++ b/drivers/spi/spi-cadence-quadspi.c @@ -2020,13 +2020,13 @@ static void cqspi_remove(struct platform_device *pdev) ddata = of_device_get_match_data(dev); + spi_unregister_controller(cqspi->host); + refcount_set(&cqspi->refcount, 0); if (!refcount_dec_and_test(&cqspi->inflight_ops)) cqspi_wait_idle(cqspi); - spi_unregister_controller(cqspi->host); - if (cqspi->rx_chan) dma_release_channel(cqspi->rx_chan);