Hello community, here is the log from the commit of package ethtool for openSUSE:Factory checked in at 2015-10-17 16:37:04 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ethtool (Old) and /work/SRC/openSUSE:Factory/.ethtool.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ethtool" Changes: -------- --- /work/SRC/openSUSE:Factory/ethtool/ethtool.changes 2015-06-08 08:26:18.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.ethtool.new/ethtool.changes 2015-10-17 16:37:05.000000000 +0200 @@ -1,0 +2,12 @@ +Fri Oct 9 12:10:03 UTC 2015 - mkube...@suse.cz + +- Update to new upstream release 4.2 + * Feature: Support soldered-on modules in module EEPROM dump + (-m option) + * Feature: Add register dump support for VMware vmxnet3 + (-d option) + * Feature: Update register dump support for IBM EMAC (-d option) + (requires Linux 4.3 or a future stable update to 4.1 or 4.2) + * Doc: Fix typo in man page + +------------------------------------------------------------------- Old: ---- ethtool-4.0.tar.sign ethtool-4.0.tar.xz New: ---- ethtool-4.2.tar.sign ethtool-4.2.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ethtool.spec ++++++ --- /var/tmp/diff_new_pack.Pv9XA2/_old 2015-10-17 16:37:06.000000000 +0200 +++ /var/tmp/diff_new_pack.Pv9XA2/_new 2015-10-17 16:37:06.000000000 +0200 @@ -17,7 +17,7 @@ Name: ethtool -Version: 4.0 +Version: 4.2 Release: 0 Summary: Examine and Tune Ethernet-Based Network Interfaces License: GPL-2.0 ++++++ ethtool-4.0.tar.xz -> ethtool-4.2.tar.xz ++++++ ++++ 1784 lines of diff (skipped) ++++ retrying with extended exclude list diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/ethtool-4.0/Makefile.am new/ethtool-4.2/Makefile.am --- old/ethtool-4.0/Makefile.am 2015-04-05 02:52:09.000000000 +0200 +++ new/ethtool-4.2/Makefile.am 2015-10-09 04:19:06.000000000 +0200 @@ -13,7 +13,7 @@ fec_8xx.c ibm_emac.c ixgb.c ixgbe.c natsemi.c \ pcnet32.c realtek.c tg3.c marvell.c vioc.c \ smsc911x.c at76c50x-usb.c sfc.c stmmac.c \ - sfpid.c sfpdiag.c ixgbevf.c tse.c + sfpid.c sfpdiag.c ixgbevf.c tse.c vmxnet3.c endif TESTS = test-cmdline test-features diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/ethtool-4.0/NEWS new/ethtool-4.2/NEWS --- old/ethtool-4.0/NEWS 2015-05-31 23:02:48.000000000 +0200 +++ new/ethtool-4.2/NEWS 2015-10-09 04:36:42.000000000 +0200 @@ -1,4 +1,12 @@ -Version 4.0 - May 31, 2014 +Version 4.2 - October 9, 2015 + + * Feature: Support soldered-on modules in module EEPROM dump (-m option) + * Feature: Add register dump support for VMware vmxnet3 (-d option) + * Feature: Update register dump support for IBM EMAC (-d option) + (requires Linux 4.3 or a future stable update to 4.1 or 4.2) + * Doc: Fix typo in man page + +Version 4.0 - May 31, 2015 * Fix: Formatting of RX flow hash indirection table when size not divisible by 8 (-x option) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/ethtool-4.0/compile new/ethtool-4.2/compile --- old/ethtool-4.0/compile 2014-12-14 19:02:04.000000000 +0100 +++ new/ethtool-4.2/compile 2015-10-09 04:37:49.000000000 +0200 @@ -3,7 +3,7 @@ scriptversion=2012-10-14.11; # UTC -# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# Copyright (C) 1999-2014 Free Software Foundation, Inc. # Written by Tom Tromey <tro...@cygnus.com>. # # This program is free software; you can redistribute it and/or modify diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/ethtool-4.0/configure.ac new/ethtool-4.2/configure.ac --- old/ethtool-4.0/configure.ac 2015-05-31 22:58:12.000000000 +0200 +++ new/ethtool-4.2/configure.ac 2015-10-09 04:36:51.000000000 +0200 @@ -1,5 +1,5 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT(ethtool, 4.0, net...@vger.kernel.org) +AC_INIT(ethtool, 4.2, net...@vger.kernel.org) AC_PREREQ(2.52) AC_CONFIG_SRCDIR([ethtool.c]) AM_INIT_AUTOMAKE([gnu]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/ethtool-4.0/ethtool.8 new/ethtool-4.2/ethtool.8 --- old/ethtool-4.0/ethtool.8 2015-05-31 23:05:36.000000000 +0200 +++ new/ethtool-4.2/ethtool.8 2015-10-09 04:37:53.000000000 +0200 @@ -113,7 +113,7 @@ . hy \\n(HY .. . -.TH ETHTOOL 8 "September 2014" "Ethtool version 4.0" +.TH ETHTOOL 8 "September 2014" "Ethtool version 4.2" .SH NAME ethtool \- query or control network driver and hardware settings . @@ -872,7 +872,7 @@ Determines whether the device should assert its Tx LPI. .TP .BI advertise \ N -Sets the speeds for which the device should advertise EEE capabiliities. +Sets the speeds for which the device should advertise EEE capabilities. Values are as for .B \-\-change advertise .TP diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/ethtool-4.0/ethtool.8.in new/ethtool-4.2/ethtool.8.in --- old/ethtool-4.0/ethtool.8.in 2014-09-22 01:13:52.000000000 +0200 +++ new/ethtool-4.2/ethtool.8.in 2015-10-09 04:24:36.000000000 +0200 @@ -872,7 +872,7 @@ Determines whether the device should assert its Tx LPI. .TP .BI advertise \ N -Sets the speeds for which the device should advertise EEE capabiliities. +Sets the speeds for which the device should advertise EEE capabilities. Values are as for .B \-\-change advertise .TP diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/ethtool-4.0/ethtool.c new/ethtool-4.2/ethtool.c --- old/ethtool-4.0/ethtool.c 2015-04-05 05:04:31.000000000 +0200 +++ new/ethtool-4.2/ethtool.c 2015-10-09 04:19:06.000000000 +0200 @@ -20,6 +20,7 @@ * Copyright 2009, 2010 Solarflare Communications * MDI-X set support by Jesse Brandeburg <jesse.brandeb...@intel.com> * Copyright 2012 Intel Corporation + * vmxnet3 support by Shrikrishna Khare <skh...@vmware.com> * * TODO: * * show settings for all devices @@ -974,6 +975,7 @@ { "st_gmac", st_gmac_dump_regs }, { "et131x", et131x_dump_regs }, { "altera_tse", altera_tse_dump_regs }, + { "vmxnet3", vmxnet3_dump_regs }, #endif }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/ethtool-4.0/ethtool.spec new/ethtool-4.2/ethtool.spec --- old/ethtool-4.0/ethtool.spec 2015-05-31 23:05:41.000000000 +0200 +++ new/ethtool-4.2/ethtool.spec 2015-10-09 04:37:55.000000000 +0200 @@ -1,5 +1,5 @@ Name : ethtool -Version : 4.0 +Version : 4.2 Release : 1 Group : Utilities diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/ethtool-4.0/ibm_emac.c new/ethtool-4.2/ibm_emac.c --- old/ethtool-4.0/ibm_emac.c 2015-05-31 22:35:16.000000000 +0200 +++ new/ethtool-4.2/ibm_emac.c 2015-10-09 04:23:19.000000000 +0200 @@ -22,6 +22,10 @@ #define EMAC_ETHTOOL_REGS_RGMII 0x00000002 #define EMAC_ETHTOOL_REGS_TAH 0x00000004 +#define EMAC_VERSION 3 +#define EMAC4_VERSION 4 +#define EMAC4SYNC_VERSION 5 + struct emac_ethtool_regs_hdr { u32 components; }; @@ -32,35 +36,78 @@ }; struct emac_regs { - u32 mr0; - u32 mr1; - u32 tmr0; - u32 tmr1; - u32 rmr; - u32 isr; - u32 iser; - u32 iahr; - u32 ialr; - u32 vtpid; - u32 vtci; - u32 ptr; - u32 iaht1; - u32 iaht2; - u32 iaht3; - u32 iaht4; - u32 gaht1; - u32 gaht2; - u32 gaht3; - u32 gaht4; + /* Common registers across all EMAC implementations. */ + u32 mr0; /* Special */ + u32 mr1; /* Reset */ + u32 tmr0; /* Special */ + u32 tmr1; /* Special */ + u32 rmr; /* Reset */ + u32 isr; /* Always */ + u32 iser; /* Reset */ + u32 iahr; /* Reset, R, T */ + u32 ialr; /* Reset, R, T */ + u32 vtpid; /* Reset, R, T */ + u32 vtci; /* Reset, R, T */ + u32 ptr; /* Reset, T */ + union { + /* Registers unique to EMAC4 implementations */ + struct { + u32 iaht1; /* Reset, R */ + u32 iaht2; /* Reset, R */ + u32 iaht3; /* Reset, R */ + u32 iaht4; /* Reset, R */ + u32 gaht1; /* Reset, R */ + u32 gaht2; /* Reset, R */ + u32 gaht3; /* Reset, R */ + u32 gaht4; /* Reset, R */ + } emac4; + /* Registers unique to EMAC4SYNC implementations */ + struct { + u32 mahr; /* Reset, R, T */ + u32 malr; /* Reset, R, T */ + u32 mmahr; /* Reset, R, T */ + u32 mmalr; /* Reset, R, T */ + u32 rsvd0[4]; + } emac4sync; + } u0; + /* Common registers across all EMAC implementations. */ u32 lsah; u32 lsal; - u32 ipgvr; - u32 stacr; - u32 trtr; - u32 rwmr; + u32 ipgvr; /* Reset, T */ + u32 stacr; /* Special */ + u32 trtr; /* Special */ + u32 rwmr; /* Reset */ u32 octx; u32 ocrx; - u32 ipcr; + union { + /* Registers unique to EMAC4 implementations */ + struct { + u32 ipcr; + } emac4; + /* Registers unique to EMAC4SYNC implementations */ + struct { + u32 rsvd1; + u32 revid; + u32 rsvd2[2]; + u32 iaht1; /* Reset, R */ + u32 iaht2; /* Reset, R */ + u32 iaht3; /* Reset, R */ + u32 iaht4; /* Reset, R */ + u32 iaht5; /* Reset, R */ + u32 iaht6; /* Reset, R */ + u32 iaht7; /* Reset, R */ + u32 iaht8; /* Reset, R */ + u32 gaht1; /* Reset, R */ + u32 gaht2; /* Reset, R */ + u32 gaht3; /* Reset, R */ + u32 gaht4; /* Reset, R */ + u32 gaht5; /* Reset, R */ + u32 gaht6; /* Reset, R */ + u32 gaht7; /* Reset, R */ + u32 gaht8; /* Reset, R */ + u32 tpc; /* Reset, T */ + } emac4sync; + } u1; }; struct mal_regs { @@ -113,6 +160,16 @@ struct emac_regs *p = (struct emac_regs *)(hdr + 1); void *res = p + 1; + if (!((hdr->version == EMAC_VERSION) || + (hdr->version == EMAC4_VERSION) || + (hdr->version == EMAC4SYNC_VERSION))) + { + printf("This driver version doesn't support information\n" + " output for EMAC area, please update it or use older\n" + " ethtool version\n"); + return res; + } + printf("EMAC%d Registers\n", hdr->index); printf("-----------------\n"); printf("MR0 = 0x%08x MR1 = 0x%08x RMR = 0x%08x\n" @@ -121,8 +178,6 @@ "TRTR = 0x%08x RWMR = 0x%08x\n" "IAR = %04x%08x\n" "LSA = %04x%08x\n" - "IAHT = 0x%04x 0x%04x 0x%04x 0x%04x\n" - "GAHT = 0x%04x 0x%04x 0x%04x 0x%04x\n" "VTPID = 0x%04x VTCI = 0x%04x\n" "IPGVR = 0x%04x STACR = 0x%08x\n" "OCTX = 0x%08x OCRX = 0x%08x\n", @@ -132,15 +187,49 @@ p->trtr, p->rwmr, p->iahr, p->ialr, p->lsah, p->lsal, - p->iaht1, p->iaht2, p->iaht3, p->iaht4, - p->gaht1, p->gaht2, p->gaht3, p->gaht4, - p->vtpid, p->vtci, p->ipgvr, p->stacr, p->octx, p->ocrx); - - if (hdr->version) - printf(" IPCR = 0x%08x\n\n", p->ipcr); - else { - printf("\n\n"); - res -= sizeof(u32); + p->vtpid, p->vtci, + p->ipgvr, p->stacr, p->octx, p->ocrx); + + if (hdr->version == EMAC4SYNC_VERSION) { + printf("MAHR = 0x%08x MALR = 0x%08x MMAHR = 0x%08x\n" + "MMALR = 0x%08x REVID = 0x%08x\n", + p->u0.emac4sync.mahr, p->u0.emac4sync.malr, + p->u0.emac4sync.mmahr, p->u0.emac4sync.mmalr, + p->u1.emac4sync.revid); + + printf("IAHT = 0x%04x 0x%04x 0x%04x 0x%04x\n", + p->u1.emac4sync.iaht1, p->u1.emac4sync.iaht2, + p->u1.emac4sync.iaht3, p->u1.emac4sync.iaht4); + printf(" 0x%04x 0x%04x 0x%04x 0x%04x\n", + p->u1.emac4sync.iaht5, p->u1.emac4sync.iaht6, + p->u1.emac4sync.iaht7, p->u1.emac4sync.iaht8); + + + printf("GAHT = 0x%04x 0x%04x 0x%04x 0x%04x\n", + p->u1.emac4sync.gaht1, p->u1.emac4sync.gaht2, + p->u1.emac4sync.gaht3, p->u1.emac4sync.gaht4); + printf(" 0x%04x 0x%04x 0x%04x 0x%04x\n\n", + p->u1.emac4sync.gaht5, p->u1.emac4sync.gaht6, + p->u1.emac4sync.gaht7, p->u1.emac4sync.gaht8); + + } else if (hdr->version == EMAC4_VERSION) { + printf("IAHT = 0x%04x 0x%04x 0x%04x 0x%04x\n", + p->u0.emac4.iaht1, p->u0.emac4.iaht2, + p->u0.emac4.iaht3, p->u0.emac4.iaht4); + + printf("GAHT = 0x%04x 0x%04x 0x%04x 0x%04x\n", + p->u0.emac4.gaht1, p->u0.emac4.gaht2, + p->u0.emac4.gaht3, p->u0.emac4.gaht4); + + printf(" IPCR = 0x%08x\n\n", p->u1.emac4.ipcr); + } else if (hdr->version == EMAC_VERSION) { + printf("IAHT = 0x%04x 0x%04x 0x%04x 0x%04x\n", + p->u0.emac4.iaht1, p->u0.emac4.iaht2, + p->u0.emac4.iaht3, p->u0.emac4.iaht4); + + printf("GAHT = 0x%04x 0x%04x 0x%04x 0x%04x\n", + p->u0.emac4.gaht1, p->u0.emac4.gaht2, + p->u0.emac4.gaht3, p->u0.emac4.gaht4); } return res; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/ethtool-4.0/internal.h new/ethtool-4.2/internal.h --- old/ethtool-4.0/internal.h 2015-04-05 02:52:09.000000000 +0200 +++ new/ethtool-4.2/internal.h 2015-10-09 04:19:06.000000000 +0200 @@ -248,6 +248,9 @@ int altera_tse_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs); +/* VMware vmxnet3 ethernet controller */ +int vmxnet3_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs); + /* Rx flow classification */ int rxclass_parse_ruleopts(struct cmd_context *ctx, struct ethtool_rx_flow_spec *fsp); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/ethtool-4.0/missing new/ethtool-4.2/missing --- old/ethtool-4.0/missing 2014-12-14 19:02:04.000000000 +0100 +++ new/ethtool-4.2/missing 2015-10-09 04:37:49.000000000 +0200 @@ -3,7 +3,7 @@ scriptversion=2013-10-28.13; # UTC -# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# Copyright (C) 1996-2014 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard <pin...@iro.umontreal.ca>, 1996. # This program is free software; you can redistribute it and/or modify diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/ethtool-4.0/sfpid.c new/ethtool-4.2/sfpid.c --- old/ethtool-4.0/sfpid.c 2015-05-31 22:08:57.000000000 +0200 +++ new/ethtool-4.2/sfpid.c 2015-09-05 12:47:54.000000000 +0200 @@ -401,7 +401,7 @@ void sff8079_show_all(const __u8 *id) { sff8079_show_identifier(id); - if ((id[0] == 0x03) && (id[1] == 0x04)) { + if (((id[0] == 0x02) || (id[0] == 0x03)) && (id[1] == 0x04)) { sff8079_show_ext_identifier(id); sff8079_show_connector(id); sff8079_show_transceiver(id); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/ethtool-4.0/test-driver new/ethtool-4.2/test-driver --- old/ethtool-4.0/test-driver 2014-12-14 19:02:04.000000000 +0100 +++ new/ethtool-4.2/test-driver 2015-10-09 04:37:49.000000000 +0200 @@ -3,7 +3,7 @@ scriptversion=2013-07-13.22; # UTC -# Copyright (C) 2011-2013 Free Software Foundation, Inc. +# Copyright (C) 2011-2014 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -106,11 +106,14 @@ # Test script is run here. "$@" >$log_file 2>&1 estatus=$? + if test $enable_hard_errors = no && test $estatus -eq 99; then - estatus=1 + tweaked_estatus=1 +else + tweaked_estatus=$estatus fi -case $estatus:$expect_failure in +case $tweaked_estatus:$expect_failure in 0:yes) col=$red res=XPASS recheck=yes gcopy=yes;; 0:*) col=$grn res=PASS recheck=no gcopy=no;; 77:*) col=$blu res=SKIP recheck=no gcopy=yes;; @@ -119,6 +122,12 @@ *:*) col=$red res=FAIL recheck=yes gcopy=yes;; esac +# Report the test outcome and exit status in the logs, so that one can +# know whether the test passed or failed simply by looking at the '.log' +# file, without the need of also peaking into the corresponding '.trs' +# file (automake bug#11814). +echo "$res $test_name (exit status: $estatus)" >>$log_file + # Report outcome to console. echo "${col}${res}${std}: $test_name" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/ethtool-4.0/vmxnet3.c new/ethtool-4.2/vmxnet3.c --- old/ethtool-4.0/vmxnet3.c 1970-01-01 01:00:00.000000000 +0100 +++ new/ethtool-4.2/vmxnet3.c 2015-10-09 04:19:06.000000000 +0200 @@ -0,0 +1,198 @@ +/* Copyright (c) 2015 VMware Inc.*/ +#include <stdio.h> +#include "internal.h" + +int +vmxnet3_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs) +{ + u32 *regs_buff = (u32 *)regs->data; + u32 version = regs->version; + int i = 0, j = 0, cnt; + + if (version != 2) + return -1; + + fprintf(stdout, "Control Registers\n"); + fprintf(stdout, "=================\n"); + + fprintf(stdout, + " VRRS (Vmxnet3 Revision Report and Selection) 0x%x\n", + regs_buff[j++]); + fprintf(stdout, + " UVRS (UPT Version Report and Selection) 0x%x\n", + regs_buff[j++]); + fprintf(stdout, + " DSA (Driver Shared Address) 0x%08x%08x\n", + regs_buff[j+1], regs_buff[j]); + j += 2; + fprintf(stdout, + " CMD (Command Register) 0x%x\n", + regs_buff[j++]); + fprintf(stdout, + " MAC (Media Access Control address) %02x:%02x:%02x:%02x:%02x:%02x\n", + regs_buff[j] & 0xff, + (regs_buff[j] >> 8) & 0xff, + (regs_buff[j] >> 16) & 0xff, + (regs_buff[j] >> 24) & 0xff, + regs_buff[j + 1] & 0xff, + (regs_buff[j + 1] >> 8) & 0xff); + j += 2; + fprintf(stdout, + " ICR (Interrupt Cause Register) 0x%x\n", + regs_buff[j++]); + fprintf(stdout, + " ECR (Event Cause Register) 0x%x\n", + regs_buff[j++]); + + fprintf(stdout, "Datapath Registers\n"); + fprintf(stdout, "==================\n"); + + /* Interrupt Mask Registers */ + cnt = regs_buff[j++]; + for (i = 0; i < cnt; i++) { + fprintf(stdout, + " IMR (Interrupt Mask Register) %d 0x%x\n", + i, regs_buff[j++]); + } + + /* Transmit Queue Registers */ + cnt = regs_buff[j++]; + for (i = 0; i < cnt; i++) { + fprintf(stdout, " Transmit Queue %d\n", i); + fprintf(stdout, " ----------------\n"); + fprintf(stdout, + " TXPROD (Transmit Ring Producer Register) 0x%x\n", + regs_buff[j++]); + fprintf(stdout, + " Transmit Ring\n"); + fprintf(stdout, + " Base Address 0x%08x%08x\n", + regs_buff[j+1], regs_buff[j]); + j += 2; + fprintf(stdout, + " Size %u\n", + regs_buff[j++]); + fprintf(stdout, + " next2fill %u\n", + regs_buff[j++]); + fprintf(stdout, + " next2comp %u\n", + regs_buff[j++]); + fprintf(stdout, + " gen %u\n", + regs_buff[j++]); + + fprintf(stdout, + " Transmit Data Ring\n"); + fprintf(stdout, + " Base Address 0x%08x%08x\n", + regs_buff[j+1], regs_buff[j]); + j += 2; + fprintf(stdout, + " Size %u\n", + regs_buff[j++]); + fprintf(stdout, + " Buffer Size %u\n", + regs_buff[j++]); + + fprintf(stdout, + " Transmit Completion Ring\n"); + fprintf(stdout, + " Base Address 0x%08x%08x\n", + regs_buff[j+1], regs_buff[j]); + j += 2; + fprintf(stdout, + " size %u\n", + regs_buff[j++]); + fprintf(stdout, + " next2proc %u\n", + regs_buff[j++]); + fprintf(stdout, + " gen %u\n", + regs_buff[j++]); + fprintf(stdout, + " stopped %u\n", + regs_buff[j++]); + } + + /* Receive Queue Registers */ + cnt = regs_buff[j++]; + for (i = 0; i < cnt; i++) { + fprintf(stdout, " Receive Queue %d\n", i); + fprintf(stdout, " ----------------\n"); + fprintf(stdout, + " RXPROD1 (Receive Ring Producer Register) 1 0x%x\n", + regs_buff[j++]); + fprintf(stdout, + " RXPROD2 (Receive Ring Producer Register) 2 0x%x\n", + regs_buff[j++]); + fprintf(stdout, + " Receive Ring 0\n"); + fprintf(stdout, + " Base Address 0x%08x%08x\n", + regs_buff[j+1], regs_buff[j]); + j += 2; + fprintf(stdout, + " Size %u\n", + regs_buff[j++]); + fprintf(stdout, + " next2fill %u\n", + regs_buff[j++]); + fprintf(stdout, + " next2comp %u\n", + regs_buff[j++]); + fprintf(stdout, + " gen %u\n", + regs_buff[j++]); + + fprintf(stdout, + " Receive Ring 1\n"); + fprintf(stdout, + " Base Address 0x%08x%08x\n", + regs_buff[j+1], regs_buff[j]); + j += 2; + fprintf(stdout, + " Size %u\n", + regs_buff[j++]); + fprintf(stdout, + " next2fill %u\n", + regs_buff[j++]); + fprintf(stdout, + " next2comp %u\n", + regs_buff[j++]); + fprintf(stdout, + " gen %u\n", + regs_buff[j++]); + + fprintf(stdout, + " Receive Data Ring\n"); + fprintf(stdout, + " Base Address 0x%08x%08x\n", + regs_buff[j+1], regs_buff[j]); + j += 2; + fprintf(stdout, + " Size %u\n", + regs_buff[j++]); + fprintf(stdout, + " Buffer Size %u\n", + regs_buff[j++]); + + fprintf(stdout, + " Receive Completion Ring\n"); + fprintf(stdout, + " Base Address 0x%08x%08x\n", + regs_buff[j+1], regs_buff[j]); + j += 2; + fprintf(stdout, + " size %u\n", + regs_buff[j++]); + fprintf(stdout, + " next2proc %u\n", + regs_buff[j++]); + fprintf(stdout, + " gen %u\n", + regs_buff[j++]); + } + + return 0; +}