From mboxrd@z Thu Jan 1 00:00:00 1970 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 DF4C9C43381 for ; Thu, 28 Mar 2019 19:29:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A68C72173C for ; Thu, 28 Mar 2019 19:29:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="jTNMsJnz" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726311AbfC1T3M (ORCPT ); Thu, 28 Mar 2019 15:29:12 -0400 Received: from mail-wm1-f67.google.com ([209.85.128.67]:52410 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725885AbfC1T3M (ORCPT ); Thu, 28 Mar 2019 15:29:12 -0400 Received: by mail-wm1-f67.google.com with SMTP id a184so45753wma.2 for ; Thu, 28 Mar 2019 12:29:10 -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=jTNMsJnzYyOXNmjfeIu65MJZrWDJ3DJh4fk6EwNhnd+e3TLyWSDkd1jvn9fx40YZPO H30VPE/l0GRRQGahoyNxKWmVq2z93xPkX0lnCO95hRwQki5s+cz8yXCBkKZhAHvvSC4C 9GC1EIXs3HG4X/5sAsay6W2MQFK94NJ26b3kzKxqEiTWnt/EgTqJ7rZ56fGVTySdd8Tr LAAfAovuFLdMVYxaDbGML7zZWMdIPjqQeelPTzAA4E+KvxeXWS3jO5fMMHUA+9Cz+rTS LtzHVvowvy8MYu9SXmyqwHq12h4xnLtYMnMr8vEPcM27+Hg/DahsV0sw4BKBQj17loED DTkA== 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=rGm+2ywQOkr6lXftwxwdoSjXhNtGZEXmD4EV3Rgq0OrD4ng4lltlsUROFh3yX98MwR S4aWtQL6iocAI/hAhz7sTt4qrzkII1mND/2c4ibrAbL6y7ALzYvMLwee9PM+h7zYKM3D VZ9JZespwDnHXl655Q3S64D2uAHrA0x6b7Bh2XlY7TGF+fEzxWNGGiQhcJApIbIXcG4B MeaiLaGVyfctmLLPPVC3y5rfbzU1xvekh6u46+WsE+RKzaF7oCYOerhZFo3M5KuDdH8c uDAm2uH90BMcLyxk1ppFXvSWMGFZYnGbbBteD/Tj4T8o4JJaXcMDiob+9MDQto1MYnl1 REMA== X-Gm-Message-State: APjAAAV1A330vooVHbFBWwKjOSwplJdbW8D79S31UdwFz3kLDumnyQ/i ISZe8Xyg3kHzT/TTceYqfFrk99v8 X-Google-Smtp-Source: APXvYqxs5vpaZAgZDyjiGXOE0FUrni5Z4jXLUhV7G6x7Nqm01b1JbzcKzOblcOmThUD4v0nlavXY1g== X-Received: by 2002:a1c:f414:: with SMTP id z20mr1031766wma.100.1553801349611; Thu, 28 Mar 2019 12:29:09 -0700 (PDT) Received: from ?IPv6:2003:ea:8bc4:dc00:347a:eb2e:ca45:166d? (p200300EA8BC4DC00347AEB2ECA45166D.dip0.t-ipconnect.de. [2003:ea:8bc4:dc00:347a:eb2e:ca45:166d]) by smtp.googlemail.com with ESMTPSA id t2sm53158413wra.9.2019.03.28.12.29.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Mar 2019 12:29:08 -0700 (PDT) Subject: [PATCH 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: <7abec5a5-8087-8591-8619-83605de6dddc@gmail.com> Message-ID: Date: Thu, 28 Mar 2019 20:26:25 +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: <7abec5a5-8087-8591-8619-83605de6dddc@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