[PATCH 1/2] driver: ahci: Allow disabling dlpm for all bios version

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In ahci_broken_lpm(), dmi->driver_data is encoded as a date: if the
date of the current BIOS is older than driver_data, the LPM horkage is
not applied.
Allow dmi->driver_data is be empty in case a problem is not fixed in any
BIOS version.

Signed-off-by: Gwendal Grignou <gwendal@xxxxxxxxxxxx>
---
 drivers/ata/ahci.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 5f1f049063dd2..9132201f1353e 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -1279,6 +1279,9 @@ static bool ahci_broken_lpm(struct pci_dev *pdev)
 	if (!dmi)
 		return false;
 
+	if (!dmi->driver_data)
+		return true;
+
 	dmi_get_date(DMI_BIOS_DATE, &year, &month, &date);
 	snprintf(buf, sizeof(buf), "%04d%02d%02d", year, month, date);
 
-- 
2.31.0.291.g576ba9dcdaf-goog




[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux