Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp861464ybm; Wed, 27 May 2020 09:43:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzhnJbcgrBU6KPmE9svyW6u41Q7g4cxnESFSb+1uhdF+x9eJCWughnHNkXFBA7LjMbFU+Ff X-Received: by 2002:a05:6402:17e6:: with SMTP id t6mr7862095edy.243.1590597808358; Wed, 27 May 2020 09:43:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590597808; cv=none; d=google.com; s=arc-20160816; b=OtTJNf7NRlxVIseqDN7lajg7Wq1h5WfVmTDZOZiUvILMIDvuVvXAWqSNYQbiluPwcx /pUELQ7J874JAOas0A+c5DNUSSDR/oUdUT4kBL+72NQug3zpj8AADXingCD4Ag1t2jJw bw4kL3yw9tGyVfAewHoIE9MyKmJH+7mrqahte1hzUebHJgpTQTsVjC1gvOesGmwWu71x uziTSEs8SEKUxPUVh/GZa6kLDw+3mrK0v4Ojac9pDaQrIR3Jn07o9UGl/lc12VWQuQ3u LcsuOr2ceT8Suk6hvZQ1aLzSrr72CDCIR60wAnyVcFzXkV9tn59LObKwr/bMmHrByWbz awBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=4ChFqEHcf5XiT8Rv55xCUecnKHnmelZryihO7VwbvC8=; b=TWTA6DZgay09KTzHnxmpvEQ8JygKAO0zSFVlh1AybJKdtGrxBDxplkDARvdmmWvZYn S8B2es1TLOKATcHrq0RFE6usdd0bTPNFFSF84ax17kpjg/LB7PlUjj5LvygZPh2KOOIv b9AjwEu6yBnwKZvGjDHTb5pMUuLh+EPO9mIuzOiWhE4at4gT8eYQbrse8lFmNdJeiSMA iRlGE7fW0XNt3OS6MoN8hZ+3XZudQUqigWB4giTDV2QMnJiW+bqpu/oRuf0PYuHW07Ih pcSTrUbLkLDnDTaowQ8eFJZjFdBRUXww0WVdWJwxib8DwrEutAFigyzYFkotVhcZDKV4 gMtw== 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 ba4si1866643edb.479.2020.05.27.09.43.05; Wed, 27 May 2020 09:43:28 -0700 (PDT) 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 S1729805AbgE0K0m (ORCPT + 99 others); Wed, 27 May 2020 06:26:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34956 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728143AbgE0K0m (ORCPT ); Wed, 27 May 2020 06:26:42 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 252AAC061A0F for ; Wed, 27 May 2020 03:26:42 -0700 (PDT) Received: from pty.hi.pengutronix.de ([2001:67c:670:100:1d::c5]) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jdtGZ-0003gm-6h; Wed, 27 May 2020 12:26:31 +0200 Received: from ore by pty.hi.pengutronix.de with local (Exim 4.89) (envelope-from ) id 1jdtGP-0002lk-0P; Wed, 27 May 2020 12:26:21 +0200 Date: Wed, 27 May 2020 12:26:20 +0200 From: Oleksij Rempel To: Michal Kubecek Cc: Andrew Lunn , "David S. Miller" , Florian Fainelli , Heiner Kallweit , Jakub Kicinski , Jonathan Corbet , "John W. Linville" , David Jander , kernel@pengutronix.de, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Russell King , mkl@pengutronix.de, Marek Vasut , Christian Herber , Amit Cohen , Petr Machata Subject: Re: [PATCH ethtool v1] netlink: add master/slave configuration support Message-ID: <20200527102620.legyuohgu2xj7pfk@pengutronix.de> References: <20200526091025.25243-1-o.rempel@pengutronix.de> <20200526124139.mvsn52cixu2t5ljz@lion.mk-sys.cz> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="pgvkh5uu574hkgt3" Content-Disposition: inline In-Reply-To: <20200526124139.mvsn52cixu2t5ljz@lion.mk-sys.cz> X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-IRC: #ptxdist @freenode X-Accept-Language: de,en X-Accept-Content-Type: text/plain X-Uptime: 12:22:51 up 194 days, 1:41, 196 users, load average: 0.03, 0.09, 0.08 User-Agent: NeoMutt/20170113 (1.7.2) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c5 X-SA-Exim-Mail-From: ore@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --pgvkh5uu574hkgt3 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, May 26, 2020 at 02:41:39PM +0200, Michal Kubecek wrote: > On Tue, May 26, 2020 at 11:10:25AM +0200, Oleksij Rempel wrote: > > This UAPI is needed for BroadR-Reach 100BASE-T1 devices. Due to lack of > > auto-negotiation support, we needed to be able to configure the > > MASTER-SLAVE role of the port manually or from an application in user > > space. > >=20 > > The same UAPI can be used for 1000BASE-T or MultiGBASE-T devices to > > force MASTER or SLAVE role. See IEEE 802.3-2018: > > 22.2.4.3.7 MASTER-SLAVE control register (Register 9) > > 22.2.4.3.8 MASTER-SLAVE status register (Register 10) > > 40.5.2 MASTER-SLAVE configuration resolution > > 45.2.1.185.1 MASTER-SLAVE config value (1.2100.14) > > 45.2.7.10 MultiGBASE-T AN control 1 register (Register 7.32) > >=20 > > The MASTER-SLAVE role affects the clock configuration: > >=20 > > -----------------------------------------------------------------------= -------- > > When the PHY is configured as MASTER, the PMA Transmit function shall > > source TX_TCLK from a local clock source. When configured as SLAVE, the > > PMA Transmit function shall source TX_TCLK from the clock recovered from > > data stream provided by MASTER. > >=20 > > iMX6Q KSZ9031 XXX > > ------\ /-----------\ /------------\ > > | | | | | > > MAC |<----RGMII----->| PHY Slave |<------>| PHY Master | > > |<--- 125 MHz ---+-<------/ | | \ | > > ------/ \-----------/ \------------/ > > ^ > > \-TX_TCLK > >=20 > > -----------------------------------------------------------------------= -------- > >=20 > > Since some clock or link related issues are only reproducible in a > > specific MASTER-SLAVE-role, MAC and PHY configuration, it is beneficial > > to provide generic (not 100BASE-T1 specific) interface to the user space > > for configuration flexibility and trouble shooting. > >=20 > > Signed-off-by: Oleksij Rempel > > --- >=20 > Please document the new command line argument in both "ethtool --help" > output and manual page. >=20 > I would also prefer updating the UAPI header copies in a separate commit > which would update all of them to a state of a specific kernel commit > (either 4.8-rc1 or current net-next); cherry picking specific changes > may lead to missing some parts. An easy way would be >=20 > # switch to kernel repository and check out what you want to copy from > make ... INSTALL_HDR_PATH=3D$somewhere headers_install > # switch back to ethtool repository > cd uapi > find . -type f -exec cp -v ${somewhere}/include/{} {} \; >=20 > Also, as the kernel counterpart is only in net-next at the moment, this > should probably wait until after ethtool 5.7 release (perhaps it would > be helpful to have a "next" branch like iproute2). I'll submit my queued > patches for 5.7 later this week; should have done so long ago but > I hoped to have the netlink friendly test framework finished before I do > (test-features.c is tied to ioctl interface too tightly). OK, should I resend fixed patch now, or wait until kernel 5.8-rc1?=20 Regards, Oleksij --=20 Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | --pgvkh5uu574hkgt3 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEERBNZvwSgvmcMY/T74omh9DUaUbMFAl7OQB8ACgkQ4omh9DUa UbOm1RAAqL//9H25o9ZZfQpbXmw561PdSUziMxat/5QesgthB84s/4hZG7iaRppl Gm7vxsAK/8aRr86Kl4gEI/6bl2lZceaskF0hAH+p9LTKIS2jjhUroTAEsibo5Cz7 DPpX8/WPsgdZbrkdkH5euhp7wPc0TrXQ6CCMKrPKV+1IwnOVKr2PY/xXRvsqbjVg Ds0mgB1N3zDm7kFZWZmuApGxfaPK0GR89QjKvLUvreIp6UvehE4jefCvCEZcp3fw hWNkZ9KE5Jfp8/67cL2UEuEaoAZk/QVr4zspreMurON9yw280FgDRciaIHLQhv26 1Cg0xvCJ41PgXS1RbOsH/rgf5SvYpk1Tm8LcUXoGkTirJo0si6FZXQklU96dEWoc 2UAeocmQ+4RAJFoBofa9wQLaDSUdFZsPuWu4oZFZS7a+rH4nG7zUGACDI93GNfy+ C6VWw3yhkaBah95kk4whxGad+F9ilAzugPZFjuM7J8U1xfgnQio5wJ7KtWGjwI/U PhWM79rZe/GuEYLmCFy/u6gB0W6i95tmUfKAlzZREew7UQ1DCSx03ELI/qUNteRn 3mURmq4SG4rN8QxRwAslhS9G6taMCviy4/SBTyACRc+CjxTsB+i+D0kicjhhpfFV mIENYsYihmZ36u4kUxCOSlnJ55OkX558vKhlgn6B7fue0KPpLOI= =8+5A -----END PGP SIGNATURE----- --pgvkh5uu574hkgt3--