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=-10.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 47413C5B57E for ; Sun, 30 Jun 2019 16:24:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1D02920673 for ; Sun, 30 Jun 2019 16:24:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1561911840; bh=OMnakVtvRGXI8xpRDl0AAsiJCT9IYcldsvHakL6wSvM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=HRPl761dDVnYkOJ0J+criay7vD2WEcKduYEih7lm3zWYCm9PvYrkWHAu8WZISF8se FWsOM/xowRmuSbjLi8mypDzWRIZQaKeMziTmH2RJcRKn6eOw2saG1e95JgPqH5Tzio LMIputNc9F79nVTQqEMTwpH7OhUgU1+ZGgaWlqGc= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726757AbfF3QX7 (ORCPT ); Sun, 30 Jun 2019 12:23:59 -0400 Received: from mail.kernel.org ([198.145.29.99]:52478 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726563AbfF3QX6 (ORCPT ); Sun, 30 Jun 2019 12:23:58 -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 2FDB120828; Sun, 30 Jun 2019 16:23:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1561911837; bh=OMnakVtvRGXI8xpRDl0AAsiJCT9IYcldsvHakL6wSvM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=v3PEHBBDouITZz1kuF5JUQSX04r6u3HrOH4afl14iWxplyz4di3scjkq0Bg8TE1t2 oXaj1eTGce8igixWD2uF3npoDyb6fPdZrVphlivSC7OKUC/YByOjqmGj9uQkE9rd+F NeM6HCvRpO3rESRSK2Wkbs2MQMDKae5K+LMXONvM= From: Leon Romanovsky To: Doug Ledford , Jason Gunthorpe Cc: Leon Romanovsky , RDMA mailing list , Saeed Mahameed , Yishai Hadas , linux-netdev Subject: [PATCH mlx5-next v2 05/13] net/mlx5: Report a CQ error event only when a handler was set Date: Sun, 30 Jun 2019 19:23:26 +0300 Message-Id: <20190630162334.22135-6-leon@kernel.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190630162334.22135-1-leon@kernel.org> References: <20190630162334.22135-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 Acked-by: Saeed Mahameed 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 c634a78d5cdd..678454535460 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