Re: [PATCH v4 3/3] PCI/ASPM: Fix L1.2 parameters when enable link state

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Bjorn Helgaas <helgaas@xxxxxxxxxx> 於 2024年3月2日 週六 上午5:41寫道:
>
> In subject:
>
>   PCI/ASPM: Fix L1.2 parameters before enabling L1.2
>
> > +     if (state & link->aspm_capable & ASPM_STATE_L1_2_MASK) {
> > +             parent_l1ss_cap = aspm_get_l1ss_cap(parent);
> > +             child_l1ss_cap = aspm_get_l1ss_cap(child);
> > +             aspm_calc_l12_info(link, parent_l1ss_cap, child_l1ss_cap);
>
> Why doesn't this happen already via normal enumeration?  It looks like
> this path should do it even without this patch:
>
>   pcie_aspm_init_link_state
>     pcie_aspm_cap_init
>       aspm_l1ss_init

I watch the VMD remapped PCI devices' power states during this path.
Their power states stay at "unknown" until someone sets their power
state to "D0".
And, because their power states stay at "unknown", the L1.2 of the
link between VMD remapped PCIe Root Port and NVMe gets wrong configs
when system goes through this path.
So, system has to calculate the L1.2 information again after set PCI
devices' power state to D0.

Sorry for the late reply.  Got my laptop back recently.

Jian-Hong Pan

> > +     }
> >       pcie_config_aspm_link(link, policy_to_aspm_state(link));
> >
> >       link->clkpm_default = (state & PCIE_LINK_STATE_CLKPM) ? 1 : 0;
> > --
> > 2.43.2
> >





[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux