Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.8 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 54C4CC43381 for ; Sat, 23 Feb 2019 16:44:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1BE2C20665 for ; Sat, 23 Feb 2019 16:44:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="0b3l78RM" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725954AbfBWQod (ORCPT ); Sat, 23 Feb 2019 11:44:33 -0500 Received: from vps0.lunn.ch ([185.16.172.187]:36216 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725886AbfBWQoc (ORCPT ); Sat, 23 Feb 2019 11:44:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=O3qxh3lkTuUORl5Gs8y0WBSCZE9IwnU+DB2YHZRrAFE=; b=0b3l78RMIIj3QuoIFfZiQU5rdx /ojN1jIkKv4McWl4ue6BXqlKIrWys5OCVT2EugKoeYd12pGDwTOtK95aw0+oRu3o/uiGUZTsomW/L sDGv//7IaHc9iB+JHtnRJJ7XhyTkCoT9B2qGvtDtYIzb6Jy55t1kElZUo1mLd17uCirk=; Received: from andrew by vps0.lunn.ch with local (Exim 4.89) (envelope-from ) id 1gxaPK-0004Vb-0E; Sat, 23 Feb 2019 17:44:10 +0100 From: Andrew Lunn To: David Miller Cc: Vivien Didelot , Russell King , netdev , Andrew Lunn Subject: [PATCH net-next 2/2] net: dsa: mv88e6xxx: Release lock while requesting IRQ Date: Sat, 23 Feb 2019 17:43:57 +0100 Message-Id: <20190223164357.17284-3-andrew@lunn.ch> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190223164357.17284-1-andrew@lunn.ch> References: <20190223164357.17284-1-andrew@lunn.ch> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org There is no need to hold the register lock while requesting the GPIO interrupt. By not holding it we can also avoid a false positive lockdep splat. Reported-by: Russell King Signed-off-by: Andrew Lunn --- drivers/net/dsa/mv88e6xxx/chip.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c index 7ee8607bf3a6..9cb17d3ef590 100644 --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c @@ -456,10 +456,12 @@ static int mv88e6xxx_g1_irq_setup(struct mv88e6xxx_chip *chip) */ irq_set_lockdep_class(chip->irq, &lock_key, &request_key); + mutex_unlock(&chip->reg_lock); err = request_threaded_irq(chip->irq, NULL, mv88e6xxx_g1_irq_thread_fn, IRQF_ONESHOT | IRQF_SHARED, dev_name(chip->dev), chip); + mutex_lock(&chip->reg_lock); if (err) mv88e6xxx_g1_irq_free_common(chip); -- 2.20.1