Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp6051145ybf; Thu, 5 Mar 2020 12:06:15 -0800 (PST) X-Google-Smtp-Source: ADFU+vsiy5yCQ+Y8nya+DBuSLN5NVrlB1+m7PkyuOI4H+7JNy6BVS5bUvq5qU+6iP/8JAFXAGGGS X-Received: by 2002:a05:6830:1d97:: with SMTP id y23mr130286oti.213.1583438775063; Thu, 05 Mar 2020 12:06:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583438775; cv=none; d=google.com; s=arc-20160816; b=uhejpaAdUqWA7SpYe/2q3A409KgiIUdKas8yfwJfVp1PGoe3hzflFIgSb79yTjtI82 vKFubTEKOR3SwNBSm4lUvoG4UiYeDXuG3UMNQKAX2P2HTOfE2KhW6kPDn4O/CqqzcWoA AzKarQ8qC4GpBKcTohIXVOeGdGXcSqgnIYLb3tk/A5d1n6d9aGrOu/bf7Oy7CpsKKWRh vNDjT8CE6XzNTIgzT9jiB50VMAmJRrOHiJ6ADtFBvl0cEI39vDchCyC57hlSg5+jKYgJ C4CwUZkj7ihj7sn5sjDWdbMJRYBeE8AOOPa5OnlQtIbTw5MRX+pm/Q3mrRXnxeys3cIB dPWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:from:subject:cc:to:message-id:date; bh=cscSDGzdCNKTHxbtzxkrxyxZh1bqXrmlF93Zj6M02OE=; b=jjLAubfRtMV5/1Qz60V1DiVFsk6WRILiUmnpHRInIVMo3fxGZkGB+WbcZ0jPBYIe5c Exod1R0JMp8I7W1UTERHTu/xtWbVjDbkJn9Lj6/llRZ3wl2MxsXMLuaQxiiQLHXKMuIp Jm1nKcF7nXh0FfPvS5ufvs5l9bsA+ErijtwkZAwKsjNKC5Yh7gWmWkPHu4Fz2ZqNUPnj laGOzHMEbHHB/UejoZKhTnB6EjmAeX2y9viPGDwqldRJYoBLz/LF5UkKY9HrN4RKKWs7 3FuZ5Rz7mPstp7BGB9BWJKUOIEyWxqo1gkXbcHLF2qE6T/ZrT3w40qo1iTvt36IvZbWw 2TLQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 110si4020692otj.303.2020.03.05.12.06.02; Thu, 05 Mar 2020 12:06:15 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726271AbgCEUFl (ORCPT + 99 others); Thu, 5 Mar 2020 15:05:41 -0500 Received: from shards.monkeyblade.net ([23.128.96.9]:56144 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725977AbgCEUFl (ORCPT ); Thu, 5 Mar 2020 15:05:41 -0500 Received: from localhost (unknown [IPv6:2601:601:9f00:477::3d5]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id 7B9B015BE9269; Thu, 5 Mar 2020 12:05:40 -0800 (PST) Date: Thu, 05 Mar 2020 12:05:39 -0800 (PST) Message-Id: <20200305.120539.348892699293645794.davem@davemloft.net> To: tanhuazhong@huawei.com Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, salil.mehta@huawei.com, yisen.zhuang@huawei.com, linuxarm@huawei.com, kuba@kernel.org, shenjian15@huawei.com Subject: Re: [PATCH net] net: hns3: fix a not link up issue when fibre port supports autoneg From: David Miller In-Reply-To: <1583372873-26924-1-git-send-email-tanhuazhong@huawei.com> References: <1583372873-26924-1-git-send-email-tanhuazhong@huawei.com> X-Mailer: Mew version 6.8 on Emacs 26.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Thu, 05 Mar 2020 12:05:40 -0800 (PST) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Huazhong Tan Date: Thu, 5 Mar 2020 09:47:53 +0800 > From: Jian Shen > > When fibre port supports auto-negotiation, the IMP(Intelligent > Management Process) processes the speed of auto-negotiation > and the user's speed separately. > For below case, the port will get a not link up problem. > step 1: disables auto-negotiation and sets speed to A, then > the driver's MAC speed will be updated to A. > step 2: enables auto-negotiation and MAC gets negotiated > speed B, then the driver's MAC speed will be updated to B > through querying in periodical task. > step 3: MAC gets new negotiated speed A. > step 4: disables auto-negotiation and sets speed to B before > periodical task query new MAC speed A, the driver will ignore > the speed configuration. > > This patch fixes it by skipping speed and duplex checking when > fibre port supports auto-negotiation. > > Fixes: 22f48e24a23d ("net: hns3: add autoneg and change speed support for fibre port") > Signed-off-by: Jian Shen > Signed-off-by: Huazhong Tan Applied and queued up for -stable, thanks.