Skip to content

Commit 636edea

Browse files
Alex Elderdavem330
authored andcommitted
net: ipa: program upper nibbles of sequencer type
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 9b8ad8d commit 636edea

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

drivers/net/ipa/ipa_endpoint.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -699,10 +699,12 @@ static void ipa_endpoint_init_seq(struct ipa_endpoint *endpoint)
699699
u32 seq_type = endpoint->seq_type;
700700
u32 val = 0;
701701

702+
/* Sequencer type is made up of four nibbles */
702703
val |= u32_encode_bits(seq_type & 0xf, HPS_SEQ_TYPE_FMASK);
703704
val |= u32_encode_bits((seq_type >> 4) & 0xf, DPS_SEQ_TYPE_FMASK);
704-
/* HPS_REP_SEQ_TYPE is 0 */
705-
/* DPS_REP_SEQ_TYPE is 0 */
705+
/* The second two apply to replicated packets */
706+
val |= u32_encode_bits((seq_type >> 8) & 0xf, HPS_REP_SEQ_TYPE_FMASK);
707+
val |= u32_encode_bits((seq_type >> 12) & 0xf, DPS_REP_SEQ_TYPE_FMASK);
706708

707709
iowrite32(val, endpoint->ipa->reg_virt + offset);
708710
}

drivers/net/ipa/ipa_reg.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -455,6 +455,8 @@ enum ipa_mode {
455455
* second packet processing pass + no decipher + microcontroller
456456
* @IPA_SEQ_DMA_DEC: DMA + cipher/decipher
457457
* @IPA_SEQ_DMA_COMP_DECOMP: DMA + compression/decompression
458+
* @IPA_SEQ_PKT_PROCESS_NO_DEC_NO_UCP_DMAP:
459+
* packet processing + no decipher + no uCP + HPS REP DMA parser
458460
* @IPA_SEQ_INVALID: invalid sequencer type
459461
*
460462
* The values defined here are broken into 4-bit nibbles that are written

0 commit comments

Comments
 (0)