From patchwork Thu Sep 17 09:02:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leon Romanovsky X-Patchwork-Id: 260724 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=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, MAILING_LIST_MULTI, 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 3E487C43461 for ; Thu, 17 Sep 2020 09:02:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DAD3F2083B for ; Thu, 17 Sep 2020 09:02:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600333351; bh=uObNOBKy1NqJePr2mqJ9xVb7ssBbEU3eil62g617ILk=; h=From:To:Cc:Subject:Date:List-ID:From; b=gQKNCOXzBRrYuKwFD8uSTbZAvnwU4iR0hg+LlAi0SQIqsyDbvozRAPYob0Ev4a8Sf SR4ZiSQE+A7NQZ2GItrdBLagfUBmWkLD46yz4HgucjG+/rdz2UPFlErsf++bnMDuOy 1IPsqxfbPUxj/BmgnrID8beHhpwquSwUnYYCvMKA= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726309AbgIQJCb (ORCPT ); Thu, 17 Sep 2020 05:02:31 -0400 Received: from mail.kernel.org ([198.145.29.99]:47128 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726185AbgIQJCa (ORCPT ); Thu, 17 Sep 2020 05:02:30 -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 A7BC62076D; Thu, 17 Sep 2020 09:02:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600333349; bh=uObNOBKy1NqJePr2mqJ9xVb7ssBbEU3eil62g617ILk=; h=From:To:Cc:Subject:Date:From; b=1A5BTxhh4eexfkFU7ZSEci59kLWUuCTqIZ8H77lt4GimVk7etNJv0/2hL4mZAzZyt XFkupcH1aBSvxpCVN7WYIJ5PfRSfuvz2fpHFeH9XDkNcZeBmqmGGAoiE/NRdwWE1UT fdwKG2j2eau422nydni9wNUDDeq7bejHffENNyuA= From: Leon Romanovsky To: Doug Ledford , Jason Gunthorpe Cc: Leon Romanovsky , Achiad Shochat , Adit Ranadive , Aharon Landau , Ariel Elior , Dennis Dalessandro , Devesh Sharma , Jakub Kicinski , linux-rdma@vger.kernel.org, Michael Guralnik , Michal Kalderon , Mike Marciniszyn , Naresh Kumar PBS , netdev@vger.kernel.org, Saeed Mahameed , Selvin Xavier , Somnath Kotur , Sriharsha Basavapatna , VMware PV-Drivers Subject: [PATCH rdma-next v2 0/3] Fix in-kernel active_speed type Date: Thu, 17 Sep 2020 12:02:20 +0300 Message-Id: <20200917090223.1018224-1-leon@kernel.org> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Leon Romanovsky Changelog: v2: * Changed WARN_ON casting to be saturated value instead while returning active_speed to the user. v1: https://lore.kernel.org/linux-rdma/20200902074503.743310-1-leon@kernel.org * Changed patch #1 to fix memory corruption to help with bisect. No change in series, because the added code is changed anyway in patch #3. v0: * https://lore.kernel.org/linux-rdma/20200824105826.1093613-1-leon@kernel.org ---------------------------------------------------------------------------------------- IBTA declares speed as 16 bits, but kernel stores it in u8. This series fixes in-kernel declaration while keeping external interface intact. Thanks Aharon Landau (3): net/mlx5: Refactor query port speed functions RDMA/mlx5: Delete duplicated mlx5_ptys_width enum RDMA: Fix link active_speed size .../infiniband/core/uverbs_std_types_device.c | 3 +- drivers/infiniband/core/verbs.c | 2 +- drivers/infiniband/hw/bnxt_re/bnxt_re.h | 2 +- drivers/infiniband/hw/hfi1/verbs.c | 2 +- drivers/infiniband/hw/mlx5/main.c | 41 +++++++------------ drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 2 +- drivers/infiniband/hw/qedr/verbs.c | 2 +- drivers/infiniband/hw/qib/qib.h | 6 +-- .../infiniband/hw/vmw_pvrdma/pvrdma_verbs.h | 2 +- .../mellanox/mlx5/core/ipoib/ethtool.c | 31 ++------------ .../net/ethernet/mellanox/mlx5/core/port.c | 23 ++--------- include/linux/mlx5/port.h | 15 +++++-- include/rdma/ib_verbs.h | 4 +- 13 files changed, 47 insertions(+), 88 deletions(-) --- 2.26.2