Skip to contentSkip to conversation

eth: lan743x: reject extts for non-pci11x1x devices

PATCH Superseded Raju Lakkaraju 3 participants 4 messages Sep 28, 2022

Subsystems (3)

v3 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

PATCH v3 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 ("Add support for PTP-IO Event Input External Timestamp

(extts)")

---
Changes:
========
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
#1 lore raw

The 09/28/2022 12:38, Raju Lakkaraju wrote:

Hi Raju,

Quoted 5 lines

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)")

The fixes tag should not spread over multiple lines. Also you have extra spaces between External and Timestamp which doesn't appear in the actual commit.

Also you have an empty line between Fixes and Reviewed-by tags.

Quoted 2 lines

I am not sure that Jakub gave his Reviewed-by, but maybe I have missed that.

Quoted 42 lines

---
Changes:
========
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

Hi Horatiu,

Thank you for review comments.
In vim editor, set the textwidth as 75. Due to this, after 75 charecters of the line, string placed in next line.

Please find the screenshot of column marker with textwidth. I will fix it and repost the patch again.

Quoted 14 lines · Horatiu Vultur

The 09/28/2022 12:38, Raju Lakkaraju wrote:

Hi Raju,

Quoted 5 lines

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)")

The fixes tag should not spread over multiple lines. Also you have extra spaces between External and Timestamp which doesn't appear in the actual commit.

Quoted 7 lines

Also you have an empty line between Fixes and Reviewed-by tags.

Quoted 2 lines

I am not sure that Jakub gave his Reviewed-by, but maybe I have missed that.

Fixes tag correction was suggested by Jakub in V2 patch.

Quoted 45 lines
Quoted 42 lines

---
Changes:
========
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
Signature · 3 lines
--------
Thanks,
Raju
maintainer
#3 lore raw
Quoted 6 lines · On Wed, 28 Sep 2022 13:50:50 +0530 Raju Lakkaraju wrote:
Quoted 4 lines
Quoted 1 line

I am not sure that Jakub gave his Reviewed-by, but maybe I have missed that.

Fixes tag correction was suggested by Jakub in V2 patch.

Does not mean I reviewed the patch, only add review tags if someone explicitly sent them to you.