Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1677059pxu; Sun, 6 Dec 2020 03:44:04 -0800 (PST) X-Google-Smtp-Source: ABdhPJyeItO8isJJarXaSlfwXggBDhiY0pkS6FhscwjKZfJDXnZZSLowee8Ea7WXDGLlOpnK/V+6 X-Received: by 2002:aa7:db56:: with SMTP id n22mr15937034edt.4.1607255044302; Sun, 06 Dec 2020 03:44:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607255044; cv=none; d=google.com; s=arc-20160816; b=OD0hWs7brZW4dymPmP+nlcgNForLHrBDKHnO0ANiqjXF6cxQnt4bOjhG61BJ8VQ8UN 3sa2icH3Hap+8anYS6T8VOmpXyTEN/E5swo4wRcEfld3t78vwP6Xff77j97tRbcdIOty xWBklHYwrZ68e2793i8WmdYU+GIUEHOO7nBM5OvFBunawNJYtTzVPBHSHgbfswfwkAtY hrbygHU86M0XJmNS9yMjAeMD//GWGa9FHAfYxDoJ2OS8D4IpDBejOMqQn8ZHFNEPIm0s 4yBJdxPZq4yifNCEbLeJ3fYPojHaSWtS+oEz4EWXAH0pyaroXUqiCuDRmXvlxJWhV6uW 3w8g== 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=CVyGLEt1YZQOx/DemehGfpus8iqmkI7wzX/upXOBV1w=; b=w1BsQRFlbJMhNuEIrk0fm1srrm0vIrn35Q+pq1SlVKDGZEfBAz6PprMNtBAXFEX16t xHpNcAHGocU2wtYA6wVvuXRPXuliiQ87aGHZ8P8ImDcDMvSnkSekoIUq64pdAu1of4Lp x4TWxRa4pgAH/qRV0T1Hp8/SaEz9bxDb8f/7YLBmW47t2GY4p9nNSbN21+w78qOlq5xk JZCOcp2ye11liSqcTLuh5leN2A80Z9I9/PdeFY7rLmfOy93XG/sHHwF1oj3u3lHq85Ut aDAB1rL7nIXLAqyDo2T7W1DtZscJMzdsNm9GufYW3Y4gaBTv0hm40IJHU2e5ZKDuSyK0 wDuA== 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 k10si2019977eji.9.2020.12.06.03.43.40; Sun, 06 Dec 2020 03:44:04 -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 S1727971AbgLFLjZ (ORCPT + 99 others); Sun, 6 Dec 2020 06:39:25 -0500 Received: from mail.kernel.org ([198.145.29.99]:35898 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727836AbgLFLjZ (ORCPT ); Sun, 6 Dec 2020 06:39:25 -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.14 11/20] ibmvnic: Fix TX completion error handling Date: Sun, 6 Dec 2020 12:17:14 +0100 Message-Id: <20201206111556.098980780@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201206111555.569713359@linuxfoundation.org> References: <20201206111555.569713359@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 @@ -2192,11 +2192,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];