|
@@ -935,6 +935,7 @@ int hif_prevent_link_low_power_states(struct hif_opaque_softc *hif)
|
|
|
struct hif_softc *scn = HIF_GET_SOFTC(hif);
|
|
|
struct hif_ipci_softc *ipci_scn = HIF_GET_IPCI_SOFTC(scn);
|
|
|
uint32_t start_time = 0, curr_time = 0;
|
|
|
+ uint32_t count = 0;
|
|
|
|
|
|
if (pld_is_pci_ep_awake(scn->qdf_dev->dev) == -ENOTSUPP)
|
|
|
return 0;
|
|
@@ -942,10 +943,16 @@ int hif_prevent_link_low_power_states(struct hif_opaque_softc *hif)
|
|
|
start_time = curr_time = qdf_system_ticks_to_msecs(qdf_system_ticks());
|
|
|
while (pld_is_pci_ep_awake(scn->qdf_dev->dev) &&
|
|
|
curr_time <= start_time + EP_WAKE_RESET_DELAY_TIMEOUT_MS) {
|
|
|
- qdf_sleep_us(EP_WAKE_RESET_DELAY_US);
|
|
|
+ if (count < EP_VOTE_POLL_TIME_CNT) {
|
|
|
+ qdf_udelay(EP_VOTE_POLL_TIME_US);
|
|
|
+ count++;
|
|
|
+ } else {
|
|
|
+ qdf_sleep_us(EP_WAKE_RESET_DELAY_US);
|
|
|
+ }
|
|
|
curr_time = qdf_system_ticks_to_msecs(qdf_system_ticks());
|
|
|
}
|
|
|
|
|
|
+
|
|
|
if (pld_is_pci_ep_awake(scn->qdf_dev->dev)) {
|
|
|
hif_err_rl(" EP state reset is not done to prevent l1");
|
|
|
ipci_scn->ep_awake_reset_fail++;
|
|
@@ -958,11 +965,18 @@ int hif_prevent_link_low_power_states(struct hif_opaque_softc *hif)
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
+ count = 0;
|
|
|
ipci_scn->prevent_l1 = true;
|
|
|
start_time = curr_time = qdf_system_ticks_to_msecs(qdf_system_ticks());
|
|
|
while (!pld_is_pci_ep_awake(scn->qdf_dev->dev) &&
|
|
|
curr_time <= start_time + EP_WAKE_DELAY_TIMEOUT_MS) {
|
|
|
- qdf_sleep_us(EP_WAKE_DELAY_US);
|
|
|
+ if (count < EP_VOTE_POLL_TIME_CNT) {
|
|
|
+ qdf_udelay(EP_WAKE_RESET_DELAY_US);
|
|
|
+ count++;
|
|
|
+ } else {
|
|
|
+ qdf_sleep_us(EP_WAKE_DELAY_US);
|
|
|
+ }
|
|
|
+
|
|
|
curr_time = qdf_system_ticks_to_msecs(qdf_system_ticks());
|
|
|
}
|
|
|
|