From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756877AbbJVII1 (ORCPT ); Thu, 22 Oct 2015 04:08:27 -0400 Received: from mail-wi0-f178.google.com ([209.85.212.178]:37800 "EHLO mail-wi0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756702AbbJVIIV (ORCPT ); Thu, 22 Oct 2015 04:08:21 -0400 Subject: Re: [PATCH] net: dsa: mv88e6060: Fix false positive lockdep splat To: Andrew Lunn References: <5627B149.6030109@baylibre.com> <20151021161416.GG17207@lunn.ch> Cc: "David S. Miller" , Florian Fainelli , Guenter Roeck , vivien.didelot@savoirfairelinux.com, Fabian Frederick , Pavel Nakonechny , Joe Perches , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, nbd@openwrt.org, sergei.shtylyov@cogentembedded.com From: Neil Armstrong Organization: Baylibre Message-ID: <56289967.6010909@baylibre.com> Date: Thu, 22 Oct 2015 10:08:07 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <20151021161416.GG17207@lunn.ch> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/21/2015 06:14 PM, Andrew Lunn wrote: > On Wed, Oct 21, 2015 at 05:37:45PM +0200, Neil Armstrong wrote: >> Like the change made for mv88e6xxx, use mutex_lock_nested() to avoid >> lockdep to give false positives because of nested MDIO busses. > > Hi Neil > > We now have three instances of this, since mdio-mux.c has the same > code. Maybe now would be a good time to refactor this code into > mdiobus_read_nested() and mdiobus_write_nested() in mdio_bus.c? At > the same time, add BUG_ON(in_interrupt()) similar to the non-nested > versions? > > Andrew > Well, mdio-mux also calls switch_fn inside the mdio_lock, clean refactoring would introduce a separate lock and call the nested variants. Is that ok ? Can someone test mdio-mux if I make the change ? Neil