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,URIBL_BLOCKED,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 A7441C31E45 for ; Thu, 13 Jun 2019 16:44:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8025020673 for ; Thu, 13 Jun 2019 16:44:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1560444263; bh=Bh3QU34HHdKBiVF2YQwTqAD0OhFrAl2rHrDhACFzOsA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=nYozWgvPp8rTc8/0UPa30yTmpOo+I5hxqGgimpC2K+frmxrV5xyPFjcFGdhxMyJ9V En2lkXu/G81LsfDlyWXsP2icbz3zlHE2F/zfC0BgNBUp5W/e1OGOaZhxTbnIPZ3QOi hCXA53mvRkaFvGPE7JChD4IMqHzG+HiJkVhWUZRc= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392719AbfFMQoV (ORCPT ); Thu, 13 Jun 2019 12:44:21 -0400 Received: from mail.kernel.org ([198.145.29.99]:59446 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730428AbfFMG07 (ORCPT ); Thu, 13 Jun 2019 02:26:59 -0400 Received: from localhost (unknown [193.47.165.251]) (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 6966B215EA; Thu, 13 Jun 2019 06:26:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1560407219; bh=Bh3QU34HHdKBiVF2YQwTqAD0OhFrAl2rHrDhACFzOsA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gNPvoD1sZ2YPDj2pztXWaFi1qRTGMFQGSYuqhrlrAfNolZTGaQ8EJsN4VtHVinJ84 dbOhM1Qut4QRgk67/ixFjz0NgChdYOpu9iNQ6zDKfymFjGto9+oSewHcUOkEepjO9r wFZYFVpPO0WFDt9KfGbRU/OGt7Et8zxcUo3I659s= From: Leon Romanovsky To: Doug Ledford , Jason Gunthorpe Cc: Leon Romanovsky , RDMA mailing list , Saeed Mahameed , Yishai Hadas , linux-netdev Subject: [PATCH mlx5-next 05/12] net/mlx5: Report a CQ error event only when a handler was set Date: Thu, 13 Jun 2019 09:26:33 +0300 Message-Id: <20190613062640.28958-6-leon@kernel.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190613062640.28958-1-leon@kernel.org> References: <20190613062640.28958-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 Reviewed-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 5971c1870e0d..c2a679657c34 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/eq.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/eq.c @@ -494,7 +494,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