Skip to content

Commit a625204

Browse files
pthomasdavem330
authored andcommitted
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 738de00 commit a625204

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/net/ethernet/cadence/macb_main.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -898,7 +898,9 @@ static void macb_tx_interrupt(struct macb_queue *queue)
898898

899899
/* First, update TX stats if needed */
900900
if (skb) {
901-
if (gem_ptp_do_txstamp(queue, skb, desc) == 0) {
901+
if (unlikely(skb_shinfo(skb)->tx_flags &
902+
SKBTX_HW_TSTAMP) &&
903+
gem_ptp_do_txstamp(queue, skb, desc) == 0) {
902904
/* skb now belongs to timestamp buffer
903905
* and will be removed later
904906
*/

0 commit comments

Comments
 (0)