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=-8.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable 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 B3E2AC433DB for ; Wed, 10 Feb 2021 02:25:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 75AA764DE7 for ; Wed, 10 Feb 2021 02:25:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234217AbhBJCYp (ORCPT ); Tue, 9 Feb 2021 21:24:45 -0500 Received: from vps0.lunn.ch ([185.16.172.187]:59120 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234858AbhBJByN (ORCPT ); Tue, 9 Feb 2021 20:54:13 -0500 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1l9eh8-005DmY-2t; Wed, 10 Feb 2021 02:53:30 +0100 Date: Wed, 10 Feb 2021 02:53:30 +0100 From: Andrew Lunn To: Michael Walle Cc: bcm-kernel-feedback-list@broadcom.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Florian Fainelli , Heiner Kallweit , Russell King , "David S . Miller" , Jakub Kicinski Subject: Re: [PATCH net-next] net: phy: introduce phydev->port Message-ID: References: <20210209163852.17037-1-michael@walle.cc> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210209163852.17037-1-michael@walle.cc> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 09, 2021 at 05:38:52PM +0100, Michael Walle wrote: > At the moment, PORT_MII is reported in the ethtool ops. This is odd > because it is an interface between the MAC and the PHY and no external > port. Some network card drivers will overwrite the port to twisted pair > or fiber, though. Even worse, the MDI/MDIX setting is only used by > ethtool if the port is twisted pair. > > Set the port to PORT_TP by default because most PHY drivers are copper > ones. If there is fibre support and it is enabled, the PHY driver will > set it to PORT_FIBRE. > > This will change reporting PORT_MII to either PORT_TP or PORT_FIBRE; > except for the genphy fallback driver. > > Suggested-by: Andrew Lunn > Signed-off-by: Michael Walle Reviewed-by: Andrew Lunn Andrew