Skip to content

Commit 24145d0

Browse files
lweiss-fairphonegregkh
authored andcommitted
net: ipa: Fix programming of QTIME_TIMESTAMP_CFG
[ Upstream commit de08f95 ] The 'val' variable gets overwritten multiple times, discarding previous values. Looking at the git log shows these should be combined with |= instead. Fixes: 9265a4f ("net: ipa: define even more IPA register fields") Link: https://sashiko.dev/#/patchset/20260403-milos-ipa-v1-0-01e9e4e03d3e%40fairphone.com?part=4 Signed-off-by: Luca Weiss <luca.weiss@fairphone.com> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Link: https://patch.msgid.link/20260409-ipa-fixes-v1-1-a817c30678ac@fairphone.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 1a8a51c commit 24145d0

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

drivers/net/ipa/ipa_main.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ static void ipa_qtime_config(struct ipa *ipa)
361361
{
362362
const struct reg *reg;
363363
u32 offset;
364-
u32 val;
364+
u32 val = 0;
365365

366366
/* Timer clock divider must be disabled when we change the rate */
367367
reg = ipa_reg(ipa, TIMERS_XO_CLK_DIV_CFG);
@@ -374,8 +374,8 @@ static void ipa_qtime_config(struct ipa *ipa)
374374
val |= reg_bit(reg, DPL_TIMESTAMP_SEL);
375375
}
376376
/* Configure tag and NAT Qtime timestamp resolution as well */
377-
val = reg_encode(reg, TAG_TIMESTAMP_LSB, TAG_TIMESTAMP_SHIFT);
378-
val = reg_encode(reg, NAT_TIMESTAMP_LSB, NAT_TIMESTAMP_SHIFT);
377+
val |= reg_encode(reg, TAG_TIMESTAMP_LSB, TAG_TIMESTAMP_SHIFT);
378+
val |= reg_encode(reg, NAT_TIMESTAMP_LSB, NAT_TIMESTAMP_SHIFT);
379379

380380
iowrite32(val, ipa->reg_virt + reg_offset(reg));
381381

0 commit comments

Comments
 (0)