Skip to content

Commit 9815e39

Browse files
LynxChausfloatious
authored andcommitted
ahci: asm1064: correct count of reported ports
The ASM1064 SATA host controller always reports wrongly, that it has 24 ports. But in reality, it only has four ports. before: ahci 0000:04:00.0: SSS flag set, parallel bus scan disabled ahci 0000:04:00.0: AHCI 0001.0301 32 slots 24 ports 6 Gbps 0xffff0f impl SATA mode ahci 0000:04:00.0: flags: 64bit ncq sntf stag pm led only pio sxs deso sadm sds apst after: ahci 0000:04:00.0: ASM1064 has only four ports ahci 0000:04:00.0: forcing port_map 0xffff0f -> 0xf ahci 0000:04:00.0: SSS flag set, parallel bus scan disabled ahci 0000:04:00.0: AHCI 0001.0301 32 slots 24 ports 6 Gbps 0xf impl SATA mode ahci 0000:04:00.0: flags: 64bit ncq sntf stag pm led only pio sxs deso sadm sds apst Signed-off-by: "Andrey Jr. Melnikov" <[email protected]> Signed-off-by: Niklas Cassel <[email protected]>
1 parent 4b08573 commit 9815e39

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

drivers/ata/ahci.c

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -671,9 +671,17 @@ MODULE_PARM_DESC(mobile_lpm_policy, "Default LPM policy for mobile chipsets");
671671
static void ahci_pci_save_initial_config(struct pci_dev *pdev,
672672
struct ahci_host_priv *hpriv)
673673
{
674-
if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA && pdev->device == 0x1166) {
675-
dev_info(&pdev->dev, "ASM1166 has only six ports\n");
676-
hpriv->saved_port_map = 0x3f;
674+
if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA) {
675+
switch (pdev->device) {
676+
case 0x1166:
677+
dev_info(&pdev->dev, "ASM1166 has only six ports\n");
678+
hpriv->saved_port_map = 0x3f;
679+
break;
680+
case 0x1064:
681+
dev_info(&pdev->dev, "ASM1064 has only four ports\n");
682+
hpriv->saved_port_map = 0xf;
683+
break;
684+
}
677685
}
678686

679687
if (pdev->vendor == PCI_VENDOR_ID_JMICRON && pdev->device == 0x2361) {

0 commit comments

Comments
 (0)