From patchwork Wed Nov 23 12:48:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roger Quadros X-Patchwork-Id: 24962 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp2788078wrr; Wed, 23 Nov 2022 05:29:21 -0800 (PST) X-Google-Smtp-Source: AA0mqf6u4c5/LCZsFlAqmG53uuv7U8hrt9oL5vwd3CCm9NUfENooJu4ZWlZ3MK75VZCqxLMbE5AO X-Received: by 2002:a17:902:d68b:b0:188:cca8:df29 with SMTP id v11-20020a170902d68b00b00188cca8df29mr14899297ply.148.1669210160877; Wed, 23 Nov 2022 05:29:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669210160; cv=none; d=google.com; s=arc-20160816; b=MaxKngN82rcVHcwrSE/D1fvUUSFcdskLByYgtbCt8Ez/SUE9RcXI37PbnKKy2waHW1 0FZ6RIILA3aqLahsmZHXTnvrRDLMZViHXWUSqTnKs0oDvHba3cdFT8mlfhZ4tsvdR1Fo EVHtoPnFVlb/pntLJ2pELUBRm2MYj/1Kl32AyzuR6rHZb/0oxbdQiGDZ/GrXa+IfYGzi h+4Te8I9Uhu3Rg6AQTt1p8Im3eG9Bixr9ttFfOrVEeTzorfwqjlf/YcrZ7LQUtC02M+s b+dkrbQnWyTrKJGz+vsmyS5xbLrDxNhdunHJCI4DlLfzey9aD6oIMW3QoxEe28M7w4Ok ld6Q== 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=SlsBlVzhskM47KVZFdF2p/quToi2RiBlIVc+AnTRb0h0HGw28wzEsj6PxPVCt8T0NG IHpTgRIB74P6o0YZG7JLirczXz8SgdqZWpF2zvEXkrvbm0XIXdf2sJJgJjB7/6dTfMtR NIIb/r51sdBeThvCUwzf+FtNlAGIe7WfMXhSmLQDnCw1pblm/hji1YbwROy5Pch91IQt SuUjAAp/k0s0O6oiDKz0kvUiD0B78sPYRoFIKpm/mu3ALFeN+8x4T+9R/4kPp6kW/mOk xndjyRfq7RnIrUZFzTjImb3fku461QZ2MZqfufV3v90cEBzR+q0XYs0HGmNk71QLHJRE ECvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Sjxs0OeT; 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 t14-20020a17090a4e4e00b0020055731860si1759579pjl.105.2022.11.23.05.29.07; Wed, 23 Nov 2022 05:29:20 -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=Sjxs0OeT; 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 S238676AbiKWNEg (ORCPT + 99 others); Wed, 23 Nov 2022 08:04:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43088 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238241AbiKWNEM (ORCPT ); Wed, 23 Nov 2022 08:04:12 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 35A2CCB942; Wed, 23 Nov 2022 04:48:52 -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 AF60AB81F6F; Wed, 23 Nov 2022 12:48:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 06104C433C1; Wed, 23 Nov 2022 12:48:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1669207724; bh=VSOHmo7sDplewfab+OwnRAyCOu/HX80NiUna1LwAweg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Sjxs0OeT1QyRSn0QYyeQ+hztPPyni+GUrHrFs6UY6zD1rGhqVliq61xgK5VEVmKMT Cu9kXusPyTVaYCfGc6PwPD4p2tyc6hwJt6Ticav0EFJ1eDYFcnh91jlIJaMkWJlMTT sB63mubxbPNy0bUPfQveIzGZiMb5v9lC5FybmrUgUZTtCDX6BYn0al9dpnGX2EtuvU V1bnQ6Yb/zd262vAXL2ifZLn50fvpAcAECkxJhx754GyeT5QgXjyh6sGHllA4/BROa A8GX7PztRZFCjwiRxgV1dbk3SUzb9SKf0SwKpDFW1qUIHOPTMD1X83uO5NZ7f6GLsx dS2caVcoORLKw== From: Roger Quadros To: davem@davemloft.net, maciej.fijalkowski@intel.com, kuba@kernel.org Cc: 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 v3 net-next 1/6] Revert "net: ethernet: ti: am65-cpsw: Fix hardware switch mode on suspend/resume" Date: Wed, 23 Nov 2022 14:48:30 +0200 Message-Id: <20221123124835.18937-2-rogerq@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20221123124835.18937-1-rogerq@kernel.org> References: <20221123124835.18937-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?1750293713607603740?= X-GMAIL-MSGID: =?utf-8?q?1750293713607603740?= 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 {