From mboxrd@z Thu Jan 1 00:00:00 1970 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=-0.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, 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 60FFBC2BA19 for ; Wed, 15 Apr 2020 13:11:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3AC9720737 for ; Wed, 15 Apr 2020 13:11:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="JVrgbH7s" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2506095AbgDONL1 (ORCPT ); Wed, 15 Apr 2020 09:11:27 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:39500 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2506082AbgDONLQ (ORCPT ); Wed, 15 Apr 2020 09:11:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=d/88LlrJNj/d4F115V1sgd+wWhjG+NBIkF8dbPSMqas=; b=JVrgbH7sW3JE9NF1Z62PGLkZVF /srK65laMmHpoN9pXWL7MZLX2syPIyp42MB9L4RzHCghJyBGg6z7QjkWjKHXRg5A0ALyCuLgXOZgM uSbkO6RV3HWzolZuxKjMZanEWE2AGJeXKw51SeuLTBwMM3dddKrHJ1mbinkNVUjxADNM=; Received: from andrew by vps0.lunn.ch with local (Exim 4.93) (envelope-from ) id 1jOhom-002sd1-1u; Wed, 15 Apr 2020 15:11:04 +0200 Date: Wed, 15 Apr 2020 15:11:04 +0200 From: Andrew Lunn To: Oleksij Rempel Cc: "David S. Miller" , Florian Fainelli , Heiner Kallweit , Jakub Kicinski , Jonathan Corbet , Michal Kubecek , David Jander , kernel@pengutronix.de, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Russell King , mkl@pengutronix.de Subject: Re: [PATCH v1] ethtool: provide UAPI for PHY master/slave configuration. Message-ID: <20200415131104.GA657811@lunn.ch> References: <20200415121209.12197-1-o.rempel@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200415121209.12197-1-o.rempel@pengutronix.de> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Wed, Apr 15, 2020 at 02:12:09PM +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. Hi Oleksij This is a nice way to do this. > +/* Port mode */ > +#define PORT_MODE_MASTER 0x00 > +#define PORT_MODE_SLAVE 0x01 > +#define PORT_MODE_MASTER_FORCE 0x02 > +#define PORT_MODE_SLAVE_FORCE 0x03 > +#define PORT_MODE_UNKNOWN 0xff It is not clear to me what PORT_MODE_MASTER and PORT_MODE_SLAVE. Do these mean to negotiate master/slave? Maybe some comments, or clearer names? Andrew