From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 7798F7E0E4; Mon, 8 Apr 2024 13:31:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712583068; cv=none; b=RCt8fJAPMzMDE/RWQGYSuCjuWysuNWpA4taxHkeV1tEPGG+xd1PbsnOIT86XARwrYLWylBc/rd93KWgEPNN1clWjxMfSdgLQdoPKD3icNR22a5mhH7sgbZB37Orr87a/XbqNhgVOcJo1UCKwPwOk9xs2YR97jeFTvVqH/vOeBRs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712583068; c=relaxed/simple; bh=qlVTU1ugldFSiIC8ZJXrznrg4voNOD8hGcFhI81DJ04=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=k+6EO1RUMfjvgByjNI9JiBg7V5slMhU0mchN5zE6DHL0GM1GNU16lBngf1EIrS1w10zsmzBI9VOgw/Da0EClvBV2S0KFhJwYH+u7RzFCrq0KUryoOSGI/x/HYN5eo+c3g53s26fJYDKOEweg0U+WlaP3Z0/L2YnY4BbZdeEEpH0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=RGvmOV7u; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="RGvmOV7u" Received: by smtp.kernel.org (Postfix) with ESMTPSA id AE4B5C433C7; Mon, 8 Apr 2024 13:31:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1712583068; bh=qlVTU1ugldFSiIC8ZJXrznrg4voNOD8hGcFhI81DJ04=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RGvmOV7uZrPsme1E/Co+7/TNGxcTWx+ovqm0Ar/5GjHHiNYoLuwSA+mQH8Jzc584j tfbWKFp2DVEi+hNRiVGM243ArjQT/JCIjZtoamAAiYSBz5q0cvODO6KFabYEbQS742 QblIYDqZb4dtoknZp11bm+ZYWO1ai4kWWa1uR35I= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Claudiu Beznea , Sergey Shtylyov , Paolo Abeni , Sasha Levin Subject: [PATCH 6.8 136/273] net: ravb: Let IP-specific receive function to interrogate descriptors Date: Mon, 8 Apr 2024 14:56:51 +0200 Message-ID: <20240408125313.515509830@linuxfoundation.org> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240408125309.280181634@linuxfoundation.org> References: <20240408125309.280181634@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.8-stable review patch. If anyone has any objections, please let me know. ------------------ From: Claudiu Beznea [ Upstream commit 2b993bfdb47b3aaafd8fe9cd5038b5e297b18ee1 ] ravb_poll() initial code used to interrogate the first descriptor of the RX queue in case gPTP is false to determine if ravb_rx() should be called. This is done for non-gPTP IPs. For gPTP IPs the driver PTP-specific information was used to determine if receive function should be called. As every IP has its own receive function that interrogates the RX descriptors list in the same way the ravb_poll() was doing there is no need to double check this in ravb_poll(). Removing the code from ravb_poll() leads to a cleaner code. Signed-off-by: Claudiu Beznea Reviewed-by: Sergey Shtylyov Signed-off-by: Paolo Abeni Stable-dep-of: 596a4254915f ("net: ravb: Always process TX descriptor ring") Signed-off-by: Sasha Levin --- drivers/net/ethernet/renesas/ravb_main.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c index f7566cfa45ca3..266ed984a98fa 100644 --- a/drivers/net/ethernet/renesas/ravb_main.c +++ b/drivers/net/ethernet/renesas/ravb_main.c @@ -1284,25 +1284,16 @@ static int ravb_poll(struct napi_struct *napi, int budget) struct net_device *ndev = napi->dev; struct ravb_private *priv = netdev_priv(ndev); const struct ravb_hw_info *info = priv->info; - bool gptp = info->gptp || info->ccc_gac; - struct ravb_rx_desc *desc; unsigned long flags; int q = napi - priv->napi; int mask = BIT(q); int quota = budget; - unsigned int entry; - if (!gptp) { - entry = priv->cur_rx[q] % priv->num_rx_ring[q]; - desc = &priv->gbeth_rx_ring[entry]; - } /* Processing RX Descriptor Ring */ /* Clear RX interrupt */ ravb_write(ndev, ~(mask | RIS0_RESERVED), RIS0); - if (gptp || desc->die_dt != DT_FEMPTY) { - if (ravb_rx(ndev, "a, q)) - goto out; - } + if (ravb_rx(ndev, "a, q)) + goto out; /* Processing TX Descriptor Ring */ spin_lock_irqsave(&priv->lock, flags); -- 2.43.0