Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1077629pxk; Fri, 25 Sep 2020 05:47:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxsw6Fyk6pym/WgIDQ3JwWmEZy9idLIUYgMmIxF/IZfnku5bONU5/vE2Mq2ZL4MI/5TQxNl X-Received: by 2002:a17:906:cb98:: with SMTP id mf24mr2704878ejb.90.1601038022690; Fri, 25 Sep 2020 05:47:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601038022; cv=none; d=google.com; s=arc-20160816; b=bmByWXYiQ13RxeoorCwFZuqounNy+b5iQ1+YtDnZxefm36uH3s/XFbSm4K6b4M2d0D YpBzNl5AGkes13kt82HrjH0upQgntmgloMKIUjFLrkayrilybJMMg0ht6IlcF65LxwY2 JQQ6DSyb/mkpirQ0jubJKtWOG+5z3zrsF8T5IgZpClOVccqOSHmx7r8PbGaQi/ruFNUT cG0PuO251yac45X+7Y6Pz/TOqq+I7/kexsQfxN78VR/YJQbarSDSZ8wz3bcjpZ3iph1W UyFIbG/OF1fW6Vpa0/UBxOKD2hFyC8rf3I2WUOSF84/+sKLo4eV4QnrEzIxBMLjpuU8e iXfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=CCZD8UTHnmfs2h2ZSbFRWr2HJAvbw3OyNcDZ8aeNLW8=; b=m2245zjchhXJt3LRbNZ6/rPQtC7i+pS2611S4pE5nB/0RdEHNXzBo7QCZeR1y2ZL/P MJ5TR7Txu9JaUFJcmAfiLU26eSXkCUgigIa2Cvpaa0VCtzlgpUs1rlAXinRte4lGUicZ rEUMt1tIbDca84uKrtZ/PvxfGD+m1/nOH6kX6PS3b2CnrvkHQGZwgD67lyVQXv9hiyt3 IJpANTiF1KDe9tMrbs4cWrhqrldKVrrMD3x7MKhN1hTnrHEvAXSOxXiGdIs6FrhtsqO5 lAqBJkaIhdfGrIRi8mzkm2ERjz/Uw+ClZxeTimp2RB6lO24AncxQKrpTL5rXdpe/Q7PP W12g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Wl8sisii; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q24si1758980edb.85.2020.09.25.05.46.38; Fri, 25 Sep 2020 05:47:02 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Wl8sisii; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728406AbgIYMo6 (ORCPT + 99 others); Fri, 25 Sep 2020 08:44:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37614 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727132AbgIYMo5 (ORCPT ); Fri, 25 Sep 2020 08:44:57 -0400 Received: from mail-lf1-x144.google.com (mail-lf1-x144.google.com [IPv6:2a00:1450:4864:20::144]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9EEAAC0613CE; Fri, 25 Sep 2020 05:44:57 -0700 (PDT) Received: by mail-lf1-x144.google.com with SMTP id y11so2646850lfl.5; Fri, 25 Sep 2020 05:44:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=CCZD8UTHnmfs2h2ZSbFRWr2HJAvbw3OyNcDZ8aeNLW8=; b=Wl8sisiizEKz1tx18uw4vdEpahVK4b8EtKIkWgqdHiF9fUTuY47DZL03xAQ+VzU44H e5hDORWoXZIgXdGF/NGg44+YC8HId64bJCZGz2yClGWVSGoCi+O9IpdalI8rD90xwYg7 wBqBNGb0uJyknn0aIg8ue7Y+fKfGSr7xhq04Qi3JhiLDejyNd8EWIG08NtAN2nzQa/6t Z1nv0a8R+CJk2Ky8UYEn5787kqsUHWTlz2EBeh98ybvYLfNoZVXN+INs/srAkv80Xy7D j4uBiSPdrhKS+SA6WvBTWnkGvfNXl/pc/NdZ8RlBL+sSLgYsn1gtsnCBWbZ/14bD+VF6 YZ8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=CCZD8UTHnmfs2h2ZSbFRWr2HJAvbw3OyNcDZ8aeNLW8=; b=a/8jk4tcT5QgWaGLodwpRpogh0WZpE+Az+WSMMHZatL9lqXdiqbswWlHKvlQeMlbfn b5ShB6rod1/sesB5vyEmem6gjfGdBO5S6NYM1xDSMF4enWyyBiear4XgtVHpem0b4WxO EOeOe16uxKC7iLCysF830OS1RVDMc6GecvdK7QAGGHObMyjb3u4bcOpnQtGwbUeL1gq6 XjbBS5Eyp1cl1GV8cL+KNATJ9YMx07V5pezxqEijRxmcscdJsAuMjtnbVqtls/8EVQwT 90fJ3WzDahwDwIX5RdbXDscYKAQFpTB51ZnE2DmTkqA2f9VIe1NzQmyTxoYtY9FlxE3v WKIw== X-Gm-Message-State: AOAM53303RY1JbaHu2s5E1MmJ2Q/FEwJ7GVmQJe2+/fXRwuqtzLJ4Xiy TOkgzJTNd4i4lnOVtyj9eG6PdEhIeEm7Jg== X-Received: by 2002:a19:dd5:: with SMTP id 204mr1223418lfn.579.1601037895702; Fri, 25 Sep 2020 05:44:55 -0700 (PDT) Received: from localhost.localdomain ([94.153.11.208]) by smtp.gmail.com with ESMTPSA id m132sm2195163lfa.217.2020.09.25.05.44.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Sep 2020 05:44:55 -0700 (PDT) From: Ivan Khoronzhuk X-Google-Original-From: Ivan Khoronzhuk To: netdev@vger.kernel.org, davem@davemloft.net, kuba@kernel.org Cc: alexander.sverdlin@nokia.com, linux-kernel@vger.kernel.org, Ivan Khoronzhuk Subject: [PATCH] net: ethernet: cavium: octeon_mgmt: use phy_start and phy_stop Date: Fri, 25 Sep 2020 15:44:39 +0300 Message-Id: <20200925124439.19946-1-ikhoronz@cisco.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org To start also "phy state machine", with UP state as it should be, the phy_start() has to be used, in another case machine even is not triggered. After this change negotiation is supposed to be triggered by SM workqueue. It's not correct usage, but it appears after the following patch, so add it as a fix. Fixes: 74a992b3598a ("net: phy: add phy_check_link_status") Signed-off-by: Ivan Khoronzhuk --- Based on net/master drivers/net/ethernet/cavium/octeon/octeon_mgmt.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/cavium/octeon/octeon_mgmt.c b/drivers/net/ethernet/cavium/octeon/octeon_mgmt.c index 3e17ce0d2314..6cb2162a75d4 100644 --- a/drivers/net/ethernet/cavium/octeon/octeon_mgmt.c +++ b/drivers/net/ethernet/cavium/octeon/octeon_mgmt.c @@ -1219,7 +1219,7 @@ static int octeon_mgmt_open(struct net_device *netdev) */ if (netdev->phydev) { netif_carrier_off(netdev); - phy_start_aneg(netdev->phydev); + phy_start(netdev->phydev); } netif_wake_queue(netdev); @@ -1247,8 +1247,10 @@ static int octeon_mgmt_stop(struct net_device *netdev) napi_disable(&p->napi); netif_stop_queue(netdev); - if (netdev->phydev) + if (netdev->phydev) { + phy_stop(netdev->phydev); phy_disconnect(netdev->phydev); + } netif_carrier_off(netdev); -- 2.20.1