diff options
author | Maciej Żenczykowski <maze@google.com> | 2019-10-30 23:19:01 -0700 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2019-10-30 23:19:01 -0700 |
commit | bf94105ff05f4f555523e1a322f5424d6a451635 (patch) | |
tree | 220d969ab4dbf11487533fca0ab50261fa1f5dbc | |
parent | 911810fb6cee4a0e8db173fc71b150cc5b50dbab (diff) | |
parent | e3e8310f4b864f5f0b32c6f9e9156dab746cff9e (diff) | |
download | ethtool-bf94105ff05f4f555523e1a322f5424d6a451635.tar.gz |
Merge upstream ethtool 5.3
am: e3e8310f4b
Change-Id: I0a7ce137f7dc6bcea645258c5241894399e94993
-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; } |