Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp7769800rwb; Wed, 23 Nov 2022 10:28:28 -0800 (PST) X-Google-Smtp-Source: AA0mqf65AOu49a8R/isW9zsaxy8AQaO3d9iSVEMCHR519CJK1BedOVVOGhi9RLlBkXDZTe0obzeG X-Received: by 2002:a62:f211:0:b0:574:7931:98a2 with SMTP id m17-20020a62f211000000b00574793198a2mr1150300pfh.17.1669228107854; Wed, 23 Nov 2022 10:28:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669228107; cv=none; d=google.com; s=arc-20160816; b=IbYmqFakZEMdtdkae0rpcjkHYDyuieexrPaSVqfq454ct02qHw50xjAA6YVN3e7EWf gXNuLE40AfSjouNDW4GwfOEdWMO/Gq8h0yDIYJpJKS+zbWu9vuRvzypijS2502Vikoc7 +4psbmoxYNrNHJsiYrvDhP1kBvapBB0HzDH+PvsW3KaoRKmmyU/MhzDRtbn1s6AvU5nD ivYNxfdH38A/Gmu3qA0EXTtYtYi1/fjcsiVv1b/zLiUE4HyZwjLBpRRfuKGH+aYodmo5 koIQGkLwCy+MKK8HVhUfhbQ3M+YIE82sCI54oRr/GM/C4of5Uv55ghwgHq6qtYyVUceZ ldvw== 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=lXKv7tLmFFWSiFg8XDXNAbAKOuzyytUGwHdhjfEns0U=; b=ZiAgr+Q9+mJROM/dhyr9qKmOMAH3oAYRAW2tWAxnjdRP2a7sxNkltrEENGlsqgE/8p TlvLiiCP/XDt05RC4koIw8EdJpQo266OwvpPUYAULCC6cpzn02yWc3ESg6ivU881kD68 d1pLqmeVcaS9S9w9eZSFZLSk2/kUTXOUSSf8EgrQQZMcNqOfrtHVUt8EzQwpydbLVwrk pB5abaXchksUgxY8CnNo/sLdm0PvR4cxgZ8xzIaW1A27O7dkP2TNpUtPORGQ0cDYrkZN RZf+OuM5C7ubKS5PsnOv12ehOR8p34IoLp6Xd9i0reaIb0jQ7XSemFDc0zDAhEz43aUf TYvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=ThkdbeRf; 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 bk2-20020a056a02028200b0046f73d846f3si17152731pgb.441.2022.11.23.10.28.16; Wed, 23 Nov 2022 10:28:27 -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=ThkdbeRf; 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 S238244AbiKWRml (ORCPT + 88 others); Wed, 23 Nov 2022 12:42:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34306 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237702AbiKWRmh (ORCPT ); Wed, 23 Nov 2022 12:42:37 -0500 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1E5AE65DA; Wed, 23 Nov 2022 09:42:34 -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=lXKv7tLmFFWSiFg8XDXNAbAKOuzyytUGwHdhjfEns0U=; b=ThkdbeRfetBSUlnQpyTOfNDiFR EFDF1RzD+bITt4TW/q7TAfzp6sIsf1q/EZ1YS+IwqXg36AVOi1YNx6YvTmLl/VB9YL/HPfaMjwCvN QOGWgtdeW9+8/AxQdxZrewpX/AA8vDEfYwGW1Bud87Vq5PH21vz46+oF//g7OKa3gbPU=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1oxtl4-003FQg-Hv; Wed, 23 Nov 2022 18:42:02 +0100 Date: Wed, 23 Nov 2022 18:42:02 +0100 From: Andrew Lunn To: Roger Quadros Cc: davem@davemloft.net, maciej.fijalkowski@intel.com, 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 v3 net-next 4/6] net: ethernet: ti: am65-cpsw: Add suspend/resume support Message-ID: References: <20221123124835.18937-1-rogerq@kernel.org> <20221123124835.18937-5-rogerq@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221123124835.18937-5-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 > +static int am65_cpsw_nuss_ndev_add_tx_napi(struct am65_cpsw_common *common); > + Please move the code around so you don't need this. Ideally as a patch which only does the move. It is then trivial to review. > static void am65_cpsw_port_set_sl_mac(struct am65_cpsw_port *slave, > const u8 *dev_addr) > { > @@ -555,11 +558,24 @@ static int am65_cpsw_nuss_ndo_slave_open(struct net_device *ndev) > struct am65_cpsw_common *common = am65_ndev_to_common(ndev); > struct am65_cpsw_port *port = am65_ndev_to_port(ndev); > int ret, i; > + u32 reg; > > ret = pm_runtime_resume_and_get(common->dev); > if (ret < 0) > return ret; > > + /* Idle MAC port */ > + cpsw_sl_ctl_set(port->slave.mac_sl, CPSW_SL_CTL_CMD_IDLE); > + cpsw_sl_wait_for_idle(port->slave.mac_sl, 100); > + cpsw_sl_ctl_reset(port->slave.mac_sl); > + > + /* soft reset MAC */ > + cpsw_sl_reg_write(port->slave.mac_sl, CPSW_SL_SOFT_RESET, 1); > + mdelay(1); > + reg = cpsw_sl_reg_read(port->slave.mac_sl, CPSW_SL_SOFT_RESET); > + if (reg) > + dev_info(common->dev, "mac reset not yet done\n"); Should that be dev_info()? dev_dbg() Andrew