From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751785AbdJ1A0A (ORCPT ); Fri, 27 Oct 2017 20:26:00 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:20304 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750962AbdJ1AZ7 (ORCPT ); Fri, 27 Oct 2017 20:25:59 -0400 Subject: Re: [PATCH] IB/mlx5: give back valid speed/width even without plugged in SFP module To: Hal Rosenstock Cc: matanb@mellanox.com, leonro@mellanox.com, parav@mellanox.com, linux-kernel@vger.kernel.org, dledford@redhat.com References: <64ef31c8-cb1a-4579-ba12-11fbf6d1d5c0@default> <0af834ca-52ff-47da-a225-744aab4e59d6@dev.mellanox.co.il> <9be6d049-c3fc-6cf2-8d91-4449f4bcc896@oracle.com> <4dcf0ca6-77ff-bfd3-9f79-c114617f536f@dev.mellanox.co.il> From: Ghazale Hosseinabadi Organization: Oracle Corporation Message-ID: <429e9093-62dd-9d28-9209-d8022e564e7f@oracle.com> Date: Fri, 27 Oct 2017 17:29:15 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Source-IP: userv0022.oracle.com [156.151.31.74] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/27/2017 05:17 PM, Hal Rosenstock wrote: > On 10/27/2017 7:19 PM, Hal Rosenstock wrote: >> On 10/27/2017 7:04 PM, Ghazale Hosseinabadi wrote: >>> >>> On 10/27/2017 03:52 PM, Hal Rosenstock wrote: >>>> On 10/27/2017 5:54 PM, Ghazale Hosseinabadi wrote: >>>>> When running ibstat (if transceiver is not connected in adapter): >>>>> >>>>> ibpanic: [7851] main: stat of IB device 'mlx5_1' failed: Invalid >>>>> argument >>>> Any output before that ? >>> no, It only prints this line. >> and setting the width to 1x in the driver so the rate file is properly >> populated fixes this ? I must be missing something as to what is going >> on in this scenario. > [off list...] > Are you using libibumad or rdma-core package ? rdma-core > Which version ? rdma-core-13-25 > What version of infiniband-diags are you using ? infiniband-diags-1.6.7-1 > Can you build from sources ? > I have patch to libibumad/rdma-core and another patch to ibstat > (infiniband-diags) which I'd like you to try. Is that possible ? I haven't built user-land packages myself, but I can definitely try it. Please send me the patches and I will try to build. Thanks, Ghazale > > Thanks. > > -- Hal > >> sysfs.c:rate_show is inconsistent as it paves over an invalid speed >> setting that to SDR but does not pave over invalid width returning >> -EINVAL but this comment is in another "direction". >> >> -- Hal >> >>> -- Ghazale >>>> I'm trying to understand how far it gets. It >>>> looks to me that empty rate file would be parsed as 0 and ibstat would >>>> show that rate. ibpanic would occur if file was not found but I could be >>>> missing something. >>>> >>>