Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp706853ybl; Wed, 4 Dec 2019 09:32:56 -0800 (PST) X-Google-Smtp-Source: APXvYqxBCSVgLUh4cwmof/oZKrY3br0AfLw+dtr18olGNNggebiI90n9dPR62/mawuZ+SCF8pDyI X-Received: by 2002:a9d:7f16:: with SMTP id j22mr3320396otq.256.1575480776013; Wed, 04 Dec 2019 09:32:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575480776; cv=none; d=google.com; s=arc-20160816; b=bckLLwXJteu04glSYfV9hEeQSVSR3SmeHQelV3C3wRimGtv1Ur+ZqNfe69NgM/UHwr ppqBdmfLdZjRFCnOyWwYlKUwMJdK2Vg/MgHkQo1AhkG2epB0MQWapvyKQNKMP62Ka75H JyUB6pVTAH8pp4iU1/5guZOrLaLhPAEWjc2ffGFupVuX4qrzPsX97xKbQjpqgdjDVEXN 3wd45+aqorGWG31LWX4ncYfYwnAep6AWZat298ji6Qrq/nc2wc69XlaSI+Rryletm6aq TzagugiFT3CE5jXmfIqIDEEI+/nZ4iLnu/BwkALagpIQ1nHLrtX6QBfgZBIdNi74elLV CRfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=ipTBQn8R7XdfAUORW76Skh6z6MK8u+Be4lKoarT8MaI=; b=sEn+i8UrFBygmET/5f6mmUE4KmQ8ilP4ZKxidkorpUiDK14sndVN01X3D5IfaaDIif vvaZckOj452QQyZxgIBL73nmNx6OmGCCdGB6r6ktyhCsKk2COKlxavwTJP66B/7f7tpZ XRuUogkxbVQ0CSNkIRgBj25yHm9Sqmdg62bLX3cOia+WZiflyMWAza4EWetPfYdwD6Re RLqOBFFLX6MakKxh2jDwqBdyuGVgyeZyAN+0WzdtKGMWdJy7sFroTczhZwAvUAIjl69J eBBU92HVfrA18a3IwdQRpUR2rLtm1iEIXvOl0p9xGHRrJfXdw8rz75fDyc4g7mFF41EO Visw== 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 t134si2325885oie.148.2019.12.04.09.32.40; Wed, 04 Dec 2019 09:32:56 -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 S1728234AbfLDRW5 (ORCPT + 99 others); Wed, 4 Dec 2019 12:22:57 -0500 Received: from mx2.suse.de ([195.135.220.15]:47804 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727033AbfLDRW5 (ORCPT ); Wed, 4 Dec 2019 12:22:57 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 41DDEB11A; Wed, 4 Dec 2019 17:22:55 +0000 (UTC) From: Mian Yousaf Kaukab To: netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, tharvey@gateworks.com, davem@davemloft.net, rric@kernel.org, sgoutham@cavium.com, sergei.shtylyov@cogentembedded.com, andrew@lunn.ch, Mian Yousaf Kaukab Subject: [PATCH v1] net: thunderx: start phy before starting autonegotiation Date: Wed, 4 Dec 2019 18:23:51 +0100 Message-Id: <20191204172351.29709-1-ykaukab@suse.de> X-Mailer: git-send-email 2.16.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Since commit 2b3e88ea6528 ("net: phy: improve phy state checking") phy_start_aneg() expects phy state to be >= PHY_UP. Call phy_start() before calling phy_start_aneg() during probe so that autonegotiation is initiated. As phy_start() takes care of calling phy_start_aneg(), drop the explicit call to phy_start_aneg(). Network fails without this patch on Octeon TX. Signed-off-by: Mian Yousaf Kaukab --- v1: -Remove call to phy_start_aneg() as suggested by Andrew Lunn -Fix reference to patch in change log as suggested by Sergei Shtylyov drivers/net/ethernet/cavium/thunder/thunder_bgx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/cavium/thunder/thunder_bgx.c b/drivers/net/ethernet/cavium/thunder/thunder_bgx.c index 1e09fdb63c4f..c4f6ec0cd183 100644 --- a/drivers/net/ethernet/cavium/thunder/thunder_bgx.c +++ b/drivers/net/ethernet/cavium/thunder/thunder_bgx.c @@ -1115,7 +1115,7 @@ static int bgx_lmac_enable(struct bgx *bgx, u8 lmacid) phy_interface_mode(lmac->lmac_type))) return -ENODEV; - phy_start_aneg(lmac->phydev); + phy_start(lmac->phydev); return 0; } -- 2.16.4