<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/include/uapi/linux/ethtool.h, branch v4.9.333</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.9.333</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.9.333'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2021-01-09T12:35:49Z</updated>
<entry>
<title>uapi: move constants from &lt;linux/kernel.h&gt; to &lt;linux/const.h&gt;</title>
<updated>2021-01-09T12:35:49Z</updated>
<author>
<name>Petr Vorel</name>
<email>petr.vorel@gmail.com</email>
</author>
<published>2020-12-15T03:03:21Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=834d8b96cd85b307241ae706c913f186ee7d2d63'/>
<id>urn:sha1:834d8b96cd85b307241ae706c913f186ee7d2d63</id>
<content type='text'>
commit a85cbe6159ffc973e5702f70a3bd5185f8f3c38d upstream.

and include &lt;linux/const.h&gt; in UAPI headers instead of &lt;linux/kernel.h&gt;.

The reason is to avoid indirect &lt;linux/sysinfo.h&gt; include when using
some network headers: &lt;linux/netlink.h&gt; or others -&gt; &lt;linux/kernel.h&gt;
-&gt; &lt;linux/sysinfo.h&gt;.

This indirect include causes on MUSL redefinition of struct sysinfo when
included both &lt;sys/sysinfo.h&gt; and some of UAPI headers:

    In file included from x86_64-buildroot-linux-musl/sysroot/usr/include/linux/kernel.h:5,
                     from x86_64-buildroot-linux-musl/sysroot/usr/include/linux/netlink.h:5,
                     from ../include/tst_netlink.h:14,
                     from tst_crypto.c:13:
    x86_64-buildroot-linux-musl/sysroot/usr/include/linux/sysinfo.h:8:8: error: redefinition of `struct sysinfo'
     struct sysinfo {
            ^~~~~~~
    In file included from ../include/tst_safe_macros.h:15,
                     from ../include/tst_test.h:93,
                     from tst_crypto.c:11:
    x86_64-buildroot-linux-musl/sysroot/usr/include/sys/sysinfo.h:10:8: note: originally defined here

Link: https://lkml.kernel.org/r/20201015190013.8901-1-petr.vorel@gmail.com
Signed-off-by: Petr Vorel &lt;petr.vorel@gmail.com&gt;
Suggested-by: Rich Felker &lt;dalias@aerifal.cx&gt;
Acked-by: Rich Felker &lt;dalias@libc.org&gt;
Cc: Peter Korsgaard &lt;peter@korsgaard.com&gt;
Cc: Baruch Siach &lt;baruch@tkos.co.il&gt;
Cc: Florian Weimer &lt;fweimer@redhat.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>net: ethtool: Add back transceiver type</title>
<updated>2020-01-29T09:24:36Z</updated>
<author>
<name>Florian Fainelli</name>
<email>f.fainelli@gmail.com</email>
</author>
<published>2017-09-20T22:52:13Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=e9cd6721460c59dc289d169b5d411bf8b9cef57a'/>
<id>urn:sha1:e9cd6721460c59dc289d169b5d411bf8b9cef57a</id>
<content type='text'>
commit 19cab8872692960535aa6d12e3a295ac51d1a648 upstream.

Commit 3f1ac7a700d0 ("net: ethtool: add new ETHTOOL_xLINKSETTINGS API")
deprecated the ethtool_cmd::transceiver field, which was fine in
premise, except that the PHY library was actually using it to report the
type of transceiver: internal or external.

Use the first word of the reserved field to put this __u8 transceiver
field back in. It is made read-only, and we don't expect the
ETHTOOL_xLINKSETTINGS API to be doing anything with this anyway, so this
is mostly for the legacy path where we do:

ethtool_get_settings()
-&gt; dev-&gt;ethtool_ops-&gt;get_link_ksettings()
   -&gt; convert_link_ksettings_to_legacy_settings()

to have no information loss compared to the legacy get_settings API.

Fixes: 3f1ac7a700d0 ("net: ethtool: add new ETHTOOL_xLINKSETTINGS API")
Signed-off-by: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>ethtool: Remove trailing semicolon for static inline</title>
<updated>2018-09-19T20:47:12Z</updated>
<author>
<name>Florian Fainelli</name>
<email>f.fainelli@gmail.com</email>
</author>
<published>2018-08-04T21:20:40Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=45ad26e499276924639ee680623d34201f98c838'/>
<id>urn:sha1:45ad26e499276924639ee680623d34201f98c838</id>
<content type='text'>
[ Upstream commit d89d41556141a527030a15233135ba622ba3350d ]

Android's header sanitization tool chokes on static inline functions having a
trailing semicolon, leading to an incorrectly parsed header file. While the
tool should obviously be fixed, also fix the header files for the two affected
functions: ethtool_get_flow_spec_ring() and ethtool_get_flow_spec_ring_vf().

Fixes: 8cf6f497de40 ("ethtool: Add helper routines to pass vf to rx_flow_spec")
Reporetd-by: Blair Prescott &lt;blair.prescott@broadcom.com&gt;
Signed-off-by: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>net: ethtool: add support for 2500BaseT and 5000BaseT link modes</title>
<updated>2017-07-05T12:40:19Z</updated>
<author>
<name>Pavel Belous</name>
<email>pavel.s.belous@gmail.com</email>
</author>
<published>2017-01-28T19:53:28Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=0e8eca987e27077fc2ade85aa402dbc177fdb026'/>
<id>urn:sha1:0e8eca987e27077fc2ade85aa402dbc177fdb026</id>
<content type='text'>
[ Upstream commit 94842b4fc4d6b1691cfc86c6f5251f299d27f4ba ]

This patch introduce support for 2500BaseT and 5000BaseT link modes.
These modes are included in the new IEEE 802.3bz standard.

Signed-off-by: Pavel Belous &lt;pavel.s.belous@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@verizon.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>ethtool: silence warning on bit loss</title>
<updated>2016-10-14T20:05:42Z</updated>
<author>
<name>Jesse Brandeburg</name>
<email>jesse.brandeburg@intel.com</email>
</author>
<published>2016-10-13T23:13:55Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=85a624403c77c3f074931aefdfced59f61b668cb'/>
<id>urn:sha1:85a624403c77c3f074931aefdfced59f61b668cb</id>
<content type='text'>
Sparse was complaining when we went to prototype some code
using ethtool_cmd_speed_set and SPEED_100000, which uses
the upper 16 bits of __u32 speed for the first time.

CHECK
...
.../uapi/linux/ethtool.h:123:28: warning:
  cast truncates bits from constant value (186a0 becomes 86a0)

The warning is actually bogus, as no bits are really lost, but
we can get rid of the sparse warning with this one small change.

Reported-by: Preethi Banala &lt;preethi.banala@intel.com&gt;
Signed-off-by: Jesse Brandeburg &lt;jesse.brandeburg@intel.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: ethtool: add support for 1000BaseX and missing 10G link modes</title>
<updated>2016-08-29T04:27:34Z</updated>
<author>
<name>Vidya Sagar Ravipati</name>
<email>vidya@cumulusnetworks.com</email>
</author>
<published>2016-08-26T08:25:50Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=5711a98221443aec54c4c81ee98c6ae46acccb65'/>
<id>urn:sha1:5711a98221443aec54c4c81ee98c6ae46acccb65</id>
<content type='text'>
This patch enhances ethtool link mode bitmap to include
missing interface modes for 1G/10G speeds

Changes:
1000baseX is the mode introduced to cover all 1G Fiber cases.
All modes under 1000BaseX i.e. 1000BASE-SX, 1000BASE-LX, 1000BASE-LX10
and 1000BASE-BX10 are not explicitly defined at this moment.
10G CR,SR,LR and ER link modes are included for 10G speed..

Issue:
ethtool on  1G/10G SFP port reports Base-T
as this port supports 1000baseX,10G CR, SR and LR modes.

root@tor-02$ ethtool swp1
Settings for swp1:
        Supported ports: [ FIBRE ]
        Supported link modes:   1000baseT/Full
                                10000baseT/Full
        Supported pause frame use: Symmetric Receive-only
        Supports auto-negotiation: Yes
        Advertised link modes:  1000baseT/Full
        Advertised pause frame use: No
        Advertised auto-negotiation: No
        Speed: 10000Mb/s
        Duplex: Full
        Port: FIBRE
        PHYAD: 0
        Transceiver: external
        Auto-negotiation: off
        Current message level: 0x00000000 (0)

        Link detected: yes

After fix:
root@tor-02$ ethtool swp1
Settings for swp1:
        Supported ports: [ FIBRE ]
        Supported link modes:   1000baseX/Full
                                10000baseCR/Full
                                10000baseSR/Full
                                10000baseLR/Full
                                10000baseER/Full
        Supported pause frame use: Symmetric Receive-only
        Supports auto-negotiation: Yes
        Advertised link modes:  1000baseT/Full
        Advertised pause frame use: No
        Advertised auto-negotiation: No
        Speed: 10000Mb/s
        Duplex: Full
        Port: FIBRE
        PHYAD: 0
        Transceiver: external
        Auto-negotiation: off
        Current message level: 0x00000000 (0)
        Link detected: yes

Signed-off-by: Vidya Sagar Ravipati &lt;vidya@cumulusnetworks.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ethtool: Add 50G baseSR2 link mode</title>
<updated>2016-06-27T08:10:41Z</updated>
<author>
<name>Gal Pressman</name>
<email>galp@mellanox.com</email>
</author>
<published>2016-06-23T14:02:43Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=89da45b8b5b2187734a11038b8593714f964ffd1'/>
<id>urn:sha1:89da45b8b5b2187734a11038b8593714f964ffd1</id>
<content type='text'>
Add ETHTOOL_LINK_MODE_50000baseSR2_Full_BIT bit.

Signed-off-by: Gal Pressman &lt;galp@mellanox.com&gt;
Signed-off-by: Saeed Mahameed &lt;saeedm@mellanox.com&gt;
Cc: Ben Hutchings &lt;bwh@kernel.org&gt;
Cc: David Decotigny &lt;decot@googlers.com&gt;
Acked-By: David Decotigny &lt;decot@googlers.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ethtool: add support for 25G/50G/100G speed modes</title>
<updated>2016-05-25T19:26:54Z</updated>
<author>
<name>Vidya Sagar Ravipati</name>
<email>vidya@cumulusnetworks.com</email>
</author>
<published>2016-05-23T06:59:00Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=3851112e4737cd52aaeda0ce8d084be9ee128106'/>
<id>urn:sha1:3851112e4737cd52aaeda0ce8d084be9ee128106</id>
<content type='text'>
This patch enhances ethtool link mode bitmap to include
25G/50G/100G speed along with interface modes

Signed-off-by: Vidya Sagar Ravipati &lt;vidya@cumulusnetworks.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ethtool: minor doc update</title>
<updated>2016-03-22T19:45:44Z</updated>
<author>
<name>David Decotigny</name>
<email>decot@googlers.com</email>
</author>
<published>2016-03-21T17:15:34Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=5f2d472450c94402627f54b603d271076f3f97c2'/>
<id>urn:sha1:5f2d472450c94402627f54b603d271076f3f97c2</id>
<content type='text'>
Updates: commit 793cf87de9d1 ("ethtool: Set cmd field in
         ETHTOOL_GLINKSETTINGS response to wrong nwords")

Signed-off-by: David Decotigny &lt;decot@googlers.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ethtool.h: define INT_MAX for userland</title>
<updated>2016-03-04T21:10:37Z</updated>
<author>
<name>Nicolas Dichtel</name>
<email>nicolas.dichtel@6wind.com</email>
</author>
<published>2016-03-04T10:52:19Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=14e2037902d65213842b4e40305ff54a64abbcb6'/>
<id>urn:sha1:14e2037902d65213842b4e40305ff54a64abbcb6</id>
<content type='text'>
INT_MAX needs limits.h in userland.
When ethtool.h is included by a userland app, we got the following error:

.../usr/include/linux/ethtool.h: In function 'ethtool_validate_speed':
.../usr/include/linux/ethtool.h:1471:18: error: 'INT_MAX' undeclared (first use in this function)
  return speed &lt;= INT_MAX || speed == SPEED_UNKNOWN
                  ^

Fixes: e02564ee334a ("ethtool: make validate_speed accept all speeds between 0 and INT_MAX")
CC: Nikolay Aleksandrov &lt;nikolay@cumulusnetworks.com&gt;
Signed-off-by: Nicolas Dichtel &lt;nicolas.dichtel@6wind.com&gt;
Acked-by: Nikolay Aleksandrov &lt;nikolay@cumulusnetworks.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
