Received: by 2002:ac0:950c:0:0:0:0:0 with SMTP id f12csp2286330imc; Tue, 12 Mar 2019 10:36:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqwale5yLjxHPHVeIino4n+1IUeL47JQWmdAXWX8rifEyJruPI5doMtf+xHBPA2euHKGOWyb X-Received: by 2002:a63:c26:: with SMTP id b38mr824051pgl.382.1552412187629; Tue, 12 Mar 2019 10:36:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552412187; cv=none; d=google.com; s=arc-20160816; b=tqCvoLU/IjIbM8n5zrz/X0sdBuyxaLzSqCJu+O9OYbqV8hWW6QRo8tRy32rQOV5rfE Z1UEIDlPo5IWoPuI/bowilYhRLcovJRA8A4Ck1HxtFlSJNMOKQH3QgYyPB6AD+DeyYS1 6OHC2IDMuYzj5YSWH0PT/95LS8fspqbXMjzo1zGc+MBqkuEaQB3seAt2ck8Z2OLijqAJ sc5ZT5Ljp2GcRul3DPOvZuzM/84aIBPt1S0GU8LftB2XWZQwu+YuTsYou90EuUAyVquR UUMn+GUXyPMLiHRsMxOQxGXpnBGXg2gxfWtYEfx/HoByTDxOTUZekYvPRlJoOztqhyca eyxg== 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=huridhD9Kb9zt7KhAQ17wWjauVPBdZnL5BgfnMWi60Y=; b=0LycH4dnwXT6/JAv491happE0hFu8xpSnNskjGqUJZx/r40ST6NAU+HbaziBk1owOD 0AxrY6aMNN0bq79GBdbTQjTQ6aTFh2lE5HFTSnSRoq703uUnpV0KcuuV4nnzNDh68qPF xj5qL5tNgchYf58Vtd8zxYuepQjn3N1FdMF/yGezVZojc96zG636C5t6u3Ng/SthtdWR phE8PbMI3M4KKye9XjZoTUoqSQVBs2waOvPAsUHTlOZim85/45O3nkE+0MB861GZRxMQ vh/+eKTd7xoTy806525z661bz+rmeTtahdTizIBOGu9NcjwEMjYEWX/ZVGzaj0phkxxb 1gEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="GMqqp/OM"; 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 37si6395263plc.233.2019.03.12.10.36.12; Tue, 12 Mar 2019 10:36: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="GMqqp/OM"; 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 S1729583AbfCLRfM (ORCPT + 99 others); Tue, 12 Mar 2019 13:35:12 -0400 Received: from mail.kernel.org ([198.145.29.99]:59658 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729354AbfCLRQy (ORCPT ); Tue, 12 Mar 2019 13:16:54 -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 5F7CA2087C; Tue, 12 Mar 2019 17:16:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1552411013; bh=uHqbiq2323LrZfdZEBFK21XzrSuQDYkkN0OT2Xylsdk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GMqqp/OMFOhkJQhj+ccOOTx7jKir5PZJqi7DpMT+TMvKoqfAPImZ5xO1BXEJYJg/1 z67ont1ftSP39QkHdVtFBpjmPjj2uR++PU7hjlqul+pJufk9djvvNlPewnBCyfTVfN RGYjivuQa87R66Sm/QDIpWOCNXdCxQtzxF7FsPfY= 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.14 118/135] qed: Fix EQ full firmware assert. Date: Tue, 12 Mar 2019 10:09:25 -0700 Message-Id: <20190312170352.094335679@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190312170341.127810985@linuxfoundation.org> References: <20190312170341.127810985@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.14-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 01a213d4ee9c..e7192f3babc2 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 467755b6dd0b..01f8e2b5cb6c 100644 --- a/drivers/net/ethernet/qlogic/qed/qed_spq.c +++ b/drivers/net/ethernet/qlogic/qed/qed_spq.c @@ -404,6 +404,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; } @@ -747,7 +752,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; @@ -879,7 +884,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; @@ -937,12 +941,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