Skip to contentSkip to conversation

AMD AHCI + Samsung 870 QVO STANDBY IMMEDIATE time out

DISCUSSION Niklas Cassel 2 participants 2 messages Sep 14 libata

lore
Share & tools
lore

Niklas Cassel

author maintainer
#0 lore raw

Hello Mario,

Perhaps you, or someone at AMD could help us with this:
https://bugzilla.kernel.org/show_bug.cgi?id=221986

Is seems that a user is having issues with:

12:00.0 SATA controller [0106]: Advanced Micro Devices, Inc.

	[AMD] 600 Series Chipset SATA Controller [1022:43f6] (rev 01)

together with:

Samsung SSD 870 QVO 8TB

when being issued command STANDBY IMMEDIATE (E0h) during system suspend.

The command never receives a completion.

It seems that this is only a problem when "med_power_with_dipm" is enabled.

Apparently, when using "max_performance" the drives do complete the STANDBY IMMEDIATE (E0h) command successfully.

From looking at the AHCI specification, the HBA should automatically wake the drive when a new command is issued via PxCI.

The user did point out that these Samsung drives are quirked with:
ATA_QUIRK_NO_LPM_ON_ATI.

See commit:
f2aac4c73c99 ("ata: libata-core: Add ATA_QUIRK_NO_LPM_ON_ATI for certain Samsung SSDs").

From earlier reports, these Samsung drives appear to handle LPM perfectly fine on Intel-based AHCI controllers.

This LPM quirk is only for the old ATI AHCI controllers, because it was assumed that, just like the ATI specific quirk that disables NCQ:
ATA_QUIRK_NO_NCQ_ON_ATI, that the AMD AHCI controllers were unaffected, see e.g. 7a8526a5cd51 ("libata: Add ATA_HORKAGE_NO_NCQ_ON_ATI for Samsung 860 and 870 SSD."):

After verifying the chipset from the user reports, the issue appears on AMD/ATI SB7x0/SB8x0/SB9x0 SATA Controllers and does not appear on recent AMD SATA adapters.

I guess it is possible that while the AMD AHCI controllers have fixed the NCQ problem with Samsung SSDs (that was troubling ATI AHCI), perhaps the AMD AHCI controllers still have the LPM issues with Samsung SSDS that was troubling ATI AHCI controllers.

It this anything anyone at AMD is aware of?

From the users report, he is using the latest available firmware from Samsung.

Considering that Samsung SSD work fine with LPM on Intel, I'm considering the users suggestion, to simply rename the ATA_QUIRK_NO_LPM_ON_ATI to ATA_QUIRK_NO_LPM_ON_ATI_AND_AMD and modify the quirk to extend to AMD AHCI controllers as well.

Kind regards,
Niklas

#1 lore raw

++ AMD guys

Quoted 60 lines · Niklas Cassel

Hello Mario,

Perhaps you, or someone at AMD could help us with this:
https://bugzilla.kernel.org/show_bug.cgi?id=221986

Is seems that a user is having issues with:

12:00.0 SATA controller [0106]: Advanced Micro Devices, Inc.

	[AMD] 600 Series Chipset SATA Controller [1022:43f6] (rev 01)

together with:

Samsung SSD 870 QVO 8TB

when being issued command STANDBY IMMEDIATE (E0h) during system suspend.

The command never receives a completion.

It seems that this is only a problem when "med_power_with_dipm" is enabled.

Apparently, when using "max_performance" the drives do complete the STANDBY IMMEDIATE (E0h) command successfully.

From looking at the AHCI specification, the HBA should automatically wake
the drive when a new command is issued via PxCI.

The user did point out that these Samsung drives are quirked with:
ATA_QUIRK_NO_LPM_ON_ATI.

See commit:
f2aac4c73c99 ("ata: libata-core: Add ATA_QUIRK_NO_LPM_ON_ATI for certain Samsung SSDs").

From earlier reports, these Samsung drives appear to handle LPM perfectly
fine on Intel-based AHCI controllers.

This LPM quirk is only for the old ATI AHCI controllers, because it was assumed that, just like the ATI specific quirk that disables NCQ:
ATA_QUIRK_NO_NCQ_ON_ATI, that the AMD AHCI controllers were unaffected, see e.g. 7a8526a5cd51 ("libata: Add ATA_HORKAGE_NO_NCQ_ON_ATI for Samsung 860 and 870 SSD."):

After verifying the chipset from the user reports, the issue appears on AMD/ATI SB7x0/SB8x0/SB9x0 SATA Controllers and does not appear on recent AMD SATA adapters.

I guess it is possible that while the AMD AHCI controllers have fixed the NCQ problem with Samsung SSDs (that was troubling ATI AHCI), perhaps the AMD AHCI controllers still have the LPM issues with Samsung SSDS that was troubling ATI AHCI controllers.

Quoted 9 lines

It this anything anyone at AMD is aware of?

From the users report, he is using the latest available firmware from Samsung.

Considering that Samsung SSD work fine with LPM on Intel, I'm considering the users suggestion, to simply rename the ATA_QUIRK_NO_LPM_ON_ATI to ATA_QUIRK_NO_LPM_ON_ATI_AND_AMD and modify the quirk to extend to AMD AHCI controllers as well.

I'm not aware of anything like this. Let's see if Shyam or Basavaraj have.

I think that sounds like a pragmatic approach. We can always back it out later if this ends up being root caused down to a different conclusion.