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=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no 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 261A7C07E98 for ; Sun, 4 Jul 2021 01:37:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 066F1613F8 for ; Sun, 4 Jul 2021 01:37:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229981AbhGDBkX (ORCPT ); Sat, 3 Jul 2021 21:40:23 -0400 Received: from szxga02-in.huawei.com ([45.249.212.188]:5951 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229596AbhGDBkW (ORCPT ); Sat, 3 Jul 2021 21:40:22 -0400 Received: from dggemv711-chm.china.huawei.com (unknown [172.30.72.57]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4GHWZP467Dz767g; Sun, 4 Jul 2021 09:34:21 +0800 (CST) Received: from dggemi759-chm.china.huawei.com (10.1.198.145) by dggemv711-chm.china.huawei.com (10.1.198.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2176.2; Sun, 4 Jul 2021 09:37:46 +0800 Received: from [10.67.102.67] (10.67.102.67) by dggemi759-chm.china.huawei.com (10.1.198.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Sun, 4 Jul 2021 09:37:45 +0800 Subject: Re: [PATCH net-next 3/3] net: hns3: add support for link diagnosis info in debugfs To: Jakub Kicinski CC: , , , , References: <1624545405-37050-1-git-send-email-huangguangbin2@huawei.com> <1624545405-37050-4-git-send-email-huangguangbin2@huawei.com> <20210624122517.7c8cb329@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> <08395721-4ca1-9913-19fd-4d8ec7e41e4b@huawei.com> <20210701085447.2270b1df@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> From: "huangguangbin (A)" Message-ID: Date: Sun, 4 Jul 2021 09:37:45 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 In-Reply-To: <20210701085447.2270b1df@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.102.67] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To dggemi759-chm.china.huawei.com (10.1.198.145) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021/7/1 23:54, Jakub Kicinski wrote: > On Thu, 1 Jul 2021 17:03:32 +0800 huangguangbin (A) wrote: >> On 2021/6/25 3:25, Jakub Kicinski wrote: >>> On Thu, 24 Jun 2021 22:36:45 +0800 Guangbin Huang wrote: >>>> In order to know reason why link down, add a debugfs file >>>> "link_diagnosis_info" to get link faults from firmware, and each bit >>>> represents one kind of fault. >>>> >>>> usage example: >>>> $ cat link_diagnosis_info >>>> Reference clock lost >>> >>> Please use ethtool->get_link_ext_state instead. >>> . >>> >> Hi Jakub, I have a question to consult you. >> Some fault information in our patch are not existed in current ethtool extended >> link states, for examples: >> "Serdes reference clock lost" >> "Serdes analog loss of signal" >> "SFP tx is disabled" >> "PHY power down" > > Why would the PHY be powered down if user requested port to be up? > In the case of other user may use MDIO tool to write PHY register directly to make PHY power down, if link state can display this information, I think it is helpful. >> "Remote fault" > > I think we do have remote fault: > > state: ETHTOOL_LINK_EXT_STATE_LINK_TRAINING_FAILURE > substate: ETHTOOL_LINK_EXT_SUBSTATE_LT_REMOTE_FAULT > OK. >> Do you think these fault information can be added to ethtool extended link states? > > Yes, would you mind categorizing them into state/substate and sharing > the proposed additions with Amit, Ido, Andrew and other PHY experts? > . > OK.