Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp5451970imm; Tue, 16 Oct 2018 10:25:34 -0700 (PDT) X-Google-Smtp-Source: ACcGV60N1DqvGsjqEsiLzmjghmWuU5Q0SGfXqUOtlpYTuSgoVM+Jp7SrRJuc5QjeC7BVH6aGRC3V X-Received: by 2002:a17:902:223:: with SMTP id 32-v6mr22368778plc.112.1539710734495; Tue, 16 Oct 2018 10:25:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539710734; cv=none; d=google.com; s=arc-20160816; b=JXv3aRHLC6GY9kKdPSkklJ8rPltuUYnMRTTAXYQ5aVtRWiPnUvwWh68IbMf4cid19V zRFeibls3PS4MwcuQdNdZZYay09ycj0qy529ENcWTyQ/7+oyNz9x749Ih7sMGDUiiIns Lb4cDN0p2ZRAksiv2x+fQQYPJkkxlUPanqF31qs5L0Q6RX19ypua1323W10q+KnDK2BB VJFs3dAYFC6Hk9KU0zLLse4mF+1eHBkX+52+c+6ZX11bb+Qr/A24E2OFMvid29oZMPOd mNsEYt5IJuupsuZUdJmkYZqvTClUyWpq+FMyy/lSJH4UbFCzczdl+ZS06BGu2f6jtkB3 0kbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=AIkr55BdGiX1YX6777nRIbWc2Csq9gKaZtU4vnNiip4=; b=eeKt9BiUS66ZR84sQ2JjcUSwn0MzzC7Pwe+TzoV2L3X02f83FwFipdfRwBgi9lA/vQ YASqJ9ef5FdOsnT54PzGxCiArgugzg5RZ/ATGu6M6KlnLFVJey9d+Up8cIbZCxtKM2R9 HnTDZh5aWHSgvjT3hN80rrjyRfUz/EHMpUYWDWtXsNjJYcxge7afU2V1ivlQDS66iO4k PRxLUmqv0nq8vzqHNhhaSrbsl3p/VM2QLfN/JPm/pIWG7TZY8UaOuAXUCODFPa0qKtSs sSP2Qe8YdHu9NBLRtp/5VwNSgDQLC/Uhcvmr06Lu2h3SwilowT1Z5BZvuwVukRMLupej 1LUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=xvbD90V0; 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 p9-v6si13661989pls.378.2018.10.16.10.25.18; Tue, 16 Oct 2018 10:25:34 -0700 (PDT) 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; dkim=pass header.i=@kernel.org header.s=default header.b=xvbD90V0; 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 S1731451AbeJQBPC (ORCPT + 99 others); Tue, 16 Oct 2018 21:15:02 -0400 Received: from mail.kernel.org ([198.145.29.99]:33550 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730396AbeJQBPB (ORCPT ); Tue, 16 Oct 2018 21:15:01 -0400 Received: from localhost (ip-213-127-77-176.ip.prioritytelecom.net [213.127.77.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B614120658; Tue, 16 Oct 2018 17:23:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1539710616; bh=VCTWqIn/klZHrPOwg4oBDJyJyr6J45C1i65lQhj6Egc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xvbD90V04jCbxTX2Q7K9uMkFRS/BCJcwOupwyb+Nhmca98We/x+A5YqhLZe0MVxhC Ys91Ly0uISLWfxp3o5s5kXvrC/eaiAtn6xpdTfCAZpnzFmL34P/oZtSJW1DMtP7haL oxadpI4gnrZcpLHFxd7NAVP3T1O/aA+7A24ihi14= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Florian Fainelli , "David S. Miller" Subject: [PATCH 4.9 28/71] net: dsa: bcm_sf2: Call setup during switch resume Date: Tue, 16 Oct 2018 19:09:25 +0200 Message-Id: <20181016170540.816116714@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181016170539.315587743@linuxfoundation.org> References: <20181016170539.315587743@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.9-stable review patch. If anyone has any objections, please let me know. ------------------ From: Florian Fainelli [ Upstream commit 54baca096386d862d19c10f58f34bf787c6b3cbe ] There is no reason to open code what the switch setup function does, in fact, because we just issued a switch reset, we would make all the register get their default values, including for instance, having unused port be enabled again and wasting power and leading to an inappropriate switch core clock being selected. Fixes: 8cfa94984c9c ("net: dsa: bcm_sf2: add suspend/resume callbacks") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/net/dsa/bcm_sf2.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) --- a/drivers/net/dsa/bcm_sf2.c +++ b/drivers/net/dsa/bcm_sf2.c @@ -744,7 +744,6 @@ static int bcm_sf2_sw_suspend(struct dsa static int bcm_sf2_sw_resume(struct dsa_switch *ds) { struct bcm_sf2_priv *priv = bcm_sf2_to_priv(ds); - unsigned int port; int ret; ret = bcm_sf2_sw_rst(priv); @@ -756,12 +755,7 @@ static int bcm_sf2_sw_resume(struct dsa_ if (priv->hw_params.num_gphy == 1) bcm_sf2_gphy_enable_set(ds, true); - for (port = 0; port < DSA_MAX_PORTS; port++) { - if ((1 << port) & ds->enabled_port_mask) - bcm_sf2_port_setup(ds, port, NULL); - else if (dsa_is_cpu_port(ds, port)) - bcm_sf2_imp_setup(ds, port); - } + ds->ops->setup(ds); return 0; }