Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp915911pxb; Thu, 19 Nov 2020 17:46:18 -0800 (PST) X-Google-Smtp-Source: ABdhPJyMGGoud//j2pl1hgWUfmCYx1z0O7rbH7WsZpcOGCSzdBgI6dLWoKcOiidH7whvhK3xx6w6 X-Received: by 2002:a17:906:34c3:: with SMTP id h3mr30961049ejb.132.1605836778033; Thu, 19 Nov 2020 17:46:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605836778; cv=none; d=google.com; s=arc-20160816; b=NtTDnVongmunIMFUEWWAY2Y9da9DY4LELW8I6zJIUtFuay2PfbdxkHpQ0fpCoU5fDS Eq+lm7Wy52ljOarmi/KCerXkyEcaBYIUWAD358mXOiIxXzxfBpHaIOEXcrKF1n9Dk/hC w7YTVZ262DTxVmSS9y26Eb94vSs/V0TlYC2+HZqmqCIbcKhqbqpN/4Gtu3WnB7EONoGl UcOBJEMqLm4zcMNJf6/OOREvdyBKC/S0BSjijpp6R56P8eRL2wRqmoWlV3GSQJRG5b+0 sVizN/6UDr8aCrzwBdE1M1ZZBgobcwgNyVj+B37d2mGK9u0hfWY6sgJhTpldp5op9Jnx zqXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=0aS7XLmGRPDgS2saAezCl2orjOjqtqx+V2VuIdzZexs=; b=OhB/y9zYj9BUJ+kRyByUnEy96K2Pij0S1EN8n/siXltO1LglmkK5baavnba3iy/Xva qsKq5z7WiPkLTtTP2drdF3Fz9lc/1dtS/YLfD4DY84sy+u07TwLM2dhGa49e2hNsBv20 VAHO+7OdrNeVYKa7Yzp37t14FXh+78txaGK0C39L5G4EI2VhhjpdVIrFTiTjbqfPoa2W 1CTCo5UKLNibcf8vM+JLJIKQhU7U1xrC7MIO5hULZnK2w/ENWV59je+gkS/9yA4W8tXl 1ZSzHKYaz6VFmbO8QnU9f3SR4XyVYr+nYIpArS9Gco+NFw2dCeit78gP+WLfP5LCN88L dvhA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nic.cz Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q12si935261edn.458.2020.11.19.17.45.53; Thu, 19 Nov 2020 17:46:18 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nic.cz Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726799AbgKTBnT (ORCPT + 99 others); Thu, 19 Nov 2020 20:43:19 -0500 Received: from lists.nic.cz ([217.31.204.67]:49250 "EHLO mail.nic.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726619AbgKTBnT (ORCPT ); Thu, 19 Nov 2020 20:43:19 -0500 Received: from localhost (unknown [IPv6:2a0e:b107:ae1:0:3e97:eff:fe61:c680]) by mail.nic.cz (Postfix) with ESMTPSA id C0B2C140A03; Fri, 20 Nov 2020 02:43:16 +0100 (CET) Date: Fri, 20 Nov 2020 02:43:11 +0100 From: Marek Behun To: Andrew Lunn 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: <20201120024311.5021d6b7@nic.cz> In-Reply-To: <20201120012906.GA1804098@lunn.ch> References: <20201120012906.GA1804098@lunn.ch> X-Mailer: Claws Mail 3.17.6 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-100.0 required=5.9 tests=SHORTCIRCUIT, USER_IN_WELCOMELIST,USER_IN_WHITELIST shortcircuit=ham autolearn=disabled version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail.nic.cz X-Virus-Scanned: clamav-milter 0.102.2 at mail X-Virus-Status: Clean Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 When I sent my proposal for Amethyst I somehow did it, and you commented [1]: > This is getting more and more complex. Maybe it is time to refactor it? And I agree :) Marek [1] https://www.spinics.net/lists/netdev/msg678090.html