NXP PTP Driver: invalid assertion #89449
Labels
area: PTP
IEEE 1588 PTP Protocol
bug
The issue is a bug, or the PR is fixing a bug
platform: NXP
NXP
priority: low
Low impact/importance bug
Describe the bug
The following assertion in the NXP PTP driver, function nxp_enet_ptp_clock_callback(), file zephyr/drivers/ptp_clock/ptp_clock_nxp_enet.c, is wrong:
The intention is to ensure that cb_data is not NULL, therefore, the check should be for
cb_data != NULL
:Actually, I saw this bug when I wanted to send a pull request for a more severe bug (enet_handle of PTP driver data should be a pointer to the enet_handle of the MAC driver, not a new instance of the data structure), but I am happy to see that this bug has been fixed already concurrently, and gPTP seems to work again on NXP i.MX RT106x).
To Reproduce
Platform: Teensy 4.1 (same issue applies at least to all NXP i.MX RT106x platforms).
Compile with gPTP and assertions:
CONFIG_NET_GPTP=y
CONFIG_ASSERT=y
Run gPTP sample (samples/net/gptp) and wait for assertion to fire.
Expected behavior
Assertion should not fire (cb_data is actually != NULL as it should be).
Impact
minor (unless assertions are used).
Logs and console output
Console output shows that assertion has fired and halts.
Environment (please complete the following information):
Additional context
n/a
The text was updated successfully, but these errors were encountered: