More fixes for the IPA driver
cover More fixes for the IPA driver
Two more fixes for the Qualcomm IPA driver.
---
Luca Weiss (2):
net: ipa: Fix programming of QTIME_TIMESTAMP_CFG
net: ipa: Fix decoding EV_PER_EE for IPA v5.0+
drivers/net/ipa/gsi.c | 1 + drivers/net/ipa/ipa_main.c | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-)
---
base-commit: 56007972c0b1e783ca714d6f1f4d6e66e531d21f
change-id: 20260409-ipa-fixes-a575cf2810df
Best regards,
Signature · 1 line
Luca Weiss <[email protected]>
PATCH 1/2 net: ipa: Fix programming of QTIME_TIMESTAMP_CFG
The 'val' variable gets overwritten multiple times, discarding previous values. Looking at the git log shows these should be combined with |= instead.
--- drivers/net/ipa/ipa_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/net/ipa/ipa_main.c +3 -3
@@ -361,7 +361,7 @@ static void ipa_qtime_config(struct ipa *ipa) {const struct reg *reg;u32 offset; -u32 val; +u32 val =0 ;/* Timer clock divider must be disabled when we change the rate */ reg =ipa_reg (ipa,TIMERS_XO_CLK_DIV_CFG );
@@ -374,8 +374,8 @@ static void ipa_qtime_config(struct ipa *ipa) val |=reg_bit (reg,DPL_TIMESTAMP_SEL ); }/* Configure tag and NAT Qtime timestamp resolution as well */ - val =reg_encode (reg,TAG_TIMESTAMP_LSB ,TAG_TIMESTAMP_SHIFT ); - val =reg_encode (reg,NAT_TIMESTAMP_LSB ,NAT_TIMESTAMP_SHIFT ); + val |=reg_encode (reg,TAG_TIMESTAMP_LSB ,TAG_TIMESTAMP_SHIFT ); + val |=reg_encode (reg,NAT_TIMESTAMP_LSB ,NAT_TIMESTAMP_SHIFT );iowrite32 (val, ipa->reg_virt +reg_offset (reg));
Signature · 1 line
2.53.0
Re: [PATCH net 1/2] net: ipa: Fix programming of QTIME_TIMESTAMP_CFG
Quoted 8 lines · Luca Weiss
The 'val' variable gets overwritten multiple times, discarding previous values. Looking at the git log shows these should be combined with |= instead.
Fixes 9265a4f0f0b4 ("net: ipa: define even more IPA register fields")Signed-off-by Luca Weiss <[email protected]>---
Ha, nice!
Konrad
PATCH 2/2 net: ipa: Fix decoding EV_PER_EE for IPA v5.0+
In reply to Luca WeissInitially 'reg' and 'val' are assigned from HW_PARAM_2.
But since IPA v5.0+ takes EV_PER_EE from HW_PARAM_4 (instead of NUM_EV_PER_EE from HW_PARAM_2), we not only need to re-assign 'reg' but also read the register value of that register into 'val' so that reg_decode() works on the correct value.
--- drivers/net/ipa/gsi.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/ipa/gsi.c +1 -0
@@ -2044,6 +2044,7 @@ static int gsi_ring_setup(struct gsi *gsi) count =reg_decode (reg,NUM_EV_PER_EE , val); }else { reg =gsi_reg (gsi,HW_PARAM_4 ); + val =ioread32 (gsi->virt +reg_offset (reg)); count =reg_decode (reg,EV_PER_EE , val); }if (!count) {
Signature · 1 line
2.53.0
Re: [PATCH net 2/2] net: ipa: Fix decoding EV_PER_EE for IPA v5.0+
Quoted 11 lines · Luca Weiss
Initially 'reg' and 'val' are assigned from
HW_PARAM_2.But since IPA v5.0+ takes
EV_PER_EEfromHW_PARAM_4(instead ofNUM_EV_PER_EEfromHW_PARAM_2), we not only need to re-assign 'reg' but also read the register value of that register into 'val' so thatreg_decode()works on the correct value.Fixes f651334e1ef5 ("net: ipa: add HW_PARAM_4 GSI register")Signed-off-by Luca Weiss <[email protected]>---
Konrad
This series was applied to netdev/net.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This series was applied to netdev/net.git (main)
by Jakub Kicinski <[email protected]>:
Quoted 9 lines · On Thu, 09 Apr 2026 10:13:30 +0200 you wrote:
Two more fixes for the Qualcomm IPA driver.
Signed-off-by Luca Weiss <[email protected]>---
Luca Weiss (2):
net: ipa: Fix programming ofQTIME_TIMESTAMP_CFG
net: ipa: Fix decodingEV_PER_EEfor IPA v5.0+[...]
Here is the summary with links:
- [net,1/2] net: ipa: Fix programming of QTIME_TIMESTAMP_CFG
https://git.kernel.org/netdev/net/c/de08f9585692 - [net,2/2] net: ipa: Fix decoding EV_PER_EE for IPA v5.0+ https://git.kernel.org/netdev/net/c/1335b903cf2e
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html