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 E6DDE378D8D for ; Fri, 15 May 2026 08:33:25 +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=1778834006; cv=none; b=QiL5ngohvHhZL2vrANdGvrbJGWP8GU6pFHXC29We3VPTol5CfQblNOqgx/fcopUn0iT5cqFgrtkFiW27da2cnDwS1JSOfNaEofZjyjD46/6WU7rFkShM5BTfnU3x7YN1j4nvA1wO1dv+3TRfl/8Nb+P+D/5hELz64FNmvlO2o74= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778834006; c=relaxed/simple; bh=wVx1T1wqsQDSdClLxGGzevAtopWd0PjZpy5AQ+963ws=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=drOCHhjGgOy48dyWEqbq5JccFCpOSzOYJW+Vh4/TisLAEw52k1aucKnIzmIXQnVD77EluDZOfTqqm8E4r/bBVnjLpAzxT+FJWbh+Y5wL9RA8H7pvnYs/PGxzZdjZRbBVTvxMb0kOHb6z38XpGnkdwxCv29czhJm81W4hvzyjK6I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=lXaMLI9x; 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="lXaMLI9x" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5B3B2C2BCB0; Fri, 15 May 2026 08:33:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1778834005; bh=wVx1T1wqsQDSdClLxGGzevAtopWd0PjZpy5AQ+963ws=; h=Subject:To:Cc:From:Date:From; b=lXaMLI9xi3AIrVwjcQ8cl+fktf6/B1lZXOW+8iXJ+XX+d6TEGgaBLkJu0PdUViSSG x8dQOsRaByvuuku4lMrG41fTqIOiAoYFmj5EDu4nEBdxUckW2z4YTDrYsvtgN+BzTE 44N8hJQCqCUkdVI49BycZ6JhlpW77GhDdyDpwdy0= Subject: FAILED: patch "[PATCH] spi: cadence-quadspi: fix controller deregistration" failed to apply to 5.15-stable tree To: johan@kernel.org,broonie@kernel.org,khairul.anuar.romli@altera.com Cc: From: Date: Fri, 15 May 2026 10:33:14 +0200 Message-ID: <2026051514-immature-cupid-de6e@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 5.15-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-5.15.y git checkout FETCH_HEAD git cherry-pick -x 964ee9793760e825b5c011741b4e3cfe06c87efc # git commit -s git send-email --to '' --in-reply-to '2026051514-immature-cupid-de6e@gregkh' --subject-prefix 'PATCH 5.15.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);