Hi, I think the "if (type != TS_SOFTWARE" is wrong. The "type" only refer to TX. But hwts_init() also set the RX. So no reason to skip it. Setting to TS_SOFTWARE means no TX hardware time stamp.
I wonder how we miss it? Probably in refactoring of the code. Or is it is a quick work-around? Erez -----Original Message----- From: Siddharth Vadapalli via Linuxptp-devel <linuxptp-devel@lists.sourceforge.net> Sent: Thursday, 21 July 2022 11:41 To: linuxptp-devel@lists.sourceforge.net Subject: [Linuxptp-devel] [PATCH] sk.c: Unreachable switch case TS_SOFTWARE Remove the unreachable switch case TS_SOFTWARE. Signed-off-by: Siddharth Vadapalli <s-vadapa...@ti.com> --- sk.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/sk.c b/sk.c index b55d6b5..a49bcf4 100644 --- a/sk.c +++ b/sk.c @@ -477,9 +477,6 @@ int sk_timestamping_init(int fd, const char *device, enum timestamp_type type, if (type != TS_SOFTWARE) { filter1 = HWTSTAMP_FILTER_PTP_V2_EVENT; switch (type) { - case TS_SOFTWARE: - tx_type = HWTSTAMP_TX_OFF; - break; case TS_HARDWARE: case TS_LEGACY_HW: tx_type = HWTSTAMP_TX_ON; -- 2.37.1 _______________________________________________ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.sourceforge.net%2Flists%2Flistinfo%2Flinuxptp-devel&data=05%7C01%7Cerez.geva.ext%40siemens.com%7Cd073e44825024b89f07a08da6aff5b2c%7C38ae3bcd95794fd4addab42e1495d55a%7C1%7C0%7C637939942226521495%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=w%2FXpp9A%2BWyUdvaAjtzqqLLc7kvmX69bvsky9bteKQcg%3D&reserved=0 _______________________________________________ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-devel