Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit e79a106

Browse files
superm1rafaeljw
authored andcommitted
ACPI: x86: Force StorageD3Enable on more products
A Rembrandt-based HP thin client is reported to have problems where the NVME disk isn't present after resume from s2idle. This is because the NVME disk wasn't put into D3 at suspend, and that happened because the StorageD3Enable _DSD was missing in the BIOS. As AMD's architecture requires that the NVME is in D3 for s2idle, adjust the criteria for force_storage_d3 to match *all* Zen SoCs when the FADT advertises low power idle support. This will ensure that any future products with this BIOS deficiency don't need to be added to the allow list of overrides. Cc: All applicable <stable@vger.kernel.org> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent 5533525 commit e79a106

File tree

1 file changed

+10
-14
lines changed

1 file changed

+10
-14
lines changed

drivers/acpi/x86/utils.c

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -206,16 +206,16 @@ bool acpi_device_override_status(struct acpi_device *adev, unsigned long long *s
206206
}
207207

208208
/*
209-
* AMD systems from Renoir and Lucienne *require* that the NVME controller
209+
* AMD systems from Renoir onwards *require* that the NVME controller
210210
* is put into D3 over a Modern Standby / suspend-to-idle cycle.
211211
*
212212
* This is "typically" accomplished using the `StorageD3Enable`
213213
* property in the _DSD that is checked via the `acpi_storage_d3` function
214-
* but this property was introduced after many of these systems launched
215-
* and most OEM systems don't have it in their BIOS.
214+
* but some OEM systems still don't have it in their BIOS.
216215
*
217216
* The Microsoft documentation for StorageD3Enable mentioned that Windows has
218-
* a hardcoded allowlist for D3 support, which was used for these platforms.
217+
* a hardcoded allowlist for D3 support as well as a registry key to override
218+
* the BIOS, which has been used for these cases.
219219
*
220220
* This allows quirking on Linux in a similar fashion.
221221
*
@@ -228,19 +228,15 @@ bool acpi_device_override_status(struct acpi_device *adev, unsigned long long *s
228228
* https://bugzilla.kernel.org/show_bug.cgi?id=216773
229229
* https://bugzilla.kernel.org/show_bug.cgi?id=217003
230230
* 2) On at least one HP system StorageD3Enable is missing on the second NVME
231-
disk in the system.
231+
* disk in the system.
232+
* 3) On at least one HP Rembrandt system StorageD3Enable is missing on the only
233+
* NVME device.
232234
*/
233-
static const struct x86_cpu_id storage_d3_cpu_ids[] = {
234-
X86_MATCH_VENDOR_FAM_MODEL(AMD, 23, 24, NULL), /* Picasso */
235-
X86_MATCH_VENDOR_FAM_MODEL(AMD, 23, 96, NULL), /* Renoir */
236-
X86_MATCH_VENDOR_FAM_MODEL(AMD, 23, 104, NULL), /* Lucienne */
237-
X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 80, NULL), /* Cezanne */
238-
{}
239-
};
240-
241235
bool force_storage_d3(void)
242236
{
243-
return x86_match_cpu(storage_d3_cpu_ids);
237+
if (!cpu_feature_enabled(X86_FEATURE_ZEN))
238+
return false;
239+
return acpi_gbl_FADT.flags & ACPI_FADT_LOW_POWER_S0;
244240
}
245241

246242
/*

0 commit comments

Comments
 (0)