diff options
author | Antoine Tenart <antoine.tenart@bootlin.com> | 2020-05-26 17:01:49 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-05-27 14:54:31 -0700 |
commit | b2e118f638fb8984e430624a8cf27483cc23cf8d (patch) | |
tree | c29d54d4a700c00513e171f604ab3ac5cff6e0d2 /drivers/net/ethernet/mscc/ocelot_board.c | |
parent | net: mscc: use the PHY MII ioctl interface when possible (diff) | |
download | linux-b2e118f638fb8984e430624a8cf27483cc23cf8d.tar.xz linux-b2e118f638fb8984e430624a8cf27483cc23cf8d.zip |
net: mscc: allow offloading timestamping operations to the PHY
This patch adds support for offloading timestamping operations not only
to the Ocelot switch (as already supported) but to compatible PHYs.
When both the PHY and the Ocelot switch support timestamping operations,
the PHY implementation is chosen as the timestamp will happen closer to
the medium.
Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mscc/ocelot_board.c')
-rw-r--r-- | drivers/net/ethernet/mscc/ocelot_board.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mscc/ocelot_board.c b/drivers/net/ethernet/mscc/ocelot_board.c index 67a8d61c926a..4a15d2ff8b70 100644 --- a/drivers/net/ethernet/mscc/ocelot_board.c +++ b/drivers/net/ethernet/mscc/ocelot_board.c @@ -189,7 +189,8 @@ static irqreturn_t ocelot_xtr_irq_handler(int irq, void *arg) skb->offload_fwd_mark = 1; skb->protocol = eth_type_trans(skb, dev); - netif_rx(skb); + if (!skb_defer_rx_timestamp(skb)) + netif_rx(skb); dev->stats.rx_bytes += len; dev->stats.rx_packets++; } while (ocelot_read(ocelot, QS_XTR_DATA_PRESENT) & BIT(grp)); |