Received: by 10.213.65.68 with SMTP id h4csp120104imn; Thu, 15 Mar 2018 19:38:37 -0700 (PDT) X-Google-Smtp-Source: AG47ELt3Z75BsIjNdZNCpxcDzsn6ajM2ZdnA521KqdN1twbmCVGG4p4vuEyaikNirh7LOZhWwI3e X-Received: by 2002:a17:902:4222:: with SMTP id g31-v6mr172072pld.335.1521167917057; Thu, 15 Mar 2018 19:38:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521167917; cv=none; d=google.com; s=arc-20160816; b=dgCMzAEbR5BQTTEmQtZMtaFcpXE0K11E5D4dI66d/BMdaacCDxT3D5VUDdXssQtpuI Kbzw6PO/JrF5ZSVT8O5OdPtvvGKumcOq1QrAHw4AJEZ9icsVu3AgaM7WmuR+vM8FuFnh wkoGotiTXDyiN9+8S0QtWOI7Z7EzTQyxstzixxTvb9byrT6SO3WR2eWe03rF7E8jtCUI YxgSVYXr1yGYUqql2QFwAYuVO8yUWiezU0r1w5ItUTXc/OmdMTXn8mghiOwO8Z+xWk1H h8LDuQQ9hGrb6q4ZOPE599FhrDmHKgd4jaLjj//lOxcTIYlgvFXJVequwSJsNvUfR/HN 0UiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=InFibyIjjqo09VjWNB6h/QX8kaxCcmQiBiiXFuyHzXE=; b=c8p2j92Vt0BPCb3P+ggAqIV3wqznzKORtOZLjlk9/NbS2A77b+XJgVS3VnuswFsooI jAooc9sf7xhij2mTUiItB8dYEm/N8yy63kEHXeOgApVJ7Yq7vhrF1Q6dkqMbJb7ve92j 6Z1FPnRdY15th8DePSjL57rldz8oZkPUEZWwjg1npm32yPq+ZynJ7Bq2Ad7Thueft3e7 TFsyOJG1BGa/S6OEKl3q3+ZiGEJzqfXApcPOk3OxSw97rWavcVyS91qWeh+vfzLJW3ol ocUNiiyMxl5NfM9/0tWPq6zTa+zJ9Jr8owY4NaEHUPncpCTqZHjf+SC6mHo2NtcxKKZO ldOw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l186si4322049pgd.174.2018.03.15.19.38.23; Thu, 15 Mar 2018 19:38:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753006AbeCPChT (ORCPT + 99 others); Thu, 15 Mar 2018 22:37:19 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:38038 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752912AbeCPChS (ORCPT ); Thu, 15 Mar 2018 22:37:18 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DDA677B4AD; Fri, 16 Mar 2018 02:37:17 +0000 (UTC) Received: from dhcp-13-42.nay.redhat.com (unknown [10.66.128.195]) by smtp.corp.redhat.com (Postfix) with ESMTP id 82187215CDAF; Fri, 16 Mar 2018 02:37:14 +0000 (UTC) From: Honggang LI To: dledford@redhat.com, jgg@ziepe.ca, matanb@mellanox.com, leonro@mellanox.com, linux-rdma@vger.kernel.org Cc: linux-kernel@vger.kernel.org, noaos@mellanox.com, honli@redhat.com Subject: [PATCH] IB/mlx5: Set the default active rate and width to QDR and 4X Date: Fri, 16 Mar 2018 10:37:13 +0800 Message-Id: <20180316023713.30323-1-honli@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Fri, 16 Mar 2018 02:37:17 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Fri, 16 Mar 2018 02:37:17 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'honli@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Honggang Li commit f1b65df5a232 ("IB/mlx5: Add support for active_width and active_speed in RoCE"). Before this patch applied, the mlx5_ib driver set default active_width and active_speed to IB_WIDTH_4X and IB_SPEED_QDR. When the RoCE port is down, the RoCE port did not negotiate the active width with remote side. The active width is zero. If run ibstat to require the port status, ibstat will panic as it read invalid width from sys file. This patch restores the original behavior. Fixes: f1b65df5a232 ("IB/mlx5: Add support for active_width and active_speed in RoCE"). Signed-off-by: Honggang Li --- drivers/infiniband/hw/mlx5/main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c index 033b6af90de9..a48e9730fab8 100644 --- a/drivers/infiniband/hw/mlx5/main.c +++ b/drivers/infiniband/hw/mlx5/main.c @@ -388,6 +388,9 @@ static int mlx5_query_port_roce(struct ib_device *device, u8 port_num, if (err) goto out; + props->active_width = IB_WIDTH_4X; + props->active_speed = IB_SPEED_QDR; + translate_eth_proto_oper(eth_prot_oper, &props->active_speed, &props->active_width); -- 2.14.GIT