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

Commit 5d016add authored by Michael Adisumarta's avatar Michael Adisumarta
Browse files

msm: ipa: Disable csum offload and status for ODL pipe



Disable csum offload and status for ODL pipe for ADPLv3 for
APQ Platform.

Change-Id: Iab2a7a931eab7ab5b94c582b1559b7ae0fef00a7
Signed-off-by: default avatarMichael Adisumarta <madisuma@codeaurora.org>
parent fb0d6073
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -3812,6 +3812,15 @@ static int ipa3_assign_policy(struct ipa_sys_connect_params *in,
		}  else if (in->client == IPA_CLIENT_ODL_DPL_CONS) {
			IPADBG("assigning policy to ODL client:%d\n",
				in->client);
			/* Status enabling is needed for DPLv2 with
			 * IPA versions < 4.5.
			 * Dont enable ipa_status for APQ, since MDM IPA
			 * has IPA >= 4.5 with DPLv3.
			 */
			if (ipa3_ctx->platform_type == IPA_PLAT_TYPE_APQ &&
				ipa3_is_mhip_offload_enabled())
				sys->ep->status.status_en = false;
			else
				sys->ep->status.status_en = true;
			sys->policy = IPA_POLICY_INTR_POLL_MODE;
			INIT_WORK(&sys->work, ipa3_wq_handle_rx);
+13 −4
Original line number Diff line number Diff line
@@ -287,10 +287,6 @@ int ipa_setup_odl_pipe(void)

	ipa_odl_ep_cfg->ipa_ep_cfg.aggr.aggr_en = IPA_ENABLE_AGGR;
	ipa_odl_ep_cfg->ipa_ep_cfg.aggr.aggr_hard_byte_limit_en = 1;
	if (ipa3_is_mhip_offload_enabled()) {
		IPADBG("MHIP is enabled, disable aggregation for ODL pipe");
		ipa_odl_ep_cfg->ipa_ep_cfg.aggr.aggr_en = IPA_BYPASS_AGGR;
	}
	ipa_odl_ep_cfg->ipa_ep_cfg.aggr.aggr = IPA_GENERIC;
	ipa_odl_ep_cfg->ipa_ep_cfg.aggr.aggr_byte_limit =
						IPA_ODL_AGGR_BYTE_LIMIT;
@@ -316,6 +312,19 @@ int ipa_setup_odl_pipe(void)
	ipa_odl_ep_cfg->desc_fifo_sz = IPA_ODL_RX_RING_SIZE *
						IPA_FIFO_ELEMENT_SIZE;
	ipa3_odl_ctx->odl_client_hdl = -1;

	/* For MHIP, ODL functionality is DMA. So bypass aggregation, checksum
	 * offload, hdr_len.
	 */
	if (ipa3_ctx->platform_type == IPA_PLAT_TYPE_APQ &&
		ipa3_is_mhip_offload_enabled()) {
		IPADBG("MHIP enabled: bypass aggr + csum offload for ODL");
		ipa_odl_ep_cfg->ipa_ep_cfg.aggr.aggr_en = IPA_BYPASS_AGGR;
		ipa_odl_ep_cfg->ipa_ep_cfg.cfg.cs_offload_en =
			IPA_DISABLE_CS_OFFLOAD;
		ipa_odl_ep_cfg->ipa_ep_cfg.hdr.hdr_len = 0;
	}

	ret = ipa3_setup_sys_pipe(ipa_odl_ep_cfg,
			&ipa3_odl_ctx->odl_client_hdl);
	return ret;