We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 31dcb6c commit d928061Copy full SHA for d928061
drivers/misc/cardreader/rtsx_pcr.c
@@ -89,9 +89,15 @@ static void rtsx_comm_set_aspm(struct rtsx_pcr *pcr, bool enable)
89
if (pcr->aspm_enabled == enable)
90
return;
91
92
- pcie_capability_clear_and_set_word(pcr->pci, PCI_EXP_LNKCTL,
93
- PCI_EXP_LNKCTL_ASPMC,
94
- enable ? pcr->aspm_en : 0);
+ if (pcr->aspm_en & 0x02)
+ rtsx_pci_write_register(pcr, ASPM_FORCE_CTL, FORCE_ASPM_CTL0 |
+ FORCE_ASPM_CTL1, enable ? 0 : FORCE_ASPM_CTL0 | FORCE_ASPM_CTL1);
95
+ else
96
97
+ FORCE_ASPM_CTL1, FORCE_ASPM_CTL0 | FORCE_ASPM_CTL1);
98
+
99
+ if (!enable && (pcr->aspm_en & 0x02))
100
+ mdelay(10);
101
102
pcr->aspm_enabled = enable;
103
}
0 commit comments