Skip to content

Commit 208723b

Browse files
committed
src/device/pciexp_device.c: switch ASPM disabling order
Signed-off-by: Filip Lewiński <filip.lewinski@3mdeb.com>
1 parent 5557b1a commit 208723b

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/device/pciexp_device.c

+6-6
Original file line numberDiff line numberDiff line change
@@ -587,15 +587,15 @@ static void pciexp_enable_aspm(struct device *root, unsigned int root_cap,
587587
lnkctl |= apmc;
588588
pci_write_config16(endp, endp_cap + PCI_EXP_LNKCTL, lnkctl);
589589
} else {
590-
/* Disable ASPM in root port first */
591-
lnkctl = pci_read_config16(root, root_cap + PCI_EXP_LNKCTL);
592-
lnkctl &= ~3;
593-
pci_write_config16(root, root_cap + PCI_EXP_LNKCTL, lnkctl);
594-
595-
/* Disable ASPM in endpoint device next */
590+
/* Disable ASPM in endpoint device first */
596591
lnkctl = pci_read_config16(endp, endp_cap + PCI_EXP_LNKCTL);
597592
lnkctl &= ~3;
598593
pci_write_config16(endp, endp_cap + PCI_EXP_LNKCTL, lnkctl);
594+
595+
/* Disable ASPM in root port next */
596+
lnkctl = pci_read_config16(root, root_cap + PCI_EXP_LNKCTL);
597+
lnkctl &= ~3;
598+
pci_write_config16(root, root_cap + PCI_EXP_LNKCTL, lnkctl);
599599
}
600600

601601
if (CONFIG(PCIEXP_ASPM))

0 commit comments

Comments
 (0)