Re: Regression from 7627a0edef54 ("ata: ahci: Drop low power policy board type") on reboot (but not cold boot)

Eric
2025-03-06T12:27:25Z

[-- Attachment #1: Type: text/plain, Size: 3038 bytes --]

Le 06/03/2025 à 11:40, Niklas Cassel a écrit :
> On Thu, Mar 06, 2025 at 11:37:08AM +0100, Niklas Cassel wrote:
>> On Mon, Mar 03, 2025 at 03:58:30PM +0100, Eric wrote:
>>> Hi Niklas
>>>
>>> Le 03/03/2025 à 07:25, Niklas Cassel a écrit :
>>>> Do you see your SSD in the kexec'd kernel?
>>> Sorry, I've tried that using several methods (systemctl kexec / kexec --load
>>> + kexec -e / kexec --load + shutdown --reboot now) and it failed each time.
>>> I *don't* think it is related to this bug, however, because each time the
>>> process got stuck just after displaying "kexec_core: Starting new kernel".
>> I just tired (as root):
>> # kexec -l /boot/vmlinuz-6.13.5-200.fc41.x86_64 --initrd=/boot/initramfs-6.13.5-200.fc41.x86_64.img --reuse-cmd
>> # kexec -e
>>
>> and FWIW, kexec worked fine.
>>
>> Did you specify an initrd ? did you specify --reuse-cmd ?

At one time, I did yes. I can't figure out what's wrong, but working
from the assumption that another way of working around the UEFI's
failure to wake the disk might yield the same information that you're
looking for,

I installed the same system on a USB stick, on which I also installed
grub, so that the reboot is made independent of weather the UEFI sees
the SSD disk or not. I'll attach dmesg extracts (grep on ata or ahci) to
this mail.

One is the dmesg after coldbooting from the USB stick, the other is
rebooting on the USB stick. First of all, the visible result : the SSD
is not detected by linux at reboot (but is when coldbooting).

Here is what changes :

eric@gwaihir:~$ diff
/media/eric/trixieUSB/home/eric/dmesg-ahci-ata-coldboot.untimed.txt
/media/eric/trixieUSB/home/eric/dmesg-ahci-ata-reboot.untimed.txt

4c4
<  ahci 0000:00:11.0: 4/4 ports implemented (port mask 0x3c)
---
>  ahci 0000:00:11.0: 3/3 ports implemented (port mask 0x38)
14c14
<  ata3: SATA max UDMA/133 abar m1024@0xfeb0b000 port 0xfeb0b200 irq 19
lpm-pol 3
---
>  ata3: DUMMY
27,28d26
<  ata3: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
<  ata6: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
29a28
>  ata6: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
31,34d29
<  ata3.00: Model 'Samsung SSD 870 QVO 2TB', rev 'SVQ02B6Q', applying
quirks: noncqtrim zeroaftertrim noncqonati
<  ata3.00: supports DRM functions and may not be fully accessible
<  ata3.00: ATA-11: Samsung SSD 870 QVO 2TB, SVQ02B6Q, max UDMA/133
<  ata3.00: 3907029168 sectors, multi 1: LBA48 NCQ (not used)
37a33
>  ata5.00: configured for UDMA/100
40d35
<  ata5.00: configured for UDMA/100
43,46d37
<  ata3.00: Features: Trust Dev-Sleep
<  ata3.00: supports DRM functions and may not be fully accessible
<  ata3.00: configured for UDMA/133
<  scsi 2:0:0:0: Direct-Access     ATA      Samsung SSD 870 2B6Q PQ: 0
ANSI: 5
50,51d40
<  ata3.00: Enabling discard_zeroes_data
<  ata3.00: Enabling discard_zeroes_data

I hope this is useful for diagnosing the problem.

> Sorry, typo:
>
> s/--reuse-cmd/--reuse-cmdline/
>
>
> Kind regards,
> Niklas

Kind regards,

Eric

[-- Attachment #2: dmesg-ahci-ata-reboot.txt --]
[-- Type: text/plain, Size: 2490 bytes --]

sudo dmesg | grep -iE "( ata|ahci)"
[ 1.884263] ahci 0000:00:11.0: version 3.0
[ 1.884401] ahci 0000:00:11.0: AHCI vers 0001.0200, 32 command slots, 6 Gbps, SATA mode
[ 1.884404] ahci 0000:00:11.0: 3/3 ports implemented (port mask 0x38)
[ 1.884407] ahci 0000:00:11.0: flags: 64bit ncq sntf ilck pm led clo pmp pio slum part
[ 1.890372] scsi host0: ahci
[ 1.891587] scsi host1: ahci
[ 1.891751] scsi host2: ahci
[ 1.891924] scsi host3: ahci
[ 1.892079] scsi host4: ahci
[ 1.892234] scsi host5: ahci
[ 1.892298] ata1: DUMMY
[ 1.892300] ata2: DUMMY
[ 1.892300] ata3: DUMMY
[ 1.892302] ata4: SATA max UDMA/133 abar m1024@0xfeb0b000 port 0xfeb0b280 irq 19 lpm-pol 3
[ 1.892305] ata5: SATA max UDMA/133 abar m1024@0xfeb0b000 port 0xfeb0b300 irq 19 lpm-pol 3
[ 1.892307] ata6: SATA max UDMA/133 abar m1024@0xfeb0b000 port 0xfeb0b380 irq 19 lpm-pol 3
[ 1.892487] ahci 0000:04:00.0: SSS flag set, parallel bus scan disabled
[ 1.892508] ahci 0000:04:00.0: AHCI vers 0001.0200, 32 command slots, 6 Gbps, SATA mode
[ 1.892511] ahci 0000:04:00.0: 2/2 ports implemented (port mask 0x3)
[ 1.892513] ahci 0000:04:00.0: flags: 64bit ncq sntf stag led clo pmp pio slum part ccc sxs
[ 1.892927] scsi host6: ahci
[ 1.893073] scsi host7: ahci
[ 1.893144] ata7: SATA max UDMA/133 abar m512@0xfe800000 port 0xfe800100 irq 43 lpm-pol 0
[ 1.893148] ata8: SATA max UDMA/133 abar m512@0xfe800000 port 0xfe800180 irq 43 lpm-pol 0
[ 2.203586] ata7: SATA link down (SStatus 0 SControl 300)
[ 2.359980] ata4: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
[ 2.360014] ata6: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[ 2.360047] ata5: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
[ 2.360592] ata4.00: ATA-7: MAXTOR STM3250310AS, 3.AAC, max UDMA/133
[ 2.360597] ata4.00: 488397168 sectors, multi 16: LBA48 NCQ (depth 32)
[ 2.360612] ata5.00: ATAPI: ASUS BC-12D2HT, 1.00, max UDMA/100
[ 2.361159] ata5.00: configured for UDMA/100
[ 2.361179] ata6.00: ATA-8: ST31000528AS, CC38, max UDMA/133
[ 2.361184] ata6.00: 1953525168 sectors, multi 16: LBA48 NCQ (depth 32)
[ 2.361317] ata4.00: configured for UDMA/133
[ 2.362599] ata6.00: configured for UDMA/133
[ 2.374807] scsi 3:0:0:0: Direct-Access ATA MAXTOR STM325031 C PQ: 0 ANSI: 5
[ 2.424501] scsi 5:0:0:0: Direct-Access ATA ST31000528AS CC38 PQ: 0 ANSI: 5
[ 2.735860] ata8: SATA link down (SStatus 0 SControl 300)

[-- Attachment #3: dmesg-ahci-ata-coldboot.txt --]
[-- Type: text/plain, Size: 3360 bytes --]

sudo dmesg | grep -iE "( ata|ahci)"
[ 1.739185] ahci 0000:00:11.0: version 3.0
[ 1.739313] ahci 0000:00:11.0: AHCI vers 0001.0200, 32 command slots, 6 Gbps, SATA mode
[ 1.739316] ahci 0000:00:11.0: 4/4 ports implemented (port mask 0x3c)
[ 1.739318] ahci 0000:00:11.0: flags: 64bit ncq sntf ilck pm led clo pmp pio slum part
[ 1.740746] scsi host0: ahci
[ 1.740987] scsi host1: ahci
[ 1.741137] scsi host2: ahci
[ 1.741288] scsi host3: ahci
[ 1.741435] scsi host4: ahci
[ 1.741582] scsi host5: ahci
[ 1.741635] ata1: DUMMY
[ 1.741637] ata2: DUMMY
[ 1.741639] ata3: SATA max UDMA/133 abar m1024@0xfeb0b000 port 0xfeb0b200 irq 19 lpm-pol 3
[ 1.741641] ata4: SATA max UDMA/133 abar m1024@0xfeb0b000 port 0xfeb0b280 irq 19 lpm-pol 3
[ 1.741644] ata5: SATA max UDMA/133 abar m1024@0xfeb0b000 port 0xfeb0b300 irq 19 lpm-pol 3
[ 1.741646] ata6: SATA max UDMA/133 abar m1024@0xfeb0b000 port 0xfeb0b380 irq 19 lpm-pol 3
[ 1.741845] ahci 0000:04:00.0: SSS flag set, parallel bus scan disabled
[ 1.741867] ahci 0000:04:00.0: AHCI vers 0001.0200, 32 command slots, 6 Gbps, SATA mode
[ 1.741869] ahci 0000:04:00.0: 2/2 ports implemented (port mask 0x3)
[ 1.741871] ahci 0000:04:00.0: flags: 64bit ncq sntf stag led clo pmp pio slum part ccc sxs
[ 1.742191] scsi host6: ahci
[ 1.742420] scsi host7: ahci
[ 1.742488] ata7: SATA max UDMA/133 abar m512@0xfe800000 port 0xfe800100 irq 43 lpm-pol 0
[ 1.742492] ata8: SATA max UDMA/133 abar m512@0xfe800000 port 0xfe800180 irq 43 lpm-pol 0
[ 2.051822] ata7: SATA link down (SStatus 0 SControl 300)
[ 2.208138] ata3: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
[ 2.208172] ata6: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[ 2.208197] ata4: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
[ 2.208229] ata5: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
[ 2.208351] ata3.00: Model 'Samsung SSD 870 QVO 2TB', rev 'SVQ02B6Q', applying quirks: noncqtrim zeroaftertrim noncqonati
[ 2.208392] ata3.00: supports DRM functions and may not be fully accessible
[ 2.208394] ata3.00: ATA-11: Samsung SSD 870 QVO 2TB, SVQ02B6Q, max UDMA/133
[ 2.208396] ata3.00: 3907029168 sectors, multi 1: LBA48 NCQ (not used)
[ 2.208751] ata4.00: ATA-7: MAXTOR STM3250310AS, 3.AAC, max UDMA/133
[ 2.208755] ata4.00: 488397168 sectors, multi 16: LBA48 NCQ (depth 32)
[ 2.208820] ata5.00: ATAPI: ASUS BC-12D2HT, 1.00, max UDMA/100
[ 2.209290] ata6.00: ATA-8: ST31000528AS, CC38, max UDMA/133
[ 2.209294] ata6.00: 1953525168 sectors, multi 16: LBA48 NCQ (depth 32)
[ 2.209388] ata5.00: configured for UDMA/100
[ 2.209467] ata4.00: configured for UDMA/133
[ 2.210572] ata6.00: configured for UDMA/133
[ 2.212871] ata3.00: Features: Trust Dev-Sleep
[ 2.213183] ata3.00: supports DRM functions and may not be fully accessible
[ 2.218231] ata3.00: configured for UDMA/133
[ 2.228592] scsi 2:0:0:0: Direct-Access ATA Samsung SSD 870 2B6Q PQ: 0 ANSI: 5
[ 2.228961] scsi 3:0:0:0: Direct-Access ATA MAXTOR STM325031 C PQ: 0 ANSI: 5
[ 2.288681] scsi 5:0:0:0: Direct-Access ATA ST31000528AS CC38 PQ: 0 ANSI: 5
[ 2.599717] ata8: SATA link down (SStatus 0 SControl 300)
[ 2.608383] ata3.00: Enabling discard_zeroes_data
[ 2.609211] ata3.00: Enabling discard_zeroes_data