Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp117242pxb; Mon, 7 Feb 2022 07:33:19 -0800 (PST) X-Google-Smtp-Source: ABdhPJwMk9D4x9IcKsTRZLGBlb+bYXzpKvU0iGe44pKjy9DxouRRXmUMejJXlQwtOfUALbzT+04a X-Received: by 2002:a17:907:7da8:: with SMTP id oz40mr249172ejc.328.1644247998935; Mon, 07 Feb 2022 07:33:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644247998; cv=none; d=google.com; s=arc-20160816; b=kkzb25EUYjI1Rs7DX6o2nNZtgGom90RzmyJZhqIYfJ/PGPBdCsAJJEG4pOlfHEp8ua 0xqhtIzom33DkuKb22EeoQ2AUGhoER0QiOLpncu/3X073zbhRp0ZrWL/JA9C7oxapSWA v/NiUDbXncoROJsJfuXw3Qrg9Ln3PHcq8YPfcgeJJju+v8drH6hoMrjGYo48cdImZZfZ MrVRbqXpY55GVVGff6/bmDWGwRuoHwK9gj8WGUCT59PVoTZeGYsH6jSpAcaEqLtLSzOi J1LT/FJKJsW3mVh2GQhs/Owq2ppZOn2paNRfyfbgtsH6emwT9hjb80ujQ8jWTfJ/SYab JXMQ== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=/8tPNhnmKNqwNI2GwJ1u5pVwv907hfEX8rrGwiFxMM8=; b=C23oQhWr3PS3fSnW8IZ9RGLV7S9m66pHDxvl2n5pxvudh48YNy5amnVQyVRH5XLXsx A0uqEzYV7LMHTH8cIt5/hyNGGYPySWBCW9WDJVxOZYWtklBSsubcsP6jWfC/7/QHnDaB LejddG4D/jIlOb5OGF7BGM2g8GJEioZ3YUSw+RNa9ew98zScnx/tbMgC6fWTH/VOWPQj 5Q9roEg8rz43lRdseMzubnnMQe4Ahoqw1a0d5JU6jEJm/L9m6BUO4c8Glv129USIy4rZ NmL69KCmNe1MEdrZJPEACQMiItlOwgXBubxdwYbC1EU8LM7akVh1RFCiQf+5Khi6MF/2 wz+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=dlXuCEYw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o5si5772682edv.446.2022.02.07.07.32.50; Mon, 07 Feb 2022 07:33:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=dlXuCEYw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345882AbiBFS2Y (ORCPT + 99 others); Sun, 6 Feb 2022 13:28:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51186 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230006AbiBFS2X (ORCPT ); Sun, 6 Feb 2022 13:28:23 -0500 X-Greylist: delayed 1582 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Sun, 06 Feb 2022 10:28:21 PST Received: from vps0.lunn.ch (vps0.lunn.ch [185.16.172.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 160CFC06173B; Sun, 6 Feb 2022 10:28:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Transfer-Encoding:Content-Disposition: Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:From: Sender:Reply-To:Subject:Date:Message-ID:To:Cc:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Content-Disposition: In-Reply-To:References; bh=/8tPNhnmKNqwNI2GwJ1u5pVwv907hfEX8rrGwiFxMM8=; b=dl XuCEYwo3gFWPQbeuANJDhxAM8CTKgrsz3WhXKSrLbI/5d9Yk3IoTKKc++vKZLa7X2pEZ1ivFIdH4a gRCAlhtGhvrgWkKYkdpn1pBI9tcCLi15RfDJ07hBFk/nIxUPNC1godBA++221YH4pFetZN5kXKtZJ 6Yr0ZoVkg+U2jn8=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1nGlr3-004Wpn-KU; Sun, 06 Feb 2022 19:01:41 +0100 Date: Sun, 6 Feb 2022 19:01:41 +0100 From: Andrew Lunn To: Raag Jadav Cc: Heiner Kallweit , Russell King , "David S. Miller" , Jakub Kicinski , Steen Hegelund , Bjarni Jonasson , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] net: phy: mscc: enable MAC SerDes autonegotiation Message-ID: References: <1644043492-31307-1-git-send-email-raagjadav@gmail.com> <20220206171234.GA5778@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220206171234.GA5778@localhost> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Feb 06, 2022 at 10:42:34PM +0530, Raag Jadav wrote: > On Sat, Feb 05, 2022 at 03:57:49PM +0100, Andrew Lunn wrote: > > On Sat, Feb 05, 2022 at 12:14:52PM +0530, Raag Jadav wrote: > > > Enable MAC SerDes autonegotiation to distinguish between > > > 1000BASE-X, SGMII and QSGMII MAC. > > > > How does autoneg help you here? It just tells you about duplex, pause > > etc. It does not indicate 1000BaseX, SGMII etc. The PHY should be > > using whatever mode it was passed in phydev->interface, which the MAC > > sets when it calls the connection function. If the PHY dynamically > > changes its host side mode as a result of what that line side is > > doing, it should also change phydev->interface. However, as far as i > > can see, the mscc does not do this. > > > > Once the PHY auto-negotiates parameters such as speed and duplex mode > with its link partner over the copper link as per IEEE 802.3 Clause 27, > the link partner’s capabilities are then transferred by PHY to MAC > over 1000BASE-X or SGMII link using the auto-negotiation functionality > defined in IEEE 802.3z Clause 37. None of this allows you to distinguish between 1000BASE-X, SGMII and QSGMII, which is what the commit message says. It does allow you to get duplex, pause, and maybe speed via in band signalling. But you should also be getting the same information out of band, via the phylib callback. There are some MACs which don't seem to work correctly without the in band signalling, so maybe that is your problem? Please could you give more background about your problem, what MAC and PHY combination are you using, what problem you are seeing, etc. Andrew