Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp5048912pxu; Thu, 10 Dec 2020 11:35:03 -0800 (PST) X-Google-Smtp-Source: ABdhPJycoTJK6eS+/45HmSm6TGcEx/CIr8mqO77PixSb+/eJ+2xZFqQyM6NNpduWm87284RbIWsu X-Received: by 2002:a17:906:2612:: with SMTP id h18mr7930668ejc.469.1607628903114; Thu, 10 Dec 2020 11:35:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607628903; cv=none; d=google.com; s=arc-20160816; b=AQYKLMsjMgwxasj7G8Addo6P+y7XSAB+IJXQIvTjgiDEsPkoaaYieTjzCy1O5wXirx 5UQEDnUdjR1G7lHdQ9zgKV4oVoGqt39x5rANhXMvVzgoTVYun2+/sIpOmfu5o/zSXos1 JdXmeTp/vvbDGbJIxIJ6p4WYEz2lQ5+9A74bV1gfT2F23gxSgCczlETyzU2hw2W03Ge6 7jx8vJ2fxV+KzRFQkKTV8LibmaUwib6V40GjyLQOXb/6+NtOlhfH6Lu15Kp0tRX7eCZ4 sSMVUzroCY+jlEfikMeQ0bSXalYLgvO550jUYEj5TSeCjkkUrpGzQeTXa3fkk4htIVC7 sgnw== 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; bh=k3yQRDPyS+64W5qUZEHtEAcQMeJ3QbwAMYdFBMBgsho=; b=Auw+RWRVehuC3RX6VrnbGfGwoioWG8uenhJTv4pnw6pAyzhGz4QxJiHpQeFSywMHhA ZjzAuyBbNqetbU3KFgZxl1VzLPWxWEEqH+CoCP+GfWIAUJMX7oGB97JqbIOeqhhNkx5G XoZ2e5/lF42Zo/kHqNDePc4oxb/CLz3gtEYtzU3BoRT3shE55pXqDPPf+ZqkTWSpWJNh D8pSWIgTt2IbnPpVtbfLTMMJwycLINxlxrE4vdP9fEcngfd6cK2MFaa1x1quWE+TjQaW VcHM3Kyvpbv83nthfH4MPrf+w3KS/l1jJnAonrMZb43EbjnFsWsmRRIm4K80EbaSAeGV daew== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g15si2756430ejx.708.2020.12.10.11.34.39; Thu, 10 Dec 2020 11:35:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390304AbgLJTbc (ORCPT + 99 others); Thu, 10 Dec 2020 14:31:32 -0500 Received: from mail.kernel.org ([198.145.29.99]:37904 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729176AbgLJO37 (ORCPT ); Thu, 10 Dec 2020 09:29:59 -0500 From: Greg Kroah-Hartman Authentication-Results: mail.kernel.org; dkim=permerror (bad message/signature format) To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Thomas Falcon , "David S. Miller" Subject: [PATCH 4.9 07/45] ibmvnic: Fix TX completion error handling Date: Thu, 10 Dec 2020 15:26:21 +0100 Message-Id: <20201210142602.726842679@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201210142602.361598591@linuxfoundation.org> References: <20201210142602.361598591@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Thomas Falcon [ Upstream commit ba246c175116e2e8fa4fdfa5f8e958e086a9a818 ] TX completions received with an error return code are not being processed properly. When an error code is seen, do not proceed to the next completion before cleaning up the existing entry's data structures. Fixes: 032c5e82847a ("Driver for IBM System i/p VNIC protocol") Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/ibm/ibmvnic.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) --- a/drivers/net/ethernet/ibm/ibmvnic.c +++ b/drivers/net/ethernet/ibm/ibmvnic.c @@ -1388,11 +1388,9 @@ restart_loop: next = ibmvnic_next_scrq(adapter, scrq); for (i = 0; i < next->tx_comp.num_comps; i++) { - if (next->tx_comp.rcs[i]) { + if (next->tx_comp.rcs[i]) dev_err(dev, "tx error %x\n", next->tx_comp.rcs[i]); - continue; - } index = be32_to_cpu(next->tx_comp.correlators[i]); txbuff = &adapter->tx_pool[pool].tx_buff[index];