Skip to content

Commit cf4f751

Browse files
floatiousgregkh
authored andcommitted
ata: ahci: Disallow LPM for ASUSPRO-D840SA motherboard
commit b5acc36 upstream. A user has bisected a regression which causes graphical corruptions on his screen to commit 7627a0e ("ata: ahci: Drop low power policy board type"). Simply reverting commit 7627a0e ("ata: ahci: Drop low power policy board type") makes the graphical corruptions on his screen to go away. (Note: there are no visible messages in dmesg that indicates a problem with AHCI.) The user also reports that the problem occurs regardless if there is an HDD or an SSD connected via AHCI, so the problem is not device related. The devices also work fine on other motherboards, so it seems specific to the ASUSPRO-D840SA motherboard. While enabling low power modes for AHCI is not supposed to affect completely unrelated hardware, like a graphics card, it does however allow the system to enter deeper PC-states, which could expose ACPI issues that were previously not visible (because the system never entered these lower power states before). There are previous examples where enabling LPM exposed serious BIOS/ACPI bugs, see e.g. commit 240630e ("ahci: Disable LPM on Lenovo 50 series laptops with a too old BIOS"). Since there hasn't been any BIOS update in years for the ASUSPRO-D840SA motherboard, disable LPM for this board, in order to avoid entering lower PC-states, which triggers graphical corruptions. Cc: [email protected] Reported-by: Andy Yang <[email protected]> Closes: https://bugzilla.kernel.org/show_bug.cgi?id=220111 Fixes: 7627a0e ("ata: ahci: Drop low power policy board type") Reviewed-by: Damien Le Moal <[email protected]> Reviewed-by: Hans de Goede <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Niklas Cassel <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 947f930 commit cf4f751

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

drivers/ata/ahci.c

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1410,8 +1410,15 @@ static bool ahci_broken_suspend(struct pci_dev *pdev)
14101410

14111411
static bool ahci_broken_lpm(struct pci_dev *pdev)
14121412
{
1413+
/*
1414+
* Platforms with LPM problems.
1415+
* If driver_data is NULL, there is no existing BIOS version with
1416+
* functioning LPM.
1417+
* If driver_data is non-NULL, then driver_data contains the DMI BIOS
1418+
* build date of the first BIOS version with functioning LPM (i.e. older
1419+
* BIOS versions have broken LPM).
1420+
*/
14131421
static const struct dmi_system_id sysids[] = {
1414-
/* Various Lenovo 50 series have LPM issues with older BIOSen */
14151422
{
14161423
.matches = {
14171424
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
@@ -1446,6 +1453,13 @@ static bool ahci_broken_lpm(struct pci_dev *pdev)
14461453
*/
14471454
.driver_data = "20180310", /* 2.35 */
14481455
},
1456+
{
1457+
.matches = {
1458+
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
1459+
DMI_MATCH(DMI_PRODUCT_VERSION, "ASUSPRO D840MB_M840SA"),
1460+
},
1461+
/* 320 is broken, there is no known good version yet. */
1462+
},
14491463
{ } /* terminate list */
14501464
};
14511465
const struct dmi_system_id *dmi = dmi_first_match(sysids);
@@ -1455,6 +1469,9 @@ static bool ahci_broken_lpm(struct pci_dev *pdev)
14551469
if (!dmi)
14561470
return false;
14571471

1472+
if (!dmi->driver_data)
1473+
return true;
1474+
14581475
dmi_get_date(DMI_BIOS_DATE, &year, &month, &date);
14591476
snprintf(buf, sizeof(buf), "%04d%02d%02d", year, month, date);
14601477

0 commit comments

Comments
 (0)