From patchwork Wed Dec 4 15:26:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mian Yousaf Kaukab X-Patchwork-Id: 11273075 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7A360159A for ; Wed, 4 Dec 2019 15:26:09 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5954F2073B for ; Wed, 4 Dec 2019 15:26:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="d5rB0+vR" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5954F2073B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=yQ1hsxB2Oav4/HiUyzWRXsI4ESy61K9r46/YP/nB1D8=; b=d5r B0+vRR2Na9byvK7iRHweMp10oVYiCjkpZJ1FvffPcDFV0f6ahll9G335dakPadDfRy33FykrkEYIX NOqg5Rti3NRz2sGNamgRUQ5uOME/JkXDHp6EUbngwGe9oxjiJ3vTMIS9vVMn/X+flOkrcLdc7fnny 919/uC//xDS+t8eDGRcIva0dLA6Gxw0CEO/Zf5n5i3TntC4IZnOZoOAQ91YBGqlsq3EIMOgojIVIB BsZmc8LfbxC0Vsq21hElXfmXfrCDRzDGVRPanDo3N9JIYg1ABWLZlfGworAHhfi8xlYHcHNY5AQ3a 5AKMPHcoC5rslUgjk0gEqBvTXNQUYWg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1icWXY-0001p3-Kx; Wed, 04 Dec 2019 15:26:08 +0000 Received: from mx2.suse.de ([195.135.220.15] helo=mx1.suse.de) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1icWXV-0001o8-Pa for linux-arm-kernel@lists.infradead.org; Wed, 04 Dec 2019 15:26:07 +0000 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 AE625AD75; Wed, 4 Dec 2019 15:26:01 +0000 (UTC) From: Mian Yousaf Kaukab To: netdev@vger.kernel.org Subject: [PATCH] net: thunderx: start phy before starting autonegotiation Date: Wed, 4 Dec 2019 16:26:51 +0100 Message-Id: <20191204152651.13418-1-ykaukab@suse.de> X-Mailer: git-send-email 2.16.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191204_072605_970932_4C6B782D X-CRM114-Status: UNSURE ( 8.19 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [195.135.220.15 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: rric@kernel.org, tharvey@gateworks.com, Mian Yousaf Kaukab , linux-kernel@vger.kernel.org, sgoutham@cavium.com, davem@davemloft.net, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Since "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. Network fails without this patch on Octeon TX. Signed-off-by: Mian Yousaf Kaukab --- drivers/net/ethernet/cavium/thunder/thunder_bgx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/cavium/thunder/thunder_bgx.c b/drivers/net/ethernet/cavium/thunder/thunder_bgx.c index 1e09fdb63c4f..504644257aff 100644 --- a/drivers/net/ethernet/cavium/thunder/thunder_bgx.c +++ b/drivers/net/ethernet/cavium/thunder/thunder_bgx.c @@ -1115,6 +1115,7 @@ static int bgx_lmac_enable(struct bgx *bgx, u8 lmacid) phy_interface_mode(lmac->lmac_type))) return -ENODEV; + phy_start(lmac->phydev); phy_start_aneg(lmac->phydev); return 0; }