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

Commit d6cf3eda authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: ipa: fix division by 0 for DMA pipes"

parents 3e8455a7 cd222dac
Loading
Loading
Loading
Loading
+10 −4
Original line number Diff line number Diff line
@@ -1078,8 +1078,11 @@ void ipa_update_repl_threshold(enum ipa_client_type ipa_client)
	 * Determine how many buffers/descriptors remaining will
	 * cause to drop below the yellow WM bar.
	 */
	if (ep->sys->rx_buff_sz)
		ep->rx_replenish_threshold = ipa_get_sys_yellow_wm(ep->sys)
						/ ep->sys->rx_buff_sz;
	else
		ep->rx_replenish_threshold = 0;
}

/**
@@ -1273,8 +1276,11 @@ int ipa2_setup_sys_pipe(struct ipa_sys_connect_params *sys_in, u32 *clnt_hdl)
		 * Determine how many buffers/descriptors remaining will
		 * cause to drop below the yellow WM bar.
		 */
		ep->rx_replenish_threshold = ipa_get_sys_yellow_wm(ep->sys)
						/ ep->sys->rx_buff_sz;
		if (ep->sys->rx_buff_sz)
			ep->rx_replenish_threshold =
			   ipa_get_sys_yellow_wm(ep->sys) / ep->sys->rx_buff_sz;
		else
			ep->rx_replenish_threshold = 0;
		/* Only when the WAN pipes are setup, actual threshold will
		 * be read from the register. So update LAN_CONS ep again with
		 * right value.