From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751972AbdH2VXc (ORCPT ); Tue, 29 Aug 2017 17:23:32 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:35506 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751425AbdH2VXa (ORCPT ); Tue, 29 Aug 2017 17:23:30 -0400 Subject: Re: [PATCH] DSA support for Micrel KSZ8895 To: Pavel Machek , Andrew Lunn , Woojung.Huh@microchip.com Cc: Maxim Uvarov , nathan.leigh.conrad@gmail.com, Vivien Didelot , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Tristram.Ha@micrel.com References: <20170816075524.GA18532@amd> <20170816140451.GA13006@lunn.ch> <9235D6609DB808459E95D78E17F2E43D40AFF8C1@CHN-SV-EXMX02.mchp-main.com> <20170827123658.GA727@amd> <20170827163122.GG13622@lunn.ch> <20170828070232.GA18135@amd> <20170828140927.GD10418@lunn.ch> <20170829074130.GA31303@amd> <20170829122604.GA22093@lunn.ch> <20170829211519.GA24221@amd> From: Florian Fainelli Message-ID: <237eee82-2edb-56c0-d644-2e6253a178dc@gmail.com> Date: Tue, 29 Aug 2017 14:23:17 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <20170829211519.GA24221@amd> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08/29/2017 02:15 PM, Pavel Machek wrote: > On Tue 2017-08-29 14:26:04, Andrew Lunn wrote: >>> But the MDIO emaulation code is from their driver, after lots of >>> deletions. >> >> Is this driver supposed to run on lots of different OSs? That would >> explain why they ignored the Linux MDIO and PHY layers. > > It did not look particulary portable. Part of the problem is that they need to duplicate the standard MII definitions, whereas we could re-use those from include/linux/mii.h and/or mdio.h. > >> If possible, please make use of the Linux infrastructure. > > I did not find any infrastructure I could use instead > ksz_mdio_emulation. fixed PHY/swphy.c is as close as it could get, but it is a highly simplified version of this. > > Now, drivers/net/phy/spi_ks8995.c can access the PHY registers, and I > can not see any translation there, so there may be something I'm > missing. I don't see anything in that driver that seems to access PHY registers what makes you think it does? There's got to be a way to perform indirect accesses through SPI, Woojung, do you know? > > Pointers would be welcome at this point. > > Thanks, > Pavel > -- Florian