Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2479321yba; Mon, 15 Apr 2019 12:30:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqwdngyytptC/SyrXDwIUR0K78za9SLh+GgyFJ7iQkKfuVTbMAV+bRovwjpG8umoosGuU4vj X-Received: by 2002:a17:902:e48f:: with SMTP id cj15mr76894216plb.256.1555356642828; Mon, 15 Apr 2019 12:30:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555356642; cv=none; d=google.com; s=arc-20160816; b=xORNBtmVWomW05bDBWzOPyPI+VnLPzgyFMYjxnQw47T3/Oj5XFqIjfKs25durl07DO E5G/vgt2Sr7ik5HecZyl4/GkxS/NKuNhA4hyKcb0SNVh2Ln1bjkGGrcfq4/VUZDoX2sL wO/2cPrBI+f35G//90qpjZXuoZePzU5PXfWGFZyI250g6gglDH4gppZLcCHaZIBGSbWi rzt3RVURxnYBoc3jY1HLEOQV51w8CwOiLiZAk8aVG4aajbvPe7/O/kzSrkrjpy7DO4ov 1AimnNhDRHWgIZtYs1DkEXKhXNdHouF7tWRckPt6s4nSFY8ChMed2Et6KJaGouMBJny3 xqRQ== 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=kxN3yupMTiPXy5/HiqWl0EbDDzFiF2bDqGew/pBqZQg=; b=DXHYtKl2F+lEGvX3CTxgilsgOzSgmQaFhkoYhCrf3HPU3J8M+jnKRDMMqRASCRIXxr PvegoDmB0+v8V6dWs4mFSeKJykCHFV2u9WYmtGbclv0L2xavPbod8QyaYXlMDVLrnnfA IY+EBpmVr9r6BnnEWGg3RbgceD/JX8ro6/SAm3Tf6Vn+N00o6lR7Ob9oCxcbpKb0wmdc NhnWe3OVDoXox9DMcMkH9NmqvBV5IM12TG9ztwvkKHfTn9u2Bg7dqvvy8YFVtNInT1C9 ym2EjgLcUtNwPfNp2iga7xz6YsuWtlN5L5GUnjk3h537xjWnoqdxa+HL2CXh03voL91t tbMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=fp9BopQM; 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 j5si46696456pfi.166.2019.04.15.12.30.26; Mon, 15 Apr 2019 12:30:42 -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=fp9BopQM; 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 S1729262AbfDOTDe (ORCPT + 99 others); Mon, 15 Apr 2019 15:03:34 -0400 Received: from mail.kernel.org ([198.145.29.99]:35324 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729235AbfDOTD0 (ORCPT ); Mon, 15 Apr 2019 15:03:26 -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 B669820880; Mon, 15 Apr 2019 19:03:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1555355006; bh=v+EuV75IoSVit2gNtdmgdDDt3iqHUEQwCcJ87e7GBOU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fp9BopQMPYBlddZrokfpzJoV615012NMsPwd9vPyhf0HvYb4KTJ09cYbjdCUkzWLv fB8Ji/COX2a1hVTHUMegTINjBkaoO4sYxsL5C14zzOMpMfreh6GZzp+BwtqzfMS31z IuMMz82BY9j59P9qziat4scA3esyhFu3oSje/cck= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Michael Chan , "David S. Miller" Subject: [PATCH 4.14 32/69] bnxt_en: Reset device on RX buffer errors. Date: Mon, 15 Apr 2019 20:58:50 +0200 Message-Id: <20190415183731.688756152@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190415183726.036654568@linuxfoundation.org> References: <20190415183726.036654568@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 From: Michael Chan [ 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: Greg Kroah-Hartman --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 6 ++++++ 1 file changed, 6 insertions(+) --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c @@ -1557,11 +1557,17 @@ static int bnxt_rx_pkt(struct bnxt *bp, 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; }