Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2461653yba; Mon, 15 Apr 2019 12:08:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqwZ4WoFcXrzG7Qa8Se81iHqddkZaJfJFGLqcuj1RIIVJ5tR+40O0I4Uc2ij27TjbcwgP51a X-Received: by 2002:a17:902:b484:: with SMTP id y4mr76825534plr.88.1555355307993; Mon, 15 Apr 2019 12:08:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555355307; cv=none; d=google.com; s=arc-20160816; b=Sh28tZ5chsh0Y6qRLyzHl+KBFroj/CsH/P016IvMNtrASM4PuoHXEPoLGiDVWjOrVp sfhrSPXA+yHXG0A6giB+HnjjLyLFfkshxNhCWvJOUmuW4QxGjpnDXm08DfOMwBfldrM8 MnkXMGwH1r9s56X8qZ3Ei5Q4sf0CU+hqhnBPYj5Rije6sC8SHcIewBh4LiSLeHpVD/2F JOatdUiyPsW5GGa/kG1hh45OQS3V+yIxO5Jky+Us0wnVUujwxO5IjgNLOtZkbpS/xRDY y2giDIAvzGoGhPNbN6vnZq5XvM9naAcFIZmNW88PZCepl/8YeuPOyAfHkPvPp9fYZ1h5 WZNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=PEStJXsNG4wjhMOfAl+NiF0S8uF7nfhLfjC6A10j830=; b=xBU1yoiUwdc66PH3Q7w4XU+dvEd9joLqUKSyEjlkHrlbM6CCOu7yB5HD7bu6Lq5zMw Bg4x7e/kIg6Hns3aFJj3/nYPyIiRfLdDN/p4xs/I0ACI8bOFl3/f1dSzwPJjbvREVSGC 265z4gdHX5qhtI+wPOBPjSf01xNEoMjpJ/xFZ8zmQ5XYHwGLEQf5h8KFuUOnuhPlZ17M d3oHCCfplb4okBHZae7vpqyubkktEGfxQgMGwTWKw47NZ6JwFdXEzrjihQUdfaaMG+99 zKyzRKnRLY7mrA4rHY/093TMGWQZJakjQIbekMpAibD/Muka6iLivUZwaGZWo9krqL4R jjaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=jRpgK72X; 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 h11si44299427pgp.391.2019.04.15.12.08.12; Mon, 15 Apr 2019 12:08:27 -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=jRpgK72X; 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 S1729767AbfDOTFp (ORCPT + 99 others); Mon, 15 Apr 2019 15:05:45 -0400 Received: from mail.kernel.org ([198.145.29.99]:39598 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729294AbfDOTFo (ORCPT ); Mon, 15 Apr 2019 15:05:44 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 086002087C; Mon, 15 Apr 2019 19:05:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1555355143; bh=Qn+qeY7QsDrBSjDMgbLW46HKmISGD5usDVSxsTcLx9s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jRpgK72XCxmLqnr9f6YusASdcV13R8NIl4YPZNSfyfBLsz58EdPAzx5VGHNs1Qp7F d3qezqk9CT/xK9EwOtK9/uyMYV+hEABuEY4ehwImkNYN1bRDJBQgytM2+vKMGqM5b1 7PNtqe8+i2fgR+n89mPS7tedlyaP+9EsD3iwNrNE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Michael Chan , "David S. Miller" , Sasha Levin Subject: [PATCH 4.19 029/101] bnxt_en: Reset device on RX buffer errors. Date: Mon, 15 Apr 2019 20:58:27 +0200 Message-Id: <20190415183741.975253374@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190415183740.341577907@linuxfoundation.org> References: <20190415183740.341577907@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit 8e44e96c6c8e8fb80b84a2ca11798a8554f710f2 ] If the RX completion indicates RX buffers errors, the RX ring will be disabled by firmware and no packets will be received on that ring from that point on. Recover by resetting the device. Fixes: c0c050c58d84 ("bnxt_en: New Broadcom ethernet driver.") Signed-off-by: Michael Chan Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c index a8abb47178be..581ad0a17d0c 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c @@ -1573,11 +1573,17 @@ static int bnxt_rx_pkt(struct bnxt *bp, struct bnxt_napi *bnapi, u32 *raw_cons, rx_buf->data = NULL; if (rxcmp1->rx_cmp_cfa_code_errors_v2 & RX_CMP_L2_ERRORS) { + u32 rx_err = le32_to_cpu(rxcmp1->rx_cmp_cfa_code_errors_v2); + bnxt_reuse_rx_data(rxr, cons, data); if (agg_bufs) bnxt_reuse_rx_agg_bufs(bnapi, cp_cons, agg_bufs); rc = -EIO; + if (rx_err & RX_CMPL_ERRORS_BUFFER_ERROR_MASK) { + netdev_warn(bp->dev, "RX buffer error %x\n", rx_err); + bnxt_sched_reset(bp, rxr); + } goto next_rx; } -- 2.19.1