From mboxrd@z Thu Jan 1 00:00:00 1970 From: Timur Tabi Subject: Re: [PATCH 2/2] at803x: double check SGMII side autoneg Date: Wed, 24 May 2017 16:32:48 -0500 Message-ID: References: <20170523160722.GC21169@lunn.ch> <3dc4f9cf-3172-0227-f03c-1ccfdad3e15e@codeaurora.org> <20170524134021.GA26577@lunn.ch> <8cf4ca6d-3e1e-3c9c-605f-5d6baf3c7588@codeaurora.org> <20170524140929.GC26577@lunn.ch> <20170524193450.GC1788@lunn.ch> <20170524211520.GJ1788@lunn.ch> <45f80817-ec17-51c0-3816-f7c93e6aeeb9@quicinc.com> <27f6d81d-50b1-a585-e251-2303957130d9@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Cc: Matthias May , Zefir Kurtisi , , David Miller , Manoj Iyer , To: Florian Fainelli , Timur Tabi , Andrew Lunn Return-path: Received: from wolverine01.qualcomm.com ([199.106.114.254]:2026 "EHLO wolverine01.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S941010AbdEXVcv (ORCPT ); Wed, 24 May 2017 17:32:51 -0400 In-Reply-To: <27f6d81d-50b1-a585-e251-2303957130d9@gmail.com> Sender: netdev-owner@vger.kernel.org List-ID: On 05/24/2017 04:28 PM, Florian Fainelli wrote: > Yes phydev->lock which is used to serialize the state machine state changes. > > Most PHYs have many more registers than the 15 standard exposed > directly, and so you need indirect reads/writes to access these > registers, which typically involve switching a particular page, doing > the indirect register access, and then flipping the page back. If you > interrupt that scheme one way or another, your reads and writes are all > messed up. Ah, and the at803x is a device like that. At worst, the autopoll feature could read a register from the wrong page, and think that the link state has changed when it hasn't. But that's still bad, and all my problems do revolve around link states. >> I forgot one detail. Every time you do an MDIO read/write, it >> temporarily disables the feature. Although, I think that's not relevant >> to your point. > > Is that done by the HW itself, or is this under SW control exclusively. Software.