Bug 211873 - ASM1166: too many SATA ports detected
Summary: ASM1166: too many SATA ports detected
Status: NEW
Alias: None
Product: IO/Storage
Classification: Unclassified
Component: Serial ATA (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Tejun Heo
Depends on:
Reported: 2021-02-21 10:17 UTC by Christian Boxdörfer
Modified: 2021-02-21 10:17 UTC (History)
0 users

See Also:
Kernel Version: 5.10.13
Regression: No
Bisected commit-id:

dmesg output (shortened) (6.32 KB, text/plain)
2021-02-21 10:17 UTC, Christian Boxdörfer

Description Christian Boxdörfer 2021-02-21 10:17:58 UTC
Created attachment 295377 [details]
dmesg output (shortened)

I've got a 6 port SATA PCI card with an ASMedia ASM1166 controller, however the kernel detects 32 SATA ports instead. This significantly delays the boot process when the kernel tries to scan all those ports for devices.

06:00.0 SATA controller: ASMedia Technology Inc. Device 1166 (rev 02)
[    1.331934] debian-workstation kernel: ahci 0000:06:00.0: SSS flag set, parallel bus scan disabled
[    1.334903] debian-workstation kernel: r8169 0000:03:00.0 enp3s0: renamed from eth0
[    1.342297] debian-workstation kernel: ahci 0000:06:00.0: AHCI 0001.0301 32 slots 32 ports 6 Gbps 0xffffff3f impl SATA mode
[    1.342299] debian-workstation kernel: ahci 0000:06:00.0: flags: 64bit ncq sntf stag pm led only pio sxs deso sadm sds apst

I was able to fix the slow boot time with a small patch that sets force_port_map to 0x3f for this controller, but I have no idea if that's the proper way to handle this issue.

If there's any debug information missing just let me know.

Thank you!

Note You need to log in before you can comment on or make changes to this bug.