[PATCH v6 7/9] PCI: Add pcie_link_is_active() to determine if the link is active
Dmitry Baryshkov
dmitry.baryshkov at oss.qualcomm.com
Thu Aug 28 05:48:26 PDT 2025
On Thu, Aug 28, 2025 at 02:32:53PM +0200, Lukas Wunner wrote:
> On Thu, Aug 28, 2025 at 05:39:04PM +0530, Krishna Chaitanya Chundru wrote:
> > Add pcie_link_is_active() a common API to check if the PCIe link is active,
> > replacing duplicate code in multiple locations.
> >
> > Signed-off-by: Krishna Chaitanya Chundru <krishna.chundru at oss.qualcomm.com>
> > Signed-off-by: Shawn Anastasio <sanastasio at raptorengineering.com>
> > Signed-off-by: Timothy Pearson <tpearson at raptorengineering.com>
>
> I think the submitter of the patch (who will become the git commit author)
> needs to come last in the Signed-off-by chain.
Not quite... The git commit author is the author of the commit and
usually the _first_ person in the SoB list. Then the patch is being
handled by several other people which leave their SoBs. The final SoB is
usually an entry from the maintainer who applied the patch to the Git.
>
> > +++ b/drivers/pci/hotplug/pciehp_hpc.c
> > @@ -614,8 +587,8 @@ static void pciehp_ignore_link_change(struct controller *ctrl,
> > * Synthesize it to ensure that it is acted on.
> > */
> > down_read_nested(&ctrl->reset_lock, ctrl->depth);
> > - if (!pciehp_check_link_active(ctrl) || pciehp_device_replaced(ctrl))
> > - pciehp_request(ctrl, ignored_events);
> > + if (!pcie_link_is_active(ctrl_dev(ctrl)) || pciehp_device_replaced(ctrl))
> > + pciehp_request(ctrl, PCI_EXP_SLTSTA_DLLSC);
> > up_read(&ctrl->reset_lock);
> > }
>
> You can just use "pdev" instead of "ctrl_dev(ctrl)" as argument to
> pcie_link_is_active() to shorten the line.
>
> With that addressed,
> Reviewed-by: Lukas Wunner <lukas at wunner.de>
--
With best wishes
Dmitry
More information about the linux-arm-kernel
mailing list