Received: by 2002:ac0:8845:0:0:0:0:0 with SMTP id g63csp741039img; Thu, 28 Feb 2019 07:10:18 -0800 (PST) X-Google-Smtp-Source: AHgI3IaSwFWCtcBd/7v03TLW698HtNt/nMOQ++dgEU0HX5EJEBzUB3IJ895lUNbZs96wd/DmF+18 X-Received: by 2002:a17:902:87:: with SMTP id a7mr8416272pla.295.1551366618112; Thu, 28 Feb 2019 07:10:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551366618; cv=none; d=google.com; s=arc-20160816; b=l9Qv2tC7sd7p5p05KYhgKC/CGro/5w5WAk4PLDL4SQRoaIKsbS5Om3G59GvoY9cb3h 4caGMIjAZYYOukadLD/vAhK4rlwQRRO/7j978HTzEJ1bTYHHAXrzUpG/9/PS0YgXvI1w fmwbiddb4lv7sugaqnAbJId437KKm2u/BbTCOXSeCKonp1gAVKlrivSCB4KpI9q4bB25 /Fsk5rxlh+tyRH4SwQk11h6ZFH/awcCUPECsBJmEdTjJFAqzl+GIWCUpX5O5sMRKCznk S4n77trVGJxnCMPJ+sY8uBLxrncMgrpKkR5eV7MZOAedEIWQTm5KlnhDkcYxo9bgyZyJ u0Bg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=pXtvIByuo4nuIkw2Fa2DSZgADlBJQ9bbk+JAFHtOB0w=; b=hw4c0OJ/SVeU5azg2FTEecud67STV7xLC/A7SkcI693kTKlSNWUN1my+fEvknmMdM2 H5zYzNrsV+mbPbvwEEP5Z9ZLvxgnDWxFWJDdIB15ihkKO+DneuHlukxmfDcSXRQ90nqW jGsxE45g9zQrYwjE/S2fK+ZGnUoHD2ywa01kAoj18ELR5dpSqJ4ECOJpY0r2F6ZFYsKB WgEIkukkyZdWA6YeVG2zTtae5vs/y5VWoUbQp3cjIS6HWu/1w4g60VqGFkl0qG17Qj6s 9zW3ygMEGvbVL78VWdM9BN4OUOcCCylePuY+Di0koOJ/qsf6rpz+f2vx9dWjuCyR8xgE xYJg== 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 f17si5247943pgj.61.2019.02.28.07.10.02; Thu, 28 Feb 2019 07:10:18 -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 S1732758AbfB1PGG (ORCPT + 99 others); Thu, 28 Feb 2019 10:06:06 -0500 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:55103 "EHLO relay4-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730791AbfB1PGE (ORCPT ); Thu, 28 Feb 2019 10:06:04 -0500 X-Originating-IP: 90.88.147.150 Received: from localhost (aaubervilliers-681-1-27-150.w90-88.abo.wanadoo.fr [90.88.147.150]) (Authenticated sender: antoine.tenart@bootlin.com) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id ED591E0016; Thu, 28 Feb 2019 15:06:00 +0000 (UTC) Date: Thu, 28 Feb 2019 16:06:00 +0100 From: Antoine Tenart To: Yan Markman Cc: Antoine Tenart , "davem@davemloft.net" , "linux@armlinux.org.uk" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "thomas.petazzoni@bootlin.com" , "maxime.chevallier@bootlin.com" , "gregory.clement@bootlin.com" , "miquel.raynal@bootlin.com" , Nadav Haklai , Stefan Chulski , "mw@semihalf.com" Subject: Re: [EXT] [PATCH net-next 15/15] net: mvpp2: set the GMAC, XLG MAC, XPCS and MPCS in reset when a port is down Message-ID: <20190228150600.GG4359@kwain> References: <20190228132128.30154-1-antoine.tenart@bootlin.com> <20190228132128.30154-16-antoine.tenart@bootlin.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.11.3 (2019-02-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Yan, On Thu, Feb 28, 2019 at 03:00:34PM +0000, Yan Markman wrote: > > The eth-down/stop may concurrent with pre-scheduled stats_work. > So it seems better to cancel stats_work first and then make resetS. I'm not sure this would actually result in an issue, but to keep it logical I'll change that. Thanks, Antoine > diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c > index 29d32cb3d52b..c10fd894c86f 100644 > --- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c > +++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c > @@ -3257,6 +3257,7 @@ static void mvpp2_stop_dev(struct mvpp2_port *port) > > if (port->phylink) > phylink_stop(port->phylink); > + > phy_power_off(port->comphy); > } > > @@ -3520,6 +3521,9 @@ static int mvpp2_stop(struct net_device *dev) > mvpp2_cleanup_rxqs(port); > mvpp2_cleanup_txqs(port); > > + mvpp2_mac_reset(port); > + mvpp22_pcs_reset(port); > + > cancel_delayed_work_sync(&port->stats_work); > > return 0; -- Antoine T?nart, Bootlin Embedded Linux and Kernel engineering https://bootlin.com