Re: [PATCH v2] mmc: sdhci-pci-gli: GL9763E: Fix LPM ordering and restore hw settings on resume
From: Athira Palliprath
Date: Fri Dec 04 2026 - 01:29:29 EST
(Resending in plain text for the mailing lists.)
Hi Ben,
Thank you for reviewing v2 and confirming the LPM ordering on both the
runtime and system suspend/resume paths, as well as sharing the earlier
thread context.
On Thu, Dec 3, 2026 at 7:22 AM BenChuang[莊智量]
<Ben.Chuang@xxxxxxxxxxxxxxxxxxx> wrote:
> In gl9763e_runtime_suspend()/resume(), this appears consistent with the
> intended LPM ordering.
>
> The only difference I see is that runtime resume now restores the HW settings
> as well. This may slightly increase the D3hot resume time.
The reason for calling gl9763e_hw_setting() in gl9763e_runtime_resume()
as well is that PCI runtime PM can also transition the device into D3cold
(not only D3hot) on platforms where runtime D3cold is enabled. When
waking from runtime D3cold, pci_restore_state() restores standard PCI
config space but not the GL9763E vendor registers (AXI_REQ, L1DLY,
HS400_RXDLY) or the AER replay-timer-timeout mask, and gl9763e_resume()
is not called on the runtime-PM path.
Since gl9763e_hw_setting() only performs a small number of PCI config
accesses with no delays or sleeps, the added overhead on D3hot runtime
resume should be minimal (microseconds compared to D3hot -> D0 and SDHCI
clock/PLL stabilization).
If you or Adrian would prefer avoiding those config writes on D3hot
resumes (for example, checking whether the settings are already intact
before reprogramming), I'm happy to adjust that; otherwise keeping it
unconditional is simpler and ensures runtime D3cold is always covered.
Best regards,
Athira