Hello community,

here is the log from the commit of package ethtool for openSUSE:Factory checked 
in at 2016-03-26 15:08:46
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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-10-17 
16:37:05.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.ethtool.new/ethtool.changes     2016-03-26 
15:08:50.000000000 +0100
@@ -1,0 +2,13 @@
+Tue Mar 15 09:41:28 UTC 2016 - [email protected]
+
+- Update to new upstream release 4.5
+  * Fix: Heap corruption when dumping registers from a file
+    (-d option)
+  * Fix: Stricter input validation for EEPROM setting (-E option)
+  * Feature: Add PHY statistics support (--phy-statistics option)
+  * Feature: Support setting default Rx flow indirection table
+    (-X option)
+  * Doc: Properly indent sub-options in man page
+  * address build issues (mostly compiler warnings)
+
+-------------------------------------------------------------------

Old:
----
  ethtool-4.2.tar.sign
  ethtool-4.2.tar.xz

New:
----
  ethtool-4.5.tar.sign
  ethtool-4.5.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ethtool.spec ++++++
--- /var/tmp/diff_new_pack.TAquea/_old  2016-03-26 15:08:51.000000000 +0100
+++ /var/tmp/diff_new_pack.TAquea/_new  2016-03-26 15:08:51.000000000 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package ethtool
 #
-# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
 
 
 Name:           ethtool
-Version:        4.2
+Version:        4.5
 Release:        0
 Summary:        Examine and Tune Ethernet-Based Network Interfaces
 License:        GPL-2.0
@@ -25,8 +25,8 @@
 Url:            http://kernel.org/pub/software/network/ethtool/
 
 #Git-Clone:    git://git.kernel.org/pub/scm/network/ethtool/ethtool
-Source:         
http://kernel.org/pub/software/network/ethtool/%name-%version.tar.xz
-Source2:        
http://kernel.org/pub/software/network/ethtool/%name-%version.tar.sign
+Source:         
http://kernel.org/pub/software/network/ethtool/%{name}-%{version}.tar.xz
+Source2:        
http://kernel.org/pub/software/network/ethtool/%{name}-%{version}.tar.sign
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 BuildRequires:  xz
 
@@ -47,8 +47,8 @@
 
 %files
 %defattr(-,root,root)
-%_sbindir/ethtool
-%_mandir/man8/ethtool.8*
+%{_sbindir}/ethtool
+%{_mandir}/man8/ethtool.8*
 %doc AUTHORS COPYING NEWS
 
 %changelog

++++++ ethtool-4.2.tar.xz -> ethtool-4.5.tar.xz ++++++
++++ 1684 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.2/NEWS new/ethtool-4.5/NEWS
--- old/ethtool-4.2/NEWS        2015-10-09 04:36:42.000000000 +0200
+++ new/ethtool-4.5/NEWS        2016-03-14 02:48:13.000000000 +0100
@@ -1,3 +1,19 @@
+Version 4.5 - March 14, 2016
+
+       * Tests: Fix missing function declarations when building tests
+       * Tests: Fix return type of test_free() prorotype
+       * Feature: Add PHY statistics support (--phy-statistics option)
+       * Doc: Properly indent sub-options in man page
+       * Feature: Support setting default Rx flow indirection table
+         (-X option)
+       * Fix: Use 'sane' kernel type definitions on 64-bit architectures
+       * Fix: Don't ignore fread() return value (-d option)
+       * Fix: Heap corruption when dumping registers from a file (-d option)
+       * Fix: Stricter input validation for EEPROM setting (-E option)
+       * Fix: Fix strict-aliasing compiler warnings in marvell.c
+       * Tests: Fix use of uninitialised variable in test_realloc()
+       * Tests: Fix compiler warning in test-features.c
+
 Version 4.2 - October 9, 2015
 
        * Feature: Support soldered-on modules in module EEPROM dump (-m 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.2/configure.ac new/ethtool-4.5/configure.ac
--- old/ethtool-4.2/configure.ac        2015-10-09 04:36:51.000000000 +0200
+++ new/ethtool-4.5/configure.ac        2016-03-14 02:40:32.000000000 +0100
@@ -1,5 +1,5 @@
 dnl Process this file with autoconf to produce a configure script.
-AC_INIT(ethtool, 4.2, [email protected])
+AC_INIT(ethtool, 4.5, [email protected])
 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.2/ethtool-copy.h new/ethtool-4.5/ethtool-copy.h
--- old/ethtool-4.2/ethtool-copy.h      2015-09-05 11:45:33.000000000 +0200
+++ new/ethtool-4.5/ethtool-copy.h      2016-03-13 16:41:20.000000000 +0100
@@ -13,15 +13,19 @@
 #ifndef _LINUX_ETHTOOL_H
 #define _LINUX_ETHTOOL_H
 
+#include <linux/kernel.h>
 #include <linux/types.h>
 #include <linux/if_ether.h>
 
+#include <limits.h> /* for INT_MAX */
+
 /* All structures exposed to userland should be defined such that they
  * have the same layout for 32-bit and 64-bit userland.
  */
 
 /**
- * struct ethtool_cmd - link control and status
+ * struct ethtool_cmd - DEPRECATED, link control and status
+ * This structure is DEPRECATED, please use struct ethtool_link_settings.
  * @cmd: Command number = %ETHTOOL_GSET or %ETHTOOL_SSET
  * @supported: Bitmask of %SUPPORTED_* flags for the link modes,
  *     physical connectors and other link features for which the
@@ -31,7 +35,7 @@
  *     physical connectors and other link features that are
  *     advertised through autonegotiation or enabled for
  *     auto-detection.
- * @speed: Low bits of the speed
+ * @speed: Low bits of the speed, 1Mb units, 0 to INT_MAX or SPEED_UNKNOWN
  * @duplex: Duplex mode; one of %DUPLEX_*
  * @port: Physical connector type; one of %PORT_*
  * @phy_address: MDIO address of PHY (transceiver); 0 or 255 if not
@@ -47,7 +51,7 @@
  *     obsoleted by &struct ethtool_coalesce.  Read-only; deprecated.
  * @maxrxpkt: Historically used to report RX IRQ coalescing; now
  *     obsoleted by &struct ethtool_coalesce.  Read-only; deprecated.
- * @speed_hi: High bits of the speed
+ * @speed_hi: High bits of the speed, 1Mb units, 0 to INT_MAX or SPEED_UNKNOWN
  * @eth_tp_mdix: Ethernet twisted-pair MDI(-X) status; one of
  *     %ETH_TP_MDI_*.  If the status is unknown or not applicable, the
  *     value will be %ETH_TP_MDI_INVALID.  Read-only.
@@ -215,6 +219,11 @@
        ETHTOOL_ID_UNSPEC,
        ETHTOOL_RX_COPYBREAK,
        ETHTOOL_TX_COPYBREAK,
+       /*
+        * Add your fresh new tubale attribute above and remember to update
+        * tunable_strings[] in net/core/ethtool.c
+        */
+       __ETHTOOL_TUNABLE_COUNT,
 };
 
 enum tunable_type_id {
@@ -537,6 +546,7 @@
  *     now deprecated
  * @ETH_SS_FEATURES: Device feature names
  * @ETH_SS_RSS_HASH_FUNCS: RSS hush function names
+ * @ETH_SS_PHY_STATS: Statistic names, for use with %ETHTOOL_GPHYSTATS
  */
 enum ethtool_stringset {
        ETH_SS_TEST             = 0,
@@ -545,6 +555,8 @@
        ETH_SS_NTUPLE_FILTERS,
        ETH_SS_FEATURES,
        ETH_SS_RSS_HASH_FUNCS,
+       ETH_SS_TUNABLES,
+       ETH_SS_PHY_STATS,
 };
 
 /**
@@ -740,6 +752,56 @@
        __u8    proto;
 };
 
+/**
+ * struct ethtool_tcpip6_spec - flow specification for TCP/IPv6 etc.
+ * @ip6src: Source host
+ * @ip6dst: Destination host
+ * @psrc: Source port
+ * @pdst: Destination port
+ * @tclass: Traffic Class
+ *
+ * This can be used to specify a TCP/IPv6, UDP/IPv6 or SCTP/IPv6 flow.
+ */
+struct ethtool_tcpip6_spec {
+       __be32  ip6src[4];
+       __be32  ip6dst[4];
+       __be16  psrc;
+       __be16  pdst;
+       __u8    tclass;
+};
+
+/**
+ * struct ethtool_ah_espip6_spec - flow specification for IPsec/IPv6
+ * @ip6src: Source host
+ * @ip6dst: Destination host
+ * @spi: Security parameters index
+ * @tclass: Traffic Class
+ *
+ * This can be used to specify an IPsec transport or tunnel over IPv6.
+ */
+struct ethtool_ah_espip6_spec {
+       __be32  ip6src[4];
+       __be32  ip6dst[4];
+       __be32  spi;
+       __u8    tclass;
+};
+
+/**
+ * struct ethtool_usrip6_spec - general flow specification for IPv6
+ * @ip6src: Source host
+ * @ip6dst: Destination host
+ * @l4_4_bytes: First 4 bytes of transport (layer 4) header
+ * @tclass: Traffic Class
+ * @l4_proto: Transport protocol number (nexthdr after any Extension Headers)
+ */
+struct ethtool_usrip6_spec {
+       __be32  ip6src[4];
+       __be32  ip6dst[4];
+       __be32  l4_4_bytes;
+       __u8    tclass;
+       __u8    l4_proto;
+};
+
 union ethtool_flow_union {
        struct ethtool_tcpip4_spec              tcp_ip4_spec;
        struct ethtool_tcpip4_spec              udp_ip4_spec;
@@ -747,6 +809,12 @@
        struct ethtool_ah_espip4_spec           ah_ip4_spec;
        struct ethtool_ah_espip4_spec           esp_ip4_spec;
        struct ethtool_usrip4_spec              usr_ip4_spec;
+       struct ethtool_tcpip6_spec              tcp_ip6_spec;
+       struct ethtool_tcpip6_spec              udp_ip6_spec;
+       struct ethtool_tcpip6_spec              sctp_ip6_spec;
+       struct ethtool_ah_espip6_spec           ah_ip6_spec;
+       struct ethtool_ah_espip6_spec           esp_ip6_spec;
+       struct ethtool_usrip6_spec              usr_ip6_spec;
        struct ethhdr                           ether_spec;
        __u8                                    hdata[52];
 };
@@ -796,6 +864,31 @@
        __u32           location;
 };
 
+/* How rings are layed out when accessing virtual functions or
+ * offloaded queues is device specific. To allow users to do flow
+ * steering and specify these queues the ring cookie is partitioned
+ * into a 32bit queue index with an 8 bit virtual function id.
+ * This also leaves the 3bytes for further specifiers. It is possible
+ * future devices may support more than 256 virtual functions if
+ * devices start supporting PCIe w/ARI. However at the moment I
+ * do not know of any devices that support this so I do not reserve
+ * space for this at this time. If a future patch consumes the next
+ * byte it should be aware of this possiblity.
+ */
+#define ETHTOOL_RX_FLOW_SPEC_RING      0x00000000FFFFFFFFLL
+#define ETHTOOL_RX_FLOW_SPEC_RING_VF   0x000000FF00000000LL
+#define ETHTOOL_RX_FLOW_SPEC_RING_VF_OFF 32
+static __inline__ __u64 ethtool_get_flow_spec_ring(__u64 ring_cookie)
+{
+       return ETHTOOL_RX_FLOW_SPEC_RING & ring_cookie;
+};
+
+static __inline__ __u64 ethtool_get_flow_spec_ring_vf(__u64 ring_cookie)
+{
+       return (ETHTOOL_RX_FLOW_SPEC_RING_VF & ring_cookie) >>
+                               ETHTOOL_RX_FLOW_SPEC_RING_VF_OFF;
+};
+
 /**
  * struct ethtool_rxnfc - command to get or set RX flow classification rules
  * @cmd: Specific command number - %ETHTOOL_GRXFH, %ETHTOOL_SRXFH,
@@ -1062,6 +1155,11 @@
  * the 'hwtstamp_tx_types' and 'hwtstamp_rx_filters' enumeration values,
  * respectively.  For example, if the device supports HWTSTAMP_TX_ON,
  * then (1 << HWTSTAMP_TX_ON) in 'tx_types' will be set.
+ *
+ * Drivers should only report the filters they actually support without
+ * upscaling in the SIOCSHWTSTAMP ioctl. If the SIOCSHWSTAMP request for
+ * HWTSTAMP_FILTER_V1_SYNC is supported by HWTSTAMP_FILTER_V1_EVENT, then the
+ * driver should only report HWTSTAMP_FILTER_V1_EVENT in this op.
  */
 struct ethtool_ts_info {
        __u32   cmd;
@@ -1108,10 +1206,29 @@
 #define ETHTOOL_F_WISH          (1 << ETHTOOL_F_WISH__BIT)
 #define ETHTOOL_F_COMPAT        (1 << ETHTOOL_F_COMPAT__BIT)
 
+#define MAX_NUM_QUEUE          4096
+
+/**
+ * struct ethtool_per_queue_op - apply sub command to the queues in mask.
+ * @cmd: ETHTOOL_PERQUEUE
+ * @sub_command: the sub command which apply to each queues
+ * @queue_mask: Bitmap of the queues which sub command apply to
+ * @data: A complete command structure following for each of the queues 
addressed
+ */
+struct ethtool_per_queue_op {
+       __u32   cmd;
+       __u32   sub_command;
+       __u32   queue_mask[__KERNEL_DIV_ROUND_UP(MAX_NUM_QUEUE, 32)];
+       char    data[];
+};
 
 /* CMDs currently supported */
-#define ETHTOOL_GSET           0x00000001 /* Get settings. */
-#define ETHTOOL_SSET           0x00000002 /* Set settings. */
+#define ETHTOOL_GSET           0x00000001 /* DEPRECATED, Get settings.
+                                           * Please use ETHTOOL_GLINKSETTINGS
+                                           */
+#define ETHTOOL_SSET           0x00000002 /* DEPRECATED, Set settings.
+                                           * Please use ETHTOOL_SLINKSETTINGS
+                                           */
 #define ETHTOOL_GDRVINFO       0x00000003 /* Get driver info. */
 #define ETHTOOL_GREGS          0x00000004 /* Get NIC registers. */
 #define ETHTOOL_GWOL           0x00000005 /* Get wake-on-lan options. */
@@ -1189,74 +1306,143 @@
 #define ETHTOOL_SRSSH          0x00000047 /* Set RX flow hash configuration */
 #define ETHTOOL_GTUNABLE       0x00000048 /* Get tunable configuration */
 #define ETHTOOL_STUNABLE       0x00000049 /* Set tunable configuration */
+#define ETHTOOL_GPHYSTATS      0x0000004a /* get PHY-specific statistics */
+
+#define ETHTOOL_PERQUEUE       0x0000004b /* Set per queue options */
+
+#define ETHTOOL_GLINKSETTINGS  0x0000004c /* Get ethtool_link_settings */
+#define ETHTOOL_SLINKSETTINGS  0x0000004d /* Set ethtool_link_settings */
+
 
 /* compatibility with older code */
 #define SPARC_ETH_GSET         ETHTOOL_GSET
 #define SPARC_ETH_SSET         ETHTOOL_SSET
 
-#define SUPPORTED_10baseT_Half         (1 << 0)
-#define SUPPORTED_10baseT_Full         (1 << 1)
-#define SUPPORTED_100baseT_Half                (1 << 2)
-#define SUPPORTED_100baseT_Full                (1 << 3)
-#define SUPPORTED_1000baseT_Half       (1 << 4)
-#define SUPPORTED_1000baseT_Full       (1 << 5)
-#define SUPPORTED_Autoneg              (1 << 6)
-#define SUPPORTED_TP                   (1 << 7)
-#define SUPPORTED_AUI                  (1 << 8)
-#define SUPPORTED_MII                  (1 << 9)
-#define SUPPORTED_FIBRE                        (1 << 10)
-#define SUPPORTED_BNC                  (1 << 11)
-#define SUPPORTED_10000baseT_Full      (1 << 12)
-#define SUPPORTED_Pause                        (1 << 13)
-#define SUPPORTED_Asym_Pause           (1 << 14)
-#define SUPPORTED_2500baseX_Full       (1 << 15)
-#define SUPPORTED_Backplane            (1 << 16)
-#define SUPPORTED_1000baseKX_Full      (1 << 17)
-#define SUPPORTED_10000baseKX4_Full    (1 << 18)
-#define SUPPORTED_10000baseKR_Full     (1 << 19)
-#define SUPPORTED_10000baseR_FEC       (1 << 20)
-#define SUPPORTED_20000baseMLD2_Full   (1 << 21)
-#define SUPPORTED_20000baseKR2_Full    (1 << 22)
-#define SUPPORTED_40000baseKR4_Full    (1 << 23)
-#define SUPPORTED_40000baseCR4_Full    (1 << 24)
-#define SUPPORTED_40000baseSR4_Full    (1 << 25)
-#define SUPPORTED_40000baseLR4_Full    (1 << 26)
-#define SUPPORTED_56000baseKR4_Full    (1 << 27)
-#define SUPPORTED_56000baseCR4_Full    (1 << 28)
-#define SUPPORTED_56000baseSR4_Full    (1 << 29)
-#define SUPPORTED_56000baseLR4_Full    (1 << 30)
-
-#define ADVERTISED_10baseT_Half                (1 << 0)
-#define ADVERTISED_10baseT_Full                (1 << 1)
-#define ADVERTISED_100baseT_Half       (1 << 2)
-#define ADVERTISED_100baseT_Full       (1 << 3)
-#define ADVERTISED_1000baseT_Half      (1 << 4)
-#define ADVERTISED_1000baseT_Full      (1 << 5)
-#define ADVERTISED_Autoneg             (1 << 6)
-#define ADVERTISED_TP                  (1 << 7)
-#define ADVERTISED_AUI                 (1 << 8)
-#define ADVERTISED_MII                 (1 << 9)
-#define ADVERTISED_FIBRE               (1 << 10)
-#define ADVERTISED_BNC                 (1 << 11)
-#define ADVERTISED_10000baseT_Full     (1 << 12)
-#define ADVERTISED_Pause               (1 << 13)
-#define ADVERTISED_Asym_Pause          (1 << 14)
-#define ADVERTISED_2500baseX_Full      (1 << 15)
-#define ADVERTISED_Backplane           (1 << 16)
-#define ADVERTISED_1000baseKX_Full     (1 << 17)
-#define ADVERTISED_10000baseKX4_Full   (1 << 18)
-#define ADVERTISED_10000baseKR_Full    (1 << 19)
-#define ADVERTISED_10000baseR_FEC      (1 << 20)
-#define ADVERTISED_20000baseMLD2_Full  (1 << 21)
-#define ADVERTISED_20000baseKR2_Full   (1 << 22)
-#define ADVERTISED_40000baseKR4_Full   (1 << 23)
-#define ADVERTISED_40000baseCR4_Full   (1 << 24)
-#define ADVERTISED_40000baseSR4_Full   (1 << 25)
-#define ADVERTISED_40000baseLR4_Full   (1 << 26)
-#define ADVERTISED_56000baseKR4_Full   (1 << 27)
-#define ADVERTISED_56000baseCR4_Full   (1 << 28)
-#define ADVERTISED_56000baseSR4_Full   (1 << 29)
-#define ADVERTISED_56000baseLR4_Full   (1 << 30)
+/* Link mode bit indices */
+enum ethtool_link_mode_bit_indices {
+       ETHTOOL_LINK_MODE_10baseT_Half_BIT      = 0,
+       ETHTOOL_LINK_MODE_10baseT_Full_BIT      = 1,
+       ETHTOOL_LINK_MODE_100baseT_Half_BIT     = 2,
+       ETHTOOL_LINK_MODE_100baseT_Full_BIT     = 3,
+       ETHTOOL_LINK_MODE_1000baseT_Half_BIT    = 4,
+       ETHTOOL_LINK_MODE_1000baseT_Full_BIT    = 5,
+       ETHTOOL_LINK_MODE_Autoneg_BIT           = 6,
+       ETHTOOL_LINK_MODE_TP_BIT                = 7,
+       ETHTOOL_LINK_MODE_AUI_BIT               = 8,
+       ETHTOOL_LINK_MODE_MII_BIT               = 9,
+       ETHTOOL_LINK_MODE_FIBRE_BIT             = 10,
+       ETHTOOL_LINK_MODE_BNC_BIT               = 11,
+       ETHTOOL_LINK_MODE_10000baseT_Full_BIT   = 12,
+       ETHTOOL_LINK_MODE_Pause_BIT             = 13,
+       ETHTOOL_LINK_MODE_Asym_Pause_BIT        = 14,
+       ETHTOOL_LINK_MODE_2500baseX_Full_BIT    = 15,
+       ETHTOOL_LINK_MODE_Backplane_BIT         = 16,
+       ETHTOOL_LINK_MODE_1000baseKX_Full_BIT   = 17,
+       ETHTOOL_LINK_MODE_10000baseKX4_Full_BIT = 18,
+       ETHTOOL_LINK_MODE_10000baseKR_Full_BIT  = 19,
+       ETHTOOL_LINK_MODE_10000baseR_FEC_BIT    = 20,
+       ETHTOOL_LINK_MODE_20000baseMLD2_Full_BIT = 21,
+       ETHTOOL_LINK_MODE_20000baseKR2_Full_BIT = 22,
+       ETHTOOL_LINK_MODE_40000baseKR4_Full_BIT = 23,
+       ETHTOOL_LINK_MODE_40000baseCR4_Full_BIT = 24,
+       ETHTOOL_LINK_MODE_40000baseSR4_Full_BIT = 25,
+       ETHTOOL_LINK_MODE_40000baseLR4_Full_BIT = 26,
+       ETHTOOL_LINK_MODE_56000baseKR4_Full_BIT = 27,
+       ETHTOOL_LINK_MODE_56000baseCR4_Full_BIT = 28,
+       ETHTOOL_LINK_MODE_56000baseSR4_Full_BIT = 29,
+       ETHTOOL_LINK_MODE_56000baseLR4_Full_BIT = 30,
+
+       /* Last allowed bit for __ETHTOOL_LINK_MODE_LEGACY_MASK is bit
+        * 31. Please do NOT define any SUPPORTED_* or ADVERTISED_*
+        * macro for bits > 31. The only way to use indices > 31 is to
+        * use the new ETHTOOL_GLINKSETTINGS/ETHTOOL_SLINKSETTINGS API.
+        */
+
+       __ETHTOOL_LINK_MODE_LAST
+         = ETHTOOL_LINK_MODE_56000baseLR4_Full_BIT,
+};
+
+#define __ETHTOOL_LINK_MODE_LEGACY_MASK(base_name)     \
+       (1UL << (ETHTOOL_LINK_MODE_ ## base_name ## _BIT))
+
+/* DEPRECATED macros. Please migrate to
+ * ETHTOOL_GLINKSETTINGS/ETHTOOL_SLINKSETTINGS API. Please do NOT
+ * define any new SUPPORTED_* macro for bits > 31.
+ */
+#define SUPPORTED_10baseT_Half         
__ETHTOOL_LINK_MODE_LEGACY_MASK(10baseT_Half)
+#define SUPPORTED_10baseT_Full         
__ETHTOOL_LINK_MODE_LEGACY_MASK(10baseT_Full)
+#define SUPPORTED_100baseT_Half                
__ETHTOOL_LINK_MODE_LEGACY_MASK(100baseT_Half)
+#define SUPPORTED_100baseT_Full                
__ETHTOOL_LINK_MODE_LEGACY_MASK(100baseT_Full)
+#define SUPPORTED_1000baseT_Half       
__ETHTOOL_LINK_MODE_LEGACY_MASK(1000baseT_Half)
+#define SUPPORTED_1000baseT_Full       
__ETHTOOL_LINK_MODE_LEGACY_MASK(1000baseT_Full)
+#define SUPPORTED_Autoneg              __ETHTOOL_LINK_MODE_LEGACY_MASK(Autoneg)
+#define SUPPORTED_TP                   __ETHTOOL_LINK_MODE_LEGACY_MASK(TP)
+#define SUPPORTED_AUI                  __ETHTOOL_LINK_MODE_LEGACY_MASK(AUI)
+#define SUPPORTED_MII                  __ETHTOOL_LINK_MODE_LEGACY_MASK(MII)
+#define SUPPORTED_FIBRE                        
__ETHTOOL_LINK_MODE_LEGACY_MASK(FIBRE)
+#define SUPPORTED_BNC                  __ETHTOOL_LINK_MODE_LEGACY_MASK(BNC)
+#define SUPPORTED_10000baseT_Full      
__ETHTOOL_LINK_MODE_LEGACY_MASK(10000baseT_Full)
+#define SUPPORTED_Pause                        
__ETHTOOL_LINK_MODE_LEGACY_MASK(Pause)
+#define SUPPORTED_Asym_Pause           
__ETHTOOL_LINK_MODE_LEGACY_MASK(Asym_Pause)
+#define SUPPORTED_2500baseX_Full       
__ETHTOOL_LINK_MODE_LEGACY_MASK(2500baseX_Full)
+#define SUPPORTED_Backplane            
__ETHTOOL_LINK_MODE_LEGACY_MASK(Backplane)
+#define SUPPORTED_1000baseKX_Full      
__ETHTOOL_LINK_MODE_LEGACY_MASK(1000baseKX_Full)
+#define SUPPORTED_10000baseKX4_Full    
__ETHTOOL_LINK_MODE_LEGACY_MASK(10000baseKX4_Full)
+#define SUPPORTED_10000baseKR_Full     
__ETHTOOL_LINK_MODE_LEGACY_MASK(10000baseKR_Full)
+#define SUPPORTED_10000baseR_FEC       
__ETHTOOL_LINK_MODE_LEGACY_MASK(10000baseR_FEC)
+#define SUPPORTED_20000baseMLD2_Full   
__ETHTOOL_LINK_MODE_LEGACY_MASK(20000baseMLD2_Full)
+#define SUPPORTED_20000baseKR2_Full    
__ETHTOOL_LINK_MODE_LEGACY_MASK(20000baseKR2_Full)
+#define SUPPORTED_40000baseKR4_Full    
__ETHTOOL_LINK_MODE_LEGACY_MASK(40000baseKR4_Full)
+#define SUPPORTED_40000baseCR4_Full    
__ETHTOOL_LINK_MODE_LEGACY_MASK(40000baseCR4_Full)
+#define SUPPORTED_40000baseSR4_Full    
__ETHTOOL_LINK_MODE_LEGACY_MASK(40000baseSR4_Full)
+#define SUPPORTED_40000baseLR4_Full    
__ETHTOOL_LINK_MODE_LEGACY_MASK(40000baseLR4_Full)
+#define SUPPORTED_56000baseKR4_Full    
__ETHTOOL_LINK_MODE_LEGACY_MASK(56000baseKR4_Full)
+#define SUPPORTED_56000baseCR4_Full    
__ETHTOOL_LINK_MODE_LEGACY_MASK(56000baseCR4_Full)
+#define SUPPORTED_56000baseSR4_Full    
__ETHTOOL_LINK_MODE_LEGACY_MASK(56000baseSR4_Full)
+#define SUPPORTED_56000baseLR4_Full    
__ETHTOOL_LINK_MODE_LEGACY_MASK(56000baseLR4_Full)
+/* Please do not define any new SUPPORTED_* macro for bits > 31, see
+ * notice above.
+ */
+
+/*
+ * DEPRECATED macros. Please migrate to
+ * ETHTOOL_GLINKSETTINGS/ETHTOOL_SLINKSETTINGS API. Please do NOT
+ * define any new ADERTISE_* macro for bits > 31.
+ */
+#define ADVERTISED_10baseT_Half                
__ETHTOOL_LINK_MODE_LEGACY_MASK(10baseT_Half)
+#define ADVERTISED_10baseT_Full                
__ETHTOOL_LINK_MODE_LEGACY_MASK(10baseT_Full)
+#define ADVERTISED_100baseT_Half       
__ETHTOOL_LINK_MODE_LEGACY_MASK(100baseT_Half)
+#define ADVERTISED_100baseT_Full       
__ETHTOOL_LINK_MODE_LEGACY_MASK(100baseT_Full)
+#define ADVERTISED_1000baseT_Half      
__ETHTOOL_LINK_MODE_LEGACY_MASK(1000baseT_Half)
+#define ADVERTISED_1000baseT_Full      
__ETHTOOL_LINK_MODE_LEGACY_MASK(1000baseT_Full)
+#define ADVERTISED_Autoneg             __ETHTOOL_LINK_MODE_LEGACY_MASK(Autoneg)
+#define ADVERTISED_TP                  __ETHTOOL_LINK_MODE_LEGACY_MASK(TP)
+#define ADVERTISED_AUI                 __ETHTOOL_LINK_MODE_LEGACY_MASK(AUI)
+#define ADVERTISED_MII                 __ETHTOOL_LINK_MODE_LEGACY_MASK(MII)
+#define ADVERTISED_FIBRE               __ETHTOOL_LINK_MODE_LEGACY_MASK(FIBRE)
+#define ADVERTISED_BNC                 __ETHTOOL_LINK_MODE_LEGACY_MASK(BNC)
+#define ADVERTISED_10000baseT_Full     
__ETHTOOL_LINK_MODE_LEGACY_MASK(10000baseT_Full)
+#define ADVERTISED_Pause               __ETHTOOL_LINK_MODE_LEGACY_MASK(Pause)
+#define ADVERTISED_Asym_Pause          
__ETHTOOL_LINK_MODE_LEGACY_MASK(Asym_Pause)
+#define ADVERTISED_2500baseX_Full      
__ETHTOOL_LINK_MODE_LEGACY_MASK(2500baseX_Full)
+#define ADVERTISED_Backplane           
__ETHTOOL_LINK_MODE_LEGACY_MASK(Backplane)
+#define ADVERTISED_1000baseKX_Full     
__ETHTOOL_LINK_MODE_LEGACY_MASK(1000baseKX_Full)
+#define ADVERTISED_10000baseKX4_Full   
__ETHTOOL_LINK_MODE_LEGACY_MASK(10000baseKX4_Full)
+#define ADVERTISED_10000baseKR_Full    
__ETHTOOL_LINK_MODE_LEGACY_MASK(10000baseKR_Full)
+#define ADVERTISED_10000baseR_FEC      
__ETHTOOL_LINK_MODE_LEGACY_MASK(10000baseR_FEC)
+#define ADVERTISED_20000baseMLD2_Full  
__ETHTOOL_LINK_MODE_LEGACY_MASK(20000baseMLD2_Full)
+#define ADVERTISED_20000baseKR2_Full   
__ETHTOOL_LINK_MODE_LEGACY_MASK(20000baseKR2_Full)
+#define ADVERTISED_40000baseKR4_Full   
__ETHTOOL_LINK_MODE_LEGACY_MASK(40000baseKR4_Full)
+#define ADVERTISED_40000baseCR4_Full   
__ETHTOOL_LINK_MODE_LEGACY_MASK(40000baseCR4_Full)
+#define ADVERTISED_40000baseSR4_Full   
__ETHTOOL_LINK_MODE_LEGACY_MASK(40000baseSR4_Full)
+#define ADVERTISED_40000baseLR4_Full   
__ETHTOOL_LINK_MODE_LEGACY_MASK(40000baseLR4_Full)
+#define ADVERTISED_56000baseKR4_Full   
__ETHTOOL_LINK_MODE_LEGACY_MASK(56000baseKR4_Full)
+#define ADVERTISED_56000baseCR4_Full   
__ETHTOOL_LINK_MODE_LEGACY_MASK(56000baseCR4_Full)
+#define ADVERTISED_56000baseSR4_Full   
__ETHTOOL_LINK_MODE_LEGACY_MASK(56000baseSR4_Full)
+#define ADVERTISED_56000baseLR4_Full   
__ETHTOOL_LINK_MODE_LEGACY_MASK(56000baseLR4_Full)
+/* Please do not define any new ADVERTISED_* macro for bits > 31, see
+ * notice above.
+ */
 
 /* The following are all involved in forcing a particular link
  * mode for the device for setting things.  When getting the
@@ -1264,23 +1450,44 @@
  * it was forced up into this mode or autonegotiated.
  */
 
-/* The forced speed, 10Mb, 100Mb, gigabit, [2.5|10|20|40|56]GbE. */
+/* The forced speed, in units of 1Mb. All values 0 to INT_MAX are legal. */
 #define SPEED_10               10
 #define SPEED_100              100
 #define SPEED_1000             1000
 #define SPEED_2500             2500
+#define SPEED_5000             5000
 #define SPEED_10000            10000
 #define SPEED_20000            20000
+#define SPEED_25000            25000
 #define SPEED_40000            40000
+#define SPEED_50000            50000
 #define SPEED_56000            56000
+#define SPEED_100000           100000
 
 #define SPEED_UNKNOWN          -1
 
+static __inline__ int ethtool_validate_speed(__u32 speed)
+{
+       return speed <= INT_MAX || speed == SPEED_UNKNOWN;
+}
+
 /* Duplex, half or full. */
 #define DUPLEX_HALF            0x00
 #define DUPLEX_FULL            0x01
 #define DUPLEX_UNKNOWN         0xff
 
+static __inline__ int ethtool_validate_duplex(__u8 duplex)
+{
+       switch (duplex) {
+       case DUPLEX_HALF:
+       case DUPLEX_FULL:
+       case DUPLEX_UNKNOWN:
+               return 1;
+       }
+
+       return 0;
+}
+
 /* Which connector port. */
 #define PORT_TP                        0x00
 #define PORT_AUI               0x01
@@ -1324,15 +1531,17 @@
 #define        UDP_V4_FLOW     0x02    /* hash or spec (udp_ip4_spec) */
 #define        SCTP_V4_FLOW    0x03    /* hash or spec (sctp_ip4_spec) */
 #define        AH_ESP_V4_FLOW  0x04    /* hash only */
-#define        TCP_V6_FLOW     0x05    /* hash only */
-#define        UDP_V6_FLOW     0x06    /* hash only */
-#define        SCTP_V6_FLOW    0x07    /* hash only */
+#define        TCP_V6_FLOW     0x05    /* hash or spec (tcp_ip6_spec; nfc 
only) */
+#define        UDP_V6_FLOW     0x06    /* hash or spec (udp_ip6_spec; nfc 
only) */
+#define        SCTP_V6_FLOW    0x07    /* hash or spec (sctp_ip6_spec; nfc 
only) */
 #define        AH_ESP_V6_FLOW  0x08    /* hash only */
 #define        AH_V4_FLOW      0x09    /* hash or spec (ah_ip4_spec) */
 #define        ESP_V4_FLOW     0x0a    /* hash or spec (esp_ip4_spec) */
-#define        AH_V6_FLOW      0x0b    /* hash only */
-#define        ESP_V6_FLOW     0x0c    /* hash only */
-#define        IP_USER_FLOW    0x0d    /* spec only (usr_ip4_spec) */
+#define        AH_V6_FLOW      0x0b    /* hash or spec (ah_ip6_spec; nfc only) 
*/
+#define        ESP_V6_FLOW     0x0c    /* hash or spec (esp_ip6_spec; nfc 
only) */
+#define        IPV4_USER_FLOW  0x0d    /* spec only (usr_ip4_spec) */
+#define        IP_USER_FLOW    IPV4_USER_FLOW
+#define        IPV6_USER_FLOW  0x0e    /* spec only (usr_ip6_spec; nfc only) */
 #define        IPV4_FLOW       0x10    /* hash only */
 #define        IPV6_FLOW       0x11    /* hash only */
 #define        ETHER_FLOW      0x12    /* spec only (ether_spec) */
@@ -1398,4 +1607,123 @@
 };
 #define ETH_RESET_SHARED_SHIFT 16
 
+
+/**
+ * struct ethtool_link_settings - link control and status
+ *
+ * IMPORTANT, Backward compatibility notice: When implementing new
+ *     user-space tools, please first try %ETHTOOL_GLINKSETTINGS, and
+ *     if it succeeds use %ETHTOOL_SLINKSETTINGS to change link
+ *     settings; do not use %ETHTOOL_SSET if %ETHTOOL_GLINKSETTINGS
+ *     succeeded: stick to %ETHTOOL_GLINKSETTINGS/%SLINKSETTINGS in
+ *     that case.  Conversely, if %ETHTOOL_GLINKSETTINGS fails, use
+ *     %ETHTOOL_GSET to query and %ETHTOOL_SSET to change link
+ *     settings; do not use %ETHTOOL_SLINKSETTINGS if
+ *     %ETHTOOL_GLINKSETTINGS failed: stick to
+ *     %ETHTOOL_GSET/%ETHTOOL_SSET in that case.
+ *
+ * @cmd: Command number = %ETHTOOL_GLINKSETTINGS or %ETHTOOL_SLINKSETTINGS
+ * @speed: Link speed (Mbps)
+ * @duplex: Duplex mode; one of %DUPLEX_*
+ * @port: Physical connector type; one of %PORT_*
+ * @phy_address: MDIO address of PHY (transceiver); 0 or 255 if not
+ *     applicable.  For clause 45 PHYs this is the PRTAD.
+ * @autoneg: Enable/disable autonegotiation and auto-detection;
+ *     either %AUTONEG_DISABLE or %AUTONEG_ENABLE
+ * @mdio_support: Bitmask of %ETH_MDIO_SUPPORTS_* flags for the MDIO
+ *     protocols supported by the interface; 0 if unknown.
+ *     Read-only.
+ * @eth_tp_mdix: Ethernet twisted-pair MDI(-X) status; one of
+ *     %ETH_TP_MDI_*.  If the status is unknown or not applicable, the
+ *     value will be %ETH_TP_MDI_INVALID.  Read-only.
+ * @eth_tp_mdix_ctrl: Ethernet twisted pair MDI(-X) control; one of
+ *     %ETH_TP_MDI_*.  If MDI(-X) control is not implemented, reads
+ *     yield %ETH_TP_MDI_INVALID and writes may be ignored or rejected.
+ *     When written successfully, the link should be renegotiated if
+ *     necessary.
+ * @link_mode_masks_nwords: Number of 32-bit words for each of the
+ *     supported, advertising, lp_advertising link mode bitmaps. For
+ *     %ETHTOOL_GLINKSETTINGS: on entry, number of words passed by user
+ *     (>= 0); on return, if handshake in progress, negative if
+ *     request size unsupported by kernel: absolute value indicates
+ *     kernel recommended size and cmd field is 0, as well as all the
+ *     other fields; otherwise (handshake completed), strictly
+ *     positive to indicate size used by kernel and cmd field is
+ *     %ETHTOOL_GLINKSETTINGS, all other fields populated by driver. For
+ *     %ETHTOOL_SLINKSETTINGS: must be valid on entry, ie. a positive
+ *     value returned previously by %ETHTOOL_GLINKSETTINGS, otherwise
+ *     refused. For drivers: ignore this field (use kernel's
+ *     __ETHTOOL_LINK_MODE_MASK_NBITS instead), any change to it will
+ *     be overwritten by kernel.
+ * @supported: Bitmap with each bit meaning given by
+ *     %ethtool_link_mode_bit_indices for the link modes, physical
+ *     connectors and other link features for which the interface
+ *     supports autonegotiation or auto-detection.  Read-only.
+ * @advertising: Bitmap with each bit meaning given by
+ *     %ethtool_link_mode_bit_indices for the link modes, physical
+ *     connectors and other link features that are advertised through
+ *     autonegotiation or enabled for auto-detection.
+ * @lp_advertising: Bitmap with each bit meaning given by
+ *     %ethtool_link_mode_bit_indices for the link modes, and other
+ *     link features that the link partner advertised through
+ *     autonegotiation; 0 if unknown or not applicable.  Read-only.
+ *
+ * If autonegotiation is disabled, the speed and @duplex represent the
+ * fixed link mode and are writable if the driver supports multiple
+ * link modes.  If it is enabled then they are read-only; if the link
+ * is up they represent the negotiated link mode; if the link is down,
+ * the speed is 0, %SPEED_UNKNOWN or the highest enabled speed and
+ * @duplex is %DUPLEX_UNKNOWN or the best enabled duplex mode.
+ *
+ * Some hardware interfaces may have multiple PHYs and/or physical
+ * connectors fitted or do not allow the driver to detect which are
+ * fitted.  For these interfaces @port and/or @phy_address may be
+ * writable, possibly dependent on @autoneg being %AUTONEG_DISABLE.
+ * Otherwise, attempts to write different values may be ignored or
+ * rejected.
+ *
+ * Deprecated %ethtool_cmd fields transceiver, maxtxpkt and maxrxpkt
+ * are not available in %ethtool_link_settings. Until all drivers are
+ * converted to ignore them or to the new %ethtool_link_settings API,
+ * for both queries and changes, users should always try
+ * %ETHTOOL_GLINKSETTINGS first, and if it fails with -ENOTSUPP stick
+ * only to %ETHTOOL_GSET and %ETHTOOL_SSET consistently. If it
+ * succeeds, then users should stick to %ETHTOOL_GLINKSETTINGS and
+ * %ETHTOOL_SLINKSETTINGS (which would support drivers implementing
+ * either %ethtool_cmd or %ethtool_link_settings).
+ *
+ * Users should assume that all fields not marked read-only are
+ * writable and subject to validation by the driver.  They should use
+ * %ETHTOOL_GLINKSETTINGS to get the current values before making specific
+ * changes and then applying them with %ETHTOOL_SLINKSETTINGS.
+ *
+ * Drivers that implement %get_link_ksettings and/or
+ * %set_link_ksettings should ignore the @cmd
+ * and @link_mode_masks_nwords fields (any change to them overwritten
+ * by kernel), and rely only on kernel's internal
+ * %__ETHTOOL_LINK_MODE_MASK_NBITS and
+ * %ethtool_link_mode_mask_t. Drivers that implement
+ * %set_link_ksettings() should validate all fields other than @cmd
+ * and @link_mode_masks_nwords that are not described as read-only or
+ * deprecated, and must ignore all fields described as read-only.
+ */
+struct ethtool_link_settings {
+       __u32   cmd;
+       __u32   speed;
+       __u8    duplex;
+       __u8    port;
+       __u8    phy_address;
+       __u8    autoneg;
+       __u8    mdio_support;
+       __u8    eth_tp_mdix;
+       __u8    eth_tp_mdix_ctrl;
+       __s8    link_mode_masks_nwords;
+       __u32   reserved[8];
+       __u32   link_mode_masks[0];
+       /* layout of link_mode_masks fields:
+        * __u32 map_supported[link_mode_masks_nwords];
+        * __u32 map_advertising[link_mode_masks_nwords];
+        * __u32 map_lp_advertising[link_mode_masks_nwords];
+        */
+};
 #endif /* _LINUX_ETHTOOL_H */
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.2/ethtool.8 new/ethtool-4.5/ethtool.8
--- old/ethtool-4.2/ethtool.8   2015-10-09 04:37:53.000000000 +0200
+++ new/ethtool-4.5/ethtool.8   2016-03-14 02:50:31.000000000 +0100
@@ -113,7 +113,7 @@
 .  hy \\n(HY
 ..
 .
-.TH ETHTOOL 8 "September 2014" "Ethtool version 4.2"
+.TH ETHTOOL 8 "March 2016" "Ethtool version 4.5"
 .SH NAME
 ethtool \- query or control network driver and hardware settings
 .
@@ -220,6 +220,9 @@
 .B ethtool \-S|\-\-statistics
 .I devname
 .HP
+.B ethtool \-\-phy\-statistics
+.I devname
+.HP
 .B ethtool \-t|\-\-test
 .I devname
 .RI [\*(SD]
@@ -296,7 +299,7 @@
 .IR N \ |
 .BI weight\  W0
 .IR W1
-.RB ...\ ]
+.RB ...\ | \ default \ ]
 .HP
 .B ethtool \-f|\-\-flash
 .I devname file
@@ -365,6 +368,7 @@
 .TP
 .B \-A \-\-pause
 Changes the pause parameters of the specified Ethernet device.
+.RS 4
 .TP
 .A2 autoneg on off
 Specifies whether pause autonegotiation should be enabled.
@@ -374,6 +378,7 @@
 .TP
 .A2 tx on off
 Specifies whether TX pause should be enabled.
+.RE
 .TP
 .B \-c \-\-show\-coalesce
 Queries the specified network device for coalescing information.
@@ -386,6 +391,7 @@
 .TP
 .B \-G \-\-set\-ring
 Changes the rx/tx ring parameters of the specified network device.
+.RS 4
 .TP
 .BI rx \ N
 Changes the number of ring entries for the Rx ring.
@@ -398,6 +404,7 @@
 .TP
 .BI tx \ N
 Changes the number of ring entries for the Tx ring.
+.RE
 .TP
 .B \-i \-\-driver
 Queries the specified network device for associated driver information.
@@ -419,6 +426,14 @@
 When raw is enabled, then it dumps the raw EEPROM data to stdout. The
 length and offset parameters allow dumping certain portions of the EEPROM.
 Default is to dump the entire EEPROM.
+.RS 4
+.TP
+.BI raw \ on|off
+.TP
+.BI offset \ N
+.TP
+.BI length \ N
+.RE
 .TP
 .B \-E \-\-change\-eeprom
 If value is specified, changes EEPROM byte for the specified network device.
@@ -436,6 +451,7 @@
 Changes the offload parameters and other features of the specified
 network device.  The following feature names are built-in and others
 may be defined by the kernel.
+.RS 4
 .TP
 .A2 rx on off
 Specifies whether RX checksumming should be enabled.
@@ -472,14 +488,17 @@
 .TP
 .A2 rxhash on off
 Specifies whether receive hashing offload should be enabled
+.RE
 .TP
 .B \-p \-\-identify
 Initiates adapter-specific action intended to enable an operator to
 easily identify the adapter by sight.  Typically this involves
 blinking one or more LEDs on the specific network port.
+.RS 4
 .TP
-.B N
+.BN
 Length of time to perform phys-id, in seconds.
+.RE
 .TP
 .B \-P \-\-show\-permaddr
 Queries the specified network device for permanent hardware address.
@@ -492,8 +511,12 @@
 Queries the specified network device for NIC- and driver-specific
 statistics.
 .TP
+.B \-\-phy\-statistics
+Queries the specified network device for PHY specific statistics.
+.TP
 .B \-t \-\-test
 Executes adapter selftest on the specified network device. Possible test modes 
are:
+.RS 4
 .TP
 .B offline
 Perform full set of tests, possibly interrupting normal operation
@@ -505,12 +528,14 @@
 .B external_lb
 Perform full set of tests, as for \fBoffline\fR, and additionally an
 external-loopback test.
+.RE
 .TP
 .B \-s \-\-change
 Allows changing some or all settings of the specified network device.
 All following options only apply if
 .B \-s
 was specified.
+.RS 4
 .TP
 .BI speed \ N
 Set speed in Mb/s.
@@ -620,11 +645,13 @@
 .TE
 .PP
 The precise meanings of these type flags differ between drivers.
+.RE
 .PD
 .RE
 .TP
 .B \-n \-u \-\-show\-nfc \-\-show\-ntuple
 Retrieves receive network flow classification options or rules.
+.RS 4
 .TP
 .BR rx\-flow\-hash \ \*(FL
 Retrieves the hash options for the specified flow type.
@@ -645,11 +672,13 @@
 .TP
 .BI rule \ N
 Retrieves the RX classification rule with the given ID.
+.RE
 .PD
 .RE
 .TP
 .B \-N \-U \-\-config\-nfc \-\-config\-ntuple
 Configures receive network flow classification options or rules.
+.RS 4
 .TP
 .BR rx\-flow\-hash \ \*(FL \: \*(HO
 Configures the hash options for the specified flow type.
@@ -688,7 +717,6 @@
 keyword, or separately using the field name keyword with \fB-mask\fR
 appended, e.g. \fBsrc-mask\fR.
 .PD
-.RE
 .TP
 .BR src \ \*(MA\ [ m \ \*(MA]
 Includes the source MAC address, specified as 6 bytes in hexadecimal
@@ -769,6 +797,7 @@
 .TP
 .BI delete \ N
 Deletes the RX classification rule with the given ID.
+.RE
 .TP
 .B \-w \-\-get\-dump
 Retrieves and prints firmware dump for the specified network device.
@@ -790,6 +819,7 @@
 .TP
 .B \-X \-\-set\-rxfh\-indir \-\-rxfh
 Configures the receive flow hash indirection table and/or RSS hash key.
+.RS 4
 .TP
 .BI hkey
 Sets RSS hash key of the specified network device. RSS hash key should be of 
device supported length.
@@ -805,9 +835,14 @@
 receive queues according to the given weights.  The sum of the weights
 must be non-zero and must not exceed the size of the indirection table.
 .TP
+.BI default
+Sets the receive flow hash indirection table to its default value.
+.RE
+.TP
 .B \-f \-\-flash
 Write a firmware image to flash or other non-volatile memory on the
 device.
+.RS 4
 .TP
 .I file
 Specifies the filename of the firmware image.  The firmware must first
@@ -819,8 +854,8 @@
 non-volatile memory, this parameter may be used to specify which
 region is to be written.  The default is 0, requesting that all
 regions are written.  All other values are driver-dependent.
-.PD
 .RE
+.PD
 .TP
 .B \-l \-\-show\-channels
 Queries the specified network device for the numbers of channels it has.
@@ -828,6 +863,7 @@
 .TP
 .B \-L \-\-set\-channels
 Changes the numbers of channels of the specified network device.
+.RS 4
 .TP
 .BI rx \ N
 Changes the number of channels with only receive queues.
@@ -840,6 +876,7 @@
 .TP
 .BI combined \ N
 Changes the number of multi-purpose channels.
+.RE
 .TP
 .B \-m \-\-dump\-module\-eeprom \-\-module\-info
 Retrieves and if possible decodes the EEPROM from plugin modules, e.g SFP+, 
QSFP.
@@ -853,10 +890,12 @@
 .TP
 .B \-\-set\-priv\-flags
 Sets the device's private flags as specified.
+.RS 4
 .PP
 .I flag
 .A1 on off
 Sets the state of the named private flag.
+.RE
 .TP
 .B \-\-show\-eee
 Queries the specified network device for its support of Energy-Efficient
@@ -864,6 +903,7 @@
 .TP
 .B \-\-set\-eee
 Sets the device EEE behaviour.
+.RS 4
 .TP
 .A2 eee on off
 Enables/disables the device support of EEE.
@@ -879,6 +919,7 @@
 .BI tx-timer \ N
 Sets the amount of time the device should stay in idle mode prior to asserting
 its Tx LPI (in microseconds). This has meaning only when Tx LPI is enabled.
+.RE
 .SH BUGS
 Not supported (in part or whole) on all network drivers.
 .SH AUTHOR
@@ -894,7 +935,8 @@
 Scott Feldman,
 Andi Kleen,
 Alexander Duyck,
-Sucheta Chakraborty.
+Sucheta Chakraborty,
+Jesse Brandeburg.
 .SH AVAILABILITY
 .B ethtool
 is available from
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.2/ethtool.8.in new/ethtool-4.5/ethtool.8.in
--- old/ethtool-4.2/ethtool.8.in        2015-10-09 04:24:36.000000000 +0200
+++ new/ethtool-4.5/ethtool.8.in        2016-03-14 02:40:56.000000000 +0100
@@ -113,7 +113,7 @@
 .  hy \\n(HY
 ..
 .
-.TH ETHTOOL 8 "September 2014" "Ethtool version @VERSION@"
+.TH ETHTOOL 8 "March 2016" "Ethtool version @VERSION@"
 .SH NAME
 ethtool \- query or control network driver and hardware settings
 .
@@ -220,6 +220,9 @@
 .B ethtool \-S|\-\-statistics
 .I devname
 .HP
+.B ethtool \-\-phy\-statistics
+.I devname
+.HP
 .B ethtool \-t|\-\-test
 .I devname
 .RI [\*(SD]
@@ -296,7 +299,7 @@
 .IR N \ |
 .BI weight\  W0
 .IR W1
-.RB ...\ ]
+.RB ...\ | \ default \ ]
 .HP
 .B ethtool \-f|\-\-flash
 .I devname file
@@ -365,6 +368,7 @@
 .TP
 .B \-A \-\-pause
 Changes the pause parameters of the specified Ethernet device.
+.RS 4
 .TP
 .A2 autoneg on off
 Specifies whether pause autonegotiation should be enabled.
@@ -374,6 +378,7 @@
 .TP
 .A2 tx on off
 Specifies whether TX pause should be enabled.
+.RE
 .TP
 .B \-c \-\-show\-coalesce
 Queries the specified network device for coalescing information.
@@ -386,6 +391,7 @@
 .TP
 .B \-G \-\-set\-ring
 Changes the rx/tx ring parameters of the specified network device.
+.RS 4
 .TP
 .BI rx \ N
 Changes the number of ring entries for the Rx ring.
@@ -398,6 +404,7 @@
 .TP
 .BI tx \ N
 Changes the number of ring entries for the Tx ring.
+.RE
 .TP
 .B \-i \-\-driver
 Queries the specified network device for associated driver information.
@@ -419,6 +426,14 @@
 When raw is enabled, then it dumps the raw EEPROM data to stdout. The
 length and offset parameters allow dumping certain portions of the EEPROM.
 Default is to dump the entire EEPROM.
+.RS 4
+.TP
+.BI raw \ on|off
+.TP
+.BI offset \ N
+.TP
+.BI length \ N
+.RE
 .TP
 .B \-E \-\-change\-eeprom
 If value is specified, changes EEPROM byte for the specified network device.
@@ -436,6 +451,7 @@
 Changes the offload parameters and other features of the specified
 network device.  The following feature names are built-in and others
 may be defined by the kernel.
+.RS 4
 .TP
 .A2 rx on off
 Specifies whether RX checksumming should be enabled.
@@ -472,14 +488,17 @@
 .TP
 .A2 rxhash on off
 Specifies whether receive hashing offload should be enabled
+.RE
 .TP
 .B \-p \-\-identify
 Initiates adapter-specific action intended to enable an operator to
 easily identify the adapter by sight.  Typically this involves
 blinking one or more LEDs on the specific network port.
+.RS 4
 .TP
-.B N
+.BN
 Length of time to perform phys-id, in seconds.
+.RE
 .TP
 .B \-P \-\-show\-permaddr
 Queries the specified network device for permanent hardware address.
@@ -492,8 +511,12 @@
 Queries the specified network device for NIC- and driver-specific
 statistics.
 .TP
+.B \-\-phy\-statistics
+Queries the specified network device for PHY specific statistics.
+.TP
 .B \-t \-\-test
 Executes adapter selftest on the specified network device. Possible test modes 
are:
+.RS 4
 .TP
 .B offline
 Perform full set of tests, possibly interrupting normal operation
@@ -505,12 +528,14 @@
 .B external_lb
 Perform full set of tests, as for \fBoffline\fR, and additionally an
 external-loopback test.
+.RE
 .TP
 .B \-s \-\-change
 Allows changing some or all settings of the specified network device.
 All following options only apply if
 .B \-s
 was specified.
+.RS 4
 .TP
 .BI speed \ N
 Set speed in Mb/s.
@@ -620,11 +645,13 @@
 .TE
 .PP
 The precise meanings of these type flags differ between drivers.
+.RE
 .PD
 .RE
 .TP
 .B \-n \-u \-\-show\-nfc \-\-show\-ntuple
 Retrieves receive network flow classification options or rules.
+.RS 4
 .TP
 .BR rx\-flow\-hash \ \*(FL
 Retrieves the hash options for the specified flow type.
@@ -645,11 +672,13 @@
 .TP
 .BI rule \ N
 Retrieves the RX classification rule with the given ID.
+.RE
 .PD
 .RE
 .TP
 .B \-N \-U \-\-config\-nfc \-\-config\-ntuple
 Configures receive network flow classification options or rules.
+.RS 4
 .TP
 .BR rx\-flow\-hash \ \*(FL \: \*(HO
 Configures the hash options for the specified flow type.
@@ -688,7 +717,6 @@
 keyword, or separately using the field name keyword with \fB-mask\fR
 appended, e.g. \fBsrc-mask\fR.
 .PD
-.RE
 .TP
 .BR src \ \*(MA\ [ m \ \*(MA]
 Includes the source MAC address, specified as 6 bytes in hexadecimal
@@ -769,6 +797,7 @@
 .TP
 .BI delete \ N
 Deletes the RX classification rule with the given ID.
+.RE
 .TP
 .B \-w \-\-get\-dump
 Retrieves and prints firmware dump for the specified network device.
@@ -790,6 +819,7 @@
 .TP
 .B \-X \-\-set\-rxfh\-indir \-\-rxfh
 Configures the receive flow hash indirection table and/or RSS hash key.
+.RS 4
 .TP
 .BI hkey
 Sets RSS hash key of the specified network device. RSS hash key should be of 
device supported length.
@@ -805,9 +835,14 @@
 receive queues according to the given weights.  The sum of the weights
 must be non-zero and must not exceed the size of the indirection table.
 .TP
+.BI default
+Sets the receive flow hash indirection table to its default value.
+.RE
+.TP
 .B \-f \-\-flash
 Write a firmware image to flash or other non-volatile memory on the
 device.
+.RS 4
 .TP
 .I file
 Specifies the filename of the firmware image.  The firmware must first
@@ -819,8 +854,8 @@
 non-volatile memory, this parameter may be used to specify which
 region is to be written.  The default is 0, requesting that all
 regions are written.  All other values are driver-dependent.
-.PD
 .RE
+.PD
 .TP
 .B \-l \-\-show\-channels
 Queries the specified network device for the numbers of channels it has.
@@ -828,6 +863,7 @@
 .TP
 .B \-L \-\-set\-channels
 Changes the numbers of channels of the specified network device.
+.RS 4
 .TP
 .BI rx \ N
 Changes the number of channels with only receive queues.
@@ -840,6 +876,7 @@
 .TP
 .BI combined \ N
 Changes the number of multi-purpose channels.
+.RE
 .TP
 .B \-m \-\-dump\-module\-eeprom \-\-module\-info
 Retrieves and if possible decodes the EEPROM from plugin modules, e.g SFP+, 
QSFP.
@@ -853,10 +890,12 @@
 .TP
 .B \-\-set\-priv\-flags
 Sets the device's private flags as specified.
+.RS 4
 .PP
 .I flag
 .A1 on off
 Sets the state of the named private flag.
+.RE
 .TP
 .B \-\-show\-eee
 Queries the specified network device for its support of Energy-Efficient
@@ -864,6 +903,7 @@
 .TP
 .B \-\-set\-eee
 Sets the device EEE behaviour.
+.RS 4
 .TP
 .A2 eee on off
 Enables/disables the device support of EEE.
@@ -879,6 +919,7 @@
 .BI tx-timer \ N
 Sets the amount of time the device should stay in idle mode prior to asserting
 its Tx LPI (in microseconds). This has meaning only when Tx LPI is enabled.
+.RE
 .SH BUGS
 Not supported (in part or whole) on all network drivers.
 .SH AUTHOR
@@ -894,7 +935,8 @@
 Scott Feldman,
 Andi Kleen,
 Alexander Duyck,
-Sucheta Chakraborty.
+Sucheta Chakraborty,
+Jesse Brandeburg.
 .SH AVAILABILITY
 .B ethtool
 is available from
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.2/ethtool.c new/ethtool-4.5/ethtool.c
--- old/ethtool-4.2/ethtool.c   2015-10-09 04:19:06.000000000 +0200
+++ new/ethtool-4.5/ethtool.c   2016-03-14 02:49:09.000000000 +0100
@@ -994,7 +994,6 @@
 }
 
 static int dump_regs(int gregs_dump_raw, int gregs_dump_hex,
-                    const char *gregs_dump_file,
                     struct ethtool_drvinfo *info, struct ethtool_regs *regs)
 {
        int i;
@@ -1004,22 +1003,6 @@
                return 0;
        }
 
-       if (gregs_dump_file) {
-               FILE *f = fopen(gregs_dump_file, "r");
-               struct stat st;
-
-               if (!f || fstat(fileno(f), &st) < 0) {
-                       fprintf(stderr, "Can't open '%s': %s\n",
-                               gregs_dump_file, strerror(errno));
-                       return -1;
-               }
-
-               regs = realloc(regs, sizeof(*regs) + st.st_size);
-               regs->len = st.st_size;
-               fread(regs->data, regs->len, 1, f);
-               fclose(f);
-       }
-
        if (!gregs_dump_hex)
                for (i = 0; i < ARRAY_SIZE(driver_list); i++)
                        if (!strncmp(driver_list[i].name, info->driver,
@@ -2708,7 +2691,31 @@
                free(regs);
                return 74;
        }
-       if (dump_regs(gregs_dump_raw, gregs_dump_hex, gregs_dump_file,
+
+       if (!gregs_dump_raw && gregs_dump_file != NULL) {
+               /* overwrite reg values from file dump */
+               FILE *f = fopen(gregs_dump_file, "r");
+               struct stat st;
+               size_t nread;
+
+               if (!f || fstat(fileno(f), &st) < 0) {
+                       fprintf(stderr, "Can't open '%s': %s\n",
+                               gregs_dump_file, strerror(errno));
+                       free(regs);
+                       return 75;
+               }
+
+               regs = realloc(regs, sizeof(*regs) + st.st_size);
+               regs->len = st.st_size;
+               nread = fread(regs->data, regs->len, 1, f);
+               fclose(f);
+               if (nread != 1) {
+                       free(regs);
+                       return 75;
+               }
+        }
+
+       if (dump_regs(gregs_dump_raw, gregs_dump_hex,
                      &drvinfo, regs) < 0) {
                fprintf(stderr, "Cannot dump registers\n");
                free(regs);
@@ -2821,8 +2828,10 @@
        if (seeprom_length == -1)
                seeprom_length = drvinfo.eedump_len;
 
-       if (drvinfo.eedump_len < seeprom_offset + seeprom_length)
-               seeprom_length = drvinfo.eedump_len - seeprom_offset;
+       if (drvinfo.eedump_len < seeprom_offset + seeprom_length) {
+               fprintf(stderr, "offset & length out of bounds\n");
+               return 1;
+       }
 
        eeprom = calloc(1, sizeof(*eeprom)+seeprom_length);
        if (!eeprom) {
@@ -2837,8 +2846,18 @@
        eeprom->data[0] = seeprom_value;
 
        /* Multi-byte write: read input from stdin */
-       if (!seeprom_value_seen)
-               eeprom->len = fread(eeprom->data, 1, eeprom->len, stdin);
+       if (!seeprom_value_seen) {
+               if (fread(eeprom->data, eeprom->len, 1, stdin) != 1) {
+                       fprintf(stderr, "not enough data from stdin\n");
+                       free(eeprom);
+                       return 75;
+               }
+               if ((fgetc(stdin) != EOF) || !feof(stdin)) {
+                       fprintf(stderr, "too much data from stdin\n");
+                       free(eeprom);
+                       return 75;
+               }
+       }
 
        err = send_ioctl(ctx, eeprom);
        if (err < 0) {
@@ -2937,7 +2956,8 @@
        return err;
 }
 
-static int do_gstats(struct cmd_context *ctx)
+static int do_gstats(struct cmd_context *ctx, int cmd, int stringset,
+                   const char *name)
 {
        struct ethtool_gstrings *strings;
        struct ethtool_stats *stats;
@@ -2947,7 +2967,7 @@
        if (ctx->argc != 0)
                exit_bad_args();
 
-       strings = get_stringset(ctx, ETH_SS_STATS,
+       strings = get_stringset(ctx, stringset,
                                offsetof(struct ethtool_drvinfo, n_stats),
                                0);
        if (!strings) {
@@ -2971,7 +2991,7 @@
                return 95;
        }
 
-       stats->cmd = ETHTOOL_GSTATS;
+       stats->cmd = cmd;
        stats->n_stats = n_stats;
        err = send_ioctl(ctx, stats);
        if (err < 0) {
@@ -2982,7 +3002,7 @@
        }
 
        /* todo - pretty-print the strings per-driver */
-       fprintf(stdout, "NIC statistics:\n");
+       fprintf(stdout, "%s statistics:\n", name);
        for (i = 0; i < n_stats; i++) {
                fprintf(stdout, "     %.*s: %llu\n",
                        ETH_GSTRING_LEN,
@@ -2995,6 +3015,16 @@
        return 0;
 }
 
+static int do_gnicstats(struct cmd_context *ctx)
+{
+       return do_gstats(ctx, ETHTOOL_GSTATS, ETH_SS_STATS, "NIC");
+}
+
+static int do_gphystats(struct cmd_context *ctx)
+{
+       return do_gstats(ctx, ETHTOOL_GPHYSTATS, ETH_SS_PHY_STATS, "PHY");
+}
+
 static int do_srxntuple(struct cmd_context *ctx,
                        struct ethtool_rx_flow_spec *rx_rule_fs);
 
@@ -3228,13 +3258,11 @@
        return 0;
 }
 
-static int fill_indir_table(u32 *indir_size, u32 *indir, int rxfhindir_equal,
-                           char **rxfhindir_weight, u32 num_weights)
+static int fill_indir_table(u32 *indir_size, u32 *indir, int rxfhindir_default,
+                           int rxfhindir_equal, char **rxfhindir_weight,
+                           u32 num_weights)
 {
        u32 i;
-       /*
-        * "*indir_size == 0" ==> reset indir to default
-        */
        if (rxfhindir_equal) {
                for (i = 0; i < *indir_size; i++)
                        indir[i] = i % rxfhindir_equal;
@@ -3268,6 +3296,9 @@
                        }
                        indir[i] = j;
                }
+       } else if (rxfhindir_default) {
+               /* "*indir_size == 0" ==> reset indir to default */
+               *indir_size = 0;
        } else {
                *indir_size = ETH_RXFH_INDIR_NO_CHANGE;
        }
@@ -3275,8 +3306,9 @@
        return 0;
 }
 
-static int do_srxfhindir(struct cmd_context *ctx, int rxfhindir_equal,
-                        char **rxfhindir_weight, u32 num_weights)
+static int do_srxfhindir(struct cmd_context *ctx, int rxfhindir_default,
+                        int rxfhindir_equal, char **rxfhindir_weight,
+                        u32 num_weights)
 {
        struct ethtool_rxfh_indir indir_head;
        struct ethtool_rxfh_indir *indir;
@@ -3301,7 +3333,8 @@
        indir->cmd = ETHTOOL_SRXFHINDIR;
        indir->size = indir_head.size;
 
-       if (fill_indir_table(&indir->size, indir->ring_index, rxfhindir_equal,
+       if (fill_indir_table(&indir->size, indir->ring_index,
+                            rxfhindir_default, rxfhindir_equal,
                             rxfhindir_weight, num_weights)) {
                free(indir);
                return 1;
@@ -3323,7 +3356,7 @@
        struct ethtool_rxfh rss_head = {0};
        struct ethtool_rxfh *rss;
        struct ethtool_rxnfc ring_count;
-       int rxfhindir_equal = 0;
+       int rxfhindir_equal = 0, rxfhindir_default = 0;
        char **rxfhindir_weight = NULL;
        char *rxfhindir_key = NULL;
        char *hkey = NULL;
@@ -3332,7 +3365,7 @@
        u32 entry_size = sizeof(rss_head.rss_config[0]);
        u32 num_weights = 0;
 
-       if (ctx->argc < 2)
+       if (ctx->argc < 1)
                exit_bad_args();
 
        while (arg_num < ctx->argc) {
@@ -3357,6 +3390,9 @@
                        if (!rxfhindir_key)
                                exit_bad_args();
                        ++arg_num;
+               } else if (!strcmp(ctx->argp[arg_num], "default")) {
+                       ++arg_num;
+                       rxfhindir_default = 1;
                } else {
                        exit_bad_args();
                }
@@ -3368,6 +3404,18 @@
                return 1;
        }
 
+       if (rxfhindir_equal && rxfhindir_default) {
+               fprintf(stderr,
+                       "Equal and default options are mutually exclusive\n");
+               return 1;
+       }
+
+       if (rxfhindir_weight && rxfhindir_default) {
+               fprintf(stderr,
+                       "Weight and default options are mutually exclusive\n");
+               return 1;
+       }
+
        ring_count.cmd = ETHTOOL_GRXRINGS;
        err = send_ioctl(ctx, &ring_count);
        if (err < 0) {
@@ -3378,8 +3426,8 @@
        rss_head.cmd = ETHTOOL_GRSSH;
        err = send_ioctl(ctx, &rss_head);
        if (err < 0 && errno == EOPNOTSUPP && !rxfhindir_key) {
-               return do_srxfhindir(ctx, rxfhindir_equal, rxfhindir_weight,
-                                    num_weights);
+               return do_srxfhindir(ctx, rxfhindir_default, rxfhindir_equal,
+                                    rxfhindir_weight, num_weights);
        } else if (err < 0) {
                perror("Cannot get RX flow hash indir size and key size");
                return 1;
@@ -3404,8 +3452,8 @@
        rss->indir_size = rss_head.indir_size;
        rss->key_size = rss_head.key_size;
 
-       if (fill_indir_table(&rss->indir_size, rss->rss_config, rxfhindir_equal,
-                            rxfhindir_weight, num_weights)) {
+       if (fill_indir_table(&rss->indir_size, rss->rss_config, 
rxfhindir_default,
+                            rxfhindir_equal, rxfhindir_weight, num_weights)) {
                err = 1;
                goto free;
        }
@@ -4077,7 +4125,9 @@
          "               [ TIME-IN-SECONDS ]\n" },
        { "-t|--test", 1, do_test, "Execute adapter self test",
          "               [ online | offline | external_lb ]\n" },
-       { "-S|--statistics", 1, do_gstats, "Show adapter statistics" },
+       { "-S|--statistics", 1, do_gnicstats, "Show adapter statistics" },
+       { "--phy-statistics", 1, do_gphystats,
+         "Show phy statistics" },
        { "-n|-u|--show-nfc|--show-ntuple", 1, do_grxclass,
          "Show Rx network flow classification options or rules",
          "             [ rx-flow-hash tcp4|udp4|ah4|esp4|sctp4|"
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.2/ethtool.spec new/ethtool-4.5/ethtool.spec
--- old/ethtool-4.2/ethtool.spec        2015-10-09 04:37:55.000000000 +0200
+++ new/ethtool-4.5/ethtool.spec        2016-03-14 02:50:54.000000000 +0100
@@ -1,5 +1,5 @@
 Name           : ethtool
-Version                : 4.2
+Version                : 4.5
 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.2/internal.h new/ethtool-4.5/internal.h
--- old/ethtool-4.2/internal.h  2015-10-09 04:19:06.000000000 +0200
+++ new/ethtool-4.5/internal.h  2016-03-13 18:35:05.000000000 +0100
@@ -3,6 +3,12 @@
 #ifndef ETHTOOL_INTERNAL_H__
 #define ETHTOOL_INTERNAL_H__
 
+/* Some platforms (eg. ppc64) need __SANE_USERSPACE_TYPES__ before
+ * <linux/types.h> to select 'int-ll64.h' and avoid compile warnings
+ * when printing __u64 with %llu.
+ */
+#define __SANE_USERSPACE_TYPES__
+
 #ifdef HAVE_CONFIG_H
 #include "ethtool-config.h"
 #endif
@@ -29,6 +35,12 @@
 typedef uint8_t u8;
 typedef int32_t s32;
 
+/* ethtool.h epxects __KERNEL_DIV_ROUND_UP to be defined by <linux/kernel.h> */
+#include <linux/kernel.h>
+#ifndef __KERNEL_DIV_ROUND_UP
+#define __KERNEL_DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d))
+#endif
+
 #include "ethtool-copy.h"
 #include "net_tstamp-copy.h"
 
@@ -132,10 +144,11 @@
 int test_ioctl(const struct cmd_expect *expect, void *cmd);
 #define TEST_IOCTL_MISMATCH (-2)
 
-#ifndef TEST_NO_WRAPPERS
 int test_main(int argc, char **argp);
-#define main(...) test_main(__VA_ARGS__)
 void test_exit(int rc) __attribute__((noreturn));
+
+#ifndef TEST_NO_WRAPPERS
+#define main(...) test_main(__VA_ARGS__)
 #undef exit
 #define exit(rc) test_exit(rc)
 void *test_malloc(size_t size);
@@ -147,7 +160,7 @@
 char *test_strdup(const char *s);
 #undef strdup
 #define strdup(s) test_strdup(s)
-void *test_free(void *ptr);
+void test_free(void *ptr);
 #undef free
 #define free(ptr) test_free(ptr)
 void *test_realloc(void *ptr, size_t size);
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.2/marvell.c new/ethtool-4.5/marvell.c
--- old/ethtool-4.2/marvell.c   2014-04-21 23:41:13.000000000 +0200
+++ new/ethtool-4.5/marvell.c   2016-03-13 18:19:25.000000000 +0100
@@ -381,7 +381,8 @@
 
 int sky2_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs)
 {
-       const u32 *r = (const u32 *) regs->data;
+       const u16 *r16 = (const u16 *) regs->data;
+       const u32 *r32 = (const u32 *) regs->data;
        int dual;
 
        dump_pci(regs->data + 0x1c00);
@@ -390,15 +391,15 @@
 
        printf("\nBus Management Unit\n");
        printf("-------------------\n");
-       printf("CSR Receive Queue 1              0x%08X\n", r[24]);
-       printf("CSR Sync Queue 1                 0x%08X\n", r[26]);
-       printf("CSR Async Queue 1                0x%08X\n", r[27]);
+       printf("CSR Receive Queue 1              0x%08X\n", r32[24]);
+       printf("CSR Sync Queue 1                 0x%08X\n", r32[26]);
+       printf("CSR Async Queue 1                0x%08X\n", r32[27]);
 
        dual = (regs->data[0x11e] & 2) != 0;
        if (dual) {
-               printf("CSR Receive Queue 2              0x%08X\n", r[25]);
-               printf("CSR Async Queue 2                0x%08X\n", r[29]);
-               printf("CSR Sync Queue 2                 0x%08X\n", r[28]);
+               printf("CSR Receive Queue 2              0x%08X\n", r32[25]);
+               printf("CSR Async Queue 2                0x%08X\n", r32[29]);
+               printf("CSR Sync Queue 2                 0x%08X\n", r32[28]);
        }
 
        dump_mac(regs->data);
@@ -423,9 +424,9 @@
        dump_timer("TX status", regs->data + 0xec0);
        dump_timer("ISR", regs->data + 0xed0);
 
-       printf("\nGMAC control             0x%04X\n", *(u32 *)(regs->data + 
0xf00));
-       printf("GPHY control             0x%04X\n", *(u32 *)(regs->data + 
0xf04));
-       printf("LINK control             0x%02hX\n", *(u16 *)(regs->data + 
0xf10));
+       printf("\nGMAC control             0x%04X\n", r32[0xf00 >> 2]);
+       printf("GPHY control             0x%04X\n", r32[0xf04 >> 2]);
+       printf("LINK control             0x%02hX\n", r16[0xf10 >> 1]);
 
        dump_gmac("GMAC 1", regs->data + 0x2800);
        dump_gmac_fifo("Rx GMAC 1", regs->data + 0xc40);
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.2/test-common.c new/ethtool-4.5/test-common.c
--- old/ethtool-4.2/test-common.c       2014-01-28 00:54:09.000000000 +0100
+++ new/ethtool-4.5/test-common.c       2016-03-13 18:19:55.000000000 +0100
@@ -100,7 +100,7 @@
 
 void *test_realloc(void *ptr, size_t size)
 {
-       struct list_head *block;
+       struct list_head *block = NULL;
 
        if (ptr) {
                block = (struct list_head *)ptr - 1;
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.2/test-features.c new/ethtool-4.5/test-features.c
--- old/ethtool-4.2/test-features.c     2012-06-13 04:41:34.000000000 +0200
+++ new/ethtool-4.5/test-features.c     2016-03-13 18:20:07.000000000 +0100
@@ -18,7 +18,7 @@
        struct ethtool_sset_info cmd;
        u32 data[1];
 }
-cmd_gssetinfo = { { ETHTOOL_GSSET_INFO, 0, 1ULL << ETH_SS_FEATURES }, 34 };
+cmd_gssetinfo = { { ETHTOOL_GSSET_INFO, 0, 1ULL << ETH_SS_FEATURES }, { 34 } };
 
 static const struct ethtool_value
 cmd_grxcsum_off = { ETHTOOL_GRXCSUM, 0 },


Reply via email to