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=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED 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 9904BC43463 for ; Fri, 18 Sep 2020 00:59:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 604BE2085B for ; Fri, 18 Sep 2020 00:59:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726154AbgIRA66 (ORCPT ); Thu, 17 Sep 2020 20:58:58 -0400 Received: from 95-31-39-132.broadband.corbina.ru ([95.31.39.132]:48000 "EHLO blackbox.su" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726102AbgIRA66 (ORCPT ); Thu, 17 Sep 2020 20:58:58 -0400 Received: from metabook.localnet (metabook.metanet [192.168.2.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by blackbox.su (Postfix) with ESMTPSA id D656F82D06; Fri, 18 Sep 2020 03:59:25 +0300 (MSK) From: Sergej Bauer To: Florian Fainelli Cc: "David S. Miller" , Andrew Lunn , Jakub Kicinski , Bryan Whitehead , Microchip Linux Driver Support , Mauro Carvalho Chehab , Rob Herring , linux-kernel@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [PATCH] add virtual PHY for PHY-less devices Date: Fri, 18 Sep 2020 03:58:40 +0300 Message-ID: <2016817.gfEZhycloL@metabook> In-Reply-To: References: <20200917214030.646-1-sbauer@blackbox.su> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Hi Florian The fixed-PHY driver looks a little bit hardly tunable, please look at https://www.lkml.org/lkml/2020/9/17/1424 This is not my idea. This is a request of HW team, and I thnk it will be useful for someone else. But I'll try to combine fixed-phy with virtual-PHY tomorrow. It just to rearrange some lines in lan743x_phy_open. -- Sergej On Friday, September 18, 2020 1:16:30 AM MSK Florian Fainelli wrote: > On 9/17/2020 2:40 PM, Sergej Bauer wrote: > > From: sbauer@blackbox.su > > > > Here is a kernel related part of my work which was helps to develop > > brand > > > > new PHY device. > > > > It is migth be helpful for developers work with PHY-less lan743x > > > > (7431:0011 in my case). It's just a fake virtual PHY which can change > > speed of network card processing as a loopback device. Baud rate can be > > tuned with ethtool from command line or by means of SIOCSMIIREG ioctl. > > Duplex mode not configurable and it's allways DUPLEX_FULL. > > > > It also provides module parameter mii_regs for setting initial values > > of > > > > IEEE 802.3 Control Register. > > You appear to have re-implemented the fixed PHY driver, please use that > instead of rolling your own.