Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752014AbdG1Ngy (ORCPT ); Fri, 28 Jul 2017 09:36:54 -0400 Received: from vps0.lunn.ch ([178.209.37.122]:43690 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751893AbdG1Ngw (ORCPT ); Fri, 28 Jul 2017 09:36:52 -0400 Date: Fri, 28 Jul 2017 15:36:37 +0200 From: Andrew Lunn To: Egil Hjelmeland Cc: corbet@lwn.net, vivien.didelot@savoirfairelinux.com, f.fainelli@gmail.com, davem@davemloft.net, kernel@pengutronix.de, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [PATCH net-next v2 01/10] net: dsa: lan9303: Fixed MDIO interface Message-ID: <20170728133637.GB32230@lunn.ch> References: <20170725161553.30147-1-privat@egil-hjelmeland.no> <20170725161553.30147-2-privat@egil-hjelmeland.no> <20170726165550.GN12049@lunn.ch> <4e36827f-fdcc-d55a-3559-e080883c715c@egil-hjelmeland.no> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4e36827f-fdcc-d55a-3559-e080883c715c@egil-hjelmeland.no> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 753 Lines: 21 On Fri, Jul 28, 2017 at 01:08:25PM +0200, Egil Hjelmeland wrote: > On 26. juli 2017 18:55, Andrew Lunn wrote: > >On Tue, Jul 25, 2017 at 06:15:44PM +0200, Egil Hjelmeland wrote: > >It is better to use mdiobus_read/write or if you are nesting mdio > >busses, mdiobus_read_nested/mdiobus_write_nested. Please test this > >code with lockdep enabled. > > > > I have CONFIG_DEBUG_SPINLOCK, CONFIG_DEBUG_MUTEXES. Should I enable > more? Hi Egil Enable CONFIG_LOCKDEP and CONFIG_PROVE_LOCKING. Any lockdep splat you get while accessing the mdio bus at this point are probably false positives, since it is a different mutex. Using the _nested() version should avoid these false positives. But you might find other places your locking is not right. Andrew