Received: by 2002:ab2:788f:0:b0:1ee:8f2e:70ae with SMTP id b15csp552524lqi; Thu, 7 Mar 2024 05:24:37 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCW1SfWXOIEFD9BIURV+ukHkHCdxV4di3bHVm56w0web0qyUy2qtHYwws2OPE0gm7unvjMNnARgab49JdZ6Xv2jNvf9sCmYJ8fCGh+Ve7A== X-Google-Smtp-Source: AGHT+IE0PuUOS3xKStPPGBiK067IHlMkrdR4g8HDVXMFa54rcmTEZ+4qHgi0QeGuEgbWRtaex2ME X-Received: by 2002:a05:622a:1a0e:b0:42f:20f2:c4cf with SMTP id f14-20020a05622a1a0e00b0042f20f2c4cfmr734199qtb.31.1709817877502; Thu, 07 Mar 2024 05:24:37 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709817877; cv=pass; d=google.com; s=arc-20160816; b=TJvXAJCz172IUl9fNbkAS0kSwZplMKRfAdB9b8UDj3ZxD5Zn+6juKvZthGMntdf9Y3 n8UOz8jsElFyqZCcWOUZQaLvQW/ML6MENqYMQaHolBSVGvChyu0DAWO2RAq493OMM6Kc +GVliUYEev3Ovl+bSz1DHGnOoP4ghW7isC65GHhWaoDxjnE1BhBuAEnIPSRTu2ZlIrcR gFcRjoPXKUxcgPSHb23LZwF1fjA9tago6ZDioGV5iJIyNFSIIw4B4f+26QzJV4r7IKHS Cl0ALjyoKN5fTx53e4fG7YK041MDJ+3FskTRDBCrZuXD6PkFsOs40ekj+4w2WB7y0C/H wjfg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=pUbIJXM5q/s25N6bZHP6NwQ+8ibrrNHeuJIIUXveGVM=; fh=+bZdVkiLmz24uXoRZ/h+BNAr4vk9JBC6QsMoFH7X5YA=; b=pRK/zMnnfp07JpGeNZvN1B+zW3Av1vgQWzhaggTPoq6UWxWjD5k1z/Z2q0//Vo+vnt VgFzKmonIvlDDwNPv8bht5o3WH7LHGnTPHZNBIT0dfMaRGPclTIA6x5TrBNvdwhfF1rP NF+P+uw99ug4j2VLTZ+fO3ZYH5/FP0P6kk/ikV+3h/+PP3aXO3Xwj+FKw8JEWAXXogGq cJbW/rsHcMpt+7u/8+9wD8GJSfa8r5Z8gvj7A//cpjE0wFbc3zTjgsIQviiLWLttdSDN adLC/NMA6TP/TBBXj7DGifnFxovL4gR2ck6PHhGLtcg0NjdF4LqsebBDKZ7Oqr3S1psL ZDEg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=nblXYr5c; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-95592-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-95592-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id v13-20020ac8578d000000b0042ef5860d9asi8490509qta.46.2024.03.07.05.24.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Mar 2024 05:24:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-95592-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=nblXYr5c; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-95592-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-95592-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 3D8A71C22329 for ; Thu, 7 Mar 2024 13:24:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A2F2612CD83; Thu, 7 Mar 2024 13:24:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="nblXYr5c" Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4069C12C7EA; Thu, 7 Mar 2024 13:24:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=156.67.10.101 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709817857; cv=none; b=gNQnk/BInLVg/u/Rp1rNw8AEm+fMj83XR3wf/6Dr/eDCSJWz+DvaDXI35sU3XHsWDHk1PRx5obCHgkCfZwkUvMdR+D8ny5R6Yu+LGszyN+lEbaqE8K1ubD4M+MHDMT1gsReOB9GhTsOOtKCO3Z/jsb5OQ7YyBHjN9cKMuT98M90= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709817857; c=relaxed/simple; bh=K5VjnAhLqgcIrKuBmbdYdluHgmQTNkIbBXmGWTbBaDM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=V1rOXdkZaWdR54teLRsHV3Z2zLdpBF3kg+RAhRlaQeG1vs1A65tgij8R9lzGxtv8/GXMQRBDvLC1EKnULBMyVnTxLZ0t0s28eOtz5QZHtcknp35XZdG2w4I2cwdkrjNJGJSCPsRUfCPxd7a1NbxpVMfF76FZKL7NHjT8o/3v04E= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch; spf=pass smtp.mailfrom=lunn.ch; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b=nblXYr5c; arc=none smtp.client-ip=156.67.10.101 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lunn.ch 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=pUbIJXM5q/s25N6bZHP6NwQ+8ibrrNHeuJIIUXveGVM=; b=nblXYr5cqdijK1j9uYJ8V5aytH Wm8KwgVeGS2NgSlv9HDNnpu701KVqvKW30l9Ctoz2sT2ZjU5zut5XIMreSzf24xTXuZADDCOjTcQG mfsKOJJjDqtq0vksRCI7PmUsD9Jw7yQBtm2J+KwabRrrjrwDVBkPwOgC0qSQiQzsxpjc=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1riDjg-009aVk-T9; Thu, 07 Mar 2024 14:24:36 +0100 Date: Thu, 7 Mar 2024 14:24:36 +0100 From: Andrew Lunn To: Parthiban.Veerasooran@microchip.com Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, horms@kernel.org, saeedm@nvidia.com, anthony.l.nguyen@intel.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, corbet@lwn.net, linux-doc@vger.kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, devicetree@vger.kernel.org, Horatiu.Vultur@microchip.com, ruanjinjie@huawei.com, Steen.Hegelund@microchip.com, vladimir.oltean@nxp.com, UNGLinuxDriver@microchip.com, Thorsten.Kummermehr@microchip.com, Pier.Beruto@onsemi.com, Selvamani.Rajagopal@onsemi.com, Nicolas.Ferre@microchip.com, benjamin.bigler@bernformulastudent.ch Subject: Re: [PATCH net-next v3 04/12] net: ethernet: oa_tc6: implement software reset Message-ID: <31a09423-276a-415b-a7b8-4aab04021a82@lunn.ch> References: <20240306085017.21731-1-Parthiban.Veerasooran@microchip.com> <20240306085017.21731-5-Parthiban.Veerasooran@microchip.com> <4e56f5c2-3d5c-4dda-8a37-01c1dbce27d7@lunn.ch> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: > >> +static int oa_tc6_read_sw_reset_status(struct oa_tc6 *tc6) > >> +{ > >> + u32 regval; > >> + int ret; > >> + > >> + ret = oa_tc6_read_register(tc6, OA_TC6_REG_STATUS0, ®val); > >> + if (ret) > >> + return 0; > >> + > >> + return regval; > > > > The function name does not really fit what the function does. The > > function returns OA_TC6_REG_STATUS0. I assume it has more bits in it > > than just STATUS0_RESETC. So either this function should be called > > oa_tc6_read_status0, or you should mask regval with STATUS0_RESETC, so > > that it does actually return the sw reset status. > Ok, as we do the masking in the calling function readx_poll_timeout, as > you suggested I will change the function name as oa_tc6_read_status0 in > the next version. O.K. And i think some of the later patches can them make use of this generic function. Andrew