Received: by 2002:ac0:950c:0:0:0:0:0 with SMTP id f12csp2291760imc; Tue, 12 Mar 2019 10:43:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqwPl0Y3EC/NDQe27sbONyJBcSHQQ7Z7XrHzOttuCyW2NSIKpiBI+y5cQTDFzQQK0DogDCcv X-Received: by 2002:a63:e654:: with SMTP id p20mr19147022pgj.345.1552412602612; Tue, 12 Mar 2019 10:43:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552412602; cv=none; d=google.com; s=arc-20160816; b=irLmIGf3ccWg0ABOT5uwRF5ya0Qn09zCTZvQ6Z3YARv3GC9ydc2K0Gg3i1ZIbmaENP oKTWXN7Z9EVH962ewAMO+l/iwHPbbUQi74XZRYk1Ytpii+MrSV36vEXmU65EHdYcPjIX 3hh3xuoQOnZDkbgDdwy2cRV2wtzRNyegC6vSNpDLOyYnjdznLb1wCOhEnEldN3f1+NRb 3dfpUINeXIx6uW/UmyfiVUGXB/807q+CBDDg0KNc/6OFzqlq9y0An8UZvqRI5RLkd2I/ 4qyqqtup8AZ6l0gJTgdZskrraFQELoWf8VuI8ehnQRBHpwzzabTxA6RpkwyqeMpSz3da dvQg== 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=GM9VRasnJ9T08Nf4qavSo7egoxjGAIqX3kii0pfcpQs=; b=ZE4M6Q5qb78+d77OKFN2G8FAMJ/4g2QdQKHfgDrAi7I2OPCZtBCRmyVnemJnkAfRxp zOktUOwHVCxS3MIZl64qzquK8fIAWCUfF1X4ypOJBnKTC4r83I0kVbZ6Ja5mq4KP0LSY qNrYhr4VZG3zj83YIbj9Sa+c9KOtR7PO+DdPrQgD06iF25mSMyyImdbRdA2jmItqYztt 1bPq+zEc1CJK91QHwUoNbR6WxjM3rieOqYgSODwj50hmgUm9sLhqfIZZw5SNrXs2OLPr D2lHPc+b7rSsC+ARNl3Y0vExqURyFyI2rG8X4GG2J60/2lyA/FOXb7tu1tKxH/FR9Tpy 9QCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=pwYklfp7; 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 23si7783609pgc.220.2019.03.12.10.43.06; Tue, 12 Mar 2019 10:43:22 -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=pwYklfp7; 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 S1728959AbfCLRQA (ORCPT + 99 others); Tue, 12 Mar 2019 13:16:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:54940 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728614AbfCLRPF (ORCPT ); Tue, 12 Mar 2019 13:15:05 -0400 Received: from localhost (unknown [104.133.8.98]) (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 D8FD2217D4; Tue, 12 Mar 2019 17:15:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1552410905; bh=QCKkDbqY2YiRvsh021Z1mLq9Fyt5C9ryaAk39JDWT/I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pwYklfp7hQvm/4MvkfSlIUa9Zm0g4GGhrI/RC9UJ2A/kfIQ8LVED3wmu1B98F4qOd gLbFvoZZbMeI4c/Ly63yqieX4QZjwIJiwz4YLFqiGpVrO3oB4YQhxtqL0ucEorEAWU BTbRjHLKCiy059+gVXXm4FV1wI8cAY6q3iFWWV4E= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Manish Chopra , Ariel Elior , "David S. Miller" , Sasha Levin Subject: [PATCH 4.19 118/149] qed: Fix EQ full firmware assert. Date: Tue, 12 Mar 2019 10:08:56 -0700 Message-Id: <20190312170359.353734716@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190312170349.421581206@linuxfoundation.org> References: <20190312170349.421581206@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore 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 4.19-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit 660492bcf4a7561b5fdc13be0ae0b0c0a8c120be ] When slowpath messages are sent with high rate, the resulting events can lead to a FW assert in case they are not handled fast enough (Event Queue Full assert). Attempt to send queued slowpath messages only after the newly evacuated entries in the EQ ring are indicated to FW. Signed-off-by: Manish Chopra Signed-off-by: Ariel Elior Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/qlogic/qed/qed_sp.h | 1 + drivers/net/ethernet/qlogic/qed/qed_spq.c | 15 +++++++-------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/net/ethernet/qlogic/qed/qed_sp.h b/drivers/net/ethernet/qlogic/qed/qed_sp.h index 3157c0d99441..dae2896e1d8e 100644 --- a/drivers/net/ethernet/qlogic/qed/qed_sp.h +++ b/drivers/net/ethernet/qlogic/qed/qed_sp.h @@ -380,6 +380,7 @@ void qed_consq_setup(struct qed_hwfn *p_hwfn); * @param p_hwfn */ void qed_consq_free(struct qed_hwfn *p_hwfn); +int qed_spq_pend_post(struct qed_hwfn *p_hwfn); /** * @file diff --git a/drivers/net/ethernet/qlogic/qed/qed_spq.c b/drivers/net/ethernet/qlogic/qed/qed_spq.c index 7106ad17afe2..a0ee847f379b 100644 --- a/drivers/net/ethernet/qlogic/qed/qed_spq.c +++ b/drivers/net/ethernet/qlogic/qed/qed_spq.c @@ -402,6 +402,11 @@ int qed_eq_completion(struct qed_hwfn *p_hwfn, void *cookie) qed_eq_prod_update(p_hwfn, qed_chain_get_prod_idx(p_chain)); + /* Attempt to post pending requests */ + spin_lock_bh(&p_hwfn->p_spq->lock); + rc = qed_spq_pend_post(p_hwfn); + spin_unlock_bh(&p_hwfn->p_spq->lock); + return rc; } @@ -745,7 +750,7 @@ static int qed_spq_post_list(struct qed_hwfn *p_hwfn, return 0; } -static int qed_spq_pend_post(struct qed_hwfn *p_hwfn) +int qed_spq_pend_post(struct qed_hwfn *p_hwfn) { struct qed_spq *p_spq = p_hwfn->p_spq; struct qed_spq_entry *p_ent = NULL; @@ -883,7 +888,6 @@ int qed_spq_completion(struct qed_hwfn *p_hwfn, struct qed_spq_entry *p_ent = NULL; struct qed_spq_entry *tmp; struct qed_spq_entry *found = NULL; - int rc; if (!p_hwfn) return -EINVAL; @@ -941,12 +945,7 @@ int qed_spq_completion(struct qed_hwfn *p_hwfn, */ qed_spq_return_entry(p_hwfn, found); - /* Attempt to post pending requests */ - spin_lock_bh(&p_spq->lock); - rc = qed_spq_pend_post(p_hwfn); - spin_unlock_bh(&p_spq->lock); - - return rc; + return 0; } int qed_consq_alloc(struct qed_hwfn *p_hwfn) -- 2.19.1