diff options
author | Alex Elder <elder@linaro.org> | 2023-02-15 13:53:50 -0600 |
---|---|---|
committer | Paolo Abeni <pabeni@redhat.com> | 2023-02-20 08:14:20 +0100 |
commit | 62747512ebe6cd292e280aa7dc1dd37d36dcb637 (patch) | |
tree | 0ef19ec5f31472b0ebb372eab5815349e3e41d5b | |
parent | f75f44ddd4cb4bb0ede9c6c7f29679e9794552df (diff) | |
download | lwn-62747512ebe6cd292e280aa7dc1dd37d36dcb637.tar.gz lwn-62747512ebe6cd292e280aa7dc1dd37d36dcb637.zip |
net: ipa: avoid setting an undefined field
The GSI channel protocol field in the CH_C_CNTXT_0 GSI register is
widened starting IPA v5.0, making the CHTYPE_PROTOCOL_MSB field
added in IPA v4.5 unnecessary. Update the code to reflect this.
Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
-rw-r--r-- | drivers/net/ipa/gsi.c | 2 | ||||
-rw-r--r-- | drivers/net/ipa/gsi_reg.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ipa/gsi.c b/drivers/net/ipa/gsi.c index 0e6f679f71a8..88279956194a 100644 --- a/drivers/net/ipa/gsi.c +++ b/drivers/net/ipa/gsi.c @@ -185,7 +185,7 @@ static u32 ch_c_cntxt_0_type_encode(enum ipa_version version, u32 val; val = reg_encode(reg, CHTYPE_PROTOCOL, type); - if (version < IPA_VERSION_4_5) + if (version < IPA_VERSION_4_5 || version >= IPA_VERSION_5_0) return val; type >>= hweight32(reg_fmask(reg, CHTYPE_PROTOCOL)); diff --git a/drivers/net/ipa/gsi_reg.h b/drivers/net/ipa/gsi_reg.h index a0b7ff0dcdfd..52520cd44c3e 100644 --- a/drivers/net/ipa/gsi_reg.h +++ b/drivers/net/ipa/gsi_reg.h @@ -101,7 +101,7 @@ enum gsi_reg_ch_c_cntxt_0_field_id { CHTYPE_DIR, CH_EE, CHID, - CHTYPE_PROTOCOL_MSB, /* IPA v4.9+ */ + CHTYPE_PROTOCOL_MSB, /* IPA v4.5-4.11 */ ERINDEX, CHSTATE, ELEMENT_SIZE, |