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 BE2D640DFBE for ; Fri, 15 May 2026 08:33:45 +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=1778834025; cv=none; b=npkIEDYKHMqq5x5suIGc4DhVc2h5hL+ZAkjkJ5viV/a50xoriga274MjqQK5YIUjggIdHZOAWfjtdHRCRp1wbfeVX6U2W2VdeLuGWdZN2pvqbH/zc8Mlk0ySUyXt+ZAmmQU+Zo/f5oJasSmglvo6OY33Iye3+/zbXpYyo6Jcx/4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778834025; c=relaxed/simple; bh=Ft1UiK3vF0ilioJRhofKkpSWjdUpTpqNsat9axMqkvQ=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=ZXcWnoQPHxjVW++mab8jxdTEb5lMv7i+3MfPOsF6xO3sZr6Qw8sxevLFrQ9OAii8nYzoeM7G7PEedby5+RXgGpJnnV3bVEOWR11n4M77m3yAhCvVbPx2DzANOqKSx08qltjNZAVbpvZlS96FOdPLzn/nI5H3FrkRAK8rd8TrDbc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=ijdazJn8; 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="ijdazJn8" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0BB59C2BCF7; Fri, 15 May 2026 08:33:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1778834025; bh=Ft1UiK3vF0ilioJRhofKkpSWjdUpTpqNsat9axMqkvQ=; h=Subject:To:Cc:From:Date:From; b=ijdazJn8d/UhmdNLvbE/0diUPDEr/RQLmRq+7ZcpCYV8LSI/5eZzC1pdV41pTlhk9 4IUMoh0z6xho740EB7Q4t/Ys9Kel3B4LEdfi/p+pgwfwPHfk8cXuiDKnhRdgbI5LHw PtHxls58FH2ISGa75IzxZm4cZYMq6DKnZ3275isU= Subject: FAILED: patch "[PATCH] spi: cadence: fix clock imbalance on probe failure" failed to apply to 6.1-stable tree To: johan@kernel.org,broonie@kernel.org,shubhrajyoti.datta@xilinx.com Cc: From: Date: Fri, 15 May 2026 10:33:41 +0200 Message-ID: <2026051541-subtype-expire-c629@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 ecea4f0e9db2fb6ab4a68a59c5aba0d8f59a9566 # git commit -s git send-email --to '' --in-reply-to '2026051541-subtype-expire-c629@gregkh' --subject-prefix 'PATCH 6.1.y' HEAD^.. Possible dependencies: thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From ecea4f0e9db2fb6ab4a68a59c5aba0d8f59a9566 Mon Sep 17 00:00:00 2001 From: Johan Hovold Date: Tue, 21 Apr 2026 14:36:13 +0200 Subject: [PATCH] spi: cadence: fix clock imbalance on probe failure Make sure that the controller is active before disabling clocks on probe failure to avoid unbalanced clock disable. Also drop the usage count before returning (so that the controller can be suspended after a probe deferral) and restore the autosuspend setting. Fixes: d36ccd9f7ea4 ("spi: cadence: Runtime pm adaptation") Cc: stable@vger.kernel.org # 4.7 Cc: Shubhrajyoti Datta Signed-off-by: Johan Hovold Link: https://patch.msgid.link/20260421123615.1533617-3-johan@kernel.org Signed-off-by: Mark Brown diff --git a/drivers/spi/spi-cadence.c b/drivers/spi/spi-cadence.c index bf4a7cf6b142..891e2ba36958 100644 --- a/drivers/spi/spi-cadence.c +++ b/drivers/spi/spi-cadence.c @@ -741,7 +741,6 @@ static int cdns_spi_probe(struct platform_device *pdev) /* Set to default valid value */ ctlr->max_speed_hz = xspi->clk_rate / 4; xspi->speed_hz = ctlr->max_speed_hz; - pm_runtime_put_autosuspend(&pdev->dev); } else { ctlr->mode_bits |= SPI_NO_CS; ctlr->target_abort = cdns_target_abort; @@ -752,12 +751,17 @@ static int cdns_spi_probe(struct platform_device *pdev) goto clk_dis_all; } + if (!spi_controller_is_target(ctlr)) + pm_runtime_put_autosuspend(&pdev->dev); + return ret; clk_dis_all: if (!spi_controller_is_target(ctlr)) { pm_runtime_disable(&pdev->dev); pm_runtime_set_suspended(&pdev->dev); + pm_runtime_put_noidle(&pdev->dev); + pm_runtime_dont_use_autosuspend(&pdev->dev); } remove_ctlr: spi_controller_put(ctlr);