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

The canonical way for a network driver to advertise what kind of
timestamping it supports is to implement
ethtool_ops::get_ts_info(). Here, we use the CAN specific
can_ethtool_op_get_ts_info_hwts() function to achieve this.

In addition, the driver currently does not support the hardware
timestamps ioctls. According to [1], SIOCSHWTSTAMP is "must" and
SIOCGHWTSTAMP is "should". This patch fills up that gap by
implementing net_device_ops::ndo_eth_ioctl() using the CAN specific
function can_eth_ioctl_hwts().

[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

Signed-off-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
Link: https://lore.kernel.org/all/20220727101641.198847-10-mailhol.vincent@wanadoo.fr
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2022-07-28 11:44:30 +02:00
..
Kconfig can: Kconfig: add CONFIG_CAN_RX_OFFLOAD 2022-06-11 17:11:02 +02:00
Makefile can: mcp251xfd: ethtool: add support 2022-03-13 09:45:35 +01:00
mcp251xfd-chip-fifo.c can: mcp251xfd: introduce struct mcp251xfd_tx_ring::nr and ::fifo_nr and make use of it 2022-02-24 08:46:59 +01:00
mcp251xfd-core.c can: mcp251xfd: advertise timestamping capabilities and add ioctl support 2022-07-28 11:44:30 +02:00
mcp251xfd-crc16.c can: mcp251xfd: rename all remaining occurrence to mcp251xfd 2020-09-30 21:55:28 +02:00
mcp251xfd-dump.c can: mcp251xfd: mcp251xfd_dump(): fix comment 2022-07-26 10:43:37 +02:00
mcp251xfd-dump.h can: mcp251xfd: add dev coredump support 2021-03-30 11:14:49 +02:00
mcp251xfd-ethtool.c can: mcp251xfd: advertise timestamping capabilities and add ioctl support 2022-07-28 11:44:30 +02:00
mcp251xfd-ram.c can: mcp251xfd: ram: coalescing support 2022-03-13 09:45:35 +01:00
mcp251xfd-ram.h can: mcp251xfd: ram: coalescing support 2022-03-13 09:45:35 +01:00
mcp251xfd-regmap.c can: mcp251xfd: mcp251xfd_regmap_crc_read(): update workaround broken CRC on TBC register 2022-07-04 12:46:45 +02:00
mcp251xfd-ring.c can: mcp251xfd: add TX IRQ coalescing ethtool support 2022-03-13 09:45:36 +01:00
mcp251xfd-rx.c can: rx-offload: rename can_rx_offload_queue_sorted() -> can_rx_offload_queue_timestamp() 2022-04-19 16:58:04 +02:00
mcp251xfd-tef.c can: mcp251xfd: add TX IRQ coalescing support 2022-03-13 09:45:36 +01:00
mcp251xfd-timestamp.c can: mcp251xfd: mark some instances of struct mcp251xfd_priv as const 2021-08-19 15:07:03 +02:00
mcp251xfd-tx.c can: mcp251xfd: move TX handling into separate file 2022-01-08 20:17:42 +01:00
mcp251xfd.h can: mcp251xfd: silence clang's -Wunaligned-access warning 2022-05-19 22:15:51 +02:00