Received: by 10.213.65.68 with SMTP id h4csp1525631imn; Thu, 15 Mar 2018 02:04:16 -0700 (PDT) X-Google-Smtp-Source: AG47ELsqoIxYVM16Yb6vr39coccveTgJQqIQ/1Qhag7EEz0NaD7oGctjSg3BmhLKGabiNk0vgkSu X-Received: by 2002:a17:902:7045:: with SMTP id h5-v6mr7242916plt.217.1521104656075; Thu, 15 Mar 2018 02:04:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521104656; cv=none; d=google.com; s=arc-20160816; b=wQMxmKabf1X9OWq6mBr3VgPZMeq8tYoRATtrLYNTYGG6MXtjsm0+mUxntsyJETYt/q BySTaJ7TOWux7kOusKBLHmPR//NLVxPdPJhmYW82EWJKIof0lVyv946mNoN58yU98jBs LwvTuxmaevHUbI+RT9MAyUkv8IQCHUC4PtHSREkQ1rJ4Osr1V3Xnb9P8DOiyOy9Zpixx 5VbqgXU/6r+yBTxYOkz+zG17QzD9/q7yfdetC69nJvMMs7HfFWRd2MG/iMxJU3Lv42TT O8RLYX4ijD95b5JQ0yKFSfSR2gSn9v/A/ETdpKSCmzf0vbRd97xJgjIJlopQKABm6Qzz DS6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=y/FOH3OfWknE5BAcKfsFAMbpZF8OXwpRmGYds354e1U=; b=y2ZcxNf/9yO9nLZ3p7C4ZXjQd+Eed2kk0e3ZNhUa/CXMgHpZF1AxyVPPoV5uxFA4l+ ZI9EtNjyY0s5unEQj7rFqKYspwyLzMiQ1GwIYkvGd15S5fwkH8/dJ60ACUaGw+MtH2Q2 hawVJ7IUe9h/AhZ+LLjhbVqhqNt8qsHSB25yFUAwrfIrOy+a1xWQHlmj+YlOV7uvoeyx iZEAxd6qQIVxxFIjYyYpeVuSd9JFxPOdYSn4r3jlnhJIhPaSiVkpndbsknTLbtuJKA1Z aIQ4/Dk2xWckdIdL6nvoEQ2VZEN7yx+Mce/F+syj1IFznzxa0Bbjzntj2Rdaguze15h1 CHmA== 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 33-v6si3633909plf.98.2018.03.15.02.04.01; Thu, 15 Mar 2018 02:04:16 -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 S1751884AbeCOJCY (ORCPT + 99 others); Thu, 15 Mar 2018 05:02:24 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:38570 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751826AbeCOJCV (ORCPT ); Thu, 15 Mar 2018 05:02:21 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1DCD74023156; Thu, 15 Mar 2018 09:02:21 +0000 (UTC) Received: from dhcp-13-42.nay.redhat.com (unknown [10.66.128.195]) by smtp.corp.redhat.com (Postfix) with ESMTP id E0262202698A; Thu, 15 Mar 2018 09:02:18 +0000 (UTC) From: Honggang LI To: dledford@redhat.com, jgg@ziepe.ca, linux-rdma@vger.kernel.org Cc: noaos@mellanox.com, linux-kernel@vger.kernel.org, honli@redhat.com Subject: [PATCH 1/2] IB/core: Set speed string to SDR for invalid active rates Date: Thu, 15 Mar 2018 17:02:13 +0800 Message-Id: <20180315090214.21706-2-honli@redhat.com> In-Reply-To: <20180315090214.21706-1-honli@redhat.com> References: <20180315090214.21706-1-honli@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Thu, 15 Mar 2018 09:02:21 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Thu, 15 Mar 2018 09:02:21 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.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. Now, the active_width and active_speed are zeros if the RoCE port is in DOWN state. The speed string should be set to " SDR" instead of a blank string when active_speed is zero. Signed-off-by: Honggang Li --- drivers/infiniband/core/sysfs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/infiniband/core/sysfs.c b/drivers/infiniband/core/sysfs.c index 8ae1308eecc7..cf36ff1f0068 100644 --- a/drivers/infiniband/core/sysfs.c +++ b/drivers/infiniband/core/sysfs.c @@ -273,6 +273,7 @@ static ssize_t rate_show(struct ib_port *p, struct port_attribute *unused, break; case IB_SPEED_SDR: default: /* default to SDR for invalid rates */ + speed = " SDR"; rate = 25; break; } -- 2.14.GIT