Skip to content

Commit 0077a50

Browse files
ConiKostfloatious
authored andcommitted
ahci: asm1166: correct count of reported ports
The ASM1166 SATA host controller always reports wrongly, that it has 32 ports. But in reality, it only has six ports. This seems to be a hardware issue, as all tested ASM1166 SATA host controllers reports such high count of ports. Example output: ahci 0000:09:00.0: AHCI 0001.0301 32 slots 32 ports 6 Gbps 0xffffff3f impl SATA mode. By adjusting the port_map, the count is limited to six ports. New output: ahci 0000:09:00.0: AHCI 0001.0301 32 slots 32 ports 6 Gbps 0x3f impl SATA mode. Closes: https://bugzilla.kernel.org/show_bug.cgi?id=211873 Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218346 Signed-off-by: Conrad Kostecki <conikost@gentoo.org> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Niklas Cassel <cassel@kernel.org>
1 parent 73ae7e1 commit 0077a50

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

drivers/ata/ahci.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -663,6 +663,11 @@ MODULE_PARM_DESC(mobile_lpm_policy, "Default LPM policy for mobile chipsets");
663663
static void ahci_pci_save_initial_config(struct pci_dev *pdev,
664664
struct ahci_host_priv *hpriv)
665665
{
666+
if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA && pdev->device == 0x1166) {
667+
dev_info(&pdev->dev, "ASM1166 has only six ports\n");
668+
hpriv->saved_port_map = 0x3f;
669+
}
670+
666671
if (pdev->vendor == PCI_VENDOR_ID_JMICRON && pdev->device == 0x2361) {
667672
dev_info(&pdev->dev, "JMB361 has only one port\n");
668673
hpriv->saved_port_map = 1;

0 commit comments

Comments
 (0)