A xHC USB 3 port might miss the first wake signal from a USB 3 device
if the port LFPS reveiver isn't enabled fast enough after xHC resume.
xHC host will anyway be resumed by a PME# signal, but will go back to
suspend if no port activity is seen.
The device resends the U3 LFPS wake signal after a 100ms delay, but
by then host is already suspended, starting all over from the
beginning of this issue.
USB 3 specs say U3 wake LFPS signal is sent for max 10ms, then device
needs to delay 100ms before resending the wake.
Don't suspend immediately if port activity isn't detected in resume.
Instead add a retry. If there is no port activity then delay for 120ms,
and re-check for port activity.
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Mathias Nyman <mathias.nyman(a)linux.intel.com>
---
drivers/usb/host/xhci.c | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index bd27bd670104..48a68fcf2b36 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -1088,6 +1088,7 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated)
struct usb_hcd *secondary_hcd;
int retval = 0;
bool comp_timer_running = false;
+ bool pending_portevent = false;
if (!hcd->state)
return 0;
@@ -1226,13 +1227,22 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated)
done:
if (retval == 0) {
- /* Resume root hubs only when have pending events. */
- if (xhci_pending_portevent(xhci)) {
+ /*
+ * Resume roothubs only if there are pending events.
+ * USB 3 devices resend U3 LFPS wake after a 100ms delay if
+ * the first wake signalling failed, give it that chance.
+ */
+ pending_portevent = xhci_pending_portevent(xhci);
+ if (!pending_portevent) {
+ msleep(120);
+ pending_portevent = xhci_pending_portevent(xhci);
+ }
+
+ if (pending_portevent) {
usb_hcd_resume_root_hub(xhci->shared_hcd);
usb_hcd_resume_root_hub(hcd);
}
}
-
/*
* If system is subject to the Quirk, Compliance Mode Timer needs to
* be re-initialized Always after a system resume. Ports are subject
--
2.25.1
This reverts commit cc8870bf4c3ab0af385538460500a9d342ed945f.
Since commit cc8870bf4c3a ("ARM: imx6q: drop of_platform_default_populate()
from init_machine") the following errors are seen on boot:
[ 0.123372] imx6q_suspend_init: failed to find ocram device!
[ 0.123537] imx6_pm_common_init: No DDR LPM support with suspend -19!
, which break suspend/resume on imx6q/dl.
Revert the offeding commit to avoid the regression.
Thanks to Tim Harvey for bisecting this problem.
Cc: stable(a)vger.kernel.org
Fixes: cc8870bf4c3a ("ARM: imx6q: drop of_platform_default_populate() from init_machine")
Signed-off-by: Fabio Estevam <festevam(a)gmail.com>
---
arch/arm/mach-imx/mach-imx6q.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-imx6q.c
index 11dcc369ec14..c9d7c29d95e1 100644
--- a/arch/arm/mach-imx/mach-imx6q.c
+++ b/arch/arm/mach-imx/mach-imx6q.c
@@ -172,6 +172,9 @@ static void __init imx6q_init_machine(void)
imx_get_soc_revision());
imx6q_enet_phy_init();
+
+ of_platform_default_populate(NULL, NULL, NULL);
+
imx_anatop_init();
cpu_is_imx6q() ? imx6q_pm_init() : imx6dl_pm_init();
imx6q_1588_init();
--
2.25.1
The patch titled
Subject: mm/debug: sync up MR_CONTIG_RANGE and MR_LONGTERM_PIN
has been added to the -mm tree. Its filename is
mm-debug-sync-up-mr_contig_range-and-mr_longterm_pin.patch
This patch should soon appear at
https://ozlabs.org/~akpm/mmots/broken-out/mm-debug-sync-up-mr_contig_range-…
and later at
https://ozlabs.org/~akpm/mmotm/broken-out/mm-debug-sync-up-mr_contig_range-…
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next and is updated
there every 3-4 working days
------------------------------------------------------
From: Weizhao Ouyang <o451686892(a)gmail.com>
Subject: mm/debug: sync up MR_CONTIG_RANGE and MR_LONGTERM_PIN
Sync up MR_CONTIG_RANGE and MR_LONGTERM_PIN to migrate_reason_names.
Link: https://lkml.kernel.org/r/20210921064553.293905-2-o451686892@gmail.com
Fixes: 310253514bbf ("mm/migrate: rename migration reason MR_CMA to MR_CONTIG_RANGE")
Fixes: d1e153fea2a8 ("mm/gup: migrate pinned pages out of movable zone")
Signed-off-by: Weizhao Ouyang <o451686892(a)gmail.com>
Reviewed-by: "Huang, Ying" <ying.huang(a)intel.com>
Cc: Anshuman Khandual <khandual(a)linux.vnet.ibm.com>
Cc: Michal Hocko <mhocko(a)suse.com>
Cc: John Hubbard <jhubbard(a)nvidia.com>
Cc: Pavel Tatashin <pasha.tatashin(a)soleen.com>
Cc: Yang Shi <yang.shi(a)linux.alibaba.com>
Cc: Zi Yan <ziy(a)nvidia.com>
Cc: Dave Hansen <dave.hansen(a)linux.intel.com>
Cc: Minchan Kim <minchan(a)kernel.org>
Cc: Mina Almasry <almasrymina(a)google.com>
Cc: "Matthew Wilcox (Oracle)" <willy(a)infradead.org>
Cc: Oscar Salvador <osalvador(a)suse.de>
Cc: Wei Xu <weixugc(a)google.com>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
mm/debug.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/mm/debug.c~mm-debug-sync-up-mr_contig_range-and-mr_longterm_pin
+++ a/mm/debug.c
@@ -24,7 +24,8 @@ const char *migrate_reason_names[MR_TYPE
"syscall_or_cpuset",
"mempolicy_mbind",
"numa_misplaced",
- "cma",
+ "contig_range",
+ "longterm_pin",
};
const struct trace_print_flags pageflag_names[] = {
_
Patches currently in -mm which might be from o451686892(a)gmail.com are
mm-debug-sync-up-mr_contig_range-and-mr_longterm_pin.patch
mm-debug-sync-up-latest-migrate_reason-to-migrate_reason_names.patch