net: mscc: ocelot: fix hardware timestamp dequeue logic
authorlaurent brando <laurent.brando@nxp.com>
Mon, 27 Jul 2020 10:26:14 +0000 (18:26 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 27 Jul 2020 19:04:40 +0000 (12:04 -0700)
commit5fd82200d870a5dd3e509c98ef2041f580b2c0e1
treef99d63efbf54813c786392bb1f04521b040a120c
parent367fe04eb64760fab400bdc990cc6067071e1e39
net: mscc: ocelot: fix hardware timestamp dequeue logic

The next hw timestamp should be snapshoot to the read registers
only once the current timestamp has been read.
If none of the pending skbs matches the current HW timestamp
just gracefully flush the available timestamp by reading it.

Signed-off-by: laurent brando <laurent.brando@nxp.com>
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mscc/ocelot.c