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 4EAE1304976 for ; Fri, 15 May 2026 05:31:03 +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=1778823063; cv=none; b=OsLCBTAZgyV7GO6WgMp3/YEtBTxsW0EDnVfeegetmAaOQi3EF45HpzkbxZlknPaPKmt0O5Fc7RUabYa/Nym6F3AdSbmXiz0ySzCMizwG0QGR8soBu+9YGP/n7wzucTtpz7MWPMMiTkl+QLy4bFLHGJ7P1F4SQdReA8hl6GzhHGg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778823063; c=relaxed/simple; bh=X+HdJfmadukvq2HKMvDUHfAAjXvJec6d2Ag3Y5xU2CE=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=HMAVDtmdP3+nt2Qm1IBxmVFtwe/0Vi+Km3+pVWV71p+KYQ70GfXuuxiB7Rqk3GVzOniZgBDkRPPRtGJdJnAl5k2IXDMlSIuuaG0+VuqGTz3wC67vQt1QvyGiPVbH25ReR6gtkEr7c5sQCt/l258W6BK2/4HtI1tI/JHAz0/Aam8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=pCgv0fy1; 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="pCgv0fy1" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DDE96C2BCB0; Fri, 15 May 2026 05:31:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1778823063; bh=X+HdJfmadukvq2HKMvDUHfAAjXvJec6d2Ag3Y5xU2CE=; h=Subject:To:Cc:From:Date:From; b=pCgv0fy1Cu4blkTBJ1/IhUhdd1rdkaRhOQSgAidAAqv2nH6lNg7ZniWaMmOetGwGI 57cokGm7IeqiXLWGtEqWKVDEAv1IFx/4ddDB4uj9f8z+Lc+ukGfLDOBycjMmegGFtj 3A6FzL9wbwQkat94JkoKAcUF5f2Txu6MAwuoyLT4= Subject: FAILED: patch "[PATCH] spi: sifive: fix controller deregistration" failed to apply to 6.6-stable tree To: johan@kernel.org,broonie@kernel.org,yash.shah@sifive.com Cc: From: Date: Fri, 15 May 2026 07:30:47 +0200 Message-ID: <2026051547-backside-sermon-2557@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.6-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.6.y git checkout FETCH_HEAD git cherry-pick -x 0f25236694a2854627c1597465a071e6bb6fe572 # git commit -s git send-email --to '' --in-reply-to '2026051547-backside-sermon-2557@gregkh' --subject-prefix 'PATCH 6.6.y' HEAD^.. Possible dependencies: thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From 0f25236694a2854627c1597465a071e6bb6fe572 Mon Sep 17 00:00:00 2001 From: Johan Hovold Date: Fri, 10 Apr 2026 10:17:44 +0200 Subject: [PATCH] spi: sifive: fix controller deregistration Make sure to deregister the controller before disabling underlying resources like interrupts during driver unbind. Note that clocks were also disabled before the recent commit 140039c23aca ("spi: sifive: Simplify clock handling with devm_clk_get_enabled()"). Fixes: 484a9a68d669 ("spi: sifive: Add driver for the SiFive SPI controller") Cc: stable@vger.kernel.org # 5.1 Cc: Yash Shah Signed-off-by: Johan Hovold Link: https://patch.msgid.link/20260410081757.503099-15-johan@kernel.org Signed-off-by: Mark Brown diff --git a/drivers/spi/spi-sifive.c b/drivers/spi/spi-sifive.c index 54adbc057af6..74a3e32fd2b5 100644 --- a/drivers/spi/spi-sifive.c +++ b/drivers/spi/spi-sifive.c @@ -392,7 +392,7 @@ static int sifive_spi_probe(struct platform_device *pdev) dev_info(&pdev->dev, "mapped; irq=%d, cs=%d\n", irq, host->num_chipselect); - ret = devm_spi_register_controller(&pdev->dev, host); + ret = spi_register_controller(host); if (ret < 0) { dev_err(&pdev->dev, "spi_register_host failed\n"); goto put_host; @@ -411,8 +411,14 @@ static void sifive_spi_remove(struct platform_device *pdev) struct spi_controller *host = platform_get_drvdata(pdev); struct sifive_spi *spi = spi_controller_get_devdata(host); + spi_controller_get(host); + + spi_unregister_controller(host); + /* Disable all the interrupts just in case */ sifive_spi_write(spi, SIFIVE_SPI_REG_IE, 0); + + spi_controller_put(host); } static int sifive_spi_suspend(struct device *dev)