From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f177.google.com (mail-wr0-f177.google.com [209.85.128.177]) by dpdk.org (Postfix) with ESMTP id 5AF52FB01 for ; Mon, 27 Mar 2017 16:17:41 +0200 (CEST) Received: by mail-wr0-f177.google.com with SMTP id w11so44890680wrc.3 for ; Mon, 27 Mar 2017 07:17:41 -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=RyaW6njWAYp1JR9G6ZLCVT5gNQALu5hWIRm6BOUKtlbMkdhf2UqFg54iPVGCZlqfq2 qkx4aEukcH71oDCAwJOb7o/xy0AqawHI2K9YYwrGV9q+C8fUjUwQYDAoT7fDAkjmWvej jNA+4FgOrNPT12iG6c/xeooek4xYf9zk7LGKIH/ik4TLrgYqJwcFsmi0LlzOoNwtifzp /jr4Iyu2AoF7ZYK5QX+oUB6PDRgSy2iVIF1gUx3gKessUNrqcAdQ22j+T63Tfx1KDTsU jGNDArOFD8r0Vnqw6uQPsra4doCd9O0ngBI1z4SSEYl+PpIDF6mivtduoGNHni5UyqBN XRtw== 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=NTMc+gffxePPDeY627zFbT6x9nA+zTbMfbC1w+i5s5du8ZWet/EyUAZmTMmERbNefl WejVg66bg7GaVPjLz82iy0/KYpUqQ59uYy7vjkCOeZr1H0kFBO+4d3A1UKGr4sMbGzTt XMTUvlU6YXagQSiCYBxkpUfCMESZO6I4J1w4qagJl1qDd7/Ey5SvRUBecDTPgLQBACNs iUn7ziBnQlTjM9SSmVMJ9BE0HdrYY4/7JcV6E+3x6bkdy6qZuYVCWCVNgOqFSJ/0z2qj v5YfbDm78vzo7Ik4GG96ML2n62Ijs8/AnPcKGrWHmsLL9O+RtXcYs2FaaHDXCjvQpTlF nftw== X-Gm-Message-State: AFeK/H1yKudw9Zk5tUdjBJAiOOoSEtIZRnF5GApsRcieGxt1nBQTC24H8pZKaqO9CXg1n6lJ X-Received: by 10.223.163.131 with SMTP id l3mr20897343wrb.138.1490624259540; Mon, 27 Mar 2017 07:17:39 -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 51sm897107wrx.38.2017.03.27.07.17.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 27 Mar 2017 07:17:38 -0700 (PDT) From: Gaetan Rivet To: dev@dpdk.org Cc: Adrien Mazarguil , Nelio Laranjeiro , stable@dpdk.org Date: Mon, 27 Mar 2017 16:17:23 +0200 Message-Id: <4b6a26ed77bbef50a0b4c66baf4170b1bedfcc38.1490624067.git.gaetan.rivet@6wind.com> 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 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: Mon, 27 Mar 2017 14:17:41 -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