Skip to content

Commit 2a2529e

Browse files
Matthew Whiteheaddavem330
authored andcommitted
3c59x: Add software timestamping
Added software timestamping ability. Tested with linuxptp and synchronized clocks to an average of less than 200 microseconds on 10 megabit ethernet. Tested on both Vortex and Boomerang models. Signed-off-by: Matthew Whitehead <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 2372175 commit 2a2529e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/net/ethernet/3com/3c59x.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2079,10 +2079,12 @@ vortex_start_xmit(struct sk_buff *skb, struct net_device *dev)
20792079
iowrite16(len, ioaddr + Wn7_MasterLen);
20802080
spin_unlock_irq(&vp->window_lock);
20812081
vp->tx_skb = skb;
2082+
skb_tx_timestamp(skb);
20822083
iowrite16(StartDMADown, ioaddr + EL3_CMD);
20832084
/* netif_wake_queue() will be called at the DMADone interrupt. */
20842085
} else {
20852086
/* ... and the packet rounded to a doubleword. */
2087+
skb_tx_timestamp(skb);
20862088
iowrite32_rep(ioaddr + TX_FIFO, skb->data, (skb->len + 3) >> 2);
20872089
dev_kfree_skb (skb);
20882090
if (ioread16(ioaddr + TxFree) > 1536) {
@@ -2212,6 +2214,7 @@ boomerang_start_xmit(struct sk_buff *skb, struct net_device *dev)
22122214
prev_entry->status &= cpu_to_le32(~TxIntrUploaded);
22132215
#endif
22142216
}
2217+
skb_tx_timestamp(skb);
22152218
iowrite16(DownUnstall, ioaddr + EL3_CMD);
22162219
spin_unlock_irqrestore(&vp->lock, flags);
22172220
return NETDEV_TX_OK;
@@ -2986,6 +2989,7 @@ static const struct ethtool_ops vortex_ethtool_ops = {
29862989
.nway_reset = vortex_nway_reset,
29872990
.get_wol = vortex_get_wol,
29882991
.set_wol = vortex_set_wol,
2992+
.get_ts_info = ethtool_op_get_ts_info,
29892993
};
29902994

29912995
#ifdef CONFIG_PCI

0 commit comments

Comments
 (0)