* [SRU][H][PATCH v2 1/1] usb: pci-quirks: disable D3cold on xhci suspend for s2idle on AMD Renoir
[not found] <20210716104010.4889-1-wse@tuxedocomputers.com>
@ 2021-07-16 10:40 ` Werner Sembach
2021-07-16 12:50 ` Greg Kroah-Hartman
0 siblings, 1 reply; 6+ messages in thread
From: Werner Sembach @ 2021-07-16 10:40 UTC (permalink / raw)
To: kernel-team
Cc: Mario Limonciello, Prike Liang, stable, Greg Kroah-Hartman,
Werner Sembach
From: Mario Limonciello <mario.limonciello@amd.com>
BugLink: https://bugs.launchpad.net/bugs/1936583
The XHCI controller is required to enter D3hot rather than D3cold for AMD
s2idle on this hardware generation.
Otherwise, the 'Controller Not Ready' (CNR) bit is not being cleared by
host in resume and eventually this results in xhci resume failures during
the s2idle wakeup.
Link: https://lore.kernel.org/linux-usb/1612527609-7053-1-git-send-email-Prike.Liang@amd.com/
Suggested-by: Prike Liang <Prike.Liang@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Cc: stable <stable@vger.kernel.org> # 5.11+
Link: https://lore.kernel.org/r/20210527154534.8900-1-mario.limonciello@amd.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit d1658268e43980c071dbffc3d894f6f6c4b6732a)
Signed-off-by: Werner Sembach <wse@tuxedocomputers.com>
---
drivers/usb/host/xhci-pci.c | 7 ++++++-
drivers/usb/host/xhci.h | 1 +
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c
index 9568b907fd05..ceccd27cf4d0 100644
--- a/drivers/usb/host/xhci-pci.c
+++ b/drivers/usb/host/xhci-pci.c
@@ -59,6 +59,7 @@
#define PCI_DEVICE_ID_INTEL_MAPLE_RIDGE_XHCI 0x1138
#define PCI_DEVICE_ID_INTEL_ALDER_LAKE_XHCI 0x461e
+#define PCI_DEVICE_ID_AMD_RENOIR_XHCI 0x1639
#define PCI_DEVICE_ID_AMD_PROMONTORYA_4 0x43b9
#define PCI_DEVICE_ID_AMD_PROMONTORYA_3 0x43ba
#define PCI_DEVICE_ID_AMD_PROMONTORYA_2 0x43bb
@@ -182,6 +183,10 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci)
(pdev->device == PCI_DEVICE_ID_AMD_PROMONTORYA_1)))
xhci->quirks |= XHCI_U2_DISABLE_WAKE;
+ if (pdev->vendor == PCI_VENDOR_ID_AMD &&
+ pdev->device == PCI_DEVICE_ID_AMD_RENOIR_XHCI)
+ xhci->quirks |= XHCI_BROKEN_D3COLD;
+
if (pdev->vendor == PCI_VENDOR_ID_INTEL) {
xhci->quirks |= XHCI_LPM_SUPPORT;
xhci->quirks |= XHCI_INTEL_HOST;
@@ -548,7 +553,7 @@ static int xhci_pci_suspend(struct usb_hcd *hcd, bool do_wakeup)
* Systems with the TI redriver that loses port status change events
* need to have the registers polled during D3, so avoid D3cold.
*/
- if (xhci->quirks & XHCI_COMP_MODE_QUIRK)
+ if (xhci->quirks & (XHCI_COMP_MODE_QUIRK | XHCI_BROKEN_D3COLD))
pci_d3cold_disable(pdev);
if (xhci->quirks & XHCI_PME_STUCK_QUIRK)
diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h
index 3190fd570c57..80a43b843af7 100644
--- a/drivers/usb/host/xhci.h
+++ b/drivers/usb/host/xhci.h
@@ -1884,6 +1884,7 @@ struct xhci_hcd {
#define XHCI_DISABLE_SPARSE BIT_ULL(38)
#define XHCI_SG_TRB_CACHE_SIZE_QUIRK BIT_ULL(39)
#define XHCI_NO_SOFT_RETRY BIT_ULL(40)
+#define XHCI_BROKEN_D3COLD BIT_ULL(41)
unsigned int num_active_eps;
unsigned int limit_active_eps;
--
2.25.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [SRU][H][PATCH v2 1/1] usb: pci-quirks: disable D3cold on xhci suspend for s2idle on AMD Renoir
2021-07-16 10:40 ` [SRU][H][PATCH v2 1/1] usb: pci-quirks: disable D3cold on xhci suspend for s2idle on AMD Renoir Werner Sembach
@ 2021-07-16 12:50 ` Greg Kroah-Hartman
2021-07-16 15:12 ` Werner Sembach
0 siblings, 1 reply; 6+ messages in thread
From: Greg Kroah-Hartman @ 2021-07-16 12:50 UTC (permalink / raw)
To: Werner Sembach; +Cc: kernel-team, Mario Limonciello, Prike Liang, stable
On Fri, Jul 16, 2021 at 12:40:10PM +0200, Werner Sembach wrote:
> From: Mario Limonciello <mario.limonciello@amd.com>
>
> BugLink: https://bugs.launchpad.net/bugs/1936583
>
> The XHCI controller is required to enter D3hot rather than D3cold for AMD
> s2idle on this hardware generation.
>
> Otherwise, the 'Controller Not Ready' (CNR) bit is not being cleared by
> host in resume and eventually this results in xhci resume failures during
> the s2idle wakeup.
>
> Link: https://lore.kernel.org/linux-usb/1612527609-7053-1-git-send-email-Prike.Liang@amd.com/
> Suggested-by: Prike Liang <Prike.Liang@amd.com>
> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
> Cc: stable <stable@vger.kernel.org> # 5.11+
> Link: https://lore.kernel.org/r/20210527154534.8900-1-mario.limonciello@amd.com
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> (cherry picked from commit d1658268e43980c071dbffc3d894f6f6c4b6732a)
> Signed-off-by: Werner Sembach <wse@tuxedocomputers.com>
> ---
> drivers/usb/host/xhci-pci.c | 7 ++++++-
> drivers/usb/host/xhci.h | 1 +
> 2 files changed, 7 insertions(+), 1 deletion(-)
>
Any reason you resent us a patch that is already in a stable release?
And why not just use the stable kernel trees as-is? Why attempt to
cherry-pick random portions of them?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [SRU][H][PATCH v2 1/1] usb: pci-quirks: disable D3cold on xhci suspend for s2idle on AMD Renoir
2021-07-16 12:50 ` Greg Kroah-Hartman
@ 2021-07-16 15:12 ` Werner Sembach
2021-07-16 15:30 ` Krzysztof Kozlowski
2021-07-16 15:32 ` Greg Kroah-Hartman
0 siblings, 2 replies; 6+ messages in thread
From: Werner Sembach @ 2021-07-16 15:12 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: kernel-team, Mario Limonciello, Prike Liang, stable
Am 16.07.21 um 14:50 schrieb Greg Kroah-Hartman:
> On Fri, Jul 16, 2021 at 12:40:10PM +0200, Werner Sembach wrote:
>> From: Mario Limonciello <mario.limonciello@amd.com>
>>
>> BugLink: https://bugs.launchpad.net/bugs/1936583
>>
>> The XHCI controller is required to enter D3hot rather than D3cold for AMD
>> s2idle on this hardware generation.
>>
>> Otherwise, the 'Controller Not Ready' (CNR) bit is not being cleared by
>> host in resume and eventually this results in xhci resume failures during
>> the s2idle wakeup.
>>
>> Link: https://lore.kernel.org/linux-usb/1612527609-7053-1-git-send-email-Prike.Liang@amd.com/
>> Suggested-by: Prike Liang <Prike.Liang@amd.com>
>> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
>> Cc: stable <stable@vger.kernel.org> # 5.11+
>> Link: https://lore.kernel.org/r/20210527154534.8900-1-mario.limonciello@amd.com
>> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>> (cherry picked from commit d1658268e43980c071dbffc3d894f6f6c4b6732a)
>> Signed-off-by: Werner Sembach <wse@tuxedocomputers.com>
>> ---
>> drivers/usb/host/xhci-pci.c | 7 ++++++-
>> drivers/usb/host/xhci.h | 1 +
>> 2 files changed, 7 insertions(+), 1 deletion(-)
>>
> Any reason you resent us a patch that is already in a stable release?
>
> And why not just use the stable kernel trees as-is? Why attempt to
> cherry-pick random portions of them?
>
> thanks,
>
> greg k-h
I didn't add the mailing list as recipent for my last replies so here again:
I only checked the Ubuntu 5.11 tree where the patch is actually missing.
The 5.8 kernel has other issues because of outdated amdgpu, that's why we never checked the 5.4 kernel.
Testing for 5.4: often hangs on boot before display manager shows up
5.4 + amdgpu-dkms from here: https://www.amd.com/en/support/kb/release-notes/rn-amdgpu-unified-linux-21-20 : Hang on
boot issue gone, but does not suspend anymore, and has graphic glitches.
Should I add these findings to the SRU?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [SRU][H][PATCH v2 1/1] usb: pci-quirks: disable D3cold on xhci suspend for s2idle on AMD Renoir
2021-07-16 15:12 ` Werner Sembach
@ 2021-07-16 15:30 ` Krzysztof Kozlowski
2021-07-16 22:25 ` Werner Sembach
2021-07-16 15:32 ` Greg Kroah-Hartman
1 sibling, 1 reply; 6+ messages in thread
From: Krzysztof Kozlowski @ 2021-07-16 15:30 UTC (permalink / raw)
To: Werner Sembach, Greg Kroah-Hartman
Cc: stable, kernel-team, Mario Limonciello, Prike Liang
On 16/07/2021 17:12, Werner Sembach wrote:
>
> Am 16.07.21 um 14:50 schrieb Greg Kroah-Hartman:
>> On Fri, Jul 16, 2021 at 12:40:10PM +0200, Werner Sembach wrote:
>>> From: Mario Limonciello <mario.limonciello@amd.com>
>>>
>>> BugLink: https://bugs.launchpad.net/bugs/1936583
>>>
>>> The XHCI controller is required to enter D3hot rather than D3cold for AMD
>>> s2idle on this hardware generation.
>>>
>>> Otherwise, the 'Controller Not Ready' (CNR) bit is not being cleared by
>>> host in resume and eventually this results in xhci resume failures during
>>> the s2idle wakeup.
>>>
>>> Link: https://lore.kernel.org/linux-usb/1612527609-7053-1-git-send-email-Prike.Liang@amd.com/
>>> Suggested-by: Prike Liang <Prike.Liang@amd.com>
>>> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
>>> Cc: stable <stable@vger.kernel.org> # 5.11+
>>> Link: https://lore.kernel.org/r/20210527154534.8900-1-mario.limonciello@amd.com
>>> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>>> (cherry picked from commit d1658268e43980c071dbffc3d894f6f6c4b6732a)
>>> Signed-off-by: Werner Sembach <wse@tuxedocomputers.com>
>>> ---
>>> drivers/usb/host/xhci-pci.c | 7 ++++++-
>>> drivers/usb/host/xhci.h | 1 +
>>> 2 files changed, 7 insertions(+), 1 deletion(-)
>>>
>> Any reason you resent us a patch that is already in a stable release?
>>
>> And why not just use the stable kernel trees as-is? Why attempt to
>> cherry-pick random portions of them?
>>
>> thanks,
>>
>> greg k-h
>
> I didn't add the mailing list as recipent for my last replies so here again:
>
> I only checked the Ubuntu 5.11 tree where the patch is actually missing.
>
> The 5.8 kernel has other issues because of outdated amdgpu, that's why we never checked the 5.4 kernel.
>
> Testing for 5.4: often hangs on boot before display manager shows up
>
> 5.4 + amdgpu-dkms from here: https://www.amd.com/en/support/kb/release-notes/rn-amdgpu-unified-linux-21-20 : Hang on
> boot issue gone, but does not suspend anymore, and has graphic glitches.
>
> Should I add these findings to the SRU?
Hi Werner,
This patch is specific to Ubuntu so it should not have been sent to LKML
(stable, Greg and others), which you did. I guess that's what Greg meant.
When sending such backports from your tree, be sure to set
"suppresscc=all" in your .git/config or use appropriate argument for git
send-email.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [SRU][H][PATCH v2 1/1] usb: pci-quirks: disable D3cold on xhci suspend for s2idle on AMD Renoir
2021-07-16 15:12 ` Werner Sembach
2021-07-16 15:30 ` Krzysztof Kozlowski
@ 2021-07-16 15:32 ` Greg Kroah-Hartman
1 sibling, 0 replies; 6+ messages in thread
From: Greg Kroah-Hartman @ 2021-07-16 15:32 UTC (permalink / raw)
To: Werner Sembach; +Cc: kernel-team, Mario Limonciello, Prike Liang, stable
On Fri, Jul 16, 2021 at 05:12:44PM +0200, Werner Sembach wrote:
>
> Am 16.07.21 um 14:50 schrieb Greg Kroah-Hartman:
> > On Fri, Jul 16, 2021 at 12:40:10PM +0200, Werner Sembach wrote:
> >> From: Mario Limonciello <mario.limonciello@amd.com>
> >>
> >> BugLink: https://bugs.launchpad.net/bugs/1936583
> >>
> >> The XHCI controller is required to enter D3hot rather than D3cold for AMD
> >> s2idle on this hardware generation.
> >>
> >> Otherwise, the 'Controller Not Ready' (CNR) bit is not being cleared by
> >> host in resume and eventually this results in xhci resume failures during
> >> the s2idle wakeup.
> >>
> >> Link: https://lore.kernel.org/linux-usb/1612527609-7053-1-git-send-email-Prike.Liang@amd.com/
> >> Suggested-by: Prike Liang <Prike.Liang@amd.com>
> >> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
> >> Cc: stable <stable@vger.kernel.org> # 5.11+
> >> Link: https://lore.kernel.org/r/20210527154534.8900-1-mario.limonciello@amd.com
> >> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> >> (cherry picked from commit d1658268e43980c071dbffc3d894f6f6c4b6732a)
> >> Signed-off-by: Werner Sembach <wse@tuxedocomputers.com>
> >> ---
> >> drivers/usb/host/xhci-pci.c | 7 ++++++-
> >> drivers/usb/host/xhci.h | 1 +
> >> 2 files changed, 7 insertions(+), 1 deletion(-)
> >>
> > Any reason you resent us a patch that is already in a stable release?
> >
> > And why not just use the stable kernel trees as-is? Why attempt to
> > cherry-pick random portions of them?
> >
> > thanks,
> >
> > greg k-h
>
> I didn't add the mailing list as recipent for my last replies so here again:
>
> I only checked the Ubuntu 5.11 tree where the patch is actually missing.
>
> The 5.8 kernel has other issues because of outdated amdgpu, that's why we never checked the 5.4 kernel.
>
> Testing for 5.4: often hangs on boot before display manager shows up
>
> 5.4 + amdgpu-dkms from here: https://www.amd.com/en/support/kb/release-notes/rn-amdgpu-unified-linux-21-20 : Hang on
> boot issue gone, but does not suspend anymore, and has graphic glitches.
>
> Should I add these findings to the SRU?
What does any of this have to do with the stable@vger.kernel.org
developers?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [SRU][H][PATCH v2 1/1] usb: pci-quirks: disable D3cold on xhci suspend for s2idle on AMD Renoir
2021-07-16 15:30 ` Krzysztof Kozlowski
@ 2021-07-16 22:25 ` Werner Sembach
0 siblings, 0 replies; 6+ messages in thread
From: Werner Sembach @ 2021-07-16 22:25 UTC (permalink / raw)
To: Krzysztof Kozlowski, Greg Kroah-Hartman
Cc: stable, kernel-team, Mario Limonciello, Prike Liang
Am 16.07.21 um 17:30 schrieb Krzysztof Kozlowski:
> On 16/07/2021 17:12, Werner Sembach wrote:
>> Am 16.07.21 um 14:50 schrieb Greg Kroah-Hartman:
>>> On Fri, Jul 16, 2021 at 12:40:10PM +0200, Werner Sembach wrote:
>>>> From: Mario Limonciello <mario.limonciello@amd.com>
>>>>
>>>> BugLink: https://bugs.launchpad.net/bugs/1936583
>>>>
>>>> The XHCI controller is required to enter D3hot rather than D3cold for AMD
>>>> s2idle on this hardware generation.
>>>>
>>>> Otherwise, the 'Controller Not Ready' (CNR) bit is not being cleared by
>>>> host in resume and eventually this results in xhci resume failures during
>>>> the s2idle wakeup.
>>>>
>>>> Link: https://lore.kernel.org/linux-usb/1612527609-7053-1-git-send-email-Prike.Liang@amd.com/
>>>> Suggested-by: Prike Liang <Prike.Liang@amd.com>
>>>> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
>>>> Cc: stable <stable@vger.kernel.org> # 5.11+
>>>> Link: https://lore.kernel.org/r/20210527154534.8900-1-mario.limonciello@amd.com
>>>> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>>>> (cherry picked from commit d1658268e43980c071dbffc3d894f6f6c4b6732a)
>>>> Signed-off-by: Werner Sembach <wse@tuxedocomputers.com>
>>>> ---
>>>> drivers/usb/host/xhci-pci.c | 7 ++++++-
>>>> drivers/usb/host/xhci.h | 1 +
>>>> 2 files changed, 7 insertions(+), 1 deletion(-)
>>>>
>>> Any reason you resent us a patch that is already in a stable release?
>>>
>>> And why not just use the stable kernel trees as-is? Why attempt to
>>> cherry-pick random portions of them?
>>>
>>> thanks,
>>>
>>> greg k-h
>> I didn't add the mailing list as recipent for my last replies so here again:
>>
>> I only checked the Ubuntu 5.11 tree where the patch is actually missing.
>>
>> The 5.8 kernel has other issues because of outdated amdgpu, that's why we never checked the 5.4 kernel.
>>
>> Testing for 5.4: often hangs on boot before display manager shows up
>>
>> 5.4 + amdgpu-dkms from here: https://www.amd.com/en/support/kb/release-notes/rn-amdgpu-unified-linux-21-20 : Hang on
>> boot issue gone, but does not suspend anymore, and has graphic glitches.
>>
>> Should I add these findings to the SRU?
> Hi Werner,
>
> This patch is specific to Ubuntu so it should not have been sent to LKML
> (stable, Greg and others), which you did. I guess that's what Greg meant.
>
> When sending such backports from your tree, be sure to set
> "suppresscc=all" in your .git/config or use appropriate argument for git
> send-email.
>
> Best regards,
> Krzysztof
Hi,
now I see, thanks for spelling it out, I was a little bit slow today. I
didn't realize that git send-email added non Ubuntu mailings lists
because of the cc in the commit message (besides already should know
this because I did it once before by accident).
I'm really really sorry, for all the confusion I caused.
Kind regards
Werner Sembach
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-07-16 22:25 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20210716104010.4889-1-wse@tuxedocomputers.com>
2021-07-16 10:40 ` [SRU][H][PATCH v2 1/1] usb: pci-quirks: disable D3cold on xhci suspend for s2idle on AMD Renoir Werner Sembach
2021-07-16 12:50 ` Greg Kroah-Hartman
2021-07-16 15:12 ` Werner Sembach
2021-07-16 15:30 ` Krzysztof Kozlowski
2021-07-16 22:25 ` Werner Sembach
2021-07-16 15:32 ` Greg Kroah-Hartman
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.