2023-06-12 19:21:06

by Charlie Johnston

[permalink] [raw]
Subject: [PATCH v1] pps: Increase PPS_MAX_SOURCES value.

For consistency with what others use for minors, this
change sets PPS_MAX_SOURCES to MINORMASK.

The PPS_MAX_SOURCES value is currently set to 16. In
some cases this was not sufficient for a system. For
example, a system with multiple (4+) PCIe cards each
with 4 PTP-capable ethernet interfaces could run out
of the available PPS major:minors if each interface
registers a PPS source.

Signed-off-by: Charlie Johnston <[email protected]>
---
include/uapi/linux/pps.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/uapi/linux/pps.h b/include/uapi/linux/pps.h
index 009ebcd8ced5..0712c2e5a472 100644
--- a/include/uapi/linux/pps.h
+++ b/include/uapi/linux/pps.h
@@ -25,8 +25,8 @@

#include <linux/types.h>

-#define PPS_VERSION "5.3.6"
-#define PPS_MAX_SOURCES 16 /* should be enough... */
+#define PPS_VERSION "5.3.6"
+#define PPS_MAX_SOURCES MINORMASK

/* Implementation note: the logical states ``assert'' and ``clear''
* are implemented in terms of the chip register, i.e. ``assert''
--
2.41.0