aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaciej Żenczykowski <maze@google.com>2019-10-30 18:10:35 -0700
committerMaciej Żenczykowski <maze@google.com>2019-10-30 18:12:32 -0700
commite3e8310f4b864f5f0b32c6f9e9156dab746cff9e (patch)
tree220d969ab4dbf11487533fca0ab50261fa1f5dbc
parent911810fb6cee4a0e8db173fc71b150cc5b50dbab (diff)
parent76c46821fc0e171de6908e0421bb2f032a6eb857 (diff)
downloadethtool-e3e8310f4b864f5f0b32c6f9e9156dab746cff9e.tar.gz
Merge upstream ethtool 5.3
This merges upstream commit 76c46821fc0e171de6908e0421bb2f032a6eb857 which is ethtool/v5.3^{commit} (or would be if the tag existed, sent an email to John Linville about that oversight) See: https://git.kernel.org/pub/scm/network/ethtool/ethtool.git/commit/?id=76c46821fc0e171de6908e0421bb2f032a6eb857 Release version 5.3. Signed-off-by: John W. Linville <linville@tuxdriver.com> aosp/external/ethtool$ git merge 76c46821fc0e171de6908e0421bb2f032a6eb857 Merge made by the 'recursive' strategy. .gitignore | 3 +++ NEWS | 4 ++++ configure.ac | 2 +- ethtool.8.in | 2 +- ethtool.c | 13 +++++++++++-- igb.c | 12 ++++++++++++ 6 files changed, 32 insertions(+), 4 deletions(-) aosp/external/ethtool$ git diff --stat 76c46821fc0e171de6908e0421bb2f032a6eb857 Android.bp | 46 ++++++++++++++++++++++++++++++++++++++++++++++ OWNERS | 1 + 2 files changed, 47 insertions(+) Test: builds, Android.bp version number fixups in follow up Signed-off-by: Maciej Żenczykowski <maze@google.com> Change-Id: Ib82925376ae821ebebe4660246ae946cc9958873
-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;
}