From mboxrd@z Thu Jan 1 00:00:00 1970 From: Florian Fainelli Subject: Re: [PATCH net-next] net: phy: sfp: handle cases where neither BR,min nor BR,max is given Date: Sat, 05 May 2018 13:35:34 -0700 Message-ID: <53A4DFE3-C335-49B2-89C5-061A96C6D99D@gmail.com> References: <20180504152103.18152-1-antoine.tenart@bootlin.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, thomas.petazzoni@bootlin.com, maxime.chevallier@bootlin.com, gregory.clement@bootlin.com, miquel.raynal@bootlin.com, nadavh@marvell.com, stefanc@marvell.com, ymarkman@marvell.com, mw@semihalf.com To: Antoine Tenart , davem@davemloft.net, linux@armlinux.org.uk Return-path: Received: from mail-pg0-f51.google.com ([74.125.83.51]:39969 "EHLO mail-pg0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751230AbeEEUfm (ORCPT ); Sat, 5 May 2018 16:35:42 -0400 In-Reply-To: <20180504152103.18152-1-antoine.tenart@bootlin.com> Sender: netdev-owner@vger.kernel.org List-ID: On May 4, 2018 8:21:03 AM PDT, Antoine Tenart wrote: >When computing the bitrate using values read from an SFP module EEPROM, >we use the nominal BR plus BR,min and BR,max to determine the >boundaries=2E But in some cases BR,min and BR,max aren't provided, which >led the SFP code to end up having the nominal value for both the >minimum >and maximum bitrate values=2E When using a passive cable, the nominal >value should be used as the maximum one, and there is no minimum one >so we should use 0=2E > >Signed-off-by: Antoine Tenart >--- > >Hi Russell, > >I'm not completely sure about this patch as this case is not really >specified in the specification=2E But the issue is there, and I've >discuss >this with others=2E It seemed logical (at least to us :)) to use the >BR,nominal values as br_max and 0 as br_min when using a passive cable >which only provides BR,nominal as this would be the highest rate at >which the cable could work=2E And because it's passive, there should be >no >issues using it at a lower rate=2E > >I've tested this with one passive cable which only reports its >BR,nominal (which was 10300) while it could be used when using >1000baseX >or 2500baseX modes=2E Which SFP modules (vendor and model) exposed this out of curiosity? Russel= l and I already saw the Cotsworks modules having so e issues with checksums= , so building a table of quirks would help=2E Thanks! --=20 Florian