Skip to content

Commit b61fef0

Browse files
floatiouskwilczynski
authored andcommitted
PCI: artpec6: Implement dw_pcie_ep operation get_features
All non-DWC EPC drivers implement (struct pci_epc *)->ops->get_features(). All DWC EPC drivers implement (struct dw_pcie_ep *)->ops->get_features(), except for pcie-artpec6.c. epc_features has been required in pci-epf-test.c since commit 6613bc2 ("PCI: endpoint: Fix NULL pointer dereference for ->get_features()"). A follow-up commit will make further use of epc_features in EPC core code. Implement epc_features in the only EPC driver where it is currently not implemented. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Niklas Cassel <[email protected]> Signed-off-by: Krzysztof Wilczyński <[email protected]> Reviewed-by: Frank Li <[email protected]> Reviewed-by: Manivannan Sadhasivam <[email protected]> Acked-by: Jesper Nilsson <[email protected]>
1 parent 129f6af commit b61fef0

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

drivers/pci/controller/dwc/pcie-artpec6.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -369,9 +369,22 @@ static int artpec6_pcie_raise_irq(struct dw_pcie_ep *ep, u8 func_no,
369369
return 0;
370370
}
371371

372+
static const struct pci_epc_features artpec6_pcie_epc_features = {
373+
.linkup_notifier = false,
374+
.msi_capable = true,
375+
.msix_capable = false,
376+
};
377+
378+
static const struct pci_epc_features *
379+
artpec6_pcie_get_features(struct dw_pcie_ep *ep)
380+
{
381+
return &artpec6_pcie_epc_features;
382+
}
383+
372384
static const struct dw_pcie_ep_ops pcie_ep_ops = {
373385
.init = artpec6_pcie_ep_init,
374386
.raise_irq = artpec6_pcie_raise_irq,
387+
.get_features = artpec6_pcie_get_features,
375388
};
376389

377390
static int artpec6_pcie_probe(struct platform_device *pdev)

0 commit comments

Comments
 (0)