diff options
author | Maciej Żenczykowski <maze@google.com> | 2019-10-30 18:10:35 -0700 |
---|---|---|
committer | Maciej Żenczykowski <maze@google.com> | 2019-10-30 18:12:32 -0700 |
commit | e3e8310f4b864f5f0b32c6f9e9156dab746cff9e (patch) | |
tree | 220d969ab4dbf11487533fca0ab50261fa1f5dbc | |
parent | 911810fb6cee4a0e8db173fc71b150cc5b50dbab (diff) | |
parent | 76c46821fc0e171de6908e0421bb2f032a6eb857 (diff) | |
download | ethtool-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-- | .gitignore | 3 | ||||
-rw-r--r-- | NEWS | 4 | ||||
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | ethtool.8.in | 2 | ||||
-rw-r--r-- | ethtool.c | 13 | ||||
-rw-r--r-- | igb.c | 12 |
6 files changed, 32 insertions, 4 deletions
@@ -27,3 +27,6 @@ autom4te.cache .deps test-*.log test-*.trs + +.*.swp +*.patch @@ -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 . @@ -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 *)(®s->data[0] + regs->len); + regs = (struct ethtool_regs *)(®s->data[0] + regs->len + sizeof(*info)); + + return dump_regs(gregs_dump_raw, gregs_dump_hex, info, regs); + } + return 0; } @@ -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; } |