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 EB289378D8D for ; Fri, 15 May 2026 08:33:22 +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=1778834003; cv=none; b=gMx76LjX3MRyyDLJ7nBmf7woEen8+6a3oVkylXRUxUl2XDgZUn4BYAcAgKPmEpuSeyG7rjzL1PctKS040YqjSo4+3JobY66RF3XaCj9m4Sx0mpiKRJx+rUUs6rfjTPuiY0fNiVbt1lOCLTk3sCYH4cTtnGrW18mvyAiTngXjcMU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778834003; c=relaxed/simple; bh=INdy//PyWBuAfwAmUiMhnPSayEsltH5DPQziAqedKXI=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=DwwPw0+hjCaneHSxhXspJ2bbBI0YhhmLZE59E11DzTguI2gK4fHIemGmhzK+qxZtK2u0lPlyndrCLwUsa42sFYjn0g3E0Y0GAilvYcXMknFaD88axAaF9OMB9sd6ycfPRTYHMzPDeLwXxBKHcUT10vfi82L+smRsN7cPYK0RQCY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=yU65UsKb; 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="yU65UsKb" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 72620C2BCB0; Fri, 15 May 2026 08:33:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1778834002; bh=INdy//PyWBuAfwAmUiMhnPSayEsltH5DPQziAqedKXI=; h=Subject:To:Cc:From:Date:From; b=yU65UsKbcXgTY51x5CHKoWooWIluQFxahWtC3TsVbmjDO/l8vtrKFjHDCpyZ+dX3n HR6h+traRgcz/7b9BAOilsavtuqxKrat/zqeA3Dpp2oy5WJLQt/9WQ0daFO5TbDIHP jWtlVrwuOEtrHxiLlvSmARzoHpQ2PMSu0REFwJGc= Subject: FAILED: patch "[PATCH] spi: cadence-quadspi: fix controller deregistration" failed to apply to 6.1-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-provolone-scant-26e1@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.1-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.1.y git checkout FETCH_HEAD git cherry-pick -x 964ee9793760e825b5c011741b4e3cfe06c87efc # git commit -s git send-email --to '' --in-reply-to '2026051513-provolone-scant-26e1@gregkh' --subject-prefix 'PATCH 6.1.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);