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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2F800C001DC for ; Mon, 31 Jul 2023 09:10:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229975AbjGaJKx (ORCPT ); Mon, 31 Jul 2023 05:10:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41778 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229479AbjGaJKw (ORCPT ); Mon, 31 Jul 2023 05:10:52 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0596AF3; Mon, 31 Jul 2023 02:10:49 -0700 (PDT) Received: from kwepemm600007.china.huawei.com (unknown [172.30.72.56]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4RDsrW01f2zrS4J; Mon, 31 Jul 2023 17:09:46 +0800 (CST) Received: from [10.69.136.139] (10.69.136.139) by kwepemm600007.china.huawei.com (7.193.23.208) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Mon, 31 Jul 2023 17:10:46 +0800 Message-ID: Date: Mon, 31 Jul 2023 17:10:45 +0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH net 5/6] net: hns3: fix wrong print link down up To: Andrew Lunn CC: , , , , , , , , , , , , References: <20230728075840.4022760-1-shaojijie@huawei.com> <20230728075840.4022760-6-shaojijie@huawei.com> <7ce32389-550b-4beb-82b1-1b6183fdeabb@lunn.ch> <2c6514a7-db97-f345-9bc4-affd4eba2dda@huawei.com> <73b41fe2-12dd-4fc0-a44d-f6f94e6541fc@lunn.ch> From: Jijie Shao In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.69.136.139] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To kwepemm600007.china.huawei.com (7.193.23.208) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org on 2023/7/30 2:23, Andrew Lunn wrote: >> Now i wounder if you are fixing the wrong thing. Maybe you should be >> fixing the PHY so it does not report up and then down? You say 'very >> snall intervals', which should in fact be 1 second. So is the PHY >> reporting link for a number of poll intervals? 1min to 10 minutes? >> >> Andrew >> >> Yes, according to the log records, the phy polls every second, >> but the link status changes take time. >> Generally, it takes 10 seconds for the phy to detect link down, >> but occasionally it takes several minutes to detect link down, > What PHY driver is this? > > It is not so clear what should actually happen with auto-neg turned > off. With it on, and the link going down, the PHY should react after > about 1 second. It is not supposed to react faster than that, although > some PHYs allow fast link down notification to be configured. > > Have you checked 802.3 to see what it says about auto-neg off and link > down detection? > > I personally would not suppress this behaviour in the MAC > driver. Otherwise you are going to have funny combinations of special > cases of a feature which very few people actually use, making your > maintenance costs higher. > > Andrew Thanks for your suggestion, We are analyzing this issue in depth.