From patchwork Tue Jul 31 06:02:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kamal Heib X-Patchwork-Id: 10549991 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 92ED21708 for ; Tue, 31 Jul 2018 06:03:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 81DE129244 for ; Tue, 31 Jul 2018 06:03:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 764AE293CB; Tue, 31 Jul 2018 06:03:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2B8FA2939B for ; Tue, 31 Jul 2018 06:03:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729674AbeGaHld (ORCPT ); Tue, 31 Jul 2018 03:41:33 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:45804 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729725AbeGaHlc (ORCPT ); Tue, 31 Jul 2018 03:41:32 -0400 Received: by mail-wr1-f68.google.com with SMTP id f12-v6so5339564wrv.12 for ; Mon, 30 Jul 2018 23:02:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=uQE6c7v+OR2RujcKAjVYZKyGkF1v0KBrF3jg/jlslTA=; b=J5DRW7vNnmxZn2AOnCjv2GKNeydI0mwOTkqh51vziK4nONCDZQI8vR9kQgyLWg6yir IPgxlVg7zjnCx2SdYUhGFe8EdP46kNibXUZcUy2j1jXMmt8Hug7P5POqeb0KYrKCTLMq 1KRjsHKxZ5VqgBTqvN6U584c1wbT0mqR6PyMUz1wrrRdDUAeFQP+5LIqa+4mYrMIcHEd I4CCctWuPd3PkSdl39EVhE41Y1buXxA5FVnPy3WM1x2mt89WLdTrHfJq/LN1a8sDd30A FR5qPGI+v6u2wxScld9xnLY33PThx/mIdVNUcJavISwnK+y6O9WHGRsai0bHyL5oP35O uJ4Q== 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=uQE6c7v+OR2RujcKAjVYZKyGkF1v0KBrF3jg/jlslTA=; b=McQvUmfyQZWDo+bzBTIAAQ7ClOGF81wx/4gdO4Fo9ptWSq1ahklnDqtDZkDkCHcCVg +Az29ZsZqsv0KbruP25ArzCY/T/rheX/Bl0gFJmQ/KWM4GjOB6Vlzwnxq/Dn171//eUk cSNOjJ0iR/gqljFtBctTmN81V9tTCIwsiUtbe4+10p+knmD4w836Mjw/JyxB/qdYHMPB 3q55eAFFegfpj3qfhQ2VQElfxLuPzhfxuI+WoHFHeT+BVS6+GBM3bBo9cjJ7f9VPyfh7 AY6Vt/vpUd0vpmbLemoTFiX6mNOYA4myUa5+YB6HeiUXoF5RRj2Z2EQuWZOlbRzGiXfh NJNA== X-Gm-Message-State: AOUpUlF9i/9tQH30L+RjxFcbyB16HxRfIIJaopmSIL0b0Q0TCkhQ2qfO Os+XSnDT8W947x2ImFZzd+k= X-Google-Smtp-Source: AAOMgpdy27vt5wzcGquIj6uy5WdaYznoitywft8qgg4naTv266tB6NhMn7Xhwtw2NcEM1FyVXyBCVw== X-Received: by 2002:adf:e14a:: with SMTP id f10-v6mr19117751wri.42.1533016976555; Mon, 30 Jul 2018 23:02:56 -0700 (PDT) Received: from localhost.localdomain ([2.53.43.221]) by smtp.gmail.com with ESMTPSA id y102-v6sm1324028wmh.9.2018.07.30.23.02.55 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 Jul 2018 23:02:56 -0700 (PDT) From: Kamal Heib To: Doug Ledford , Jason Gunthorpe , Leon Romanovsky Cc: linux-rdma@vger.kernel.org, Kamal Heib Subject: [PATCH rdma-next 2/2] RDMA/ipoib: Fix return code check from rdma_set_cq_moderation Date: Tue, 31 Jul 2018 09:02:37 +0300 Message-Id: <20180731060237.5045-3-kamalheib1@gmail.com> X-Mailer: git-send-email 2.14.4 In-Reply-To: <20180731060237.5045-1-kamalheib1@gmail.com> References: <20180731060237.5045-1-kamalheib1@gmail.com> Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Make sure to check for "-EOPNOTSUPP" instead of "-ENOSYS" which is the return code from rdma_set_cq_moderation() in case that it not supported. Signed-off-by: Kamal Heib --- drivers/infiniband/ulp/ipoib/ipoib_ethtool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c b/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c index 2706bf26cbac..83429925dfc6 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c @@ -102,7 +102,7 @@ static int ipoib_set_coalesce(struct net_device *dev, ret = rdma_set_cq_moderation(priv->recv_cq, coal->rx_max_coalesced_frames, coal->rx_coalesce_usecs); - if (ret && ret != -ENOSYS) { + if (ret && ret != -EOPNOTSUPP) { ipoib_warn(priv, "failed modifying CQ (%d)\n", ret); return ret; }