Skip to contentSkip to conversation

eth: lan743x: reject extts for non-pci11x1x devices

PATCH Applied Raju Lakkaraju 3 participants 3 messages Sep 30, 2022 – Oct 3, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v5 1/1 eth: lan743x: reject extts for non-pci11x1x devices

Remove PTP_PF_EXTTS support for non-PCI11x1x devices since they do not support the PTP-IO Input event triggered timestamping mechanisms added

Fixes 60942c397af6 ("net: lan743x: Add support for PTP-IO Event Input External Timestamp (extts)")

---
Changes:
========
V4 -> V5:
- Remove the Reviewed-by tag added by me
- Correct the Fixes tag subject line

V3 -> V4:
- Fix the Fixes tag line split

V2 -> V3:
- Correct the Fixes tag

V1 -> V2:
- Repost against net with a Fixes tag

 drivers/net/ethernet/microchip/lan743x_ptp.c | 7 +++++++
 1 file changed, 7 insertions(+)
drivers/net/ethernet/microchip/lan743x_ptp.c +7 -0
index 6a11e2ceb013..da3ea905adbb 100644
@@ -1049,6 +1049,10 @@ static int lan743x_ptpci_verify_pin_config(struct ptp_clock_info *ptp,
 					   enum ptp_pin_function func,
 					   unsigned int chan)
 {
+	struct lan743x_ptp *lan_ptp =
+		container_of(ptp, struct lan743x_ptp, ptp_clock_info);
+	struct lan743x_adapter *adapter =
+		container_of(lan_ptp, struct lan743x_adapter, ptp);
 	int result = 0;
 
 	/* Confirm the requested function is supported. Parameter
@@ -1057,7 +1061,10 @@ static int lan743x_ptpci_verify_pin_config(struct ptp_clock_info *ptp,
 	switch (func) {
 	case PTP_PF_NONE:
 	case PTP_PF_PEROUT:
+		break;
 	case PTP_PF_EXTTS:
+		if (!adapter->is_pci11x1x)
+			result = -1;
 		break;
 	case PTP_PF_PHYSYNC:
 	default:
Signature · 1 line
2.25.1
Reviewed-by on v5 1/1
#1 lore raw
Quoted 5 lines · Raju Lakkaraju

Remove PTP_PF_EXTTS support for non-PCI11x1x devices since they do not support the PTP-IO Input event triggered timestamping mechanisms added

Fixes 60942c397af6 ("net: lan743x: Add support for PTP-IO Event Input External Timestamp (extts)")
Quoted 48 lines

---
Changes:
========
V4 -> V5:
- Remove the Reviewed-by tag added by me
- Correct the Fixes tag subject line

V3 -> V4:
- Fix the Fixes tag line split

V2 -> V3:
- Correct the Fixes tag

V1 -> V2:
- Repost against net with a Fixes tag

 drivers/net/ethernet/microchip/lan743x_ptp.c | 7 +++++++
 1 file changed, 7 insertions(+)
drivers/net/ethernet/microchip/lan743x_ptp.c +7 -0
index 6a11e2ceb013..da3ea905adbb 100644
@@ -1049,6 +1049,10 @@ static int lan743x_ptpci_verify_pin_config(struct ptp_clock_info *ptp,
 					   enum ptp_pin_function func,
 					   unsigned int chan)
 {
+	struct lan743x_ptp *lan_ptp =
+		container_of(ptp, struct lan743x_ptp, ptp_clock_info);
+	struct lan743x_adapter *adapter =
+		container_of(lan_ptp, struct lan743x_adapter, ptp);
 	int result = 0;
 
 	/* Confirm the requested function is supported. Parameter
@@ -1057,7 +1061,10 @@ static int lan743x_ptpci_verify_pin_config(struct ptp_clock_info *ptp,
 	switch (func) {
 	case PTP_PF_NONE:
 	case PTP_PF_PEROUT:
+		break;
 	case PTP_PF_EXTTS:
+		if (!adapter->is_pci11x1x)
+			result = -1;
 		break;
 	case PTP_PF_PHYSYNC:
 	default:
Signature · 1 line
2.25.1
Signature · 1 line
/Horatiu
#2 lore raw
In reply to Raju Lakkaraju
This patch was applied to netdev/net.git (master) by David S. Miller <[email protected]>:

Hello:

This patch was applied to netdev/net.git (master)
by David S. Miller <[email protected]>:

Quoted 5 lines · On Fri, 30 Sep 2022 14:57:40 +0530 you wrote:

Remove PTP_PF_EXTTS support for non-PCI11x1x devices since they do not support the PTP-IO Input event triggered timestamping mechanisms added

Fixes 60942c397af6 ("net: lan743x: Add support for PTP-IO Event Input External Timestamp (extts)")
Quoted 8 lines

---
Changes:
========
V4 -> V5:
- Remove the Reviewed-by tag added by me
- Correct the Fixes tag subject line

[...]

Here is the summary with links:
- [net,V5] eth: lan743x: reject extts for non-pci11x1x devices

    https://git.kernel.org/netdev/net/c/cb4b12071a4b

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html