1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/drivers/net/can/usb/peak_usb
Vincent Mailhol bedd94835a can: peak_usb: advertise timestamping capabilities and add ioctl support
Currently, userland has no method to query which timestamping features
are supported by the peak_usb driver (aside maybe of getting RX
messages and observe whether or not hardware timestamps stay at zero).

The canonical way to add hardware timestamp support is to implement
ethtool_ops::get_ts_info() in order to advertise the timestamping
capabilities and to implement net_device_ops::ndo_eth_ioctl() as
requested in [1]. Currently, the driver only supports hardware RX
timestamps [2] but not hardware TX. For this reason, the generic
function can_ethtool_op_get_ts_info_hwts() and can_eth_ioctl_hwts()
can not be reused and instead this patch adds pcan_get_ts_info() and
peak_eth_ioctl().

[1] kernel doc Timestamping, section 3.1: "Hardware Timestamping
Implementation: Device Drivers"
Link: https://docs.kernel.org/networking/timestamping.html#hardware-timestamping-implementation-device-drivers

[2] https://lore.kernel.org/linux-can/20220727080634.l6uttnbrmwbabh3o@pengutronix.de/

CC: Stephane Grosjean <s.grosjean@peak-system.com>
Signed-off-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
Link: https://lore.kernel.org/all/20220727101641.198847-15-mailhol.vincent@wanadoo.fr
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2022-07-28 11:44:31 +02:00
..
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
pcan_usb.c can: peak_usb: advertise timestamping capabilities and add ioctl support 2022-07-28 11:44:31 +02:00
pcan_usb_core.c can: peak_usb: advertise timestamping capabilities and add ioctl support 2022-07-28 11:44:31 +02:00
pcan_usb_core.h can: peak_usb: advertise timestamping capabilities and add ioctl support 2022-07-28 11:44:31 +02:00
pcan_usb_fd.c can: peak_usb: advertise timestamping capabilities and add ioctl support 2022-07-28 11:44:31 +02:00
pcan_usb_pro.c can: peak_usb: advertise timestamping capabilities and add ioctl support 2022-07-28 11:44:31 +02:00
pcan_usb_pro.h can: peak_usb: correction of an initially misnamed field name 2022-07-19 21:22:05 +02:00