Skip to contentSkip to conversation

igc: Fix the typo in the PTM Control macro

PATCH Superseded Sasha Neftin 2 participants 2 messages Aug 2, 2023

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 igc: Fix the typo in the PTM Control macro

The IGC_PTM_CTRL_SHRT_CYC defined the time between two consecutive PTM requests. The bit resolution of this field is six bits. This patch comes to correct the typo in the IGC_PTM_CTRL_SHRT_CYC macro.

Fixes a90ec8483732 ("igc: Add support for PTP getcrosststamp()")
---
 drivers/net/ethernet/intel/igc/igc_defines.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/intel/igc/igc_defines.h +1 -1
index c3722f524ea7..0bac6eeb42c0 100644
@@ -546,7 +546,7 @@
 #define IGC_PTM_CTRL_START_NOW	BIT(29) /* Start PTM Now */
 #define IGC_PTM_CTRL_EN		BIT(30) /* Enable PTM */
 #define IGC_PTM_CTRL_TRIG	BIT(31) /* PTM Cycle trigger */
-#define IGC_PTM_CTRL_SHRT_CYC(usec)	(((usec) & 0x2f) << 2)
+#define IGC_PTM_CTRL_SHRT_CYC(usec)	(((usec) & 0x3f) << 2)
 #define IGC_PTM_CTRL_PTM_TO(usec)	(((usec) & 0xff) << 8)
 
 #define IGC_PTM_SHORT_CYC_DEFAULT	1   /* Default short cycle interval */
Signature · 6 lines
2.25.1

_______________________________________________
Intel-wired-lan mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
Reviewed-by on v1 1/1
#1 lore raw

Dear Sasha,

Thank you for your patch.

Am 02.08.23 um 08:19 schrieb Sasha Neftin:

Quoted 1 line

The IGC_PTM_CTRL_SHRT_CYC defined the time between two consecutive PTM

define*s*

Quoted 2 lines

requests. The bit resolution of this field is six bits. This patch comes to correct the typo in the IGC_PTM_CTRL_SHRT_CYC macro.

Well bit six was set before, wasn’t it? If you resend, you can write, that bit five was missing in the mask.

For the summary I suggest something like:

igc: Also set bit 5 in mask in PTM Control macro

Quoted 11 lines
Fixes a90ec8483732 ("igc: Add support for PTP getcrosststamp()")
---
  drivers/net/ethernet/intel/igc/igc_defines.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/intel/igc/igc_defines.h +0 -0
index c3722f524ea7..0bac6eeb42c0 100644

drivers/net/ethernet/intel/igc/igc_defines.h line 552

Quoted 8 lines
drivers/net/ethernet/intel/igc/igc_defines.h +1 -1
@@ -546,7 +546,7 @@
  #define IGC_PTM_CTRL_START_NOW	BIT(29) /* Start PTM Now */
  #define IGC_PTM_CTRL_EN		BIT(30) /* Enable PTM */
  #define IGC_PTM_CTRL_TRIG	BIT(31) /* PTM Cycle trigger */
-#define IGC_PTM_CTRL_SHRT_CYC(usec)	(((usec) & 0x2f) << 2)
+#define IGC_PTM_CTRL_SHRT_CYC(usec)	(((usec) & 0x3f) << 2)
  #define IGC_PTM_CTRL_PTM_TO(usec)	(((usec) & 0xff) << 8)
 
  #define IGC_PTM_SHORT_CYC_DEFAULT	1   /* Default short cycle interval */

Kind regards,

Paul
_______________________________________________
Intel-wired-lan mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan