Browse Source

cnss2: Resume PCI bus before reading registers

In some scenarios, during force FW assert,
cnss_pci_pm_runtime_get_sync might not resume bus.
Make sure PCI bus is resume before accessing.

Change-Id: Ic5c17c3385318dbc739358ac7ccdb148aed1052a
CRs-Fixed: 3540601
Naman Padhiar 1 year ago
parent
commit
c727c5eab9
1 changed files with 5 additions and 0 deletions
  1. 5 0
      cnss2/pci.c

+ 5 - 0
cnss2/pci.c

@@ -5712,6 +5712,11 @@ int cnss_pci_force_fw_assert_hdlr(struct cnss_pci_data *pci_priv)
 	ret = cnss_pci_pm_runtime_get_sync(pci_priv, RTPM_ID_CNSS);
 	if (ret < 0)
 		goto runtime_pm_put;
+	/*
+	 * In some scenarios, cnss_pci_pm_runtime_get_sync
+	 * might not resume PCI bus. For those cases do auto resume.
+	 */
+	cnss_auto_resume(&pci_priv->pci_dev->dev);
 
 	if (!pci_priv->is_smmu_fault)
 		cnss_pci_mhi_reg_dump(pci_priv);