linux/drivers
Lorenzo Bianconi 232d49dd4b net: stmmac: propagate PTP addend and system time programming errors
stmmac_update_subsecond_increment() ignores the error returned by
stmmac_config_addend(), and stmmac_init_tstamp_counter() discards the
addend and system time programming errors, always returning success. A
failure to program the addend (PTP_TCR_TSADDREG) or to initialize the
system time counter (PTP_TCR_TSINIT) is therefore silently swallowed,
leaving the hardware timestamp counter in a non-running or partially
configured state while the driver keeps operating as if timestamping
were up. This matters for TAPRIO/EST offloading, which derives the gate
base time from the hardware timestamp counter.

The same hooks are also called from the PHC callbacks: settime64 and
adjfine drop the error and report success to clock_settime() and
clock_adjtime(), so a dead PTP reference clock goes unnoticed by
ptp4l/phc2sys.

Return error codes from stmmac_update_subsecond_increment(),
stmmac_init_tstamp_counter(), stmmac_dl_ts_coarse_set() and the
settime64/adjfine callbacks instead of silently returning success. On
failure, roll back the partially applied configuration so the hardware
and the driver bookkeeping stay consistent, and report the reason
through the devlink extack. Also guard against a zero sub-second
increment, which would otherwise divide by zero when computing the
addend.

Reset the persistent timestamping state (hwts_tx_en, hwts_rx_en,
tstamp_config, systime_flags and tsfupdt_coarse) when (re)initializing
timestamping, so a failed init does not leave TX/RX timestamping
enabled on a counter that never started.

Fixes: cc4c9001ce ("net: stmmac: Switch stmmac_hwtimestamp to generic HW Interface Helpers")
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@oss.qualcomm.com>
Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2026-10-02 10:31:09 +01:00
..
accel accel/ivpu: Use separate flag for job timeout 2026-09-22 08:01:04 +02:00
accessibility
acpi treewide: refresh kmalloc_obj() conversions 2026-09-04 21:37:00 -07:00
amba
android Char/Misc/IIO/etc driver update for 7.3-rc1 2026-08-25 09:38:50 -07:00
ata ata: libata-scsi: bound the ATA passthru sense descriptor writes 2026-09-23 21:05:55 +02:00
atm
auxdisplay auxdisplay for v7.3-1 2026-08-24 08:15:59 -07:00
base sched/cache: Refresh LLC capacity across CPU hotplug, to fix capacity underestimation bug 2026-09-22 10:50:54 +02:00
bcma
block block-7.3-20260911 2026-09-11 12:38:44 -07:00
bluetooth Bluetooth: btintel: validate DDC record lengths 2026-09-23 09:32:38 -04:00
bus Char/Misc/IIO/etc driver update for 7.3-rc1 2026-08-25 09:38:50 -07:00
cache
cdrom
cdx
char virtio_console: do not free control-out buffers on remove 2026-09-07 18:54:02 -04:00
clk Arm firmware fixes for v7.3 2026-09-14 17:02:19 +02:00
clocksource hyperv-next for v7.3-rc1 2026-08-26 16:47:40 -07:00
comedi
connector
counter Char/Misc/IIO/etc driver update for 7.3-rc1 2026-08-25 09:38:50 -07:00
cpufreq Merge branch 'pm-cpufreq' 2026-09-10 20:16:37 +02:00
cpuidle cpuidle: dt_idle_genpd: kfree() the original name allocation 2026-09-01 17:28:56 +02:00
crypto This push fixes a regression in caam. 2026-09-18 10:01:31 -07:00
cxl Merge branch 'for-7.3/cxl-port-err-prep' into cxl-for-next 2026-08-05 13:55:07 -07:00
dax mm.git review status for mm-hotfixes-stable..mm-stable 2026-08-20 18:17:08 -07:00
dca
devfreq treewide: refresh kmalloc_obj() conversions 2026-09-04 21:37:00 -07:00
dibs dibs: Unregister dibs_class after error 2026-09-04 16:12:24 -07:00
dio
dma dmaengine fixes for v7.3 2026-09-20 10:45:22 -07:00
dma-buf dma-buf/dma-fence: fix checking signaling bit for timeline and driver name v3 2026-09-15 10:02:53 +02:00
dpll dpll: use exact lookup for reference sync pin id 2026-09-21 17:19:42 -07:00
edac EDAC/altera: Use parent device for devres in altr_portb_setup() 2026-09-07 21:29:44 -07:00
eisa
extcon
firewire firewire: cdev: fix back-transition for iso_resource_auto client resource 2026-09-23 09:20:17 +09:00
firmware Arm firmware fixes for v7.3 2026-09-14 17:02:19 +02:00
fpga treewide: refresh kmalloc_obj() conversions 2026-09-04 21:37:00 -07:00
fsi
fwctl rust: introduce abstractions for fwctl 2026-08-14 19:21:17 -03:00
gnss
gpib Char/Misc/IIO/etc driver update for 7.3-rc1 2026-08-25 09:38:50 -07:00
gpio gpio: tps65219: Fix TPS65214 GPIO direction programming 2026-09-23 16:42:01 +02:00
gpu A number of fixes: 2026-09-26 07:58:24 +10:00
greybus
hid hid-for-linus-2026092202 2026-09-22 10:30:17 -07:00
hsi HSI changes for the 7.3 series 2026-08-21 12:01:23 -07:00
hte
hv treewide: refresh kmalloc_obj() conversions 2026-09-04 21:37:00 -07:00
hwmon hwmon: (hp-wmi-sensors) Improve raw WMI string handling 2026-09-16 17:08:19 -07:00
hwspinlock
hwtracing treewide: refresh kmalloc_obj() conversions 2026-09-04 21:37:00 -07:00
i2c i2c: qcom-geni: Fix hardcoded clock index in SE_GENI_CLK_SEL 2026-09-24 22:52:30 +02:00
i3c treewide: refresh kmalloc_obj() conversions 2026-09-04 21:37:00 -07:00
idle Merge branch 'intel-idle-lpi' 2026-08-07 21:22:50 +02:00
iio treewide: refresh kmalloc_obj() conversions 2026-09-04 21:37:00 -07:00
infiniband RDMA v7.3 first rc pull 2026-09-14 09:58:12 -07:00
input Input updates for v7.3-rc3 2026-09-20 07:02:34 -07:00
interconnect This pull request contains the following interconnect updates for 2026-08-19 09:55:37 +02:00
iommu iommu/amd: Remove unused macro 2026-09-11 17:27:22 +02:00
ipack Char/Misc/IIO/etc driver update for 7.3-rc1 2026-08-25 09:38:50 -07:00
irqchip irqchip/gic-v5: Preserve ICC_CR0_EL1 state 2026-09-07 21:44:17 +02:00
leds LEDs for v7.3 2026-08-27 11:05:51 -07:00
macintosh
mailbox treewide: refresh kmalloc_obj() conversions 2026-09-04 21:37:00 -07:00
mcb
md treewide: refresh kmalloc_obj() conversions 2026-09-04 21:37:00 -07:00
media media: ipu-bridge: do not use the CVS device lookup for IVSC 2026-09-13 10:15:16 -07:00
memory * Raw NAND changes 2026-08-23 09:11:21 -07:00
memstick memstick: ms_block: destroy io_queue workqueue on removal 2026-09-02 18:08:42 +02:00
message
mfd treewide: refresh kmalloc_obj() conversions 2026-09-04 21:37:00 -07:00
misc Merge drm/drm-fixes into drm-misc-fixes 2026-09-01 09:38:51 +02:00
mmc mmc: sdhci-of-aspeed: Remove children before releasing SDC resources 2026-09-14 12:04:29 +02:00
most
mtd The most important set of fixes are around the handling of the QE bit in 2026-09-29 13:45:18 -07:00
mux
net net: stmmac: propagate PTP addend and system time programming errors 2026-10-02 10:31:09 +01:00
nfc nfc: pn533: fix OOB read in pn533_acr122_is_rx_frame_valid() 2026-09-23 22:13:18 +02:00
ntb NTB: ntb_transport: Reject oversized TX buffers 2026-08-20 13:43:24 -07:00
nubus
nvdimm treewide: refresh kmalloc_obj() conversions 2026-09-04 21:37:00 -07:00
nvme kmalloc_obj conversions for v7.3-rc2 2026-09-05 20:45:18 -07:00
nvmem Char/Misc/IIO/etc driver update for 7.3-rc1 2026-08-25 09:38:50 -07:00
of Devicetree fixes for v7.3, part 1: 2026-08-27 12:53:43 -07:00
opp OPP updates for 7.3-rc2 2026-09-09 19:03:00 +02:00
parisc parisc: eisa: Fix infinite loop when parsing invalid IRQ value 2026-08-18 11:43:05 +02:00
parport
pci pci-v7.3-fixes-2 2026-09-26 09:59:59 -07:00
pcmcia
peci
perf Perf events fixes: 2026-09-27 08:15:58 -07:00
phy phy: mediatek: phy-mtk-hdmi-mt8195: Fix TMDS clk bit ratio setting 2026-09-13 16:05:23 +05:30
pinctrl pinctrl: tegra238: Fix register bank for AON pin groups 2026-09-21 00:06:32 +02:00
platform platform-drivers-x86 for v7.3-2 2026-09-11 12:52:48 -07:00
pmdomain treewide: refresh kmalloc_obj() conversions 2026-09-04 21:37:00 -07:00
pnp Merge branches 'acpi-numa', 'acpi-misc' and 'pnp' 2026-08-07 20:01:31 +02:00
power power sequencing fixes for v7.3-rc4 2026-09-17 09:40:25 -07:00
powercap More power management updates for 7.3-rc1 2026-08-26 14:13:26 -07:00
pps pps-gpio: remove dead capture_clear code 2026-08-03 21:10:10 -07:00
ps3
ptp treewide: refresh kmalloc_obj() conversions 2026-09-04 21:37:00 -07:00
pwm Driver core changes for 7.3-rc1 2026-08-19 10:42:18 -07:00
rapidio rapidio: mport_cdev: fix use-after-free in dma_req_free() 2026-08-05 11:20:14 -07:00
ras - Mark the mpc85xx and ThunderX EDAC drivers as orphaned due to lack of 2026-08-31 20:10:39 -07:00
regulator regulator: pf1550: fix which regulator is notified 2026-09-07 18:08:38 +01:00
remoteproc remoteproc: qcom_q6v5_pas: Fix error masking in qcom_pas_stop() 2026-08-31 11:45:00 -05:00
resctrl arm64 updates for 7.3 2026-08-18 11:57:17 -07:00
reset Mostly the usual clk driver updates and new SoC additions plus non-critical 2026-08-26 11:14:30 -07:00
rpmsg
rtc rtc: spear: initialize IRQ state before requesting alarm IRQ 2026-09-21 22:46:42 +02:00
s390 Arm: 2026-09-26 08:26:12 -07:00
sbus
scsi SCSI fixes on 20260925 2026-09-25 14:41:52 -07:00
sh
siox
slimbus
soc soc: samsung: exynos-pmu: fix use-after-free of interrupt generator node 2026-09-18 14:39:19 +02:00
soundwire soundwire: cadence_master: wait and cancel cdns->work before clock stop 2026-09-08 19:19:42 +05:30
spi spi: fsl-qspi: Reprogram the clock rate when the operation frequency changes 2026-09-17 19:46:29 +01:00
spmi
ssb
staging Staging driver fixes for 7.3-rc2 2026-09-06 09:49:06 -07:00
target scsi: target: iscsi: Reserve a terminator byte for the login payload 2026-09-01 22:08:31 -04:00
tc
tee treewide: refresh kmalloc_obj() conversions 2026-09-04 21:37:00 -07:00
thermal thermal: gov_step_wise: Fix stale mitigation vote with non-zero lower bounds 2026-09-22 21:16:11 +02:00
thunderbolt treewide: refresh kmalloc_obj() conversions 2026-09-04 21:37:00 -07:00
tty fbdev fixes for 7.3-rc3: 2026-09-12 08:06:04 -07:00
ufs SCSI fixes on 20260925 2026-09-25 14:41:52 -07:00
uio
usb USB fixes for 7.3-rc2 2026-09-06 08:50:20 -07:00
vdpa vduse: return compat ioctl results directly 2026-09-08 03:58:27 -04:00
vfio mm.git review status for mm-hotfixes-stable..mm-stable 2026-08-20 18:17:08 -07:00
vhost vhost: invalidate vring access on IOTLB transitions 2026-09-07 18:54:04 -04:00
video fbdev fixes for 7.3-rc3: 2026-09-12 08:06:04 -07:00
virt arm64 updates for 7.3 2026-08-18 11:57:17 -07:00
virtio virtio_input: stop callbacks before unregistering input device 2026-09-07 18:54:04 -04:00
w1 1-Wire bus drivers for v7.3 2026-08-06 11:08:37 +02:00
watchdog watchdog: da9063: fix suspend/resume handling of HW_RUNNING watchdog 2026-09-18 08:10:45 -07:00
xen treewide: refresh kmalloc_obj() conversions 2026-09-04 21:37:00 -07:00
zorro
Kconfig
Makefile