Prechádzať zdrojové kódy

cnss2: Clear DRV last connected flag at right place

DRV last connected flag is cleared based on return from
host driver runtime_resume callback. In host triggered
SSR case runtime_resume callback return success without
actually resuming the bus and clearing DRV last connected
flag. When CNSS driver actually tries to resume the bus,
based on DRV last connected flag it calls MHI resume instead
of MHI DRV resume and fail to resume the bus. Bus resume
failure results in MHI driver go to bad state and fail to
trigger RDDM in device using SYS_ERR.
Fix this issue by clearing DRV last connected flag only after
bus resume is success.

Change-Id: Ia904f6965c2a2cbe0a483cf02ced91a09775ca62
CRs-Fixed: 3720847
Naman Padhiar 1 rok pred
rodič
commit
36aaccd887
1 zmenil súbory, kde vykonal 1 pridanie a 3 odobranie
  1. 1 3
      cnss2/pci.c

+ 1 - 3
cnss2/pci.c

@@ -4301,9 +4301,6 @@ static int cnss_pci_runtime_resume(struct device *dev)
 	else
 		ret = cnss_auto_resume(dev);
 
-	if (!ret)
-		pci_priv->drv_connected_last = 0;
-
 	cnss_pr_vdbg("Runtime resume status: %d\n", ret);
 
 	return ret;
@@ -4572,6 +4569,7 @@ int cnss_auto_resume(struct device *dev)
 	mutex_unlock(&pci_priv->bus_lock);
 
 	cnss_request_bus_bandwidth(dev, plat_priv->icc.current_bw_vote);
+	pci_priv->drv_connected_last = 0;
 
 	return 0;
 }