From 95c177f16631d8d5df1031405a7029c2a69b747d Mon Sep 17 00:00:00 2001 From: Bojun Pan Date: Thu, 2 Apr 2020 09:18:27 -0700 Subject: [PATCH] msm: ipa: enable SYSPIPE_ERR_DETECTION bit for deaggr_err We observe the IPA RX stall due to the DEAGGR_ERR_IRQ of PACKET_SIZE > FRAME_SIZE on rndis. In IPA, some of de-aggregation error handling checks are dependent on the syspipe_err_detection config bit. Adding IGNORE_MIN_PKT_ERR bit for rndis as well based on recommendations. Change-Id: Iad1c816bf3371696bf665a8702fcf27490e230d0 Signed-off-by: Bojun Pan --- include/linux/ipa.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/include/linux/ipa.h b/include/linux/ipa.h index 060f90c6ef55..91ae371d852f 100644 --- a/include/linux/ipa.h +++ b/include/linux/ipa.h @@ -350,18 +350,28 @@ struct ipa_ep_cfg_holb { * struct ipa_ep_cfg_deaggr - deaggregation configuration in IPA end-point * @deaggr_hdr_len: Deaggregation Header length in bytes. Valid only for Input * Pipes, which are configured for 'Generic' deaggregation. + * @syspipe_err_detection - If set to 1, enables error detection for + * de-aggregration. Valid only for Input Pipes, which are configured + * for 'Generic' deaggregation. + * Note: if this bit is set, de-aggregated frames must be contiguous + * in memory. * @packet_offset_valid: - 0: PACKET_OFFSET is not used, 1: PACKET_OFFSET is * used. * @packet_offset_location: Location of packet offset field, which specifies * the offset to the packet from the start of the packet offset field. + * @ignore_min_pkt_err - Ignore packets smaller than header. This is intended + * for use in RNDIS de-aggregated pipes, to silently ignore a redundant + * 1-byte trailer in MSFT implementation. * @max_packet_len: DEAGGR Max Packet Length in Bytes. A Packet with higher * size wil be treated as an error. 0 - Packet Length is not Bound, * IPA should not check for a Max Packet Length. */ struct ipa_ep_cfg_deaggr { u32 deaggr_hdr_len; + bool syspipe_err_detection; bool packet_offset_valid; u32 packet_offset_location; + bool ignore_min_pkt_err; u32 max_packet_len; };