* FAILED: patch "[PATCH] scsi: ufs: ufs-pci: Fix default runtime and system PM levels" failed to apply to 5.15-stable tree
@ 2025-08-21 13:09 gregkh
2025-08-22 5:10 ` Adrian Hunter
0 siblings, 1 reply; 3+ messages in thread
From: gregkh @ 2025-08-21 13:09 UTC (permalink / raw)
To: adrian.hunter, bvanassche, martin.petersen; +Cc: stable
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 <stable@vger.kernel.org>.
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 6de7435e6b81fe52c0ab4c7e181f6b5decd18eb1
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable@vger.kernel.org>' --in-reply-to '2025082102-levitate-simple-9760@gregkh' --subject-prefix 'PATCH 5.15.y' HEAD^..
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 6de7435e6b81fe52c0ab4c7e181f6b5decd18eb1 Mon Sep 17 00:00:00 2001
From: Adrian Hunter <adrian.hunter@intel.com>
Date: Wed, 23 Jul 2025 19:58:50 +0300
Subject: [PATCH] scsi: ufs: ufs-pci: Fix default runtime and system PM levels
Intel MTL-like host controllers support auto-hibernate. Using
auto-hibernate with manual (driver initiated) hibernate produces more
complex operation. For example, the host controller will have to exit
auto-hibernate simply to allow the driver to enter hibernate state
manually. That is not recommended.
The default rpm_lvl and spm_lvl is 3, which includes manual hibernate.
Change the default values to 2, which does not.
Note, to be simpler to backport to stable kernels, utilize the UFS PCI
driver's ->late_init() call back. Recent commits have made it possible
to set up a controller-specific default in the regular ->init() call
back, but not all stable kernels have those changes.
Fixes: 4049f7acef3e ("scsi: ufs: ufs-pci: Add support for Intel MTL")
Cc: stable@vger.kernel.org
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20250723165856.145750-3-adrian.hunter@intel.com
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
diff --git a/drivers/ufs/host/ufshcd-pci.c b/drivers/ufs/host/ufshcd-pci.c
index af1c272eef1c..8aff32d7057d 100644
--- a/drivers/ufs/host/ufshcd-pci.c
+++ b/drivers/ufs/host/ufshcd-pci.c
@@ -468,10 +468,23 @@ static int ufs_intel_adl_init(struct ufs_hba *hba)
return ufs_intel_common_init(hba);
}
+static void ufs_intel_mtl_late_init(struct ufs_hba *hba)
+{
+ hba->rpm_lvl = UFS_PM_LVL_2;
+ hba->spm_lvl = UFS_PM_LVL_2;
+}
+
static int ufs_intel_mtl_init(struct ufs_hba *hba)
{
+ struct ufs_host *ufs_host;
+ int err;
+
hba->caps |= UFSHCD_CAP_CRYPTO | UFSHCD_CAP_WB_EN;
- return ufs_intel_common_init(hba);
+ err = ufs_intel_common_init(hba);
+ /* Get variant after it is set in ufs_intel_common_init() */
+ ufs_host = ufshcd_get_variant(hba);
+ ufs_host->late_init = ufs_intel_mtl_late_init;
+ return err;
}
static int ufs_qemu_get_hba_mac(struct ufs_hba *hba)
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: FAILED: patch "[PATCH] scsi: ufs: ufs-pci: Fix default runtime and system PM levels" failed to apply to 5.15-stable tree
2025-08-21 13:09 FAILED: patch "[PATCH] scsi: ufs: ufs-pci: Fix default runtime and system PM levels" failed to apply to 5.15-stable tree gregkh
@ 2025-08-22 5:10 ` Adrian Hunter
2025-08-22 5:31 ` Greg KH
0 siblings, 1 reply; 3+ messages in thread
From: Adrian Hunter @ 2025-08-22 5:10 UTC (permalink / raw)
To: gregkh; +Cc: stable, Patni, Archana, bvanassche, martin.petersen
On 21/08/2025 16:09, gregkh@linuxfoundation.org wrote:
>
> 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 <stable@vger.kernel.org>.
>
> 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 6de7435e6b81fe52c0ab4c7e181f6b5decd18eb1
This works for me even though ufshcd-pci.c has moved since then
from drivers/scsi/ufs/ to drivers/ufs/host/
$ git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.15.y
From https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
* branch linux-5.15.y -> FETCH_HEAD
$ git checkout FETCH_HEAD
HEAD is now at c79648372d02 Linux 5.15.189
$ git show --stat 6de7435e6b81fe52c0ab4c7e181f6b5decd18eb1 | grep ufshcd-pci.c
drivers/ufs/host/ufshcd-pci.c | 15 ++++++++++++++-
$ git cherry-pick -x 6de7435e6b81fe52c0ab4c7e181f6b5decd18eb1
Auto-merging drivers/scsi/ufs/ufshcd-pci.c
[detached HEAD 15aa885c945e] scsi: ufs: ufs-pci: Fix default runtime and system PM levels
Date: Wed Jul 23 19:58:50 2025 +0300
1 file changed, 14 insertions(+), 1 deletion(-)
$ git show --stat HEAD | grep ufshcd-pci.c
drivers/scsi/ufs/ufshcd-pci.c | 15 ++++++++++++++-
Please note 4428ddea832cfdb63e476eb2e5c8feb5d36057fe works too:
$ git cherry-pick -x 4428ddea832cfdb63e476eb2e5c8feb5d36057fe
Auto-merging drivers/scsi/ufs/ufshcd-pci.c
[detached HEAD 9b324ade6f64] scsi: ufs: ufs-pci: Fix hibernate state transition for Intel MTL-like host controllers
Author: Archana Patni <archana.patni@intel.com>
Date: Wed Jul 23 19:58:49 2025 +0300
1 file changed, 27 insertions(+)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: FAILED: patch "[PATCH] scsi: ufs: ufs-pci: Fix default runtime and system PM levels" failed to apply to 5.15-stable tree
2025-08-22 5:10 ` Adrian Hunter
@ 2025-08-22 5:31 ` Greg KH
0 siblings, 0 replies; 3+ messages in thread
From: Greg KH @ 2025-08-22 5:31 UTC (permalink / raw)
To: Adrian Hunter; +Cc: stable, Patni, Archana, bvanassche, martin.petersen
On Fri, Aug 22, 2025 at 08:10:39AM +0300, Adrian Hunter wrote:
> On 21/08/2025 16:09, gregkh@linuxfoundation.org wrote:
> >
> > 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 <stable@vger.kernel.org>.
> >
> > 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 6de7435e6b81fe52c0ab4c7e181f6b5decd18eb1
>
> This works for me even though ufshcd-pci.c has moved since then
> from drivers/scsi/ufs/ to drivers/ufs/host/
>
> $ git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.15.y
> From https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
> * branch linux-5.15.y -> FETCH_HEAD
> $ git checkout FETCH_HEAD
> HEAD is now at c79648372d02 Linux 5.15.189
> $ git show --stat 6de7435e6b81fe52c0ab4c7e181f6b5decd18eb1 | grep ufshcd-pci.c
> drivers/ufs/host/ufshcd-pci.c | 15 ++++++++++++++-
> $ git cherry-pick -x 6de7435e6b81fe52c0ab4c7e181f6b5decd18eb1
> Auto-merging drivers/scsi/ufs/ufshcd-pci.c
> [detached HEAD 15aa885c945e] scsi: ufs: ufs-pci: Fix default runtime and system PM levels
> Date: Wed Jul 23 19:58:50 2025 +0300
> 1 file changed, 14 insertions(+), 1 deletion(-)
> $ git show --stat HEAD | grep ufshcd-pci.c
> drivers/scsi/ufs/ufshcd-pci.c | 15 ++++++++++++++-
>
> Please note 4428ddea832cfdb63e476eb2e5c8feb5d36057fe works too:
>
> $ git cherry-pick -x 4428ddea832cfdb63e476eb2e5c8feb5d36057fe
> Auto-merging drivers/scsi/ufs/ufshcd-pci.c
> [detached HEAD 9b324ade6f64] scsi: ufs: ufs-pci: Fix hibernate state transition for Intel MTL-like host controllers
> Author: Archana Patni <archana.patni@intel.com>
> Date: Wed Jul 23 19:58:49 2025 +0300
> 1 file changed, 27 insertions(+)
I don't use cherry-pick, so if a file moves it's hard to detect at
times. Can you send me the patch that you have properly generated (and
built-tested)?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-08-22 5:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-21 13:09 FAILED: patch "[PATCH] scsi: ufs: ufs-pci: Fix default runtime and system PM levels" failed to apply to 5.15-stable tree gregkh
2025-08-22 5:10 ` Adrian Hunter
2025-08-22 5:31 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox