Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1350961pxb; Thu, 16 Sep 2021 05:47:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwnN+lE028O7FyZ1KIZOMGPs6iqLMF2+3kljUEOLTBqG0lXsEJq1HSQuVz+DIdCGyFaYir7 X-Received: by 2002:a02:7813:: with SMTP id p19mr4226148jac.38.1631796448826; Thu, 16 Sep 2021 05:47:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631796448; cv=none; d=google.com; s=arc-20160816; b=Bldu3FZ5D5PTSenmle+MCaM8QZTdX7O0mzNLaVWYpK7gDtyKkQYziyQprOOrV0v4Ni 3l/9SjdNg4PW10Wje+VWeAktX1Q9YLrt1ODpp/c3Q57iJDdgBq3fKNRv1z4RgzD5DusB MwzTZDZQqqQ3NqTE1P1iBPN7UHQs4oVu5dt49/hQ+dEriiTlonzld9sxLDNJ8a9HgZxB dTHjnm+776I8bjeekGKeLYGd3g+aKkie1vc0C9eYNLV97quPLEbvhW5lEN5OTBDGG4rv vVX/TRJhPD2+Iw1oUdqz2LNsqv3zgruF3cunYaYnPgltvGhtMrnyRZzfsax1IglH9Uo8 dP6g== 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-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=blLTBJBUXDjrO3ZZ8TPo9N3rgru39vDBHZ72imqGbm0=; b=K1RYbUZAw6M/etPUTY4bUBr9drF9HtuTUICBm85Jjd9o/rbtxWe73+j5nKjHwk7agm fAFSLynj+2hE1y5h0dBduupPJNCr0oDFYw/Xuejb1jXZnuF+eC65Lj1WWYGFato1rYcu XhR1urXoFv/p7kYQ/aD2dSScGakXXKvKou2+pOMwnPqSBTRxHWBEQbnolA5hkr2Ey8aT Gbotij1EqxHG7tqwA9QXi57RaVq8JPiyxJXF78p3B+LK61N6bXvVV4mUTnr7PBK0mo4t hN5b4H7Du9TI+anh6duoMpFpfs+T9AXrhW3ER+8ta0wiIZokeuvQ+MBTi/WHxpL0amag ogWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=j+bY353P; 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 e46si2338153jaf.50.2021.09.16.05.47.16; Thu, 16 Sep 2021 05:47: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; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=j+bY353P; 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 S239609AbhIPMrz (ORCPT + 99 others); Thu, 16 Sep 2021 08:47:55 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:44078 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230299AbhIPMry (ORCPT ); Thu, 16 Sep 2021 08:47:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To: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=blLTBJBUXDjrO3ZZ8TPo9N3rgru39vDBHZ72imqGbm0=; b=j+bY353POdkkFTi0Yg5Io/vtDW KKNt6puNypRB+qwdof2rDeewxXt5LVRSu6Y7WQf+WGKf8w0xhvmfFWvRu1fTnT95SWTqbnXArBHV/ Of53Gj0Dt8qfoCHrQF2q0YLGadFHWJPRyKyx1xXE8AzWRNqbXv7dmiDDQVoc7TTS2734=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1mQqma-006uH7-VD; Thu, 16 Sep 2021 14:46:28 +0200 Date: Thu, 16 Sep 2021 14:46:28 +0200 From: Andrew Lunn To: Michael Heimpold Cc: Stefan Wahren , "David S. Miller" , Jakub Kicinski , Rob Herring , Michael Heimpold , jimmy.shen@vertexcom.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: Re: [PATCH RFC 3/3] net: vertexcom: Add MSE102x SPI support Message-ID: References: <20210914151717.12232-1-stefan.wahren@i2se.com> <20210914151717.12232-4-stefan.wahren@i2se.com> <20210916112618.Horde.UWH1AKpXpmAwqSTq8U1y-WN@www.mhei.heimpold.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210916112618.Horde.UWH1AKpXpmAwqSTq8U1y-WN@www.mhei.heimpold.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 16, 2021 at 11:26:18AM +0000, Michael Heimpold wrote: > Hi Andrew, > > Zitat von Andrew Lunn : > > > > +static int mse102x_probe_spi(struct spi_device *spi) > > > +{ > > > > ... > > > > > + netif_carrier_off(mse->ndev); > > > + ndev->if_port = IF_PORT_10BASET; > > > > That is not correct. Maybe you should add a IF_PORT_HOMEPLUG ? > > Would a simple IF_PORT_HOMEPLUG be sufficient, or should it be > more precise as for Ethernet (10BASET, 100BASET...), e.g. > IF_PORT_HOMEPLUG_10 > IF_PORT_HOMEPLUG_AV > IF_PORT_HOMEPLUG_AV2 > IF_PORT_HOMEPLUG_GREENPHY It is an interesting question. I think the first thing to find out is, what in userspace actually uses this. If it is a deprecated tool, i would not spend the energy. Probably a better interface is ethtool get_link_ksettings, and set_link_ksettings. $ /sbin/ethtool enp3s0 Settings for enp3s0: Supported ports: [ TP MII ] Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Full You can set supported ports to HomePlug, and supported link modes to 10, AV, AV2, GREENPHY etc. Is there a negotiation mechanism where different homeplug devices can find out what they have in common and select a mode? That would be very similar to Ethernet autoneg, so you can make use of the other fields ethtool provides to show this information, etc. Andrew