diff options
author | Paul Thomas <pthomas8589@gmail.com> | 2019-04-08 15:37:54 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-04-08 16:38:23 -0700 |
commit | a62520473f15750cd1432d36b377a06cd7cff8d2 (patch) | |
tree | 7541ee89ab3db6a604f8c1ea122fa5c4791e89af /drivers/net/ethernet/cadence | |
parent | 738de00cda52e20c197fe4813b089e4fe5312b22 (diff) | |
download | linux-a62520473f15750cd1432d36b377a06cd7cff8d2.tar.bz2 |
net: macb driver, check for SKBTX_HW_TSTAMP
Make sure SKBTX_HW_TSTAMP (i.e. SOF_TIMESTAMPING_TX_HARDWARE) has been
enabled for this skb. It does fix the issue where normal socks that
aren't expecting a timestamp will not wake up on select, but when a
user does want a SOF_TIMESTAMPING_TX_HARDWARE it does work.
Signed-off-by: Paul Thomas <pthomas8589@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/cadence')
-rw-r--r-- | drivers/net/ethernet/cadence/macb_main.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c index 1522aee81884..3da2795e2486 100644 --- a/drivers/net/ethernet/cadence/macb_main.c +++ b/drivers/net/ethernet/cadence/macb_main.c @@ -898,7 +898,9 @@ static void macb_tx_interrupt(struct macb_queue *queue) /* First, update TX stats if needed */ if (skb) { - if (gem_ptp_do_txstamp(queue, skb, desc) == 0) { + if (unlikely(skb_shinfo(skb)->tx_flags & + SKBTX_HW_TSTAMP) && + gem_ptp_do_txstamp(queue, skb, desc) == 0) { /* skb now belongs to timestamp buffer * and will be removed later */ |