diff options
author | Paul Thomas <pthomas8589@gmail.com> | 2019-04-08 15:37:54 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-12-05 09:21:32 +0100 |
commit | cabf7f90ced5088d16820221c9301c872a7a2a5d (patch) | |
tree | aa48946381c5d333ac1230fb4a1401918b341ff6 | |
parent | e8d59efd8ef9f1d2f3a79d41c16b9a01fea4be38 (diff) | |
download | linux-stable-cabf7f90ced5088d16820221c9301c872a7a2a5d.tar.gz linux-stable-cabf7f90ced5088d16820221c9301c872a7a2a5d.tar.bz2 linux-stable-cabf7f90ced5088d16820221c9301c872a7a2a5d.zip |
net: macb driver, check for SKBTX_HW_TSTAMP
commit a62520473f15750cd1432d36b377a06cd7cff8d2 upstream.
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>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-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 98f769393250..c2eb18854794 100644 --- a/drivers/net/ethernet/cadence/macb_main.c +++ b/drivers/net/ethernet/cadence/macb_main.c @@ -860,7 +860,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 */ |