From patchwork Thu Apr 6 01:40:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Song, Yoong Siang" X-Patchwork-Id: 13202766 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E7999C7619A for ; Thu, 6 Apr 2023 01:41:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=7UJa4pTW4BdWsvYkn5HcJ9suCwATA6K67uL6XG4ur/E=; b=ABthUkuws/nsar I96Qir7G619rBJZVHXS9GyctRWH+VWRTiSEOmKxBnlPw0XI4YTQzQE2qlRZ5vUvvK3Dydz4GJB/C6 XKl0ck4t1nB6bXutog6AJZgjjeOa64Vgiug/vC6QZ78fWTc1IE6nltLmQ9WS3AX7lt0NZxeCLVu0g PkHVQ72a5PKMq0hOWLF0WnCYz6I0iDw2zA3vjBvAaoIDWHSbupMkVQiAjsJxwdvh6PiFuLkxVCc0V QYm26raKMhPgcvxqC8QbJNOYkGBdVzuEaQxNoWAnKbCeGD67cM+d7/O3IYRTKf7dRAyJMH1VYLh1X 6mQKmIQ0GEH1flkVy3UA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pkEcH-0063P0-0R; Thu, 06 Apr 2023 01:40:45 +0000 Received: from mga12.intel.com ([192.55.52.136]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pkEcE-0063OW-17 for linux-arm-kernel@lists.infradead.org; Thu, 06 Apr 2023 01:40:43 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1680745242; x=1712281242; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=DCavWhtg2E8IoulfYWNZX/tJY4eyp3ElFmAFgZG+SzY=; b=Rxn7Ud0WnNxm+xWrcUxrP6Sz6XmlQ0iseQG92fjGpzdSJ7m7YfKQLHBE 3rMpUZ1ESAlKbumlQiTJ7eNJxkITIaHf/IeETEcpKdnv4NW8oG7kCcsGC dOQW8BCOHUHpKlgD0V4zfhhNDFXFXq0rJJu6oKyV0lgVht7ID9BM8dnrb 2fi51y91gKyXuzdoslFAibeBrHJKd9tCiAQyrTgWv5CQOCdnbgdJPAQsj cvbcnxcOtgtKRZOXLeOvCoGcepSZkvnHDfH4f42pRSt7dPaixmH/WxpT8 /f2ovjnI7L0osmpCCigwIrP4jHwdAusrP+hus0qgsoum05wlb2gh3gGEo w==; X-IronPort-AV: E=McAfee;i="6600,9927,10671"; a="322262719" X-IronPort-AV: E=Sophos;i="5.98,322,1673942400"; d="scan'208";a="322262719" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Apr 2023 18:40:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10671"; a="810817453" X-IronPort-AV: E=Sophos;i="5.98,322,1673942400"; d="scan'208";a="810817453" Received: from p12ill20yoongsia.png.intel.com ([10.88.227.28]) by orsmga004.jf.intel.com with ESMTP; 05 Apr 2023 18:40:34 -0700 From: Song Yoong Siang To: Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , Alexei Starovoitov , Daniel Borkmann , Jesper Dangaard Brouer , John Fastabend , Christian Marangi , Alexander Duyck Cc: netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, bpf@vger.kernel.org, stable@vger.kernel.org, Song Yoong Siang Subject: [PATCH net v2 1/1] net: stmmac: Add queue reset into stmmac_xdp_open() function Date: Thu, 6 Apr 2023 09:40:04 +0800 Message-Id: <20230406014004.3726672-1-yoong.siang.song@intel.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230405_184042_446457_655C3D2D X-CRM114-Status: UNSURE ( 8.16 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Queue reset was moved out from __init_dma_rx_desc_rings() and __init_dma_tx_desc_rings() functions. Thus, the driver fails to transmit and receive packet after XDP prog setup. This commit adds the missing queue reset into stmmac_xdp_open() function. v2: Add reviewed-by tag Fixes: f9ec5723c3db ("net: ethernet: stmicro: stmmac: move queue reset to dedicated functions") Cc: # 6.0+ Reviewed-by: Alexander Duyck Signed-off-by: Song Yoong Siang --- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index 3e5bbfe3c41b..e4c27eb17bd2 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -6630,6 +6630,8 @@ int stmmac_xdp_open(struct net_device *dev) goto init_error; } + stmmac_reset_queues_param(priv); + /* DMA CSR Channel configuration */ for (chan = 0; chan < dma_csr_ch; chan++) { stmmac_init_chan(priv, priv->ioaddr, priv->plat->dma_cfg, chan);