]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ahci: Disable LPM on Lenovo 50 series laptops with a too old BIOS
authorHans de Goede <hdegoede@redhat.com>
Sun, 1 Jul 2018 10:15:46 +0000 (12:15 +0200)
committerTejun Heo <tj@kernel.org>
Mon, 2 Jul 2018 14:54:38 +0000 (07:54 -0700)
commit240630e61870e62e39a97225048f9945848fa5f5
tree8dfa3ff969ae958f0925db3ec3822c4b6792d46a
parent8740fa6f5c834a881b9b0d560e62c6fe3c1e60ef
ahci: Disable LPM on Lenovo 50 series laptops with a too old BIOS

There have been several reports of LPM related hard freezes about once
a day on multiple Lenovo 50 series models. Strange enough these reports
where not disk model specific as LPM issues usually are and some users
with the exact same disk + laptop where seeing them while other users
where not seeing these issues.

It turns out that enabling LPM triggers a firmware bug somewhere, which
has been fixed in later BIOS versions.

This commit adds a new ahci_broken_lpm() function and a new ATA_FLAG_NO_LPM
for dealing with this.

The ahci_broken_lpm() function contains DMI match info for the 4 models
which are known to be affected by this and the DMI BIOS date field for
known good BIOS versions. If the BIOS date is older then the one in the
table LPM will be disabled and a warning will be printed.

Note the BIOS dates are for known good versions, some older versions may
work too, but we don't know for sure, the table is using dates from BIOS
versions for which users have confirmed that upgrading to that version
makes the problem go away.

Unfortunately I've been unable to get hold of the reporter who reported
that BIOS version 2.35 fixed the problems on the W541 for him. I've been
able to verify the DMI_SYS_VENDOR and DMI_PRODUCT_VERSION from an older
dmidecode, but I don't know the exact BIOS date as reported in the DMI.
Lenovo keeps a changelog with dates in their release notes, but the
dates there are the release dates not the build dates which are in DMI.
So I've chosen to set the date to which we compare to one day past the
release date of the 2.34 BIOS. I plan to fix this with a follow up
commit once I've the necessary info.

Cc: stable@vger.kernel.org
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
drivers/ata/ahci.c
drivers/ata/libata-core.c
include/linux/libata.h