mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 18:41:58 +09:00
PCI: qcom-ep: Disable resources unconditionally during PERST# assert
[ Upstream commit 912315715d7b74f7abdb6f063ebace44ee288af9 ]
All EP specific resources are enabled during PERST# deassert. As a counter
operation, all resources should be disabled during PERST# assert. There is
no point in skipping that if the link was not enabled.
This will also result in enablement of the resources twice if PERST# got
deasserted again. So remove the check from qcom_pcie_perst_assert() and
disable all the resources unconditionally.
Fixes: f55fee56a6 ("PCI: qcom-ep: Add Qualcomm PCIe Endpoint controller driver")
Link: https://lore.kernel.org/linux-pci/20240430-pci-epf-rework-v4-1-22832d0d456f@linaro.org
Tested-by: Niklas Cassel <cassel@kernel.org>
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Krzysztof Wilczyński <kwilczynski@kernel.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Niklas Cassel <cassel@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
e651b5e478
commit
f51b50ff38
@@ -446,12 +446,6 @@ err_disable_resources:
|
|||||||
static void qcom_pcie_perst_assert(struct dw_pcie *pci)
|
static void qcom_pcie_perst_assert(struct dw_pcie *pci)
|
||||||
{
|
{
|
||||||
struct qcom_pcie_ep *pcie_ep = to_pcie_ep(pci);
|
struct qcom_pcie_ep *pcie_ep = to_pcie_ep(pci);
|
||||||
struct device *dev = pci->dev;
|
|
||||||
|
|
||||||
if (pcie_ep->link_status == QCOM_PCIE_EP_LINK_DISABLED) {
|
|
||||||
dev_dbg(dev, "Link is already disabled\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
qcom_pcie_disable_resources(pcie_ep);
|
qcom_pcie_disable_resources(pcie_ep);
|
||||||
pcie_ep->link_status = QCOM_PCIE_EP_LINK_DISABLED;
|
pcie_ep->link_status = QCOM_PCIE_EP_LINK_DISABLED;
|
||||||
|
|||||||
Reference in New Issue
Block a user