Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp3561447pxb; Fri, 11 Feb 2022 02:41:27 -0800 (PST) X-Google-Smtp-Source: ABdhPJzYKuKg2tjHZVE46CM9hJpPAPzBTUpii6QLNwuo2XZHcVpjx6S5zuL3FfXa9y90i70nGRKV X-Received: by 2002:a17:907:60d0:: with SMTP id hv16mr841051ejc.668.1644576087706; Fri, 11 Feb 2022 02:41:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644576087; cv=none; d=google.com; s=arc-20160816; b=C0oitm6DTnWoVbpQgldxrOsgzJFGcF1Oo+uiFhVh4hw5iUcEgdHZe1OEWLG9Y9ZL8R RtIkpTjK9FiNRaXNafvaVmefBUzpKsBszD3d3m3+O7FKOvJ1YhfMfUNlMsnz4/hBnzLU JC0HOrPrqDN0pJwmiU70tcwUIwfRLx76oS3oG0ofVlnWlZeST/j0u9YBd6Y8TYOBtMbQ Xdoaf95yY3irAVC+NUG5Kid5dZp6QFEoxebjejfyioRT5XHKyaHVHsyw+LuBoaETtcG6 j6vuU72AS7HSgKHIzeMGbDtNyZ7vg7iNXGissf61gqH07v1cgnR2OAtkIJs+9HcWpDn7 pOqA== 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 :message-id:date:subject:cc:to:from; bh=58ZPNyqpqvtiChGWFFLqv8+uGzD2FkXb/QSNqfg7yzA=; b=nrxKEYKLiTW/Ta/nGn2F8goKoKH7hkeRi3DZyrf2L53vgCcQpGTLe0GedWaNGg0T2R 2Eb7XVoLUx8wKaSiMBnSHh8QKVPz1Xronj2WLmVWuX2gw+0xbyQzKJEnf1/uEw2wkAOX K6jeC/C6wKo3vPEyG6HG4zTQNMxlpNrWelbhjV+5BzU2r8yFgqWkn2g0m+YW2qkgqzvJ ogvVwkMCijYEm8aqZVMDT0oExHpO4WyM6W8iIFrN5E2rbrT1rnMQcNsp3r5qK+s4dxCI aA1GYFMMwDyQlcdWC9L7UUUe3V9harsfvB+v+KSvx36w0Na0Q7b8VR/gISY5xdSdRBSc vAMg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id js8si414273ejc.1001.2022.02.11.02.41.01; Fri, 11 Feb 2022 02:41:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346239AbiBKGw1 (ORCPT + 99 others); Fri, 11 Feb 2022 01:52:27 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:44314 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240722AbiBKGw0 (ORCPT ); Fri, 11 Feb 2022 01:52:26 -0500 Received: from plekste.mt.lv (bute.mt.lv [IPv6:2a02:610:7501:2000::195]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 42A19265A; Thu, 10 Feb 2022 22:52:26 -0800 (PST) Received: from [2a02:610:7501:feff:1ccf:41ff:fe50:18b9] (helo=localhost.localdomain) by plekste.mt.lv with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1nIPmx-00043i-K7; Fri, 11 Feb 2022 08:52:15 +0200 From: Gatis Peisenieks To: chris.snook@gmail.com, davem@davemloft.net, kuba@kernel.org, hkallweit1@gmail.com, jesse.brandeburg@intel.com, dchickles@marvell.com, tully@mikrotik.com, antons@mikrotik.com, eric.dumazet@gmail.com Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Gatis Peisenieks Subject: [PATCH net] atl1c: fix tx timeout after link flap on Mikrotik 10/25G NIC Date: Fri, 11 Feb 2022 08:51:23 +0200 Message-Id: <20220211065123.4187615-1-gatis@mikrotik.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org If NIC had packets in tx queue at the moment link down event happened, it could result in tx timeout when link got back up. Since device has more than one tx queue we need to reset them accordingly. Fixes: 057f4af2b171 ("atl1c: add 4 RX/TX queue support for Mikrotik 10/25G NIC") Signed-off-by: Gatis Peisenieks --- drivers/net/ethernet/atheros/atl1c/atl1c_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c index da595242bc13..f50604f3e541 100644 --- a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c +++ b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c @@ -900,7 +900,7 @@ static void atl1c_clean_tx_ring(struct atl1c_adapter *adapter, atl1c_clean_buffer(pdev, buffer_info); } - netdev_reset_queue(adapter->netdev); + netdev_tx_reset_queue(netdev_get_tx_queue(adapter->netdev, queue)); /* Zero out Tx-buffers */ memset(tpd_ring->desc, 0, sizeof(struct atl1c_tpd_desc) * -- 2.31.1