From patchwork Fri Jul 26 07:06:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Chiu X-Patchwork-Id: 13742415 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 29620C3DA63 for ; Fri, 26 Jul 2024 07:07:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:Message-Id: Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: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=R6bPP41x2BcXUf2RhmUFWS336ijR3sePP2PnHhiYKX0=; b=26SZdtFUo4No3LndQDs5Zku5kD 2xjbNwveF7unFvr2cbSh9O6GEPZirpkXM0WxMw5C04xk+1NdayXA/w9USKgqW3XdPMKJ9emJDaXZn CfjrEhCiqOWQQ1gpwpCwd9ZTROJzkUMFjiivFLOdaWNWaJEWPjkmwoN9iTRxO7+5xOPxIOXIBZfMF 2D6SKLecZLiyf7aEqGkH97BB6R8Fow4mPLSTWYpwronStaB1dJXvdKwYvY/dd9zbbHkNApDz+nMHq wtYxymTz4VajB+koMcJq9MeFSyGUDyBaXMhPd304VWjYUa0277LY0lKRb3StuNWRN2zRHUthGb7gq PBEkZCjA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sXF2v-000000037mF-3aCi; Fri, 26 Jul 2024 07:07:21 +0000 Received: from mail-il1-x135.google.com ([2607:f8b0:4864:20::135]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sXF2V-000000037eE-40n7 for linux-arm-kernel@lists.infradead.org; Fri, 26 Jul 2024 07:06:57 +0000 Received: by mail-il1-x135.google.com with SMTP id e9e14a558f8ab-396db51d140so6203435ab.0 for ; Fri, 26 Jul 2024 00:06:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; t=1721977614; x=1722582414; darn=lists.infradead.org; h=cc:to:message-id:content-transfer-encoding:mime-version:subject :date:from:from:to:cc:subject:date:message-id:reply-to; bh=R6bPP41x2BcXUf2RhmUFWS336ijR3sePP2PnHhiYKX0=; b=TJQz5V/qKmNForne7qS6U1euDg5V60ExBagPoNh5o+ug5q7bUVAgSLiIudQU/oGkf+ t6QaqKizdd45bGd3djfrpLXZV5CnLDPIMagBAMa/Ot6mGIlzZiRMn3vQUmnAEg71gkoT EH/zM2Pta2wzZFNUogZlqNeCbBwCgSqXr0ek8GsWoeBeoRrdPI2xZhws4yZQ7SdoBTz8 /TAhet07Fe9CZj0US//JrLzShFJf2bm+8Esy1xFYNOioWWP035UZGvr+qBz4xwviuFpJ ZDl175OzaDE3dgZ/Iyx1BiZTKvO7F0eTtNr+Tbe9/1XWIrz3NZF0Da+EW1j085w/K3KV 56qQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721977614; x=1722582414; h=cc:to:message-id:content-transfer-encoding:mime-version:subject :date:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=R6bPP41x2BcXUf2RhmUFWS336ijR3sePP2PnHhiYKX0=; b=E2XLqp3g36DCZ9v8yjs1fCUsRi+0BzkYJQSm6suIILpgPWyL0TLR+zTA9J1T/E7ZN9 30leJPEP5FtOz/zwPDwvqLpy9DTPVMjrrMRSJ9SZFVXAwDFT6ey4eNQBHWLIeEAXBw/+ jNZsNsLwmooI+v8V2G3cp6OXe7KWTwWh8BCdc1INQ5d11qkMpgFmDSddo6TMX6S/tTO5 JIAbZDOYejgcV1V613LOOxg5ZXGuLCurPYHzpSugQvAm+jWhivdePoW7dlo9jg0BNuVr L4Dw7wJiPMKBnokd/dZdEJH3zqWy/jhUfKfAafu1sxvxRHjBLC76SuMPsih/4VN8Yfth +jTg== X-Forwarded-Encrypted: i=1; AJvYcCW65vcCnWVzzHJt09O8j41YNkZwDc9axrDpNhw667Vx0ZAEsONWpAFjI9iA2ugVSNa86V5irEGGgwtoFvb3eN0+ftjtxqZcOJ+iPe8T9GTFqTPZxbc= X-Gm-Message-State: AOJu0YwIb1LZMugbWFBYSMkuB2M7322VpM02NeyEu4q6d6XnWfFleGHl Ft5xMrsRsGTQVup9mCnp6rvlp2o2LmS7xkIxYLrtFBRtoaJ9MlG/fzRv4TrofZk= X-Google-Smtp-Source: AGHT+IH/MAMZrCPan9EzFang1zc1AhdOVmFmxnStAc5cJ/IPwPzY0XAHlowhcmA3IyMyJtLj8fNBeQ== X-Received: by 2002:a05:6e02:214c:b0:39a:e814:d2ab with SMTP id e9e14a558f8ab-39ae814d513mr6951765ab.21.1721977613849; Fri, 26 Jul 2024 00:06:53 -0700 (PDT) Received: from [127.0.1.1] (59-124-168-89.hinet-ip.hinet.net. [59.124.168.89]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-70ead8749c2sm2108345b3a.155.2024.07.26.00.06.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jul 2024 00:06:53 -0700 (PDT) From: Andy Chiu Date: Fri, 26 Jul 2024 15:06:50 +0800 Subject: [PATCH] net: axienet: start napi before enabling Rx/Tx MIME-Version: 1.0 Message-Id: <20240726-dev-andyc-net-fixes-v1-1-15a98b79afb4@sifive.com> X-B4-Tracking: v=1; b=H4sIAAlLo2YC/x3LQQqAIBBA0avIrBswK5WuEi1Ep5qNhYYU0d2Tl o/PfyBTYsowigcSFc68x4q2EeA3F1dCDtWgpOqlURoDFXQx3B4jnbjwRRk7qRerBmus76GeR6I /1HGa3/cD8bY0u2UAAAA= To: Radhey Shyam Pandey , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Michal Simek , Robert Hancock Cc: netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Andy Chiu X-Mailer: b4 0.13-dev-a684c X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240726_000656_034343_E3502F7A X-CRM114-Status: GOOD ( 10.51 ) 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 softirq may get lost if an Rx interrupt comes before we call napi_enable. Move napi_enable in front of axienet_setoptions(), which turns on the device, to address the issue. Link: https://lists.gnu.org/archive/html/qemu-devel/2024-07/msg06160.html Fixes: cc37610caaf8 ("net: axienet: implement NAPI and GRO receive") Signed-off-by: Andy Chiu Reviewed-by: Eric Dumazet --- drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- base-commit: 80532af22b67cb83736f62feaeba483b2a5f74db change-id: 20240726-dev-andyc-net-fixes-306f825878c4 Best regards, diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c index db7640529ce7..6fb48268b47c 100644 --- a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c +++ b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c @@ -1849,9 +1849,9 @@ static void axienet_dma_err_handler(struct work_struct *work) ~(XAE_OPTION_TXEN | XAE_OPTION_RXEN)); axienet_set_mac_address(ndev, NULL); axienet_set_multicast_list(ndev); - axienet_setoptions(ndev, lp->options); napi_enable(&lp->napi_rx); napi_enable(&lp->napi_tx); + axienet_setoptions(ndev, lp->options); } /**