Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AD591C433DB for ; Mon, 15 Mar 2021 01:12:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6D51464E69 for ; Mon, 15 Mar 2021 01:12:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229587AbhCOBJV (ORCPT ); Sun, 14 Mar 2021 21:09:21 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:56112 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229476AbhCOBJL (ORCPT ); Sun, 14 Mar 2021 21:09:11 -0400 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1lLbjB-00AyVG-Mg; Mon, 15 Mar 2021 02:09:01 +0100 Date: Mon, 15 Mar 2021 02:09:01 +0100 From: Andrew Lunn To: Robert Hancock Cc: "nicolas.ferre@microchip.com" , "davem@davemloft.net" , "kuba@kernel.org" , "claudiu.beznea@microchip.com" , "netdev@vger.kernel.org" , "linux@armlinux.org.uk" Subject: Re: [PATCH net-next 2/2] net: macb: Disable PCS auto-negotiation for SGMII fixed-link mode Message-ID: References: <20210311201813.3804249-1-robert.hancock@calian.com> <20210311201813.3804249-3-robert.hancock@calian.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Sun, Mar 14, 2021 at 11:22:03PM +0000, Robert Hancock wrote: > On Sat, 2021-03-13 at 02:45 +0100, Andrew Lunn wrote: > > On Thu, Mar 11, 2021 at 02:18:13PM -0600, Robert Hancock wrote: > > > When using a fixed-link configuration in SGMII mode, it's not really > > > sensible to have auto-negotiation enabled since the link settings are > > > fixed by definition. In other configurations, such as an SGMII > > > connection to a PHY, it should generally be enabled. > > > > So how do you tell the PCS it should be doing 10Mbps over the SGMII > > link? I'm assuming it is the PCS which does the bit replication, not > > the MAC? > > I'm not sure if this is the same for all devices using this Cadence IP, but the > register documentation I have for the Xilinx UltraScale+ MPSoC we are using > indicates this PCS is only capable of 1000 Mbps speeds: > > https://www.xilinx.com/html_docs/registers/ug1087/gem___pcs_control.html > > So it doesn't actually seem applicable in this case. > > > > > I'm surprised you are even using SGMII with a fixed link. 1000BaseX is > > the norm, and then you don't need to worry about the speed. > > > > That would be a bit simpler, yes - but it seems like this hardware is set up > more for SGMII mode - it's not entirely clear to me that 1000BaseX is supported > in the hardware, and it's not currently supported in the driver that I can see. This hardware just seems odd. If it was not for the fact the documentation say SGMII all over the place, i would be temped to say it is actually doing 1000BaseX. Assuming the documentation is not totally wrong, your code seems sensible for the hardware. Andrew