Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp3905020pxb; Mon, 21 Feb 2022 08:03:28 -0800 (PST) X-Google-Smtp-Source: ABdhPJzGTRBQf89ia02bTDOvhgx4DYxSgXju+JsR3NuU0HF8ZpFDS0LKZ+JSYYOwjqgp7xH88aUc X-Received: by 2002:a17:902:7205:b0:14c:9586:f9d5 with SMTP id ba5-20020a170902720500b0014c9586f9d5mr19519189plb.77.1645459408538; Mon, 21 Feb 2022 08:03:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645459408; cv=none; d=google.com; s=arc-20160816; b=rlO4oDT0O4S4kw6DixRwR+gxWouNRmxGlh1kZr83HGwwptbvVrESGQw16kTr+u2SGq lZ9ed+pTaxH8eN0FkuuNaWRvNU2y1+9FWD9N4/C6tRzYH2/coRjnMMGq1ohxw9tMlQkv AN2P8rSVGeaPlg30mKh+gVH/P1CZIJIranidQY+TrHJnZDiXAs9HtTm+thIyyHYMwxn3 ltUx44jIrjwvUDrP1DYrubECD3AtSvtHNTeM54/AqKLGrZBHaX1dE3QeWjl42VvnDS8H /dRQtRGBfBmBnY+QSOLwVL2n/kOVqbqIJT/H3dZWR90pvce1Lx6487PhxS9gjnqmIRGs iesQ== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=dGCiAyklfT0Kwf81B9jDnos/NCz7Q3C3wzFKv2X9l/c=; b=Ud+Z7GwVfkuttpcxMM9iSlnLvc1nlZYoNIg0ORDbFBz2jcxoTx8YZydYu/yh3Xt+ma iozx/N83oHXXQeOyuV4T0DY3UYA0IO2nVxWX09xOJAzNKKM/m34NgqcSgpRs1x+NOZTH Az5kh1ZeDYx3ifC1HAU/I8bW9JsaH7WhFFpDxXT6b4KNTbkMoB7QKxCb884pe+GPHt9S E46hKGRE1zzOi3HLhu/wU0zW6aqIStx9tFMPiSaw8khQ0CEbnHIpSoruJABSj+8leXD6 gp2v6wL969FoDJs47yJLJMhpfUjzQrDCly75uS0U/lbOVpsOErbqV9B2Yr6/TxN1No8J hApA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=W6YOrFc9; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d8si10911212plo.305.2022.02.21.08.03.11; Mon, 21 Feb 2022 08:03:28 -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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=W6YOrFc9; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351914AbiBUJyl (ORCPT + 99 others); Mon, 21 Feb 2022 04:54:41 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:41670 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352978AbiBUJsF (ORCPT ); Mon, 21 Feb 2022 04:48:05 -0500 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4386BF25; Mon, 21 Feb 2022 01:22:12 -0800 (PST) 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 sin.source.kernel.org (Postfix) with ESMTPS id A50D1CE0E8B; Mon, 21 Feb 2022 09:22:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8C8C2C340E9; Mon, 21 Feb 2022 09:22:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1645435329; bh=mc0aKOxSsDuTXpmJoC/IG9w3zf1N4r0QHjUEA7j//a4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=W6YOrFc9EjaJOeL+Qxfp1il7YRCjFa8+dc1lkTCbDUD9suRhDkMC8OzAeK9A2US0x 4GBz0zjhwwU8IMSuqotR8fmtiD/ynJaMjaIbyuc5DYrgpQNDDSzgDhcbtmUMjwLL6Y Nmg4AXsXLT4KZPMzJIqIWzuZ9YUt2ZOzDdlg9vYQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Gatis Peisenieks , Jakub Kicinski Subject: [PATCH 5.16 126/227] atl1c: fix tx timeout after link flap on Mikrotik 10/25G NIC Date: Mon, 21 Feb 2022 09:49:05 +0100 Message-Id: <20220221084939.035155227@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220221084934.836145070@linuxfoundation.org> References: <20220221084934.836145070@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 From: Gatis Peisenieks commit bf8e59fd315f304eb538546e35de6dc603e4709f upstream. 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 Link: https://lore.kernel.org/r/20220211065123.4187615-1-gatis@mikrotik.com Signed-off-by: Jakub Kicinski Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/atheros/atl1c/atl1c_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- 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 a 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) *