Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2265911imm; Mon, 28 May 2018 05:04:37 -0700 (PDT) X-Google-Smtp-Source: AB8JxZq1dUY4xKIfCd3Rf4u7dBuXjpmdZ20x/Z3BbzAU6bbYH9vugeXw0bjQwrBMhZYKnjaDLIHV X-Received: by 2002:a17:902:a703:: with SMTP id w3-v6mr13723866plq.111.1527509077287; Mon, 28 May 2018 05:04:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527509077; cv=none; d=google.com; s=arc-20160816; b=G5GnzPscheFpwrYzppb1/yLahtl1HKTEaEQ1bBGhg7zqN2Ky5pzqPdJb9qoKfgjn+l Yt4+oWY4yEKFGEFnO0ck/lqj1fQvlYfPxKjYnGPcJ0kBMaLyXSpCPH4JrfVIYB3F7lnG 78HDLA1B25H8niY5Nzvjb7ye5yg2+WkvXZBwsVnzQ+ts4tab4zUFBNuXBg/EIlgQ2tcx wDEoymWWvhQOa4xVRB7arwlwAZh1i+tR1z6ox32rihwnigvMkBQt1BxGnFRDmDpXNfmH bYLzRRJVelfqtxrcjXOnW/grZwmfXVByvYY4muvMz24HQnDDQiCfaAgDOUSRcNZNYzU/ dsNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=C1onKZ+DJdmXYIft4A281AkLsweQFfFGwGy2fwwK0dQ=; b=SNI9GUFHukyZsBCwDqKnpkLNcrV7tZH7g4eiWXDsVAGXI+uhvvlHjF8rxTpPxOphAd MN8chQl9hGj+TeiqIpO+75L0c0LG7DJ3jAPimnZ6SulPOZpzSsWlxPSmho3ZhZtfF6EF WL/RPiwEmt3F6RlZoFD8vGD2VLuuiS710X/gW2rtW2d5my12P2WrsOIFr00R2vhCoU+K //wg3y+UmNir5+3Qlx8XRuIE83YKsjdVQG8L1a0g4FvJQMYDKyQjEGm0kGA5e0z7N5oi WqYE3ZMoUBjUcCsD8qwn3QntvnlNJZAiFEB5pZ8UMXPM5ShrUVvtAKfebmT1iOHmeawD DePQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=YfrPeXx0; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f13-v6si918951pfn.84.2018.05.28.05.04.22; Mon, 28 May 2018 05:04:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=YfrPeXx0; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S938528AbeE1MCV (ORCPT + 99 others); Mon, 28 May 2018 08:02:21 -0400 Received: from mail.kernel.org ([198.145.29.99]:53668 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1423325AbeE1LGx (ORCPT ); Mon, 28 May 2018 07:06:53 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C894E2075C; Mon, 28 May 2018 11:06:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527505613; bh=w2rOwRpWMNeF3XQhotXurieIFZcwST+XJINWfz/k5DE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YfrPeXx0Myd8KSF2Ja7OJ7Epovg1seX3Q02otGXrWHwiC6yX7v+BjYbOqcGL5n8xs suuKh0AS/0MdmDA4o5uQh2Eq1YIfZmathA+/xrhNtG3mOdlA4IQcThiCSbLpjgWEOJ 5R5kmKSPVkISf7kIg204uQwGnJI9qsUjfIWh8MHY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Thomas Falcon , "David S. Miller" , Sasha Levin Subject: [PATCH 4.16 066/272] ibmvnic: Zero used TX descriptor counter on reset Date: Mon, 28 May 2018 12:01:39 +0200 Message-Id: <20180528100246.426555643@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180528100240.256525891@linuxfoundation.org> References: <20180528100240.256525891@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.16-stable review patch. If anyone has any objections, please let me know. ------------------ From: Thomas Falcon [ Upstream commit 41f714672f93608751dbd2fa2291d476a8ff0150 ] The counter that tracks used TX descriptors pending completion needs to be zeroed as part of a device reset. This change fixes a bug causing transmit queues to be stopped unnecessarily and in some cases a transmit queue stall and timeout reset. If the counter is not reset, the remaining descriptors will not be "removed", effectively reducing queue capacity. If the queue is over half full, it will cause the queue to stall if stopped. Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/ibm/ibmvnic.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/net/ethernet/ibm/ibmvnic.c +++ b/drivers/net/ethernet/ibm/ibmvnic.c @@ -2266,6 +2266,7 @@ static int reset_one_sub_crq_queue(struc } memset(scrq->msgs, 0, 4 * PAGE_SIZE); + atomic_set(&scrq->used, 0); scrq->cur = 0; rc = h_reg_sub_crq(adapter->vdev->unit_address, scrq->msg_token,