From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Lunn Subject: Re: [PATCH RFC 0/4] Fixes for Marvell MII paged register access races Date: Sat, 9 Dec 2017 20:06:10 +0100 Message-ID: <20171209190610.GC2299@lunn.ch> References: <20171208154756.GF10595@n2100.armlinux.org.uk> <204d19c0-05eb-3b03-275e-2a6d111cd1b0@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Russell King - ARM Linux , netdev@vger.kernel.org To: Florian Fainelli Return-path: Received: from vps0.lunn.ch ([185.16.172.187]:54091 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751028AbdLITGM (ORCPT ); Sat, 9 Dec 2017 14:06:12 -0500 Content-Disposition: inline In-Reply-To: <204d19c0-05eb-3b03-275e-2a6d111cd1b0@gmail.com> Sender: netdev-owner@vger.kernel.org List-ID: > > Another potential question is whether using the mdiobus lock (which > > excludes all other MII bus access) is best - while it has the advantage > > of also ensuring atomicity with userspace accesses, it means that no one > > else can access an independent PHY on the same bus while a paged access > > is on-going. It feels like a big hammer, but I'm not convinced that we > > will see a lot of contention on it. > > Regarding that last topic, this could become a fairly contended lock on > a switch with lots (e.g: > 5-6) of built-in PHYs, all being polled > (which is usually the case right now). One would expect that the polling > should be limited to 2 BMSR reads to minimize the bus utilization. Hi Florian In this case, we probably are not doing pages reads, just normal reads. So there should not be any more contention than there already is. Andrew