Received: by 10.223.185.116 with SMTP id b49csp6403726wrg; Wed, 28 Feb 2018 08:51:26 -0800 (PST) X-Google-Smtp-Source: AH8x225q6u4Uytprz5VxslWZVn+nWrk5HBI5OD8Wlteceuk7sK8iwMl8De4rcsWfg5ZtrJZ8SnyR X-Received: by 10.99.138.74 with SMTP id y71mr14996364pgd.419.1519836686179; Wed, 28 Feb 2018 08:51:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519836686; cv=none; d=google.com; s=arc-20160816; b=0QSF5qQ4/BXETSrOpFFbppwifElHFWzX5eDbyn0/9WkXJ9eWcM/DKOphOo5xqUDGvA Mo8eP9Kf79iO65QNm2gV34KZXxwGFUWltZQ2xvp+Ti0PD85tbQOylq5nyQmJ9cxmoGyw sEjhqStYzXsEO3IBnv4KHNzIgsPEZtlGyyW5QiNVDhJB64QWT9ogV0bIyrPTQEgZ4oKL rzk1y+pU/lHfC6fuFsC6TYUZr0FxLHfexkJUP5lvcKmr6W4ZG64p/mWVIp/BS9FkoBcO Xs4hq+mbnSr3ymkDAaddgO6AMq2eBtH2ltERfPIeDbgKsBDml+iYusSRFyVzhRdTBhOL 4nJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:subject:message-id:date:cc:to :from:mime-version:content-transfer-encoding:content-disposition :arc-authentication-results; bh=zNVtqTBS0U8/LV9AZhC1zRfepaAGE7y4YMg2IoWIGKk=; b=icfBFZM7glVLYARPh5A5cjKX6c5xcVJ3Vha5Bxb8ZsAGOyDVnJNEIs7kqewbwp7GeK DsAO8alJOWrYXcogsUisNKc5aMYhJ6LV5VMrf4MXfUB35YIxRCWG5x8RC4sAfGoIxP8A jxCq9GjWRUG0hRJwQWVXUDrC9uFlTVQC1hlqw/ExqgcUVw4RavFtiq73QzeQoxpo6M+T enrP4PP+c9Ov+CjnjPgAx7AVPviuyqPGs9v/Zw4iVc0oeOOFL4ptpCLFnGsuy5a6UbUj AWnFGj/u0rJaio6XMHl8d//8x+w9qD+DHMx30AJpAop8RmYHxvSY9SPCtVY+liOPV6Wg vNfA== 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 m72si1481774pfj.159.2018.02.28.08.51.10; Wed, 28 Feb 2018 08:51:26 -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 S932795AbeB1QuX (ORCPT + 99 others); Wed, 28 Feb 2018 11:50:23 -0500 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:34564 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932747AbeB1P6e (ORCPT ); Wed, 28 Feb 2018 10:58:34 -0500 Received: from [2a02:8011:400e:2:6f00:88c8:c921:d332] (helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1er3Ys-0006XW-Bu; Wed, 28 Feb 2018 15:22:30 +0000 Received: from ben by deadeye with local (Exim 4.90_1) (envelope-from ) id 1er3Yh-00008O-FI; Wed, 28 Feb 2018 15:22:19 +0000 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, "Gregory CLEMENT" , "Dmitri Epshtein" , "David S. Miller" , "Yelena Krivosheev" Date: Wed, 28 Feb 2018 15:20:18 +0000 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) Subject: [PATCH 3.16 136/254] net: mvneta: clear interface link status on port disable In-Reply-To: X-SA-Exim-Connect-IP: 2a02:8011:400e:2:6f00:88c8:c921:d332 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.16.55-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Yelena Krivosheev commit 4423c18e466afdfb02a36ee8b9f901d144b3c607 upstream. When port connect to PHY in polling mode (with poll interval 1 sec), port and phy link status must be synchronize in order don't loss link change event. [gregory.clement@free-electrons.com: add fixes tag] Fixes: c5aff18204da ("net: mvneta: driver for Marvell Armada 370/XP network unit") Signed-off-by: Yelena Krivosheev Tested-by: Dmitri Epshtein Signed-off-by: Gregory CLEMENT Signed-off-by: David S. Miller Signed-off-by: Ben Hutchings --- drivers/net/ethernet/marvell/mvneta.c | 4 ++++ 1 file changed, 4 insertions(+) --- a/drivers/net/ethernet/marvell/mvneta.c +++ b/drivers/net/ethernet/marvell/mvneta.c @@ -851,6 +851,10 @@ static void mvneta_port_disable(struct m val &= ~MVNETA_GMAC0_PORT_ENABLE; mvreg_write(pp, MVNETA_GMAC_CTRL_0, val); + pp->link = 0; + pp->duplex = -1; + pp->speed = 0; + udelay(200); }