]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
net: ipa: program upper nibbles of sequencer type
authorAlex Elder <elder@linaro.org>
Thu, 11 Jun 2020 19:48:32 +0000 (14:48 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 24 Jun 2020 15:49:11 +0000 (17:49 +0200)
[ Upstream commit 636edeaad5577b6023f0de2b98a010d1cea73607 ]

The upper two nibbles of the sequencer type were not used for
SDM845, and were assumed to be 0.  But for SC7180 they are used, and
so they must be programmed by ipa_endpoint_init_seq().  Fix this bug.

IPA_SEQ_PKT_PROCESS_NO_DEC_NO_UCP_DMAP doesn't have a descriptive
comment, so add one.

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ipa/ipa_endpoint.c
drivers/net/ipa/ipa_reg.h

index a21534f1462fa5d81fb2f30ed969327d5881776e..1d823ac0f6d61b266a0db05605d9f4c17aca1c4d 100644 (file)
@@ -669,10 +669,12 @@ static void ipa_endpoint_init_seq(struct ipa_endpoint *endpoint)
        u32 seq_type = endpoint->seq_type;
        u32 val = 0;
 
+       /* Sequencer type is made up of four nibbles */
        val |= u32_encode_bits(seq_type & 0xf, HPS_SEQ_TYPE_FMASK);
        val |= u32_encode_bits((seq_type >> 4) & 0xf, DPS_SEQ_TYPE_FMASK);
-       /* HPS_REP_SEQ_TYPE is 0 */
-       /* DPS_REP_SEQ_TYPE is 0 */
+       /* The second two apply to replicated packets */
+       val |= u32_encode_bits((seq_type >> 8) & 0xf, HPS_REP_SEQ_TYPE_FMASK);
+       val |= u32_encode_bits((seq_type >> 12) & 0xf, DPS_REP_SEQ_TYPE_FMASK);
 
        iowrite32(val, endpoint->ipa->reg_virt + offset);
 }
index 3b8106aa277a0acdb8f4ad88b043d0dd4773b93d..0a688d8c1d7cfc1486b09336ad8c951135024e0c 100644 (file)
@@ -455,6 +455,8 @@ enum ipa_mode {
  *     second packet processing pass + no decipher + microcontroller
  * @IPA_SEQ_DMA_DEC:           DMA + cipher/decipher
  * @IPA_SEQ_DMA_COMP_DECOMP:   DMA + compression/decompression
+ * @IPA_SEQ_PKT_PROCESS_NO_DEC_NO_UCP_DMAP:
+ *     packet processing + no decipher + no uCP + HPS REP DMA parser
  * @IPA_SEQ_INVALID:           invalid sequencer type
  *
  * The values defined here are broken into 4-bit nibbles that are written