From ce0a05749b86b83cef8f3e640f213568bc314fe5 Mon Sep 17 00:00:00 2001 From: Nagarjuna Kristam Date: Thu, 27 Feb 2025 11:49:06 +0530 Subject: [PATCH] pci: tegra264-ep: Fix set_bar and map_addr ICD - set_bar when called post controller initialization should be rejected. - map_addr outcome is to be able to access remote memory rather than register update. Update API documentation information accordingly. JIRA NET-2663 Change-Id: Ie4e1b029200fa8e61685e97ba3a0f029c3e6fe9d Signed-off-by: Nagarjuna Kristam Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3310942 GVS: buildbot_gerritrpt Reviewed-by: Manikanta Maddireddy Reviewed-by: Bitan Biswas --- drivers/pci/controller/private-soc/pcie-tegra264-ep.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/pci/controller/private-soc/pcie-tegra264-ep.h b/drivers/pci/controller/private-soc/pcie-tegra264-ep.h index d240892f..e58065b9 100644 --- a/drivers/pci/controller/private-soc/pcie-tegra264-ep.h +++ b/drivers/pci/controller/private-soc/pcie-tegra264-ep.h @@ -236,7 +236,7 @@ static int tegra264_pcie_ep_write_header(struct pci_epc *epc, u8 fn, * * @return * - 0 on If Bar details are in range.. - * - -EINVAL if Bar configuration is not supported + * - -EINVAL if Bar configuration is not supported or called once link is established. */ static int tegra264_pcie_ep_set_bar(struct pci_epc *epc, u8 fn, #if defined(NV_PCI_EPC_WRITE_HEADER_HAS_VFN_ARG) @@ -324,7 +324,8 @@ static void tegra264_pcie_ep_clear_bar(struct pci_epc *epc, u8 fn, * if called before controller is initialized. * * @outcome - * - On success, mapping details in Tegra264 EP controller register is updated. + * - On success, outbound address is mapped to controller aperture and caller can access + * remote memory. */ static int tegra264_pcie_ep_map_addr(struct pci_epc *epc, u8 func_no, #if defined(NV_PCI_EPC_WRITE_HEADER_HAS_VFN_ARG)