Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

net: stmmac: intel: populate entire system_counterval_t in get_time_fn() callback

get_time_fn() callback implementations are expected to fill out the
entire system_counterval_t struct as it may be initially uninitialized.

This broke with the removal of convert_art_to_tsc() helper functions
which left use_nsecs uninitialized.

Initially assign the entire struct with default values.

Fixes: f5e1d0db3f02 ("stmmac: intel: Remove convert_art_to_tsc()")
Cc: stable@vger.kernel.org
Signed-off-by: Markus Blöchl <markus@blochl.de>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20250713-stmmac_crossts-v1-1-31bfe051b5cb@blochl.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Markus Blöchl and committed by
Jakub Kicinski
e6176ab1 ae2256f9

+7 -1
+7 -1
drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c
··· 433 433 return -ETIMEDOUT; 434 434 } 435 435 436 + *system = (struct system_counterval_t) { 437 + .cycles = 0, 438 + .cs_id = CSID_X86_ART, 439 + .use_nsecs = false, 440 + }; 441 + 436 442 num_snapshot = (readl(ioaddr + GMAC_TIMESTAMP_STATUS) & 437 443 GMAC_TIMESTAMP_ATSNS_MASK) >> 438 444 GMAC_TIMESTAMP_ATSNS_SHIFT; ··· 454 448 } 455 449 456 450 system->cycles *= intel_priv->crossts_adj; 457 - system->cs_id = CSID_X86_ART; 451 + 458 452 priv->plat->flags &= ~STMMAC_FLAG_INT_SNAPSHOT_EN; 459 453 460 454 return 0;