From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marc Zyngier Subject: Re: lan78xx: WARNING: irq 79 handler enabled interrupts Date: Sat, 29 Dec 2018 09:41:38 +0000 Message-ID: <86efa0brfx.wl-marc.zyngier@arm.com> References: <1082628525.187562.1546041777025@email.ionos.de> Mime-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Cc: Woojung Huh , Eric Anholt , Microchip Linux Driver Support , , To: Stefan Wahren Return-path: Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:32958 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729201AbeL2Jln (ORCPT ); Sat, 29 Dec 2018 04:41:43 -0500 In-Reply-To: <1082628525.187562.1546041777025@email.ionos.de> Sender: netdev-owner@vger.kernel.org List-ID: On Sat, 29 Dec 2018 00:02:57 +0000, Stefan Wahren wrote: Hi Stephan, > > Hi, > while booting my Raspberry Pi 3 B+ with Linux 4.20 (arm64/defconfig) > i'm getting the following warning: > > [ 11.005738] irq 79 handler irq_default_primary_handler+0x0/0x8 enabled interrupts [...] > This seems to come from the lan78xx driver, because i don't get this > warning on the RPI 3B (smsc95xx). > > What's the approach to fix this issue? Is it just simply replace > spin_lock_irq() with spin_lock_irqsave() at the right places? No, this is more pathological than that. The USB framework seems to be using threaded interrupts, which implies that interrupts are re-enabled as soon as it has run. In turn, this driver is using handle_simple_irq() as its flow, which definitely expect interrupts to be disabled. I have no insight in how this driver works, but I'm happy to help if someone explains the interrupt flow of this thing. M. -- Jazz is not dead, it just smell funny. From mboxrd@z Thu Jan 1 00:00:00 1970 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=-2.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS, URIBL_BLOCKED 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 D887CC43387 for ; Sat, 29 Dec 2018 09:42:04 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A267A2081B for ; Sat, 29 Dec 2018 09:42:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="G4oZL+Bm" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A267A2081B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Subject:To:From:Message-ID:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=zRoRkSRkw1L4fYv8bwtXRZ94nVpUIhLaRR+YKD2H2Kk=; b=G4oZL+Bm+7jexa DIXl7Yn6NCLPjvqGbsB6Qa8n5xaVPNnv5a6lJ0djyrjUE4OcArXNuf4Rip1ZmzuQmqXjA+V5CIr8q 5XkIfuKU4F+f09SDHGZbnV+sqSRgEHBM5RMwyknq/aM1oTyf/iDaCkYFsqOR6ylfmR/IBCiE7+iug xl3HKqBDupMv3yfZhOcw+5LRTxrpwjugJLHF0ZTHzIjVxBxTYVnmWykzWGLB7uS2Xyptt5lgQdgxw 1hklgz9L2g7G/9a0z/yu54tPwE/D/U1dy2PO4JZkdglmc3wMLOIhQOV/h3A5SgFUnZQEgD3Stn4g1 GbbwXuJDYKlX5ZCPs5uQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gdB85-0003VG-5j; Sat, 29 Dec 2018 09:42:01 +0000 Received: from foss.arm.com ([217.140.101.70]) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gdB81-0003Uj-Cd for linux-arm-kernel@lists.infradead.org; Sat, 29 Dec 2018 09:41:58 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 9739AA78; Sat, 29 Dec 2018 01:41:42 -0800 (PST) Received: from big-swifty.misterjones.org (usa-sjc-mx-foss1.foss.arm.com [217.140.101.70]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id E0D053F5D4; Sat, 29 Dec 2018 01:41:40 -0800 (PST) Date: Sat, 29 Dec 2018 09:41:38 +0000 Message-ID: <86efa0brfx.wl-marc.zyngier@arm.com> From: Marc Zyngier To: Stefan Wahren Subject: Re: lan78xx: WARNING: irq 79 handler enabled interrupts In-Reply-To: <1082628525.187562.1546041777025@email.ionos.de> References: <1082628525.187562.1546041777025@email.ionos.de> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 EasyPG/1.0.0 Emacs/25.1 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) Organization: ARM Ltd MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181229_014157_436625_8A0DDE2C X-CRM114-Status: GOOD ( 14.39 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Woojung Huh , Eric Anholt , netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Microchip Linux Driver Support Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Sat, 29 Dec 2018 00:02:57 +0000, Stefan Wahren wrote: Hi Stephan, > > Hi, > while booting my Raspberry Pi 3 B+ with Linux 4.20 (arm64/defconfig) > i'm getting the following warning: > > [ 11.005738] irq 79 handler irq_default_primary_handler+0x0/0x8 enabled interrupts [...] > This seems to come from the lan78xx driver, because i don't get this > warning on the RPI 3B (smsc95xx). > > What's the approach to fix this issue? Is it just simply replace > spin_lock_irq() with spin_lock_irqsave() at the right places? No, this is more pathological than that. The USB framework seems to be using threaded interrupts, which implies that interrupts are re-enabled as soon as it has run. In turn, this driver is using handle_simple_irq() as its flow, which definitely expect interrupts to be disabled. I have no insight in how this driver works, but I'm happy to help if someone explains the interrupt flow of this thing. M. -- Jazz is not dead, it just smell funny. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel