From mboxrd@z Thu Jan 1 00:00:00 1970 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2D811C7619A for ; Wed, 12 Apr 2023 08:45:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230387AbjDLIpH (ORCPT ); Wed, 12 Apr 2023 04:45:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50906 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231255AbjDLIov (ORCPT ); Wed, 12 Apr 2023 04:44:51 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E557B6E9E for ; Wed, 12 Apr 2023 01:44:30 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 0534663036 for ; Wed, 12 Apr 2023 08:44:22 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1D225C433D2; Wed, 12 Apr 2023 08:44:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1681289061; bh=u4QMldzwkCH7K8evFHAHipIsjqvDKlM5fwCfMdglvxw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=td5QOkaAYf1N7puLVmhw3Csuin/LtTafrGjmiHoPLWhX2KIanjt3VJ9Krk1BmPeI5 LMfVgQ4Jtu4kH+jbLyKP1ccM/LDyDvvGT6hXgnHdjgRXALjYgvRCA7hrVLO6p+Z7Ue DXICxO9dVfdipWuMsNu3R7o4+xDNc7HEs78qq5sg= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Song Yoong Siang , Alexander Duyck , Jakub Kicinski Subject: [PATCH 6.1 122/164] net: stmmac: Add queue reset into stmmac_xdp_open() function Date: Wed, 12 Apr 2023 10:34:04 +0200 Message-Id: <20230412082841.779494923@linuxfoundation.org> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230412082836.695875037@linuxfoundation.org> References: <20230412082836.695875037@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Song Yoong Siang commit 24e3fce00c0b557491ff596c0682a29dee6fe848 upstream. 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. Fixes: f9ec5723c3db ("net: ethernet: stmicro: stmmac: move queue reset to dedicated functions") Cc: # 6.0+ Signed-off-by: Song Yoong Siang Reviewed-by: Alexander Duyck Link: https://lore.kernel.org/r/20230404044823.3226144-1-yoong.siang.song@intel.com Signed-off-by: Jakub Kicinski Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 ++ 1 file changed, 2 insertions(+) --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -6627,6 +6627,8 @@ int stmmac_xdp_open(struct net_device *d 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);