From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755996AbbJUQOe (ORCPT ); Wed, 21 Oct 2015 12:14:34 -0400 Received: from vps0.lunn.ch ([178.209.37.122]:45037 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755168AbbJUQOa (ORCPT ); Wed, 21 Oct 2015 12:14:30 -0400 Date: Wed, 21 Oct 2015 18:14:16 +0200 From: Andrew Lunn To: Neil Armstrong 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 Subject: Re: [PATCH] net: dsa: mv88e6060: Fix false positive lockdep splat Message-ID: <20151021161416.GG17207@lunn.ch> References: <5627B149.6030109@baylibre.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5627B149.6030109@baylibre.com> 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 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