aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaciej Żenczykowski <maze@google.com>2019-10-30 23:24:30 -0700
committerandroid-build-merger <android-build-merger@google.com>2019-10-30 23:24:30 -0700
commitdb83832c436db8ddec9abaab3efa7bd75f8c2755 (patch)
tree220d969ab4dbf11487533fca0ab50261fa1f5dbc
parentdae23e6e17a41df0aef5a861256dcf34b2176262 (diff)
parentbf94105ff05f4f555523e1a322f5424d6a451635 (diff)
downloadethtool-db83832c436db8ddec9abaab3efa7bd75f8c2755.tar.gz
Merge upstream ethtool 5.3 am: e3e8310f4b
am: bf94105ff0 Change-Id: I5e032fd411185dcea99f670a0ca5a376ac34b64c
-rw-r--r--.gitignore3
-rw-r--r--NEWS4
-rw-r--r--configure.ac2
-rw-r--r--ethtool.8.in2
-rw-r--r--ethtool.c13
-rw-r--r--igb.c12
6 files changed, 32 insertions, 4 deletions
diff --git a/.gitignore b/.gitignore
index f1165a2..c4df588 100644
--- a/.gitignore
+++ b/.gitignore
@@ -27,3 +27,6 @@ autom4te.cache
.deps
test-*.log
test-*.trs
+
+.*.swp
+*.patch
diff --git a/NEWS b/NEWS
index 6b2248f..70f2396 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,7 @@
+Version 5.3 - September 23, 2019
+ * Feature: igb: dump RR2DCDELAY register
+ * Feature: dump nested registers
+
Version 5.2 - July 25, 2019
* Feature: Add 100BaseT1 and 1000BaseT1 link modes
* Feature: Use standard file location macros in ethtool.spec
diff --git a/configure.ac b/configure.ac
index 2127fdb..56e4683 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,5 @@
dnl Process this file with autoconf to produce a configure script.
-AC_INIT(ethtool, 5.2, netdev@vger.kernel.org)
+AC_INIT(ethtool, 5.3, netdev@vger.kernel.org)
AC_PREREQ(2.52)
AC_CONFIG_SRCDIR([ethtool.c])
AM_INIT_AUTOMAKE([gnu])
diff --git a/ethtool.8.in b/ethtool.8.in
index cd3be91..22472e1 100644
--- a/ethtool.8.in
+++ b/ethtool.8.in
@@ -113,7 +113,7 @@
. hy \\n(HY
..
.
-.TH ETHTOOL 8 "July 2019" "Ethtool version @VERSION@"
+.TH ETHTOOL 8 "September 2019" "Ethtool version @VERSION@"
.SH NAME
ethtool \- query or control network driver and hardware settings
.
diff --git a/ethtool.c b/ethtool.c
index 05fe05a..c0e2903 100644
--- a/ethtool.c
+++ b/ethtool.c
@@ -1245,7 +1245,7 @@ static int dump_regs(int gregs_dump_raw, int gregs_dump_hex,
if (gregs_dump_raw) {
fwrite(regs->data, regs->len, 1, stdout);
- return 0;
+ goto nested;
}
if (!gregs_dump_hex)
@@ -1253,7 +1253,7 @@ static int dump_regs(int gregs_dump_raw, int gregs_dump_hex,
if (!strncmp(driver_list[i].name, info->driver,
ETHTOOL_BUSINFO_LEN)) {
if (driver_list[i].func(info, regs) == 0)
- return 0;
+ goto nested;
/* This version (or some other
* variation in the dump format) is
* not handled; fall back to hex
@@ -1263,6 +1263,15 @@ static int dump_regs(int gregs_dump_raw, int gregs_dump_hex,
dump_hex(stdout, regs->data, regs->len, 0);
+nested:
+ /* Recurse dump if some drvinfo and regs structures are nested */
+ if (info->regdump_len > regs->len + sizeof(*info) + sizeof(*regs)) {
+ info = (struct ethtool_drvinfo *)(&regs->data[0] + regs->len);
+ regs = (struct ethtool_regs *)(&regs->data[0] + regs->len + sizeof(*info));
+
+ return dump_regs(gregs_dump_raw, gregs_dump_hex, info, regs);
+ }
+
return 0;
}
diff --git a/igb.c b/igb.c
index e0ccef9..cb24877 100644
--- a/igb.c
+++ b/igb.c
@@ -859,6 +859,18 @@ igb_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs)
"0x03430: TDFPC (Tx data FIFO packet count) 0x%08X\n",
regs_buff[550]);
+ /*
+ * Starting from kernel version 5.3 the registers dump buffer grew from
+ * 739 4-byte words to 740 words, and word 740 contains the RR2DCDELAY
+ * register.
+ */
+ if (regs->len < 740)
+ return 0;
+
+ fprintf(stdout,
+ "0x05BF4: RR2DCDELAY (Max. DMA read delay) 0x%08X\n",
+ regs_buff[739]);
+
return 0;
}