Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 30e704ba authored by Yue Ma's avatar Yue Ma
Browse files

cnss2: Use token argument instead of dev in SMMU fault handler



The dev argument from SMMU fault handler is SMMU device not client
device so use token argument to get PCI context for driver.

Change-Id: Ia126bf144b0bda537438d5a212b2e2ef8a21d022
Signed-off-by: default avatarYue Ma <yuem@codeaurora.org>
parent fff51c15
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -1136,9 +1136,16 @@ static int cnss_pci_smmu_fault_handler(struct iommu_domain *domain,
				       struct device *dev, unsigned long iova,
				       int flags, void *handler_token)
{
	struct cnss_pci_data *pci_priv = handler_token;

	cnss_pr_err("SMMU fault happened with IOVA 0x%lx\n", iova);

	cnss_force_fw_assert(dev);
	if (!pci_priv) {
		cnss_pr_err("pci_priv is NULL\n");
		return -ENODEV;
	}

	cnss_force_fw_assert(&pci_priv->pci_dev->dev);

	/* IOMMU driver requires non-zero return value to print debug info. */
	return -EINVAL;