Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp922267pxb; Thu, 19 Nov 2020 17:59:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJxd8GUmwChOXWksBh+miE511nKmP1CEWIC8/+xVjBMTvicMAtdMqJ8u7p+2Sk3iBlCFMGK/ X-Received: by 2002:a17:907:c14:: with SMTP id ga20mr30856613ejc.526.1605837561585; Thu, 19 Nov 2020 17:59:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605837561; cv=none; d=google.com; s=arc-20160816; b=Dd1O6o/2gxg201ODzZ4AiOSxFAnImlCSmFtwT1gxs8mxV7kmqKAxSJAJjFILNTrCGh JkHZjWWyc2Pvl+ENVOJemK7uAunLU9VPVvLL1Hy3xAYav8/u+EglIXYBedndJ92s3/mH 9JRxPk6YJonJlwk0FF8vTWTK4GtgAYd0vSTH7e6XfZNxxjrQzMnLOyZAClFp57TI+Qzp tU04wbtuhuOwQEGmzq+hoHEcJNdoDdXd2CwwrutIU7WbQiY2vA5+wxOhKWAuMcaktAy6 idyuGw2yvi5PkOHqluPrcEx8nbDqBImuIiWsTqPjZ4vY/GttT7R6YKCI2GFpjl7XerCn cwZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=LVbjDapawr6X0SeWH92kzcC86spBupXe2wAXspeRBBI=; b=iwnNpJ2CvVBHCzFAXwz73SrCWABV92pBZGmTGccD0Oc3KogC1UacBmvFKXeLWaW+QX MJPlJIe8qkB1Gh3zx0cxKg5zHWZEUXJRY83yRhkgiVnWZoRB0WZZt+SCdR9ppcJNG3lH 3NPKuS92JGNQNVPSkpJ8vyeDWRhbcyri9WSykUbEH28XrSifRgVsSXxAj+SLXdPwa0i6 ipz2lTAxGWAiAW7Amyr0OWj0QLdfeG7bBHGObeS7SANAfmm4WTNIdXtHnwZYPiFYC5KW VvjWqshVoCOWXxmeIkz8aROK84VFrfHzsEbvpdtFreZUqk4UC/+1jt06Ok1Aqg+tAOWK K5Bw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m15si891170eda.302.2020.11.19.17.58.58; Thu, 19 Nov 2020 17:59:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727173AbgKTBys (ORCPT + 99 others); Thu, 19 Nov 2020 20:54:48 -0500 Received: from vps0.lunn.ch ([185.16.172.187]:40326 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726540AbgKTByr (ORCPT ); Thu, 19 Nov 2020 20:54:47 -0500 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1kfvdE-0082qw-MZ; Fri, 20 Nov 2020 02:54:36 +0100 Date: Fri, 20 Nov 2020 02:54:36 +0100 From: Andrew Lunn To: Marek Behun Cc: Pavana Sharma , lkp@intel.com, ashkan.boldaji@digi.com, clang-built-linux@googlegroups.com, davem@davemloft.net, f.fainelli@gmail.com, gregkh@linuxfoundation.org, kbuild-all@lists.01.org, kuba@kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, robh+dt@kernel.org, devicetree@vger.kernel.org, vivien.didelot@gmail.com Subject: Re: [PATCH v10 4/4] net: dsa: mv88e6xxx: Add support for mv88e6393x family of Marvell Message-ID: <20201120015436.GC1804098@lunn.ch> References: <20201120012906.GA1804098@lunn.ch> <20201120024311.5021d6b7@nic.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201120024311.5021d6b7@nic.cz> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 20, 2020 at 02:43:11AM +0100, Marek Behun wrote: > Hi Andrew, > > On Fri, 20 Nov 2020 02:29:06 +0100 > Andrew Lunn wrote: > > > > + if (speed >= 2500 && port > 0 && port < 9) > > > + return -EOPNOTSUPP; > > > > Maybe i'm missing something, but it looks like at this point you can > > call > > > > return mv88e6xxx_port_set_speed_duplex(chip, port, speed, true, true, duplex); > > He can't. That function does not support speed 5000. You can't simply > add it, because it clashes with register value for speed 2500 on > previous switches (Peridot, Topaz). > > Amethyst reg val Peridot + Topaz reg val > 2500 SPD_1000 | ALT_BIT SPD_10000 | ALT_BIT > 5000 SPD_10000 | ALT_BIT not supported > 10000 SPD_UNFORCED SPD_UNFORCED Hi Marek O.K, as i said, i might be missing something :-) I think a comment would be nice, pointing this out. Otherwise somebody might try refactoring it, and make the same mistake! Andrew