aboutsummaryrefslogtreecommitdiff
path: root/net/mdio-tools
diff options
context:
space:
mode:
authorRobert Marko <robert.marko@sartura.hr>2022-06-07 13:47:40 +0200
committerRosen Penev <rosenp@gmail.com>2022-06-09 11:06:41 -0700
commit4048eeb3ea6dc1f9eb3a1e258c080d409d50237b (patch)
tree810b2101cc919865024ac5895e3876baf2c9bb32 /net/mdio-tools
parent27a6a2df7e391113ccc50649a3e3b3f6bcb18dcb (diff)
mdio-tools: update to 1.1.1
Update the mdio-netlink kmod and userspace mdio-tools to version 1.1.1. mdio-tools required a musl time64 compatibility fix that I have an PR open for already. Changelog: [v1.1.1] - 2022-05-23 --------------------- Tiny bugfix release. - mdio: The bench operation is now much more reliable when stacked on other devices than regular PHYs (e.g. paged PHYs or Marvell switches). - mvls: The STU can now be dumped chips from the Peridot generation. [v1.1.0] - 2022-05-04 --------------------- A sprawling release, adding various mvls related introspection features. mvls also gains a JSON output format. - mvls: The STU can now be dumped (requires Linux 5.17 or later). This is useful now that mv88e6xxx supports offloading of MST states - mvls: Output can now be formatted as JSON for easier scripting - mdio: mvls: A subset of MIB counters can now be dumped. This let's you get at counters for DSA ports, which are not reachable from ethtool - mdio: mvls: The LAG mask and LAG map tables can now be dumped - mdio: Improve usage message by including the examples from the manual Signed-off-by: Robert Marko <robert.marko@sartura.hr>
Diffstat (limited to 'net/mdio-tools')
-rw-r--r--net/mdio-tools/Makefile6
-rw-r--r--net/mdio-tools/patches/0001-mdio-bench-make-time_t-prints-portable.patch47
2 files changed, 50 insertions, 3 deletions
diff --git a/net/mdio-tools/Makefile b/net/mdio-tools/Makefile
index c110bfdcf..565b5211a 100644
--- a/net/mdio-tools/Makefile
+++ b/net/mdio-tools/Makefile
@@ -1,12 +1,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=mdio-tools
-PKG_RELEASE:=2
+PKG_RELEASE:=1
PKG_SOURCE_URL:=https://github.com/wkz/mdio-tools
PKG_SOURCE_PROTO:=git
-PKG_SOURCE_VERSION:=1.0.1
-PKG_MIRROR_HASH:=36bc20b91034a2bbc627a4d4b58c3b46279f5bb65bf2067347a751bb0f9a0371
+PKG_SOURCE_VERSION:=1.1.1
+PKG_MIRROR_HASH:=aec5a5d8031de166a5ff38dc5442cfbf5de002b11c0a256ea4a03ae047040d03
PKG_FIXUP:=autoreconf
diff --git a/net/mdio-tools/patches/0001-mdio-bench-make-time_t-prints-portable.patch b/net/mdio-tools/patches/0001-mdio-bench-make-time_t-prints-portable.patch
new file mode 100644
index 000000000..9030a4d1a
--- /dev/null
+++ b/net/mdio-tools/patches/0001-mdio-bench-make-time_t-prints-portable.patch
@@ -0,0 +1,47 @@
+From 7da5b168152987806e295ed3b7e97b77ffa93cb9 Mon Sep 17 00:00:00 2001
+From: Robert Marko <robert.marko@sartura.hr>
+Date: Tue, 7 Jun 2022 13:34:40 +0200
+Subject: [PATCH] mdio: bench: make time_t prints portable
+
+Using %ld to print time_t will work fine on 64 bit platforms, however
+now musl libc defines time_t to be 64 even on 32bit platforms.
+
+This will make the compilation fail with:
+mdio.c: In function 'mdio_common_bench_cb':
+mdio.c:555:27: error: format '%ld' expects argument of type 'long int', but argument 2 has type 'time_t' {aka 'long long int'} [-Werror=format=]
+ 555 | printf("%ld.%2.2lds\n", end.tv_sec, end.tv_nsec / 10000000);
+ | ~~^ ~~~~~~~~~~
+ | | |
+ | long int time_t {aka long long int}
+ | %lld
+
+So, replace the %ld in prints with the PRId64 from inttypes.h and cast
+tv_sec and tv_nsec to int64_t.
+
+This makes it compile and work on 32 bit ARMv7 fine.
+
+Signed-off-by: Robert Marko <robert.marko@sartura.hr>
+---
+ src/mdio/mdio.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+--- a/src/mdio/mdio.c
++++ b/src/mdio/mdio.c
+@@ -552,13 +552,13 @@ int mdio_common_bench_cb(uint32_t *data,
+ printf("Performed 1000 reads in ");
+
+ if (end.tv_sec)
+- printf("%ld.%2.2lds\n", end.tv_sec, end.tv_nsec / 10000000);
++ printf("%"PRId64".%2.2"PRId64"s\n", (int64_t)end.tv_sec, (int64_t)end.tv_nsec / 10000000);
+ else if (end.tv_nsec > 1000000)
+- printf("%ldms\n", end.tv_nsec / 1000000);
++ printf("%"PRId64"ms\n", (int64_t)end.tv_nsec / 1000000);
+ else if (end.tv_nsec > 1000)
+- printf("%ldus\n", end.tv_nsec / 1000);
++ printf("%"PRId64"us\n", (int64_t)end.tv_nsec / 1000);
+ else
+- printf("%ldns\n", end.tv_nsec);
++ printf("%"PRId64"ns\n", (int64_t)end.tv_nsec);
+
+ return err;
+ }