Re: [PATCH v6 1/3] PCI/ASPM: Use pcie_capability_clear_and_set_word() for ASPM disable/restore
Manivannan Sadhasivam <[email protected]>
| Newsgroups | org.kernel.vger.linux-pci,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <mjyj2cxu2tsevlklhdzxugiyijumnxov5d7xucxywivd4ize4l@cuiit7zl63bk> |
On Mon, Jul 27, 2026 at 07:32:36PM +0530, Krishna Chaitanya Chundru wrote:
> pcie_aspm_cap_init() disables ASPM L0s/L1 on both ends of the Link
> before touching L1SS config, then later restores the LNKCTL state
> that was in effect beforehand. Both steps use raw
> pcie_capability_write_word() calls: the disable step computes the
> new value by hand from a snapshot taken earlier in the function, and
> the restore step writes that same snapshot straight back.
>
> Switch both steps to pcie_capability_clear_and_set_word(), masked to
> PCI_EXP_LNKCTL_ASPMC, matching the accessor pcie_config_aspm_dev()
> already uses elsewhere in this file for the exact same register. This
> does a live read-modify-write of just the ASPM Control bits instead of
> relying on a stale snapshot for the rest of the word, and is
> consistent with how the rest of the file already touches this
> register. No functional change.
>
> Fixes: 7447990137bf ("PCI/ASPM: Disable L1 before disabling L1 PM Substates")
Reported-by: Sashiko <[email protected]>
Closes: https://lore.kernel.org/all/[email protected]/
> Signed-off-by: Krishna Chaitanya Chundru <[email protected]>
Reviewed-by: Manivannan Sadhasivam <[email protected]>
- Mani
--
மணிவண்ணன் சதாசிவம்