From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Allan W. Nielsen" Subject: [PATCH net-next v2 3/5] ethtool: (uapi) Add ETHTOOL_PHY_DOWNSHIFT to PHY tunables Date: Mon, 14 Nov 2016 10:29:18 +0100 Message-ID: <1479115760-1182-4-git-send-email-allan.nielsen@microsemi.com> References: <1479115760-1182-1-git-send-email-allan.nielsen@microsemi.com> Mime-Version: 1.0 Content-Type: text/plain Cc: , , , Raju Lakkaraju To: Return-path: Received: from mail-by2nam03on0049.outbound.protection.outlook.com ([104.47.42.49]:17952 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753184AbcKNJ3o (ORCPT ); Mon, 14 Nov 2016 04:29:44 -0500 In-Reply-To: <1479115760-1182-1-git-send-email-allan.nielsen@microsemi.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Raju Lakkaraju For operation in cabling environments that are incompatible with 1000BAST-T, PHY device may provide an automatic link speed downshift operation. When enabled, the device automatically changes its 1000BAST-T auto-negotiation to the next slower speed after a configured number of failed attempts at 1000BAST-T. This feature is useful in setting up in networks using older cable installations that include only pairs A and B, and not pairs C and D. Signed-off-by: Raju Lakkaraju --- include/uapi/linux/ethtool.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/uapi/linux/ethtool.h b/include/uapi/linux/ethtool.h index 42f696f..f0db778 100644 --- a/include/uapi/linux/ethtool.h +++ b/include/uapi/linux/ethtool.h @@ -248,9 +248,12 @@ struct ethtool_tunable { void *data[0]; }; +#define DOWNSHIFT_DEV_DEFAULT_COUNT 0xff +#define DOWNSHIFT_DEV_DISABLE 0 + enum phy_tunable_id { ETHTOOL_PHY_ID_UNSPEC, - + ETHTOOL_PHY_DOWNSHIFT, /* * Add your fresh new phy tunable attribute above and remember to update * phy_tunable_strings[] in net/core/ethtool.c -- 2.7.3