blob: 36fbffa2e130673368e7c8079a2e3a990dd1e729 [file] [log] [blame]
b.liue9582032025-04-17 19:18:16 +08001From e6208c23045ece890eebfe0564f73ccc52603867 Mon Sep 17 00:00:00 2001
2From: Yangbo Lu <yangbo.lu@nxp.com>
3Date: Wed, 27 Nov 2019 15:27:56 +0800
4Subject: [PATCH] net: mscc: ocelot: avoid incorrect consuming in skbs list
5
6Break the matching loop when find the matching skb for TX timestamp.
7This is to avoid consuming more skbs incorrectly. The timestamp ID
8is from 0 to 3 while the FIFO could support 128 timestamps at most.
9
10Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
11Signed-off-by: David S. Miller <davem@davemloft.net>
12---
13 drivers/net/ethernet/mscc/ocelot.c | 1 +
14 1 file changed, 1 insertion(+)
15
16--- a/drivers/net/ethernet/mscc/ocelot.c
17+++ b/drivers/net/ethernet/mscc/ocelot.c
18@@ -736,6 +736,7 @@ void ocelot_get_txtstamp(struct ocelot *
19
20 list_del(pos);
21 kfree(entry);
22+ break;
23 }
24
25 /* Next ts */