Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3897939pxf; Mon, 15 Mar 2021 23:59:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxzSDj+SLfG95XZposMbX7WD6RSF/R3Ese4gE9Jhpo0y3K/TvLDVCOzYN0mlb0AodAQU5HX X-Received: by 2002:aa7:cd54:: with SMTP id v20mr34567995edw.80.1615877943369; Mon, 15 Mar 2021 23:59:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615877943; cv=none; d=google.com; s=arc-20160816; b=ow99o3f8EOLP2V1K0Gq5k7/XIV1XGDDbeb6ErVlPEHfBZMJbdOt5+9pvrC7vq/qyIo RxMU6GH26uy0R7kT1E8sI4KL/66b9C9ubK0/KMMbpF3M5xOLanUfP11NugZCsM6Az248 rln7Swk3bG1dkE+TUIOYUr2U1SzjgEGUPrtcsXc0s5dtGcVsSh7gJZOa9xl/sV4e+j/f /Z0cjnYvdsvwpckQrHh2zSoIG1Dou82grsz5RDu/J2WADAHrd9AOlzvehvaB0zXIxV1k kZB0mTfchY002Bglw+6ylU/EYrb7BfdQTZ4sVeH4TT+qSqamoqh3dzDoiqtBG1tsEihz Fczg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=hY/6fBCuxhZv015I6rdM/WOR04UbN6/0koz+5CjbfIQ=; b=If7yu20sYopKa0PIs7szNnGWcYkQKWidWmeWCosTlhpzgf95du7qV+vJ20M9wG2m0c HW4gFLyOt36UE9ltf2q7GFxYDB3Y9l78ctjGp52qszx3aTf0/G2RnW1+MRsi0/uwIYEl MYWJTwheHu/tAGcXHzRBLkSmz8N7Uul/wrSlMNQKUrNEzc4gwqoGNzFBwrNzlHTFfR6c YtCgwUdppU+Dq3XXjTS2+PpkU1JKXoTVkwsI3nES64UeoiDDJHiyechRWXRDhGm5jHPC 3rgbNJ6h3iIbTsUdBvbWTZg1QaxXNbijQbqSCANcQzo0ZC4PZ/zqmP5V9rTmDxnie5OO Lw8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=D3D1NwUu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id se19si13395699ejb.119.2021.03.15.23.58.40; Mon, 15 Mar 2021 23:59:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=D3D1NwUu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S232018AbhCPAlv (ORCPT + 99 others); Mon, 15 Mar 2021 20:41:51 -0400 Received: from mail.kernel.org ([198.145.29.99]:57598 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232024AbhCPAll (ORCPT ); Mon, 15 Mar 2021 20:41:41 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 13E0B64F5D; Tue, 16 Mar 2021 00:41:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1615855301; bh=VOYpVt5GwO6xxd7dzoJqdqBQftQfoa6f+tTn+g1OspY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=D3D1NwUuG0CuABzkFTHXcEAW+S7iIYvnc+93RHujNFtyOqGnPORw93SC2PO8r5GxT lVPI4D4FhmO4FWooADcYUwTjmCrzDRDqOWo5htEtnoYMQlT7MkeucFC8etgProA2md ad9Xj1r3TvDxivfFzmvitvuV4GhlC0Z8kvFTqTtfHIzSNQkcv2+BULqz07q/38v9Ua NW6dUIrrsXuzhEIzRFrEJrXJAAsBugvAXWqDDOl9owixrrKRpX/9XtX3MkKksdiGjS vP5zxn1qoPU3QgIF9HRB6/dRTBB2emhNh/z9tDH1HDpnoAZCOQ1DR+bEjW4fLAKzPU L03jnisdxoGqQ== Date: Mon, 15 Mar 2021 17:41:40 -0700 From: Jakub Kicinski To: mohammad.athari.ismail@intel.com Cc: Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , "David S . Miller" , Maxime Coquelin , Ong Boon Leong , Voon Weifeng , vee.khee.wong@intel.com, netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next 1/2] net: stmmac: EST interrupts handling and error reporting Message-ID: <20210315174140.6abb0edf@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> In-Reply-To: <20210315221409.3867-2-mohammad.athari.ismail@intel.com> References: <20210315221409.3867-1-mohammad.athari.ismail@intel.com> <20210315221409.3867-2-mohammad.athari.ismail@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 16 Mar 2021 06:14:08 +0800 mohammad.athari.ismail@intel.com wrote: > From: Voon Weifeng > > Enabled EST related interrupts as below: > 1) Constant Gate Control Error (CGCE) > 2) Head-of-Line Blocking due to Scheduling (HLBS) > 3) Head-of-Line Blocking due to Frame Size (HLBF). > 4) Base Time Register error (BTRE) > 5) Switch to S/W owned list Complete (SWLC) > > For HLBS, the user will get the info of all the queues that shows this > error. For HLBF, the user will get the info of all the queue with the > latest frame size which causes the error. Frame size 0 indicates no > error. > > The ISR handling takes place when EST feature is enabled by user. > > Signed-off-by: Voon Weifeng > Signed-off-by: Ong Boon Leong > Co-developed-by: Mohammad Athari Bin Ismail > Signed-off-by: Mohammad Athari Bin Ismail > + if (status & HLBS) { > + value = readl(ioaddr + MTL_EST_SCH_ERR); > + value &= txqcnt_mask; > + > + /* Clear Interrupt */ > + writel(value, ioaddr + MTL_EST_SCH_ERR); > + > + /* Collecting info to shows all the queues that has HLBS > + * issue. The only way to clear this is to clear the > + * statistic > + */ > + if (net_ratelimit()) > + netdev_err(dev, "EST: HLB(sched) Queue %u\n", value); This is a mask so probably better display it as hex? > + } > + > + if (status & HLBF) { > + value = readl(ioaddr + MTL_EST_FRM_SZ_ERR); > + feqn = value & txqcnt_mask; > + > + value = readl(ioaddr + MTL_EST_FRM_SZ_CAP); > + hbfq = (value & SZ_CAP_HBFQ_MASK(txqcnt)) >> SZ_CAP_HBFQ_SHIFT; > + hbfs = value & SZ_CAP_HBFS_MASK; > + > + /* Clear Interrupt */ > + writel(feqn, ioaddr + MTL_EST_FRM_SZ_ERR); > + > + if (net_ratelimit()) > + netdev_err(dev, "EST: HLB(size) Queue %u Size %u\n", > + hbfq, hbfs); > + } > + > + if (status & BTRE) { > + btrl = (status & BTRL) >> BTRL_SHIFT; > + > + if (net_ratelimit()) > + netdev_info(dev, "EST: BTR Error Loop Count %u\n", > + btrl); > + > + writel(BTRE, ioaddr + MTL_EST_STATUS); > + } > + > + if (status & SWLC) { > + writel(SWLC, ioaddr + MTL_EST_STATUS); > + netdev_info(dev, "EST: SWOL has been switched\n"); > + } > + > + return status; Caller never checks the return value, it probably should if this driver supports shared irqs? Otherwise you can make this function void. > +}