[PATCH v2 06/18] PCI: endpoint: test: Implement link_down event operation
Niklas Cassel
cassel at kernel.org
Fri Apr 5 06:39:58 PDT 2024
On Wed, Apr 03, 2024 at 01:18:23PM +0530, Manivannan Sadhasivam wrote:
> On Sat, Mar 30, 2024 at 01:19:16PM +0900, Damien Le Moal wrote:
> > Implement the link_down event operation to stop the command execution
> > delayed work when the endpoint controller notifies a link down event.
> >
> > Signed-off-by: Damien Le Moal <dlemoal at kernel.org>
>
> This patch is already part of another series I posted [1] and under review. So
> this can be dropped.
>
> - Mani
>
> [1] https://lore.kernel.org/linux-pci/20240401-pci-epf-rework-v2-9-970dbe90b99d@linaro.org/
Mani, your patch does not use _sync(),
so I don't think that we can simply drop this patch.
Kind regards,
Niklas
>
> > Reviewed-by: Frank Li <Frank.Li at nxp.com>
> > ---
> > drivers/pci/endpoint/functions/pci-epf-test.c | 10 ++++++++++
> > 1 file changed, 10 insertions(+)
> >
> > diff --git a/drivers/pci/endpoint/functions/pci-epf-test.c b/drivers/pci/endpoint/functions/pci-epf-test.c
> > index ab40c3182677..e6d4e1747c9f 100644
> > --- a/drivers/pci/endpoint/functions/pci-epf-test.c
> > +++ b/drivers/pci/endpoint/functions/pci-epf-test.c
> > @@ -824,9 +824,19 @@ static int pci_epf_test_link_up(struct pci_epf *epf)
> > return 0;
> > }
> >
> > +static int pci_epf_test_link_down(struct pci_epf *epf)
> > +{
> > + struct pci_epf_test *epf_test = epf_get_drvdata(epf);
> > +
> > + cancel_delayed_work_sync(&epf_test->cmd_handler);
> > +
> > + return 0;
> > +}
> > +
> > static const struct pci_epc_event_ops pci_epf_test_event_ops = {
> > .core_init = pci_epf_test_core_init,
> > .link_up = pci_epf_test_link_up,
> > + .link_down = pci_epf_test_link_down,
> > };
> >
> > static int pci_epf_test_alloc_space(struct pci_epf *epf)
> > --
> > 2.44.0
> >
>
> --
> மணிவண்ணன் சதாசிவம்
More information about the linux-arm-kernel
mailing list