On Wed, May 29, 2024 at 03:02:45PM +0200, Tim Teichmann wrote: > Hello Niklas, > > > ata3 (TOSHIBA HDWD110) appears to work correctly. > > > > ata2 (Apacer AS340 120GB) results in command timeouts and > > "a change in device presence has been detected" being set in PxSERR.DIAG.X. > > > > > >> [ 2.964262] ata2.00: exception Emask 0x10 SAct 0x80 SErr 0x40d0002 action 0xe frozen > > > >> [ 2.964274] ata2.00: irq_stat 0x00000040, connection status changed > > > >> [ 2.964279] ata2: SError: { RecovComm PHYRdyChg CommWake 10B8B DevExch } > > > >> [ 2.964288] ata2.00: failed command: READ FPDMA QUEUED > > > >> [ 2.964291] ata2.00: cmd 60/08:38:80:ff:f1/00:00:0d:00:00/40 tag 7 ncq dma 4096 in > > > >> res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x10 (ATA bus error) > > > >> [ 2.964307] ata2.00: status: { DRDY } > > > >> [ 2.964318] ata2: hard resetting link > > > > > > Could you please try the following patch (quirk): > > > > diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c > > index c449d60d9bb9..24ebcad65b65 100644 > > --- a/drivers/ata/libata-core.c > > +++ b/drivers/ata/libata-core.c > > @@ -4199,6 +4199,9 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = { > > ATA_HORKAGE_ZERO_AFTER_TRIM | > > ATA_HORKAGE_NOLPM }, > > > > + /* Apacer models with LPM issues */ > > + { "Apacer AS340*", NULL, ATA_HORKAGE_NOLPM }, > > + > > /* These specific Samsung models/firmware-revs do not handle LPM well */ > > { "SAMSUNG MZMPC128HBFU-000MV", "CXM14M1Q", ATA_HORKAGE_NOLPM }, > > { "SAMSUNG SSD PM830 mSATA *", "CXM13D1Q", ATA_HORKAGE_NOLPM }, > > > > > > > > Kind regards, > > Niklas > > I've just tested the patch you've provided [0] and it works without > throwing ATA exceptions. > > The full dmesg output is attached below. > Thank you Tim. I intend to send out a real patch for this, but before I do could you please run: $ hdparm -I /dev/sdX against both your SATA drives and paste the output. (I just want to make sure that the device actually advertizes some kind of power management support.) Kind regards, Niklas