From patchwork Tue Nov 29 13:34:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roger Quadros X-Patchwork-Id: 27236 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp340704wrr; Tue, 29 Nov 2022 05:38:10 -0800 (PST) X-Google-Smtp-Source: AA0mqf6wcmd5pUY6l0rL50wXk6iO+Ol/kJX4YniYA07QEKQCIrjPCLw0eJkZ6uzXczXECIFgCbTm X-Received: by 2002:a17:907:9010:b0:7ad:ba48:7e7c with SMTP id ay16-20020a170907901000b007adba487e7cmr47725187ejc.443.1669729090050; Tue, 29 Nov 2022 05:38:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669729090; cv=none; d=google.com; s=arc-20160816; b=tfgM2vjpXYSwUpzbxh5eBWYm4uVwPPCqe7CJcFFgeVRzSMZZjFukHIo5FFk3HfaGMw j3CPxg+LLccauzpQC/ipjEVj5svNYgjn+R9f64cdyyMA7qqExFohI7gLCogC796456BW a4jjDMYi65Klvo3STfDVIKVWBmL0aEh7i6D2X/THTMVaQNPNeO42pt6HFHftODsriqDa GSJEqHn2qFaL18mzdCUYFrc6TfGNquEuS3XRcE9POsq+Hc3aU13HamYndd6/0an2+pX1 6lQ1iRMPDbeApjYhOr1KjKqm+GMjpf+vyMvV3C4LYBJznpOGLMzRrzBhhAYmV3M1QA2g P0XQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dkim-signature; bh=U0xWu72zRL3sYdfI/x6/kKjsn2kmtTey9+kq3p3nqOI=; b=mbD5XJ6Z7FWHGcQgYoQM1TVU7x45JM6FKDk0JUFMeM28lwrNDC0yo2u/S/V5BIn00K Rm5yTI8fbpuJE4m8YdWMxDSU8i0lO2p2wJ/A4bEYwVqL/26kuCT4wnq3p9brzTasHNgc 0tofBM0HRslseASNLrd5oAvgZnWtjXpgV83tdT/pN3PvmPl1gkEGoaP27DAOOlIU05Cq F6GhZ3+un2prNTKAk4SRkOKOG78DAg0xXxIreZ5yUTLKbxw1jBNMrsXWPorKmWdVkls+ 9zBRF4yvGDLLfyPZsMgapuexYjFtmK0bSgBgC9ajLRPsBNQtWcZoN8HMkBnjc3eQIZzd vCPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WsahoVjm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dn21-20020a17090794d500b007bfdadb58d8si4851497ejc.544.2022.11.29.05.37.45; Tue, 29 Nov 2022 05:38:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WsahoVjm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232515AbiK2NfR (ORCPT + 99 others); Tue, 29 Nov 2022 08:35:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43590 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231853AbiK2NfP (ORCPT ); Tue, 29 Nov 2022 08:35:15 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 402491FF8F; Tue, 29 Nov 2022 05:35:14 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id F1F37B811BC; Tue, 29 Nov 2022 13:35:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2A01AC433D7; Tue, 29 Nov 2022 13:35:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1669728911; bh=VSOHmo7sDplewfab+OwnRAyCOu/HX80NiUna1LwAweg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WsahoVjm0ty0uYcAGRz7J33BoIStIU5MqEJP9ul5OIWU5H1yW0dddUUQ/bMQmJK6T bii/PYHtN/8Whh3ya9MXoojAefWyFEAj6+tJbJcEKQbaxyqGDleVMezfUL3vxzybxo 6bdyaRQLyH7vZW4ww26KGZHrwDddugdsuSUxP4LrrccN4Y0X3YQoJMVA7BVbXxXgxd qH90M/VMaCuvmdztowAF6lJ7McOBRRt8fCXqCfLO+hsdwaNGL9LaDX8fiDUSTZHK/E 8Gzkm5KUSpSEsGip35Vq9OpV1skBFIhbSXB2q4pei4b/aQQ3Q7HSCwMODdXpPHcMcf WzrXqMPFMvcBA== From: Roger Quadros To: davem@davemloft.net, maciej.fijalkowski@intel.com, kuba@kernel.org Cc: andrew@lunn.ch, edumazet@google.com, pabeni@redhat.com, vigneshr@ti.com, linux-omap@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Roger Quadros Subject: [PATCH v4 net-next 1/6] Revert "net: ethernet: ti: am65-cpsw: Fix hardware switch mode on suspend/resume" Date: Tue, 29 Nov 2022 15:34:56 +0200 Message-Id: <20221129133501.30659-2-rogerq@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20221129133501.30659-1-rogerq@kernel.org> References: <20221129133501.30659-1-rogerq@kernel.org> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750837850141377965?= X-GMAIL-MSGID: =?utf-8?q?1750837850141377965?= This reverts commit 1af3cb3702d02167926a2bd18580cecb2d64fd94. This is to make it easier to revert the offending commit fd23df72f2be ("net: ethernet: ti: am65-cpsw: Add suspend/resume support") Signed-off-by: Roger Quadros --- drivers/net/ethernet/ti/am65-cpsw-nuss.c | 7 ------- drivers/net/ethernet/ti/am65-cpsw-nuss.h | 2 -- 2 files changed, 9 deletions(-) diff --git a/drivers/net/ethernet/ti/am65-cpsw-nuss.c b/drivers/net/ethernet/ti/am65-cpsw-nuss.c index 6b0458df613a..b43dc75c2202 100644 --- a/drivers/net/ethernet/ti/am65-cpsw-nuss.c +++ b/drivers/net/ethernet/ti/am65-cpsw-nuss.c @@ -2714,7 +2714,6 @@ static int am65_cpsw_nuss_probe(struct platform_device *pdev) struct clk *clk; u64 id_temp; int ret, i; - int ale_entries; common = devm_kzalloc(dev, sizeof(struct am65_cpsw_common), GFP_KERNEL); if (!common) @@ -2809,10 +2808,6 @@ static int am65_cpsw_nuss_probe(struct platform_device *pdev) goto err_of_clear; } - ale_entries = common->ale->params.ale_entries; - common->ale_context = devm_kzalloc(dev, - ale_entries * ALE_ENTRY_WORDS * sizeof(u32), - GFP_KERNEL); ret = am65_cpsw_init_cpts(common); if (ret) goto err_of_clear; @@ -2883,7 +2878,6 @@ static int am65_cpsw_nuss_suspend(struct device *dev) int i, ret; struct am65_cpsw_host *host_p = am65_common_get_host(common); - cpsw_ale_dump(common->ale, common->ale_context); host_p->vid_context = readl(host_p->port_base + AM65_CPSW_PORT_VLAN_REG_OFFSET); for (i = 0; i < common->port_num; i++) { port = &common->ports[i]; @@ -2942,7 +2936,6 @@ static int am65_cpsw_nuss_resume(struct device *dev) } writel(host_p->vid_context, host_p->port_base + AM65_CPSW_PORT_VLAN_REG_OFFSET); - cpsw_ale_restore(common->ale, common->ale_context); return 0; } diff --git a/drivers/net/ethernet/ti/am65-cpsw-nuss.h b/drivers/net/ethernet/ti/am65-cpsw-nuss.h index 4b75620f8d28..e95cc37a7286 100644 --- a/drivers/net/ethernet/ti/am65-cpsw-nuss.h +++ b/drivers/net/ethernet/ti/am65-cpsw-nuss.h @@ -149,8 +149,6 @@ struct am65_cpsw_common { struct net_device *hw_bridge_dev; struct notifier_block am65_cpsw_netdevice_nb; unsigned char switch_id[MAX_PHYS_ITEM_ID_LEN]; - /* only for suspend/resume context restore */ - u32 *ale_context; }; struct am65_cpsw_ndev_stats {