Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1652025pxb; Fri, 26 Feb 2021 17:32:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJxDXr8GjkA40UoyLZCJuE3ncj9QeYvyASX3ND53pEI9Tuifvo5WO/fNrdBa3mMZz2U5EIoD X-Received: by 2002:a17:906:5acd:: with SMTP id x13mr6071254ejs.211.1614389557700; Fri, 26 Feb 2021 17:32:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614389557; cv=none; d=google.com; s=arc-20160816; b=RijyNSiuXuMbA2xhT5FNomN6l3G+f74BzqSo9V0XAPHaOiBQv3O0XKLx9OFi8AM9Tj wY5H3X442NBYUoPohSu3TEUtWh3VyS5miqY0U0a6+08M9vaLFWWo2e+bRqovqknBXfrf bWQbynjD8j2f8u/k5qgaTb54SvurGbKgbBTStilpSRakdoqcPkA1/2OwoFOkcttU+mrL JDEG4I+xuW4GW2D2BoUQhMz+7OKUEogyHpRKA0HxgBbTW3VVN2R5e68i6z1J4Su4UVo8 jpHbs1jd1t/a2O2cxd2CaYAaDoLxltrXd9W5jL+W9duNOCoE6qYNsMS1/woWnKqiqH47 Hfug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=ZbotXa7zHgzIcd7NML9Mxylpi1X+kj39Af2vo/UU/K8=; b=rBDvbopR2mL4qHquEjv3miqDtSBJI+F6Y7iN1x04WwX0nnVLM7cIhEXZpwQozTeOY2 WTJGDeajRqf7k8/rdF6Xdcrvkq0sLEXZiVpJIZPsc/TKSax3mO0ue0Yb4u1RZnOkHCpx xojJLXZ3+KL1WrnoErTRFwekcq+IzCvuOzBddx1QHXdMzBbjWMpyam12gxcQ00MNaj3H z5eMrc5aiYO+rQRdBnG2ozzMwRKjl4ZVmh0fVXCJLuLKSSaKQzwcb/z/odn4EWOM9Diu fMENT1fmBK2IEalZY40MZDMQDjtBUt4imTJJSBd92aepHL0HlOtIdVX822QE4QxwtmRY 1OTw== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s10si6964695edj.416.2021.02.26.17.32.03; Fri, 26 Feb 2021 17:32:37 -0800 (PST) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230014AbhB0B2U (ORCPT + 99 others); Fri, 26 Feb 2021 20:28:20 -0500 Received: from szxga01-in.huawei.com ([45.249.212.187]:4639 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229864AbhB0B2T (ORCPT ); Fri, 26 Feb 2021 20:28:19 -0500 Received: from dggeme752-chm.china.huawei.com (unknown [172.30.72.56]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4DnTPV662JzYDCT; Sat, 27 Feb 2021 09:26:06 +0800 (CST) Received: from [127.0.0.1] (10.69.26.252) by dggeme752-chm.china.huawei.com (10.3.19.98) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2106.2; Sat, 27 Feb 2021 09:27:35 +0800 Subject: Re: [PATCH net] net: phy: fix save wrong speed and duplex problem if autoneg is on To: Jakub Kicinski CC: , , , , , , Guangbin Huang References: <1614325482-25208-1-git-send-email-tanhuazhong@huawei.com> <20210226155603.6a1cda0b@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> From: Huazhong Tan Message-ID: Date: Sat, 27 Feb 2021 09:27:35 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.5.1 MIME-Version: 1.0 In-Reply-To: <20210226155603.6a1cda0b@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Originating-IP: [10.69.26.252] X-ClientProxiedBy: dggeme704-chm.china.huawei.com (10.1.199.100) To dggeme752-chm.china.huawei.com (10.3.19.98) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021/2/27 7:56, Jakub Kicinski wrote: > On Fri, 26 Feb 2021 15:44:42 +0800 Huazhong Tan wrote: >> From: Guangbin Huang >> >> If phy uses generic driver and autoneg is on, enter command >> "ethtool -s eth0 speed 50" will not change phy speed actually, but >> command "ethtool eth0" shows speed is 50Mb/s because phydev->speed >> has been set to 50 and no update later. >> >> And duplex setting has same problem too. >> >> However, if autoneg is on, phy only changes speed and duplex according to >> phydev->advertising, but not phydev->speed and phydev->duplex. So in this >> case, phydev->speed and phydev->duplex don't need to be set in function >> phy_ethtool_ksettings_set() if autoneg is on. > Can we get a Fixes tag for this one? How far back does this behavior > date? will add a fixes tag in V2, thanks. > .