lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Z9BFSM059Wj2cYX5@ryzen>
Date: Tue, 11 Mar 2025 15:14:32 +0100
From: Niklas Cassel <cassel@...nel.org>
To: Hans de Goede <hdegoede@...hat.com>
Cc: Eric <eric.4.debian@...batoulnz.fr>,
	Salvatore Bonaccorso <carnil@...ian.org>,
	Mario Limonciello <mario.limonciello@....com>,
	Christoph Hellwig <hch@...radead.org>,
	Mika Westerberg <mika.westerberg@...ux.intel.com>,
	Damien Le Moal <dlemoal@...nel.org>,
	Jian-Hong Pan <jhp@...lessos.org>, regressions@...ts.linux.dev,
	linux-kernel@...r.kernel.org, stable@...r.kernel.org,
	linux-ide@...r.kernel.org,
	Dieter Mummenschanz <dmummenschanz@....de>
Subject: Re: Regression from 7627a0edef54 ("ata: ahci: Drop low power policy
 board type") on reboot (but not cold boot)

Hello Hans, Eric,

On Mon, Mar 10, 2025 at 09:12:13PM +0100, Hans de Goede wrote:
> 
> I agree with you that this is a BIOS bug of the motherboard in question
> and/or a bad interaction between the ATI SATA controller and Samsung SSD
> 870* models. Note that given the age of the motherboard there are likely
> not going to be any BIOS updates fixing this though.

Looking at the number of quirks for some of the ATI SB7x0/SB8x0/SB9x0 SATA
controllers, they really look like something special (not in a good way):
https://github.com/torvalds/linux/blob/v6.14-rc6/drivers/ata/ahci.c#L236-L244

-Ignore SError internal
-No MSI
-Max 255 sectors
-Broken 64-bit DMA
-Retry SRST (software reset)

And that is even without the weird "disable NCQ but only for Samsung SSD
8xx drives" quirk when using these ATI controllers.


What does bother me is that we don't know if it is this specific mobo/BIOS:
     Manufacturer: ASUSTeK COMPUTER INC.
     Product Name: M5A99X EVO R2.0
     Version: Rev 1.xx

     M5A99X EVO R2.0 BIOS 2501
     Version 2501
     3.06 MB
     2014/05/14


that should have a NOLPM quirk, like we do for specific BIOSes:
https://github.com/torvalds/linux/blob/v6.14-rc6/drivers/ata/ahci.c#L1402-L1439

Or if it this ATI SATA controller that is always broken when it comes
to LPM, regardless of the drive, or if it is only Samsung drives.

Considering the dmesg comparing cold boot, the Maxtor drive and the
ASUS ATAPI device seems to be recognized correctly.

Eric, could you please run:
$ sudo hdparm -I /dev/sdX | grep "interface power management"

on both your Samsung and Maxtor drive?
(A star to the left of feature means that the feature is enabled)



One guess... perhaps it could be Device Initiated PM that is broken with
these controllers? (Even though the controller does claim to support it.)

Eric, could you please try this patch:

diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index f813dbdc2346..ca690fde8842 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -244,7 +244,7 @@ static const struct ata_port_info ahci_port_info[] = {
 	},
 	[board_ahci_sb700] = {	/* for SB700 and SB800 */
 		AHCI_HFLAGS	(AHCI_HFLAG_IGN_SERR_INTERNAL),
-		.flags		= AHCI_FLAG_COMMON,
+		.flags		= AHCI_FLAG_COMMON | ATA_FLAG_NO_DIPM,
 		.pio_mask	= ATA_PIO4,
 		.udma_mask	= ATA_UDMA6,
 		.port_ops	= &ahci_pmp_retry_srst_ops,



Normally, I do think that we need more reports, to see if it is just
this specific BIOS, or all the ATI SB7x0/SB8x0/SB9x0 SATA controllers
that are broken...

...but, considering how many quirks these ATI controllers have already...

...and the fact that the one (Dieter) who reported that his Samsung SSD 870
QVO could enter deeper sleep states just fine was running an Intel AHCI
controller (with the same FW version as Eric), I would be open to a patch
that sets ATA_FLAG_NO_LPM for all these ATI controllers.

Or a ATA_QUIRK_NO_LPM_ON_ATI, like you suggested, if we are certain that it
is only Samsung drives that don't work with these ATI SATA controllers.


Kind regards,
Niklas

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ