Skip to contentSkip to conversation

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

PATCH In review Raju Lakkaraju 2 participants 2 messages Sep 23, 2022 – Sep 26, 2022

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

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

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

---
Changes:
========
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
maintainer
#1 lore raw
Quoted 7 lines · On Fri, 23 Sep 2022 15:11:34 +0530 Raju Lakkaraju wrote:

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

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

The fixes tag should go before your sign-off. So something like:

Subject: 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 ("Add support for PTP-IO Event Input External Timestamp (extts)")

I'd be good to add to the commit message what the user-visible problem will be. Crash or just silently accepting a config which won't work?