* [PATCH 6.1] Partial revert of xhci: use pm_ptr() instead #ifdef for CONFIG_PM conditionals
@ 2025-01-18 12:15 Ron Economos
2025-01-18 12:18 ` kernel test robot
2025-01-18 19:40 ` Sasha Levin
0 siblings, 2 replies; 9+ messages in thread
From: Ron Economos @ 2025-01-18 12:15 UTC (permalink / raw)
To: Greg Kroah-Hartman, stable; +Cc: Pavel Machek, linux-kernel, Ron Economos
This fixes the build when CONFIG_PM is not set
Signed-off-by: Ron Economos <re@w6rz.net>
---
drivers/usb/host/xhci-pci.c | 8 +++++++-
include/linux/usb/hcd.h | 2 ++
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c
index 1d71e8ef9919..2ff049e02326 100644
--- a/drivers/usb/host/xhci-pci.c
+++ b/drivers/usb/host/xhci-pci.c
@@ -571,6 +571,7 @@ static void xhci_pci_remove(struct pci_dev *dev)
pci_set_power_state(dev, PCI_D3hot);
}
+#ifdef CONFIG_PM
/*
* In some Intel xHCI controllers, in order to get D3 working,
* through a vendor specific SSIC CONFIG register at offset 0x883c,
@@ -720,6 +721,7 @@ static void xhci_pci_shutdown(struct usb_hcd *hcd)
if (xhci->quirks & XHCI_SPURIOUS_WAKEUP)
pci_set_power_state(pdev, PCI_D3hot);
}
+#endif /* CONFIG_PM */
/*-------------------------------------------------------------------------*/
@@ -761,17 +763,21 @@ static struct pci_driver xhci_pci_driver = {
/* suspend and resume implemented later */
.shutdown = usb_hcd_pci_shutdown,
+#ifdef CONFIG_PM
.driver = {
- .pm = pm_ptr(&usb_hcd_pci_pm_ops),
+ .pm = &usb_hcd_pci_pm_ops
},
+#endif
};
static int __init xhci_pci_init(void)
{
xhci_init_driver(&xhci_pci_hc_driver, &xhci_pci_overrides);
+#ifdef CONFIG_PM
xhci_pci_hc_driver.pci_suspend = xhci_pci_suspend;
xhci_pci_hc_driver.pci_resume = xhci_pci_resume;
xhci_pci_hc_driver.shutdown = xhci_pci_shutdown;
+#endif
return pci_register_driver(&xhci_pci_driver);
}
module_init(xhci_pci_init);
diff --git a/include/linux/usb/hcd.h b/include/linux/usb/hcd.h
index 575716d3672a..cd667acf6267 100644
--- a/include/linux/usb/hcd.h
+++ b/include/linux/usb/hcd.h
@@ -486,7 +486,9 @@ extern void usb_hcd_pci_shutdown(struct pci_dev *dev);
extern int usb_hcd_amd_remote_wakeup_quirk(struct pci_dev *dev);
+#ifdef CONFIG_PM
extern const struct dev_pm_ops usb_hcd_pci_pm_ops;
+#endif
#endif /* CONFIG_USB_PCI */
/* pci-ish (pdev null is ok) buffer alloc/mapping support */
--
2.43.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 6.1] Partial revert of xhci: use pm_ptr() instead #ifdef for CONFIG_PM conditionals
2025-01-18 12:15 Ron Economos
@ 2025-01-18 12:18 ` kernel test robot
2025-01-18 19:40 ` Sasha Levin
1 sibling, 0 replies; 9+ messages in thread
From: kernel test robot @ 2025-01-18 12:18 UTC (permalink / raw)
To: Ron Economos; +Cc: stable, oe-kbuild-all
Hi,
Thanks for your patch.
FYI: kernel test robot notices the stable kernel rule is not satisfied.
The check is based on https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html#option-3
Rule: The upstream commit ID must be specified with a separate line above the commit text.
Subject: [PATCH 6.1] Partial revert of xhci: use pm_ptr() instead #ifdef for CONFIG_PM conditionals
Link: https://lore.kernel.org/stable/20250118121505.4052080-1-re%40w6rz.net
Please ignore this mail if the patch is not relevant for upstream.
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 6.1] Partial revert of xhci: use pm_ptr() instead #ifdef for CONFIG_PM conditionals
@ 2025-01-18 12:24 Ron Economos
2025-01-18 12:26 ` kernel test robot
` (3 more replies)
0 siblings, 4 replies; 9+ messages in thread
From: Ron Economos @ 2025-01-18 12:24 UTC (permalink / raw)
To: Greg Kroah-Hartman, stable; +Cc: Pavel Machek, linux-kernel, Ron Economos
commit 9734fd7a27772016b1f6e31a03258338a219d7d6
This fixes the build when CONFIG_PM is not set
Signed-off-by: Ron Economos <re@w6rz.net>
---
drivers/usb/host/xhci-pci.c | 8 +++++++-
include/linux/usb/hcd.h | 2 ++
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c
index 1d71e8ef9919..2ff049e02326 100644
--- a/drivers/usb/host/xhci-pci.c
+++ b/drivers/usb/host/xhci-pci.c
@@ -571,6 +571,7 @@ static void xhci_pci_remove(struct pci_dev *dev)
pci_set_power_state(dev, PCI_D3hot);
}
+#ifdef CONFIG_PM
/*
* In some Intel xHCI controllers, in order to get D3 working,
* through a vendor specific SSIC CONFIG register at offset 0x883c,
@@ -720,6 +721,7 @@ static void xhci_pci_shutdown(struct usb_hcd *hcd)
if (xhci->quirks & XHCI_SPURIOUS_WAKEUP)
pci_set_power_state(pdev, PCI_D3hot);
}
+#endif /* CONFIG_PM */
/*-------------------------------------------------------------------------*/
@@ -761,17 +763,21 @@ static struct pci_driver xhci_pci_driver = {
/* suspend and resume implemented later */
.shutdown = usb_hcd_pci_shutdown,
+#ifdef CONFIG_PM
.driver = {
- .pm = pm_ptr(&usb_hcd_pci_pm_ops),
+ .pm = &usb_hcd_pci_pm_ops
},
+#endif
};
static int __init xhci_pci_init(void)
{
xhci_init_driver(&xhci_pci_hc_driver, &xhci_pci_overrides);
+#ifdef CONFIG_PM
xhci_pci_hc_driver.pci_suspend = xhci_pci_suspend;
xhci_pci_hc_driver.pci_resume = xhci_pci_resume;
xhci_pci_hc_driver.shutdown = xhci_pci_shutdown;
+#endif
return pci_register_driver(&xhci_pci_driver);
}
module_init(xhci_pci_init);
diff --git a/include/linux/usb/hcd.h b/include/linux/usb/hcd.h
index 575716d3672a..cd667acf6267 100644
--- a/include/linux/usb/hcd.h
+++ b/include/linux/usb/hcd.h
@@ -486,7 +486,9 @@ extern void usb_hcd_pci_shutdown(struct pci_dev *dev);
extern int usb_hcd_amd_remote_wakeup_quirk(struct pci_dev *dev);
+#ifdef CONFIG_PM
extern const struct dev_pm_ops usb_hcd_pci_pm_ops;
+#endif
#endif /* CONFIG_USB_PCI */
/* pci-ish (pdev null is ok) buffer alloc/mapping support */
--
2.43.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 6.1] Partial revert of xhci: use pm_ptr() instead #ifdef for CONFIG_PM conditionals
2025-01-18 12:24 [PATCH 6.1] Partial revert of xhci: use pm_ptr() instead #ifdef for CONFIG_PM conditionals Ron Economos
@ 2025-01-18 12:26 ` kernel test robot
2025-01-18 14:52 ` Greg KH
2025-01-18 14:51 ` Greg Kroah-Hartman
` (2 subsequent siblings)
3 siblings, 1 reply; 9+ messages in thread
From: kernel test robot @ 2025-01-18 12:26 UTC (permalink / raw)
To: Ron Economos; +Cc: stable, oe-kbuild-all
Hi,
Thanks for your patch.
FYI: kernel test robot notices the stable kernel rule is not satisfied.
The check is based on https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html#option-3
Rule: The upstream commit ID must be specified with a separate line above the commit text.
Subject: [PATCH 6.1] Partial revert of xhci: use pm_ptr() instead #ifdef for CONFIG_PM conditionals
Link: https://lore.kernel.org/stable/20250118122409.4052121-1-re%40w6rz.net
Please ignore this mail if the patch is not relevant for upstream.
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 6.1] Partial revert of xhci: use pm_ptr() instead #ifdef for CONFIG_PM conditionals
2025-01-18 12:24 [PATCH 6.1] Partial revert of xhci: use pm_ptr() instead #ifdef for CONFIG_PM conditionals Ron Economos
2025-01-18 12:26 ` kernel test robot
@ 2025-01-18 14:51 ` Greg Kroah-Hartman
2025-01-18 19:41 ` Sasha Levin
2025-01-19 7:37 ` Greg Kroah-Hartman
3 siblings, 0 replies; 9+ messages in thread
From: Greg Kroah-Hartman @ 2025-01-18 14:51 UTC (permalink / raw)
To: Ron Economos; +Cc: stable, linux-kernel
On Sat, Jan 18, 2025 at 04:24:09AM -0800, Ron Economos wrote:
> commit 9734fd7a27772016b1f6e31a03258338a219d7d6
Needs a bit more information here, as this isn't that commit :)
I'll edit it by hand when applying it, no problem, thanks for the patch,
that was the hard part!
greg k-h
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 6.1] Partial revert of xhci: use pm_ptr() instead #ifdef for CONFIG_PM conditionals
2025-01-18 12:26 ` kernel test robot
@ 2025-01-18 14:52 ` Greg KH
0 siblings, 0 replies; 9+ messages in thread
From: Greg KH @ 2025-01-18 14:52 UTC (permalink / raw)
To: Ron Economos, stable, oe-kbuild-all; +Cc: kernel test robot
On Sat, Jan 18, 2025 at 08:26:02PM +0800, kernel test robot wrote:
> Hi,
>
> Thanks for your patch.
>
> FYI: kernel test robot notices the stable kernel rule is not satisfied.
>
> The check is based on https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html#option-3
>
> Rule: The upstream commit ID must be specified with a separate line above the commit text.
> Subject: [PATCH 6.1] Partial revert of xhci: use pm_ptr() instead #ifdef for CONFIG_PM conditionals
> Link: https://lore.kernel.org/stable/20250118122409.4052121-1-re%40w6rz.net
>
> Please ignore this mail if the patch is not relevant for upstream.
Ron, don't worry about this, it's a false-positive.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 6.1] Partial revert of xhci: use pm_ptr() instead #ifdef for CONFIG_PM conditionals
2025-01-18 12:15 Ron Economos
2025-01-18 12:18 ` kernel test robot
@ 2025-01-18 19:40 ` Sasha Levin
1 sibling, 0 replies; 9+ messages in thread
From: Sasha Levin @ 2025-01-18 19:40 UTC (permalink / raw)
To: stable; +Cc: Ron Economos, Sasha Levin
[ Sasha's backport helper bot ]
Hi,
No upstream commit was identified. Using temporary commit for testing.
Results of testing on various branches:
| Branch | Patch Apply | Build Test |
|---------------------------|-------------|------------|
| stable/linux-6.1.y | Success | Success |
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 6.1] Partial revert of xhci: use pm_ptr() instead #ifdef for CONFIG_PM conditionals
2025-01-18 12:24 [PATCH 6.1] Partial revert of xhci: use pm_ptr() instead #ifdef for CONFIG_PM conditionals Ron Economos
2025-01-18 12:26 ` kernel test robot
2025-01-18 14:51 ` Greg Kroah-Hartman
@ 2025-01-18 19:41 ` Sasha Levin
2025-01-19 7:37 ` Greg Kroah-Hartman
3 siblings, 0 replies; 9+ messages in thread
From: Sasha Levin @ 2025-01-18 19:41 UTC (permalink / raw)
To: stable; +Cc: Ron Economos, Sasha Levin
[ Sasha's backport helper bot ]
Hi,
No upstream commit was identified. Using temporary commit for testing.
Results of testing on various branches:
| Branch | Patch Apply | Build Test |
|---------------------------|-------------|------------|
| stable/linux-6.1.y | Success | Success |
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 6.1] Partial revert of xhci: use pm_ptr() instead #ifdef for CONFIG_PM conditionals
2025-01-18 12:24 [PATCH 6.1] Partial revert of xhci: use pm_ptr() instead #ifdef for CONFIG_PM conditionals Ron Economos
` (2 preceding siblings ...)
2025-01-18 19:41 ` Sasha Levin
@ 2025-01-19 7:37 ` Greg Kroah-Hartman
3 siblings, 0 replies; 9+ messages in thread
From: Greg Kroah-Hartman @ 2025-01-19 7:37 UTC (permalink / raw)
To: Ron Economos; +Cc: stable, Pavel Machek, linux-kernel
On Sat, Jan 18, 2025 at 04:24:09AM -0800, Ron Economos wrote:
> commit 9734fd7a27772016b1f6e31a03258338a219d7d6
>
> This fixes the build when CONFIG_PM is not set
>
> Signed-off-by: Ron Economos <re@w6rz.net>
> ---
> drivers/usb/host/xhci-pci.c | 8 +++++++-
> include/linux/usb/hcd.h | 2 ++
> 2 files changed, 9 insertions(+), 1 deletion(-)
<snip>
I've finally been able to reproduce this issue here, and have trimmed
this revert down even more to be the following patch. I'll go do a new
6.1.y release with just it in now.
thanks,
greg k-h
From: Ron Economos <re@w6rz.net>
Date: Sat, 18 Jan 2025 04:24:09 -0800
Subject: Partial revert of xhci: use pm_ptr() instead #ifdef for CONFIG_PM conditionals
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, stable@vger.kernel.org
Cc: Pavel Machek <pavel@denx.de>, linux-kernel@vger.kernel.org, Ron Economos <re@w6rz.net>
Message-ID: <20250118122409.4052121-1-re@w6rz.net>
commit 9734fd7a2777 ("xhci: use pm_ptr() instead of #ifdef for CONFIG_PM
conditionals") did not quite work properly in the 6.1.y branch where it was
applied to fix a build error when CONFIG_PM was set as it left the following
build errors still present:
ERROR: modpost: "xhci_suspend" [drivers/usb/host/xhci-pci.ko] undefined!
ERROR: modpost: "xhci_resume" [drivers/usb/host/xhci-pci.ko] undefined!
Fix this up by properly placing the #ifdef CONFIG_PM in the xhci-pci.c and
hcd.h files to handle this correctly.
Link: https://lore.kernel.org/r/133dbfa0-4a37-4ae0-bb95-1a35f668ec11@w6rz.net
Signed-off-by: Ron Economos <re@w6rz.net>
Link: https://lore.kernel.org/r/d0919169-ee06-4bdd-b2e3-2f776db90971@roeck-us.net
Reported-by: Guenter Roeck <linux@roeck-us.net>
[ Trimmed the partial revert down to an even smaller bit to only be what
is required to fix the build error - gregkh]
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/usb/host/xhci-pci.c | 4 ++++
1 file changed, 4 insertions(+)
--- a/drivers/usb/host/xhci-pci.c
+++ b/drivers/usb/host/xhci-pci.c
@@ -571,6 +571,7 @@ static void xhci_pci_remove(struct pci_d
pci_set_power_state(dev, PCI_D3hot);
}
+#ifdef CONFIG_PM
/*
* In some Intel xHCI controllers, in order to get D3 working,
* through a vendor specific SSIC CONFIG register at offset 0x883c,
@@ -720,6 +721,7 @@ static void xhci_pci_shutdown(struct usb
if (xhci->quirks & XHCI_SPURIOUS_WAKEUP)
pci_set_power_state(pdev, PCI_D3hot);
}
+#endif /* CONFIG_PM */
/*-------------------------------------------------------------------------*/
@@ -769,9 +771,11 @@ static struct pci_driver xhci_pci_driver
static int __init xhci_pci_init(void)
{
xhci_init_driver(&xhci_pci_hc_driver, &xhci_pci_overrides);
+#ifdef CONFIG_PM
xhci_pci_hc_driver.pci_suspend = xhci_pci_suspend;
xhci_pci_hc_driver.pci_resume = xhci_pci_resume;
xhci_pci_hc_driver.shutdown = xhci_pci_shutdown;
+#endif
return pci_register_driver(&xhci_pci_driver);
}
module_init(xhci_pci_init);
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2025-01-19 7:37 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-18 12:24 [PATCH 6.1] Partial revert of xhci: use pm_ptr() instead #ifdef for CONFIG_PM conditionals Ron Economos
2025-01-18 12:26 ` kernel test robot
2025-01-18 14:52 ` Greg KH
2025-01-18 14:51 ` Greg Kroah-Hartman
2025-01-18 19:41 ` Sasha Levin
2025-01-19 7:37 ` Greg Kroah-Hartman
-- strict thread matches above, loose matches on Subject: below --
2025-01-18 12:15 Ron Economos
2025-01-18 12:18 ` kernel test robot
2025-01-18 19:40 ` Sasha Levin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox