Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754813AbcKOXD1 (ORCPT ); Tue, 15 Nov 2016 18:03:27 -0500 Received: from vps0.lunn.ch ([178.209.37.122]:41144 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752609AbcKOXD0 (ORCPT ); Tue, 15 Nov 2016 18:03:26 -0500 Date: Wed, 16 Nov 2016 00:03:17 +0100 From: Andrew Lunn To: Lino Sanfilippo Cc: Florian Fainelli , davem@davemloft.net, charrer@alacritech.com, liodot@gmail.com, gregkh@linuxfoundation.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [net-next 1/2] net: ethernet: slicoss: add slicoss gigabit ethernet driver Message-ID: <20161115230317.GG23231@lunn.ch> References: <1479012453-19410-1-git-send-email-LinoSanfilippo@gmx.de> <1479012453-19410-2-git-send-email-LinoSanfilippo@gmx.de> <20161113195544.GA18258@lunn.ch> <69558f55-824a-7063-d9b3-ccc0a6113b87@gmx.de> <4450caf4-e1cf-5187-1337-c46b81b08708@gmail.com> <0d1b4dee-11bb-3605-699c-ea417484cb68@gmx.de> <20161115215907.GF23231@lunn.ch> <86165d2b-f9d5-a380-9bb0-f77c12691eb6@gmx.de> <41c0c732-0935-1625-b88d-c084e5000a6c@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 650 Lines: 14 > >>>>> + val = MII_BMCR << 16 | SLIC_PCR_AUTONEG | > >>>>> + SLIC_PCR_AUTONEG_RST; > >>>>> + slic_write(sdev, SLIC_REG_WPHY, val); > Thats essentially what I meant by setting a flag in the irq handler. The mdio > function would have to check somehow if the irq has been fired (be it by means > of a flag or a completion that is set by the irq handler and checked by the > mdio function). So I agree that it should work (if reading via the AP command > is actually possible). It seems odd you have a nice simple way to do writes, but reads are very complex. There might be a simple read method hiding somewhere. Andrew