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

Commit 95644cdf authored by Gidon Studinski's avatar Gidon Studinski Committed by Gerrit - the friendly Code Review server
Browse files

msm: ipa: ZLT issue workaround



Due to ZLT issue with USB 3.0 core, BAM threashold need to be set
to max packet size value. After setting the threshold, USB core
will not be notified on ZLT

Change-Id: I80c56119e10391e3c1791752b1b7d8a426bc79b0
CRs-Fixed: 561728
Acked-by: default avatarAdy Abraham <adya@qti.qualcomm.com>
Signed-off-by: default avatarGidon Studinski <gidons@codeaurora.org>
parent 64b8f03b
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -256,6 +256,10 @@ int ipa_connect(const struct ipa_connect_params *in, struct ipa_sps_params *sps,
	IPADBG("Data FIFO pa=0x%x, size=%d\n", ep->connect.data.phys_base,
	       ep->connect.data.size);

	if (ipa_ctx->ipa_hw_type == IPA_HW_v2_0 &&
					IPA_CLIENT_IS_USB_CONS(in->client))
		ep->connect.event_thresh = IPA_USB_EVENT_THRESHOLD;
	else
		ep->connect.event_thresh = IPA_EVENT_THRESHOLD;
	ep->connect.options = SPS_O_AUTO_ENABLE;    /* BAM-to-BAM */

+7 −0
Original line number Diff line number Diff line
@@ -129,6 +129,13 @@

#define IPA_EVENT_THRESHOLD 0x10

/*
 * Due to ZLT issue with USB 3.0 core, IPA BAM threashold need to be set
 * to max packet size + 1. After setting the threshold, USB core
 * will not be notified on ZLTs
 */
#define IPA_USB_EVENT_THRESHOLD 0x4001

#define IPA_RX_POOL_CEIL 32
#define IPA_RX_SKB_SIZE 1792

+6 −0
Original line number Diff line number Diff line
@@ -156,6 +156,12 @@ enum ipa_client_type {
	IPA_CLIENT_MAX,
};

#define IPA_CLIENT_IS_USB_CONS(client) \
	((client) == IPA_CLIENT_USB_CONS || \
	(client) == IPA_CLIENT_USB2_CONS || \
	(client) == IPA_CLIENT_USB3_CONS || \
	(client) == IPA_CLIENT_USB4_CONS)

/**
 * enum ipa_ip_type - Address family: IPv4 or IPv6
 */