Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1257594pxb; Wed, 10 Feb 2021 04:16:13 -0800 (PST) X-Google-Smtp-Source: ABdhPJzHt1BTDGvFlEgRkqmnleNIxqC/LtXA3D+1Wm5gINl4FODhQcpyepbu1vItnscc9PucJDzN X-Received: by 2002:a05:6402:b83:: with SMTP id cf3mr2875375edb.298.1612959373110; Wed, 10 Feb 2021 04:16:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612959373; cv=none; d=google.com; s=arc-20160816; b=nnMAqDWuXsIgontW0uDVWhmkrgd85rr+C3sPg/yL2F7qoSmyTfwRomk6WBOS1UMFrS 42MqaXfeah4I2a7+tH1iqvMbl0SpFyfoiIPiQhCpisdxidtxWgFeqKJ/QORt5WuIqJ22 sCnlVPZVE9zoa4J/09IFjtNoO4nX0TwbW+ePqbkfU6AgbfQWq5trhwe9B3Lqrs8PJqy9 jY9oaYtRbW7LvLNtRXW2i83wDVZRsYmZEOW4NFPXQpoiCcg1ItUWb2+GNEtjpv0rW/Ad Tt8ZkAO2OnmF12lEzPpKAJYh0+WtFmj3n7jm7Izna4KZhSkxg45dQlJTmGrcIH20spo7 qtBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:user-agent:references:in-reply-to :subject:cc:to:from:date:content-transfer-encoding:mime-version :dkim-signature; bh=WelEA5lC69vxnuHv17nGcuOxdVz9yENi8PVd8iZYJTc=; b=Y3H7pCKeIS9Sw/BVO4jVK2HWd/in3anhSuXSbmu6XY9kqcTWatJHROCTATJQKQMoDP AyJQc8dySsfMr8vzFCQrjWrpH6zDqgrfyHtllFffeXw81wjJK86Owx+R+Tq/HMrPicVF GJLCNbB/zrySIDTRoVD1z4Y30QgCk7OfdFPYDwWjmv3WaGsSh2sotq3xTni4Cl9gFNc3 isa7nKBvYfNyjgGJB3IDreApAVpqOXBA09bTV3caqo6eJE9bclQe94GLNyKhS+hXG8OL e6Aq/1LG3MI2l23Qp0gNee33BCa151OTWswKQt17AaUbVroSUCPbb+vEhOW/LKrQ2m4I VbHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2016061301 header.b=PyTRbDNE; 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 d1si1320110edj.181.2021.02.10.04.15.48; Wed, 10 Feb 2021 04:16:13 -0800 (PST) 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=@walle.cc header.s=mail2016061301 header.b=PyTRbDNE; 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 S231785AbhBJMPL (ORCPT + 99 others); Wed, 10 Feb 2021 07:15:11 -0500 Received: from ssl.serverraum.org ([176.9.125.105]:37733 "EHLO ssl.serverraum.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231708AbhBJMLg (ORCPT ); Wed, 10 Feb 2021 07:11:36 -0500 Received: from ssl.serverraum.org (web.serverraum.org [172.16.0.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ssl.serverraum.org (Postfix) with ESMTPSA id 37BA122FB3; Wed, 10 Feb 2021 13:10:43 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2016061301; t=1612959043; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=WelEA5lC69vxnuHv17nGcuOxdVz9yENi8PVd8iZYJTc=; b=PyTRbDNEDqrWQ5aWgvybv8ofBNU9cJKAjnoKnjyHgr7YltLhIljNpQeshgEeb6r8ThHJmD 7Zg4LkHVXGekcWCC5+9oYlhKz07fDHjsPMYutkYfqfUBPG0/8x4Fv3oUCNHnGEgaj35FZ5 YjyEW9L9XuF2sA4aaM2NTVVwAX6s4Zo= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 10 Feb 2021 13:10:43 +0100 From: Michael Walle To: Russell King - ARM Linux admin Cc: bcm-kernel-feedback-list@broadcom.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Florian Fainelli , Andrew Lunn , Heiner Kallweit , "David S . Miller" , Jakub Kicinski Subject: Re: [PATCH net-next] net: phy: introduce phydev->port In-Reply-To: <20210210115415.GV1463@shell.armlinux.org.uk> References: <20210209163852.17037-1-michael@walle.cc> <41e4f35c87607e69cb87c4ef421d4a77@walle.cc> <20210210115415.GV1463@shell.armlinux.org.uk> User-Agent: Roundcube Webmail/1.4.10 Message-ID: X-Sender: michael@walle.cc Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am 2021-02-10 12:54, schrieb Russell King - ARM Linux admin: > On Wed, Feb 10, 2021 at 12:20:02PM +0100, Michael Walle wrote: >> >> Am 2021-02-09 17:38, schrieb Michael Walle: >> > --- a/drivers/net/phy/phy.c >> > +++ b/drivers/net/phy/phy.c >> > @@ -308,7 +308,7 @@ void phy_ethtool_ksettings_get(struct phy_device >> > *phydev, >> > if (phydev->interface == PHY_INTERFACE_MODE_MOCA) >> > cmd->base.port = PORT_BNC; >> > else >> > - cmd->base.port = PORT_MII; >> > + cmd->base.port = phydev->port; >> > cmd->base.transceiver = phy_is_internal(phydev) ? >> > XCVR_INTERNAL : XCVR_EXTERNAL; >> > cmd->base.phy_address = phydev->mdio.addr; >> >> Russell, the phylink has a similiar place where PORT_MII is set. I >> don't >> know if we'd have to change that, too. > > What would we change it to? It was just a question whether we have to change it and I take from your answer we do not. I was just curious because there is the same edge case for the PORT_BNC like in the phy core. > If there's no PHY attached and no SFP, what kind of interface do we > have? As we've no idea what's on the media side, assuming that we are > presenting a MII-like interface to stuff outside of what we control is > entirely reasonable. > > Claiming the world is TP would be entirely wrong, there may not be a > RJ45 jack. Consider the case where the MAC is connected to a switch. > It's a MII-like link. It's certianly not TP, BNC, fiber, AUI, or > direct attach. Yes, I get your point. -michael