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

Commit 8732519e authored by Sujeev Dias's avatar Sujeev Dias
Browse files

msm: mhi_rmnet: Keep wake when processing transfer



Disable MHI from going into low power mode when
processing inbound transfers.

CRs-Fixed: 1081654
Change-Id: If8af0805501901a15981bbc6db0c92d2e040eb78
Signed-off-by: default avatarSujeev Dias <sdias@codeaurora.org>
parent c41ce96e
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -352,6 +352,7 @@ static int rmnet_mhi_poll(struct napi_struct *napi, int budget)
		if (atomic_read(&rmnet_mhi_ptr->irq_masked_cntr)) {
			atomic_dec(&rmnet_mhi_ptr->irq_masked_cntr);
			mhi_unmask_irq(rmnet_mhi_ptr->rx_client_handle);
			mhi_set_lpm(rmnet_mhi_ptr->rx_client_handle, true);
		}
	} else {
		if (received_packets == budget)
@@ -492,6 +493,7 @@ static void rmnet_mhi_rx_cb(struct mhi_result *result)
	if (napi_schedule_prep(&(rmnet_mhi_ptr->napi))) {
		mhi_mask_irq(rmnet_mhi_ptr->rx_client_handle);
		atomic_inc(&rmnet_mhi_ptr->irq_masked_cntr);
		mhi_set_lpm(rmnet_mhi_ptr->rx_client_handle, false);
		__napi_schedule(&(rmnet_mhi_ptr->napi));
	} else {
		rmnet_mhi_ptr->debug.rx_interrupts_in_masked_irq++;
@@ -524,6 +526,7 @@ static int rmnet_mhi_open(struct net_device *dev)
	if (napi_schedule_prep(&(rmnet_mhi_ptr->napi))) {
		mhi_mask_irq(rmnet_mhi_ptr->rx_client_handle);
		atomic_inc(&rmnet_mhi_ptr->irq_masked_cntr);
		mhi_set_lpm(rmnet_mhi_ptr->rx_client_handle, false);
		__napi_schedule(&(rmnet_mhi_ptr->napi));
	} else {
		rmnet_mhi_ptr->debug.rx_interrupts_in_masked_irq++;