Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 13543C43381 for ; Fri, 29 Mar 2019 19:17:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C0F22218A3 for ; Fri, 29 Mar 2019 19:17:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ObNmSwON" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729766AbfC2TRW (ORCPT ); Fri, 29 Mar 2019 15:17:22 -0400 Received: from mail-wm1-f67.google.com ([209.85.128.67]:51566 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729483AbfC2TRW (ORCPT ); Fri, 29 Mar 2019 15:17:22 -0400 Received: by mail-wm1-f67.google.com with SMTP id 4so3628505wmf.1 for ; Fri, 29 Mar 2019 12:17:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:from:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=rS4bQQB+J+XhCtx/inr8A3/QnSTixc2mEFjfxNEVV4g=; b=ObNmSwONlVBNVpyxPYnAzkFelM9Lv4S6Sf6bPrkgl2mygKApgAUl2XERh4gtAjk+8Q 0K0U0k5GrQxWH4iEXV0MfqLHuZSqgt9OVch4zz/OK4cKySSo8/mkW+QCduLwvtQKWGKR pw1l7UqCnmGzvnf9HUoXwhz1xJQMEpROp8ZK4PwAfiRlwdhZ2noh3tUjqfMOkNPar9Aj kuETjQOL8iExD+3gCgTqWRarHGdTnnOIdMHAPVUEvuuWtmxrb9UADrDp/NWV1qLSycRw bxPVTWgz/NQNlqiUGvuZCQTJMEmb8EB+fYN2gGN/UFdo4zrNHcdcABvaeenCTcZuaYIe 8vXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=rS4bQQB+J+XhCtx/inr8A3/QnSTixc2mEFjfxNEVV4g=; b=gwWLU4E3IdKylj4Bn6If+gsAYEQaWyhoQC1PIfoNHdbtnqZYJCCxnOlalEGYdUIuPb AkHvP4sNgaDIrNESFV/ZIBe8eQaPx6qCAFMim+Tqo8whi497BmjvupklUNzJWqdZH9j/ Bq21hGgvh8krfxVu7qTm02NunPcWf9blyoZr1IbhEBIUD5yt9Hssiqmu3+K035RSEBoG uSBXUVsBkn+94u8xuN6FNcrKA4ASE+jTE7RSxFcEH4RUcG58Nf2lbjd3g7iBnWvbGn5M s5zixYTPZUrUTmjeK9b8ZjzZJqSgxhgGbu69JQkHY6y3d+mlfEzRX08H1STYZdN/JOq4 8uUg== X-Gm-Message-State: APjAAAVa25G/7i8I+xsu3iRKQzcdGj9eHKlRMOUWOoJF36gn6/TjsjHA 6Tu7L78b3jXwzd59ccdH9ZKHaP63 X-Google-Smtp-Source: APXvYqzcUQiFifzmmD4OYD83w2cU2y+NM+f+1Tw5H634SxVNlCxKwrtxYkk0x8RX74hQTAtbg/7RKQ== X-Received: by 2002:a1c:d04a:: with SMTP id h71mr4579150wmg.120.1553887040563; Fri, 29 Mar 2019 12:17:20 -0700 (PDT) Received: from ?IPv6:2003:ea:8be1:dd00:a991:cc44:5157:9e5? (p200300EA8BE1DD00A991CC44515709E5.dip0.t-ipconnect.de. [2003:ea:8be1:dd00:a991:cc44:5157:9e5]) by smtp.googlemail.com with ESMTPSA id e9sm5503862wrp.35.2019.03.29.12.17.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 29 Mar 2019 12:17:19 -0700 (PDT) Subject: [PATCH v2 1/4] ethtool: sync ethtool-copy.h with linux-next from 03/28/2019 From: Heiner Kallweit To: John Linville , Andrew Lunn , Florian Fainelli Cc: "netdev@vger.kernel.org" References: <86b1ab67-fd7e-2789-1218-8c14e8198a60@gmail.com> Message-ID: <9fc411e3-2d12-ac66-b150-be0afb4b76e5@gmail.com> Date: Fri, 29 Mar 2019 20:14:40 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <86b1ab67-fd7e-2789-1218-8c14e8198a60@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Sync ethtool-copy.h with linux-next from 03/28/2019. This provides access to the new PHY tunable for Fast Link Down support. Signed-off-by: Heiner Kallweit --- ethtool-copy.h | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/ethtool-copy.h b/ethtool-copy.h index 1204076..92ab10d 100644 --- a/ethtool-copy.h +++ b/ethtool-copy.h @@ -89,10 +89,6 @@ * %ETHTOOL_GSET to get the current values before making specific * changes and then applying them with %ETHTOOL_SSET. * - * Drivers that implement set_settings() should validate all fields - * other than @cmd that are not described as read-only or deprecated, - * and must ignore all fields described as read-only. - * * Deprecated fields should be ignored by both users and drivers. */ struct ethtool_cmd { @@ -254,9 +250,17 @@ struct ethtool_tunable { #define DOWNSHIFT_DEV_DEFAULT_COUNT 0xff #define DOWNSHIFT_DEV_DISABLE 0 +/* Time in msecs after which link is reported as down + * 0 = lowest time supported by the PHY + * 0xff = off, link down detection according to standard + */ +#define ETHTOOL_PHY_FAST_LINK_DOWN_ON 0 +#define ETHTOOL_PHY_FAST_LINK_DOWN_OFF 0xff + enum phy_tunable_id { ETHTOOL_PHY_ID_UNSPEC, ETHTOOL_PHY_DOWNSHIFT, + ETHTOOL_PHY_FAST_LINK_DOWN, /* * Add your fresh new phy tunable attribute above and remember to update * phy_tunable_strings[] in net/core/ethtool.c @@ -884,7 +888,7 @@ struct ethtool_rx_flow_spec { __u32 location; }; -/* How rings are layed out when accessing virtual functions or +/* How rings are laid 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. @@ -893,7 +897,7 @@ struct ethtool_rx_flow_spec { * 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. + * byte it should be aware of this possibility. */ #define ETHTOOL_RX_FLOW_SPEC_RING 0x00000000FFFFFFFFLL #define ETHTOOL_RX_FLOW_SPEC_RING_VF 0x000000FF00000000LL @@ -1434,6 +1438,13 @@ enum ethtool_link_mode_bit_indices { ETHTOOL_LINK_MODE_56000baseSR4_Full_BIT = 29, ETHTOOL_LINK_MODE_56000baseLR4_Full_BIT = 30, ETHTOOL_LINK_MODE_25000baseCR_Full_BIT = 31, + + /* 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_25000baseKR_Full_BIT = 32, ETHTOOL_LINK_MODE_25000baseSR_Full_BIT = 33, ETHTOOL_LINK_MODE_50000baseCR2_Full_BIT = 34, @@ -1471,14 +1482,8 @@ enum ethtool_link_mode_bit_indices { ETHTOOL_LINK_MODE_200000baseDR4_Full_BIT = 65, ETHTOOL_LINK_MODE_200000baseCR4_Full_BIT = 66, - /* 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_200000baseCR4_Full_BIT, + /* must be last entry */ + __ETHTOOL_LINK_MODE_MASK_NBITS }; #define __ETHTOOL_LINK_MODE_LEGACY_MASK(base_name) \ @@ -1814,14 +1819,9 @@ enum ethtool_reset_flags { * 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). + * are not available in %ethtool_link_settings. These fields will be + * always set to zero in %ETHTOOL_GSET reply and %ETHTOOL_SSET will + * fail if any of them is set to non-zero value. * * Users should assume that all fields not marked read-only are * writable and subject to validation by the driver. They should use -- 2.21.0