From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A944AC31E5B for ; Tue, 18 Jun 2019 17:16:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 762FC2084A for ; Tue, 18 Jun 2019 17:16:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1560878161; bh=hHJn+EwBV2dBJUe9VVfHTe5a7cdACQwbjVLR1tbht4E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=hWscq14REz1qOfxGUA/dJ9+0xW79Kd2hjho7ZkX7wScKjaaz+2GbM2arGCB7j001P bddsKWrA4gKZ6Qv/XEEjL2uXsVz3XRdz2w2POb5E09UApu2U0lO/pfQzv/5l5z6P1L t4muz3qhMj6Ras+O6+RKkMNhpU08BEX+YWg43k4A= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730069AbfFRRQA (ORCPT ); Tue, 18 Jun 2019 13:16:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:48664 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728572AbfFRRQA (ORCPT ); Tue, 18 Jun 2019 13:16:00 -0400 Received: from localhost (unknown [37.142.3.125]) (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 978E020B1F; Tue, 18 Jun 2019 17:15:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1560878159; bh=hHJn+EwBV2dBJUe9VVfHTe5a7cdACQwbjVLR1tbht4E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=q6KCIbm1mc5nDYZzniAPtiBP03gdLle3Pyt62tA+UTzWy3Fx7lL4YA7xUZyy1ipbW 0Ll3yR/DXvFUh0gWg6GYKGZNH05q1PkwmxCIcQncxGIvwee+g5/YttR930X+C2tiLr zB+sw79rEw7WFOxeDC4mZ7QTaBYto6AXz7qLOPow= From: Leon Romanovsky To: Doug Ledford , Jason Gunthorpe Cc: Leon Romanovsky , RDMA mailing list , Yishai Hadas , Saeed Mahameed , linux-netdev Subject: [PATCH mlx5-next v1 05/12] net/mlx5: Report a CQ error event only when a handler was set Date: Tue, 18 Jun 2019 20:15:33 +0300 Message-Id: <20190618171540.11729-6-leon@kernel.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190618171540.11729-1-leon@kernel.org> References: <20190618171540.11729-1-leon@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Yishai Hadas Report a CQ error event only when a handler was set. This enables mlx5_ib to not set a handler upon CQ creation and use some other mechanism to get this event as of other events by the mlx5_eq_notifier_register API. Signed-off-by: Yishai Hadas Signed-off-by: Leon Romanovsky --- drivers/net/ethernet/mellanox/mlx5/core/eq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eq.c b/drivers/net/ethernet/mellanox/mlx5/core/eq.c index a7a8bf73e465..316fbed81470 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/eq.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/eq.c @@ -503,7 +503,8 @@ static int cq_err_event_notifier(struct notifier_block *nb, return NOTIFY_OK; } - cq->event(cq, type); + if (cq->event) + cq->event(cq, type); mlx5_cq_put(cq); -- 2.20.1