From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f172.google.com (mail-wr0-f172.google.com [209.85.128.172]) by dpdk.org (Postfix) with ESMTP id 3653629C7 for ; Tue, 28 Mar 2017 16:13:28 +0200 (CEST) Received: by mail-wr0-f172.google.com with SMTP id l43so107006973wre.1 for ; Tue, 28 Mar 2017 07:13:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=F/CiB5sYx4PNFCQgUG0aIaqvtOw/PDy7bD/V+AFLtaw=; b=oMiP7Wyg+GKg6jsaQmmQ2UcxvnhWnWvIPu97y9m2G4nuQU82hjK23C4rWR+hUFs776 A6WHi4lRiXRRPTYAwlLFwVeuFR2ud/hwbviAXGss7iHQCv9mHMaH7JXQFnFUwxS4xO3m 9wgYwJ8X4EQeJOh/fdmiEfDPAHP9CuaiWcYaaIrEGrQev7m2Uuhnr61NkL7gXyMg9Rst elWuGf8IFFEZOOE+2zpdx3uW1giwqRmi8wqliAf8t13fzBpVl85VynDPN9yK+q+QjMUx /q92RjG7ImF9uo3x9H7eW71AYoaNc7DVonux5JtOQLgCsMbYSGb3MosriV93ebSLKfdt unbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=F/CiB5sYx4PNFCQgUG0aIaqvtOw/PDy7bD/V+AFLtaw=; b=RdHZhoMqLh9+uhfTN1cnfvAkgCkx37zK63Q3SJ6mvOezpPnFr9mksR4jaUK501HgPq L7mRAR0HMA4HQwBXJDwl62VaTTnm5iG2zFI9YAGwjazEhGgVH6aPJk8F3KpKaf384mdX JJFRgOOSSIHC6rYrSj7VvSwmErC6L5O6maZl/GcYyR7EpsOYNnwAd16ROhaDdTZyFE0y ewrp2GuXufWPWnmZoti3KYHgm42TX62SiE4fdXJ5P8JCtvZDemNcPxcI128bjZgy0XKx R5ptd4bCxwBbkGzuWDI6tk3BHr9U7i2mvacMSnKeBFSUj6ymVvKCJNC5gNqv6l7UzE9d l+Mg== X-Gm-Message-State: AFeK/H2NLvxxyo363DDLAJGAwAdruqzyiPsBJdxnOB6EaaZ1dKqhikEdfeK0J3D2Jrpgkhdy X-Received: by 10.223.161.207 with SMTP id v15mr9061316wrv.71.1490710408007; Tue, 28 Mar 2017 07:13:28 -0700 (PDT) Received: from bidouze.dev.6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id m83sm2287841wmc.7.2017.03.28.07.13.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 28 Mar 2017 07:13:27 -0700 (PDT) From: Gaetan Rivet To: dev@dpdk.org Cc: Adrien Mazarguil , Nelio Laranjeiro , stable@dpdk.org Date: Tue, 28 Mar 2017 16:13:12 +0200 Message-Id: X-Mailer: git-send-email 2.1.4 In-Reply-To: <2f6db539fb06934a9433fea1e3ea64d5171db962.1490624067.git.gaetan.rivet@6wind.com> References: <2f6db539fb06934a9433fea1e3ea64d5171db962.1490624067.git.gaetan.rivet@6wind.com> Subject: [dpdk-stable] [PATCH v2 2/2] net/mlx5: fix returned values upon failed probing X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Mar 2017 14:13:28 -0000 Fixes: 771fa900b73a ("mlx5: introduce new driver for Mellanox ConnectX-4 adapters") Cc: stable@dpdk.org Signed-off-by: Gaetan Rivet Acked-by: Adrien Mazarguil --- drivers/net/mlx5/mlx5.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c index bc6a34f..f034e88 100644 --- a/drivers/net/mlx5/mlx5.c +++ b/drivers/net/mlx5/mlx5.c @@ -408,10 +408,8 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev) list = ibv_get_device_list(&i); if (list == NULL) { assert(errno); - if (errno == ENOSYS) { - WARN("cannot list devices, is ib_uverbs loaded?"); - return 0; - } + if (errno == ENOSYS) + ERROR("cannot list devices, is ib_uverbs loaded?"); return -errno; } assert(i >= 0); @@ -475,11 +473,11 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev) ibv_free_device_list(list); switch (err) { case 0: - WARN("cannot access device, is mlx5_ib loaded?"); - return 0; + ERROR("cannot access device, is mlx5_ib loaded?"); + return -ENODEV; case EINVAL: - WARN("cannot use device, are drivers up to date?"); - return 0; + ERROR("cannot use device, are drivers up to date?"); + return -EINVAL; } assert(err > 0); return -err; -- 2.1.4