Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp5122397rwb; Mon, 21 Nov 2022 17:11:34 -0800 (PST) X-Google-Smtp-Source: AA0mqf6s9+jAU+lGyLOfmSpJ/iieSrckpIqldMKQNiEGWa4KQ8AKAbFsLv+usZlhsDlW+Ev4ljxq X-Received: by 2002:a17:906:3a5b:b0:78d:f3f4:b1a0 with SMTP id a27-20020a1709063a5b00b0078df3f4b1a0mr17844706ejf.489.1669079493850; Mon, 21 Nov 2022 17:11:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669079493; cv=none; d=google.com; s=arc-20160816; b=ZXGmhej31d2Z+roCKDcnzygmptZUjkGGtbWSXmp5G6zZgC05qWB5i0Xyp72xvkvvpp +P264KilusIBnmNnUeMi+UD+UBBIiWf+umxbluqZ6t89KQpJ4wjxPgCH7Dl0wUwyG9sV G2WN+riVufzWtF6ktOagJmV3/yo5z6IchRXKJHKl9Pwemx83yh3gVFYjd+Qg4+KEDbH4 SrUwCz+TgV3cfC0z8rSOgSOW78//teumBIBEFdUMPjORyuWRS9he9Vpd1bSK/tJ+8WRi MScyT1t+BZbSznkQ8+rNNK/AueDS4SDZRMo9Ny06O5k2q1qUmTIGoqamha0peyyHnVTC uinQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=zPVMcCH9Caitlz3wUBlsPo77SkoefyvanEm3LccCtxY=; b=08gByC2XnWrez8ThXdLvnhACKPf6RNFldze599r6pMJV78Mu9YnSSZL7BEJlgtyFeP Z8tKqf6fyErVu6IVKubx864dVxmgmUxgO3Xmtw0E0cxm0+2hLK6plDc3NfS0yETEGK2t eIzljAoj5wbd1zlVZ/4Z/8rCFPF/0AP5q4fm3iAm9oXjgupvXUj3OOhNxoC7xiE4kUS2 MJ1YehL791orU7W7rBRL42fTDaQ1K7CGWKvp99zsztEqQODvsYw++jTN/TgPjD13ZwQg 5ZyTF4kW2FfBpXzN8N+Js3Grj5HVv63X60Bb1jdrijbI7LFhWj36IEQfMgncJckpFHnH QBmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=jtQozGfH; 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=lunn.ch Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ji22-20020a170907981600b007adf16570c3si6627092ejc.17.2022.11.21.17.11.04; Mon, 21 Nov 2022 17:11:33 -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=@lunn.ch header.s=20171124 header.b=jtQozGfH; 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=lunn.ch Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231654AbiKVA7I (ORCPT + 91 others); Mon, 21 Nov 2022 19:59:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41718 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229721AbiKVA7H (ORCPT ); Mon, 21 Nov 2022 19:59:07 -0500 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0E58B682A7; Mon, 21 Nov 2022 16:59:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=zPVMcCH9Caitlz3wUBlsPo77SkoefyvanEm3LccCtxY=; b=jtQozGfH5eP3OXUAZE+c34a19J 7Ag2NmZxjvTihPff4lb1ygaDigB1vazuQnodxMEpdgWxKRNXwKcwAkEYulfRtFqO1XI3ar7ZSjhhW TNURY7ibyYW7uU4EWHaVjR/1LeBYbJqoSv70K6d4RZfM2zru5Op1XpuzJG2+FE5DvtCA=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1oxHck-0034Is-NX; Tue, 22 Nov 2022 01:58:54 +0100 Date: Tue, 22 Nov 2022 01:58:54 +0100 From: Andrew Lunn To: Roger Quadros Cc: davem@davemloft.net, kuba@kernel.org, edumazet@google.com, pabeni@redhat.com, vigneshr@ti.com, linux-omap@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 1/4] net: ethernet: ti: am65-cpsw: Fix set channel operation Message-ID: References: <20221121142300.9320-1-rogerq@kernel.org> <20221121142300.9320-2-rogerq@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221121142300.9320-2-rogerq@kernel.org> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,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 On Mon, Nov 21, 2022 at 04:22:57PM +0200, Roger Quadros wrote: > The set channel operation "ethtool -L tx " broke with > the recent suspend/resume changes. > > Revert back to original driver behaviour of not freeing > the TX/RX IRQs at am65_cpsw_nuss_common_stop(). We will > now free them only on .suspend() as we need to release > the DMA channels (as DMA looses context) and re-acquiring > them on .resume() may not necessarily give us the same > IRQs. > > Introduce am65_cpsw_nuss_remove_rx_chns() which is similar > to am65_cpsw_nuss_remove_tx_chns() and invoke them both in > .suspend(). > > At .resume() call am65_cpsw_nuss_init_rx/tx_chns() to > acquire the DMA channels. > > To as IRQs need to be requested after knowing the IRQ > numbers, move am65_cpsw_nuss_ndev_add_tx_napi() call to > am65_cpsw_nuss_init_tx_chns(). It is probably easier to review if you first do a revert and then add the new code to make suspend/resume work. Andrew