[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230215110755.33bb9436@kmaincent-XPS-13-7390>
Date: Wed, 15 Feb 2023 11:07:55 +0100
From: Köry Maincent <kory.maincent@...tlin.com>
To: Jonathan Lemon <jonathan.lemon@...il.com>,
Richard Cochran <richardcochran@...il.com>,
Florian Fainelli <f.fainelli@...il.com>
Cc: netdev@...r.kernel.org,
Maxime Chevallier <maxime.chevallier@...tlin.com>,
Thomas Petazzoni <thomas.petazzoni@...tlin.com>
Subject: net: phy: broadcom: error in rxtstamp callback?
Hello,
I am new to PTP API. I am currently adding the support of PTP to a PHY driver.
I looked at the other PTP supports to do it and I figured out there might be an
issue with the broadcom driver. As I am only beginner in PTP I may have wrong
and if it is the case could you explain me why.
I also don't have such broadcom PHY to test it, but I want to report it if the
issue is real.
The issue is on the rxtstamp callback, it never return true nor deliver the
skb.
Here is the patch that may fix it:
diff --git a/drivers/net/phy/bcm-phy-ptp.c b/drivers/net/phy/bcm-phy-ptp.c
index ef00d6163061..57bb63bd98c7 100644
--- a/drivers/net/phy/bcm-phy-ptp.c
+++ b/drivers/net/phy/bcm-phy-ptp.c
@@ -412,7 +412,9 @@ static bool bcm_ptp_rxtstamp(struct mii_timestamper *mii_ts,
__pskb_trim(skb, skb->len - 8);
}
- return false;
+ netif_rx(skb);
+
+ return true;
}
static bool bcm_ptp_get_tstamp(struct bcm_ptp_private *priv,
--
2.25.1
Regards,
Powered by blists - more mailing lists