[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

linux-image-6.12.27-amd64: CONFIG_SATA_MOBILE_LPM_POLICY=3 caused system freezing several seconds with ata ncq/dma errors



Dear Maintainer,

I am reporting an issue with the default config of CONFIG_SATA_MOBILE_LPM_POLICY=3. I'm not sure if it's considered as a bug but it caused serious issues with my system communicating with the SSD device - causing freezings for several seconds every random time. Maybe I should report this to the SSD firmware or kernel; but this issue did not occur on Debian 12 with the same SSD device where CONFIG_SATA_MOBILE_LPM_POLICY=0. The change was done last year: https://github.com/torvalds/linux/blame/ec7714e4947909190ffb3041a03311a975350fe0/drivers/ata/Kconfig#L121


What led up to the situation?
- Attached errors caused system freezing for several seconds and hard resetting
communication between the kernel and SSD device every random time.

What exactly did you do (or not do) that was effective (or ineffective)?
- 1. Replaced the SATA data/power cables to new ones was ineffective.
  2. Changed the ata port from 10 to 9. Ineffective
  3. Turn off NCQ. Ineffective, I started to see DMA errors with the same pattern.
  4. Setting boot parameter (via grub config) ahci.mobile_lpm_policy=1,
effective no issues/errors for 2 days. I see this config by default has
value 3 as in kernel source.


** Command line:
BOOT_IMAGE=/boot/vmlinuz-6.12.27-amd64 root=UUID=af49d432-77b9-47f5-bd4f-5cab831ab221 ro quiet splash nvidia-drm.modeset=1 nouveau.modeset=0 ahci.mobile_lpm_policy=1

Controller
SATA controller: Advanced Micro Devices, Inc. [AMD] 600 Series Chipset SATA
Controller (rev 01)
Board Name: X670E GAMING PLUS WIFI (MS-7E16)

SSD Device

Model Family:     Phison Driven SSDs
Device Model:     KINGSTON SA400S37960G
Serial Number:    50026B7382E64E6E
LU WWN Device Id: 5 0026b7 382e64e6e
Firmware Version: SAM22101
User Capacity:    960,197,124,096 bytes [960 GB]
Sector Size:      512 bytes logical/physical
Rotation Rate:    Solid State Device
TRIM Command:     Available
Device is:        In smartctl database 7.3/5528
ATA Version is:   ACS-3 T13/2161-D revision 4
SATA Version is:  SATA 3.2, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:    Thu May 29 19:16:50 2025 EEST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
AAM feature is:   Unavailable
APM feature is:   Disabled
Rd look-ahead is: Enabled
Write cache is:   Enabled
DSN feature is:   Unavailable
ATA Security is:  Disabled, frozen [SEC2]
Wt Cache Reorder: Unavailable


Note: I'm not subscribed to the emailing list.


Thank you



SATA Phy Event Counters (GP Log 0x11)
ID      Size     Value  Description
0x0001  4          269  Command failed due to ICRC error
0x0002  4            1  R_ERR response for data FIS
0x0005  4            0  R_ERR response for non-data FIS
0x000a  4            3  Device-to-host register FISes sent due to a COMRESET


Jun 03 22:24:29 memo kernel: ata9.00: exception Emask 0x0 SAct 0x30088004 SErr
0xd0000 action 0x6 frozen
Jun 03 22:24:29 memo kernel: ata9: SError: { PHYRdyChg CommWake 10B8B }
Jun 03 22:24:29 memo kernel: ata9.00: failed command: WRITE FPDMA QUEUED
Jun 03 22:24:29 memo kernel: ata9.00: cmd 61/18:10:a8:e9:16/00:00:02:00:00/40
tag 2 ncq dma 12288 out
Jun 03 22:24:29 memo kernel: ata9.00: status: { DRDY }
Jun 03 22:24:29 memo kernel: ata9.00: failed command: READ FPDMA QUEUED
Jun 03 22:24:29 memo kernel: ata9.00: cmd 60/08:78:98:c4:5f/00:00:63:00:00/40
tag 15 ncq dma 4096 in
Jun 03 22:24:29 memo kernel: ata9.00: status: { DRDY }
Jun 03 22:24:29 memo kernel: ata9.00: failed command: WRITE FPDMA QUEUED
Jun 03 22:24:29 memo kernel: ata9.00: cmd 61/00:98:70:09:f1/01:00:35:00:00/40
tag 19 ncq dma 131072 out
Jun 03 22:24:29 memo kernel: ata9.00: status: { DRDY }
Jun 03 22:24:29 memo kernel: ata9.00: failed command: READ FPDMA QUEUED
Jun 03 22:24:29 memo kernel: ata9.00: cmd 60/08:e0:80:8c:5f/00:00:31:00:00/40
tag 28 ncq dma 4096 in
Jun 03 22:24:29 memo kernel: ata9.00: status: { DRDY }
Jun 03 22:24:29 memo kernel: ata9.00: failed command: READ FPDMA QUEUED
Jun 03 22:24:29 memo kernel: ata9.00: cmd 60/08:e8:b8:ab:9f/00:00:33:00:00/40
tag 29 ncq dma 4096 in
Jun 03 22:24:29 memo kernel: ata9.00: status: { DRDY }
Jun 03 22:24:29 memo kernel: ata9: hard resetting link
Jun 03 22:24:29 memo kernel: ata9: SATA link up 6.0 Gbps (SStatus 133 SControl
300)
Jun 03 22:24:29 memo kernel: ata9.00: configured for UDMA/133

ata10.00: exception Emask 0x2 SAct 0x7effffff SErr 0xed0400 action 0x6 frozen
May 29 19:10:14 memo kernel: ata10: SError: { Proto PHYRdyChg CommWake 10B8B
BadCRC Handshk LinkSeq }
May 29 19:10:14 memo kernel: ata10.00: failed command: WRITE FPDMA QUEUED
May 29 19:10:14 memo kernel: ata10.00: cmd 61/08:00:10:54:29/00:00:60:00:00/40
tag 0 ncq dma 4096 out
May 29 19:10:14 memo kernel: ata10.00: status: { DRDY }
May 29 19:10:14 memo kernel: ata10.00: failed command: WRITE FPDMA QUEUED
May 29 19:10:14 memo kernel: ata10.00: cmd 61/08:08:78:56:29/00:00:60:00:00/40
tag 1 ncq dma 4096 out
May 29 19:10:14 memo kernel: ata10.00: status: { DRDY }
May 29 19:10:14 memo kernel: ata10.00: failed command: WRITE FPDMA QUEUED
May 29 19:10:14 memo kernel: ata10.00: cmd 61/08:10:50:59:29/00:00:60:00:00/40
tag 2 ncq dma 4096 out
May 29 19:10:14 memo kernel: ata10.00: status: { DRDY }
May 29 19:10:14 memo kernel: ata10.00: failed command: READ FPDMA QUEUED
May 29 19:10:14 memo kernel: ata10.00: cmd 60/18:18:00:db:5e/00:00:62:00:00/40
tag 3 ncq dma 12288 in
May 29 19:10:14 memo kernel: ata10.00: status: { DRDY }
May 29 19:10:14 memo kernel: ata10.00: failed command: READ FPDMA QUEUED
May 29 19:10:14 memo kernel: ata10.00: cmd 60/08:20:18:db:5e/00:00:62:00:00/40
tag 4 ncq dma 4096 in
May 29 19:10:14 memo kernel: ata10.00: status: { DRDY }
May 29 19:10:14 memo kernel: ata10.00: failed command: READ FPDMA QUEUED
May 29 19:10:14 memo kernel: ata10.00: cmd 60/e8:28:20:db:5e/00:00:62:00:00/40
tag 5 ncq dma 118784 in
May 29 19:10:14 memo kernel: ata10.00: status: { DRDY }
May 29 19:10:14 memo kernel: ata10.00: failed command: READ FPDMA QUEUED
May 29 19:10:14 memo kernel: ata10.00: cmd 60/c8:30:00:da:5e/00:00:62:00:00/40
tag 6 ncq dma 102400 in
May 29 19:10:14 memo kernel: ata10.00: status: { DRDY }
May 29 19:10:14 memo kernel: ata10.00: failed command: READ FPDMA QUEUED
May 29 19:10:14 memo kernel: ata10.00: cmd 60/08:38:c8:da:5e/00:00:62:00:00/40
tag 7 ncq dma 4096 in
May 29 19:10:14 memo kernel: ata10.00: status: { DRDY }
May 29 19:10:14 memo kernel: ata10.00: failed command: READ FPDMA QUEUED
May 29 19:10:14 memo kernel: ata10.00: cmd 60/30:40:d0:da:5e/00:00:62:00:00/40
tag 8 ncq dma 24576 in
May 29 19:10:14 memo kernel: ata10.00: status: { DRDY }
May 29 19:10:14 memo kernel: ata10.00: failed command: WRITE FPDMA QUEUED
May 29 19:10:14 memo kernel: ata10.00: cmd 61/40:48:a8:ca:f9/05:00:35:00:00/40
tag 9 ncq dma 688128 out
May 29 19:10:14 memo kernel: ata10.00: status: { DRDY }
May 29 19:10:14 memo kernel: ata10.00: failed command: WRITE FPDMA QUEUED
May 29 19:10:14 memo kernel: ata10.00: cmd 61/40:50:e8:cf:f9/05:00:35:00:00/40
tag 10 ncq dma 688128 out
May 29 19:10:14 memo kernel: ata10.00: status: { DRDY }
May 29 19:10:14 memo kernel: ata10.00: failed command: READ FPDMA QUEUED
May 29 19:10:14 memo kernel: ata10.00: cmd 60/08:58:20:dd:5e/00:00:62:00:00/40
tag 11 ncq dma 4096 in
May 29 19:10:14 memo kernel: ata10.00: status: { DRDY }
May 29 19:10:14 memo kernel: ata10.00: failed command: WRITE FPDMA QUEUED
May 29 19:10:14 memo kernel: ata10.00: cmd 61/40:60:28:d5:f9/05:00:35:00:00/40
tag 12 ncq dma 688128 out
May 29 19:10:14 memo kernel: ata10.00: status: { DRDY }
May 29 19:10:14 memo kernel: ata10.00: failed command: WRITE FPDMA QUEUED
May 29 19:10:14 memo kernel: ata10.00: cmd 61/40:68:68:da:f9/05:00:35:00:00/40
tag 13 ncq dma 688128 out
May 29 19:10:14 memo kernel: ata10.00: status: { DRDY }
May 29 19:10:14 memo kernel: ata10.00: failed command: WRITE FPDMA QUEUED
May 29 19:10:14 memo kernel: ata10.00: cmd 61/40:70:a8:df:f9/05:00:35:00:00/40
tag 14 ncq dma 688128 out
May 29 19:10:14 memo kernel: ata10.00: status: { DRDY }
May 29 19:10:14 memo kernel: ata10.00: failed command: READ FPDMA QUEUED
May 29 19:10:14 memo kernel: ata10.00: cmd 60/08:78:48:96:a0/00:00:62:00:00/40
tag 15 ncq dma 4096 in
May 29 19:10:14 memo kernel: ata10.00: status: { DRDY }
May 29 19:10:14 memo kernel: ata10.00: failed command: READ FPDMA QUEUED
May 29 19:10:14 memo kernel: ata10.00: cmd 60/00:80:50:9a:11/01:00:31:00:00/40
tag 16 ncq dma 131072 in
May 29 19:10:14 memo kernel: ata10.00: status: { DRDY }
May 29 19:10:14 memo kernel: ata10.00: failed command: WRITE FPDMA QUEUED
May 29 19:10:14 memo kernel: ata10.00: cmd 61/40:88:e8:e4:f9/05:00:35:00:00/40
tag 17 ncq dma 688128 out
May 29 19:10:14 memo kernel: ata10.00: status: { DRDY }
May 29 19:10:14 memo kernel: ata10.00: failed command: WRITE FPDMA QUEUED
May 29 19:10:14 memo kernel: ata10.00: cmd 61/98:90:28:ea:f9/03:00:35:00:00/40
tag 18 ncq dma 471040 out
May 29 19:10:14 memo kernel: ata10.00: status: { DRDY }
May 29 19:10:14 memo kernel: ata10.00: failed command: WRITE FPDMA QUEUED
May 29 19:10:14 memo kernel: ata10.00: cmd 61/08:98:18:4d:29/00:00:60:00:00/40
tag 19 ncq dma 4096 out
May 29 19:10:14 memo kernel: ata10.00: status: { DRDY }
May 29 19:10:14 memo kernel: ata10.00: failed command: READ FPDMA QUEUED
May 29 19:10:14 memo kernel: ata10.00: cmd 60/20:a0:00:dd:5e/00:00:62:00:00/40
tag 20 ncq dma 16384 in
May 29 19:10:14 memo kernel: ata10.00: status: { DRDY }
May 29 19:10:14 memo kernel: ata10.00: failed command: READ FPDMA QUEUED
May 29 19:10:14 memo kernel: ata10.00: cmd 60/40:a8:38:dd:5e/00:00:62:00:00/40
tag 21 ncq dma 32768 in
May 29 19:10:14 memo kernel: ata10.00: status: { DRDY }
May 29 19:10:14 memo kernel: ata10.00: failed command: READ FPDMA QUEUED
May 29 19:10:14 memo kernel: ata10.00: cmd 60/88:b0:78:dd:5e/00:00:62:00:00/40
tag 22 ncq dma 69632 in
May 29 19:10:14 memo kernel: ata10.00: status: { DRDY }
May 29 19:10:14 memo kernel: ata10.00: failed command: READ FPDMA QUEUED
May 29 19:10:14 memo kernel: ata10.00: cmd 60/08:b8:30:dd:5e/00:00:62:00:00/40
tag 23 ncq dma 4096 in
May 29 19:10:14 memo kernel: ata10.00: status: { DRDY }
May 29 19:10:14 memo kernel: ata10.00: failed command: READ FPDMA QUEUED
May 29 19:10:14 memo kernel: ata10.00: cmd 60/08:c8:00:b1:10/00:00:02:00:00/40
tag 25 ncq dma 4096 in
May 29 19:10:14 memo kernel: ata10.00: status: { DRDY }
May 29 19:10:14 memo kernel: ata10.00: failed command: READ FPDMA QUEUED
May 29 19:10:14 memo kernel: ata10.00: cmd 60/08:d0:28:dd:5e/00:00:62:00:00/40
tag 26 ncq dma 4096 in
May 29 19:10:14 memo kernel: ata10.00: status: { DRDY }
May 29 19:10:14 memo kernel: ata10.00: failed command: WRITE FPDMA QUEUED
May 29 19:10:14 memo kernel: ata10.00: cmd 61/08:d8:68:50:29/00:00:60:00:00/40
tag 27 ncq dma 4096 out
May 29 19:10:14 memo kernel: ata10.00: status: { DRDY }
May 29 19:10:14 memo kernel: ata10.00: failed command: WRITE FPDMA QUEUED
May 29 19:10:14 memo kernel: ata10.00: cmd 61/08:e0:00:52:29/00:00:60:00:00/40
tag 28 ncq dma 4096 out
May 29 19:10:14 memo kernel: ata10.00: status: { DRDY }
May 29 19:10:14 memo kernel: ata10.00: failed command: WRITE FPDMA QUEUED
May 29 19:10:14 memo kernel: ata10.00: cmd 61/08:e8:e8:52:29/00:00:60:00:00/40
tag 29 ncq dma 4096 out
May 29 19:10:14 memo kernel: ata10.00: status: { DRDY }
May 29 19:10:14 memo kernel: ata10.00: failed command: WRITE FPDMA QUEUED
May 29 19:10:14 memo kernel: ata10.00: cmd 61/08:f0:98:53:29/00:00:60:00:00/40
tag 30 ncq dma 4096 out
May 29 19:10:14 memo kernel: ata10.00: status: { DRDY }
May 29 19:10:14 memo kernel: ata10: hard resetting link
May 29 19:10:14 memo kernel: ata10: SATA link up 6.0 Gbps (SStatus 133 SControl
300)
May 29 19:10:14 memo kernel: ata10.00: configured for UDMA/133
May 29 19:10:14 memo kernel: ata10: EH complete



Reply to: