Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1571663pxb; Thu, 28 Oct 2021 06:16:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw4SGJWcgkBH7vCdfNslAl0QsOBJLlE6eOn3nN3iNtz2H07ZXlqrZqJeDpyyO1X3moMXL+V X-Received: by 2002:a17:902:ed96:b0:141:a313:dd9 with SMTP id e22-20020a170902ed9600b00141a3130dd9mr191208plj.37.1635426994303; Thu, 28 Oct 2021 06:16:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635426994; cv=none; d=google.com; s=arc-20160816; b=euFu4vTTMPyBaagYqjJFilVAsMNejT8pM1fXz8RPAzk6/7whMNZMRC5oTx23qmrgJx oyrGh6rHdCvRXSXKZmU53dQ7gwqvvp1Gyj8k613Sl+vpvLf3ZDLn8Job+rWxaR8t2KwI 3hKur7D+mwLfZd3GcD2jfE/biquZbKyA0KHJxFNFnA3+lcx/WvQ6yJ8qs4pAbq2Evpym LwlxLXlbwsT86slEdVcV3SW9BW5isQHTnxKG8BigDHS8Uo1jBFZH1dy+3dHrlLNhIf69 h0RWfeYnodqNg0rNHY+bkXX5fNHh+wySMbJsf/6zXIYG0iiZeNKRi510I/bnA21lN7Kp hKvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:references:cc:to :subject; bh=5vD8r7Tcw6YyKgFW72bRUs7NtqJI4odDxW54qd/mAW0=; b=KxqI/pAMS6+iZs2XtuwIEoSQ9H7un03REskgOrO/9SYP1WwlRyNbJM2GUyGBsYxKiO FO49GdBxTzBFQ4ebe6KyTcskN1E477yKaDBtf9HeJU25sGsrVMtI8cB7WVoH2VdKIRiN wIsFiR5plqJdUi3wfMFmqRHu2BvAv+u38o/VpeN97V1CVbplG7dsccHBHaILHY8rRrAO Ui5SEQRWwkH3x6DLtgC7vZvztUzoxfvF8ce+e1v4SiFOe0ZwyBIY1L+6rBFZcpGrkGor 9qjfLXmF4ZOjzZ8FBN2wMHbhTpsmVLuMmJ286f6DnURoSOFy9HzY+O0jguzpdC0WvaEa 1DVQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g2si3808210pgl.634.2021.10.28.06.16.21; Thu, 28 Oct 2021 06:16:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230286AbhJ1NQd (ORCPT + 99 others); Thu, 28 Oct 2021 09:16:33 -0400 Received: from szxga01-in.huawei.com ([45.249.212.187]:13985 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230248AbhJ1NQc (ORCPT ); Thu, 28 Oct 2021 09:16:32 -0400 Received: from dggemv703-chm.china.huawei.com (unknown [172.30.72.53]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4Hg5Yx2J4VzWZ1h; Thu, 28 Oct 2021 21:12:05 +0800 (CST) Received: from kwepemm600016.china.huawei.com (7.193.23.20) by dggemv703-chm.china.huawei.com (10.3.19.46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.15; Thu, 28 Oct 2021 21:14:02 +0800 Received: from [10.67.102.67] (10.67.102.67) by kwepemm600016.china.huawei.com (7.193.23.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.15; Thu, 28 Oct 2021 21:14:01 +0800 Subject: Re: [PATCH net 1/7] net: hns3: fix pause config problem after autoneg disabled To: Andrew Lunn CC: , , , , , , References: <20211027121149.45897-1-huangguangbin2@huawei.com> <20211027121149.45897-2-huangguangbin2@huawei.com> <09eda9fe-196b-006b-6f01-f54e75715961@huawei.com> From: "huangguangbin (A)" Message-ID: <41ed2a6f-b9fc-4806-72d1-1e65f946fe30@huawei.com> Date: Thu, 28 Oct 2021 21:14:01 +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: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.102.67] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To kwepemm600016.china.huawei.com (7.193.23.20) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021/10/28 20:30, Andrew Lunn wrote: >> Hi Andrew, thanks very much for your guidance on how to use pause autoneg, >> it confuses me before because PHY registers actually have no separate setting >> bit of pause autoneg. >> >> So, summarize what you mean: >> 1. If pause autoneg is on, driver should always use the autoneg result to program >> the MAC. Eventhough general autoneg is off now and link state is no changed then >> driver just needs to keep the last configuration for the MAC, if link state is >> changed and phy goes down and up then driver needs to program the MAC according >> to the autoneg result in the link_adjust callback. >> 2. If pause autoneg is off, driver should directly configure the MAC with tx pause >> and rx pause. Eventhough general autoneg is on, driver should ignore the autoneg >> result. >> >> Do I understand right? > > Yes, that fits my understanding of ethtool, etc. > > phylink tried to clear up some of these problems by fully implementing > the call within phylink. All the MAC driver needs to provide is a > method to configure the MAC pause settings. Take a look at > phylink_ethtool_set_pauseparam() and the commit messages related to > that. > > Andrew > . > Ok, thanks!