From patchwork Fri Feb 11 18:14:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Andrzej Siewior X-Patchwork-Id: 12743731 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 85836C4167B for ; Fri, 11 Feb 2022 18:15:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352564AbiBKSP1 (ORCPT ); Fri, 11 Feb 2022 13:15:27 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:55408 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352508AbiBKSPT (ORCPT ); Fri, 11 Feb 2022 13:15:19 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 880C8CF5; Fri, 11 Feb 2022 10:15:18 -0800 (PST) From: Sebastian Andrzej Siewior DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1644603317; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=An8sejACWdvpFe+0xRHo7AseACg3JQzOaIfRXUshpP4=; b=NARq7CRKp2oDkLGnfeobnnJ29QT7pRs0iM8vCshdXDiq2e6YjM9Y1ieee/G3eZ3xDSy03b F7xRV+u0zfjsqL7bncoA90wNQSCqyI3dSDldvxTEBLZehwnQkIsXv+HIUqHgdw8BGUN0U/ YuNahORbgMxr/bxomwhFwhIHf0MQKyRibsi3wynm6uOKURGzNxOP2O08WQ+uQlKkVdb8u7 +DLPxuacNsZbex48IUoHVoRablVzvRbOBZMw/Mg29mwevrXD/shpZTp9icWuTYdYGZFZXa zTPGSV0V8ZhhnfSncBba9laxo4/vd56AgZpD0Y8PdwvD0crQCrnL5LZEvkTFxA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1644603317; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=An8sejACWdvpFe+0xRHo7AseACg3JQzOaIfRXUshpP4=; b=0CgFF1kBSfhzXy7ccJmZkN1Vgek7S1AU9/rKcNKYR3KliKVCxVgRh/3fPhp897170McYhC M0I2VN41cyQJh0DQ== To: greybus-dev@lists.linaro.org, linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, linux-staging@lists.linux.dev, linux-usb@vger.kernel.org, netdev@vger.kernel.org Cc: "David S. Miller" , Alex Elder , Arnd Bergmann , Greg Kroah-Hartman , Hans de Goede , Jakub Kicinski , Johan Hovold , Lee Jones , Rui Miguel Silva , Thomas Gleixner , UNGLinuxDriver@microchip.com, Wolfram Sang , Woojung Huh , Sebastian Andrzej Siewior Subject: [PATCH v4 6/7] net: usb: lan78xx: Use generic_handle_irq_safe(). Date: Fri, 11 Feb 2022 19:14:59 +0100 Message-Id: <20220211181500.1856198-7-bigeasy@linutronix.de> In-Reply-To: <20220211181500.1856198-1-bigeasy@linutronix.de> References: <20220211181500.1856198-1-bigeasy@linutronix.de> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Instead of manually disabling interrupts before invoking use generic_handle_irq_safe() which can be invoked with enabled and disabled interrupts. Signed-off-by: Sebastian Andrzej Siewior --- drivers/net/usb/lan78xx.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/net/usb/lan78xx.c b/drivers/net/usb/lan78xx.c index b8e20a3f2b84e..415f16662f88e 100644 --- a/drivers/net/usb/lan78xx.c +++ b/drivers/net/usb/lan78xx.c @@ -1537,11 +1537,8 @@ static void lan78xx_status(struct lan78xx_net *dev, struct urb *urb) netif_dbg(dev, link, dev->net, "PHY INTR: 0x%08x\n", intdata); lan78xx_defer_kevent(dev, EVENT_LINK_RESET); - if (dev->domain_data.phyirq > 0) { - local_irq_disable(); - generic_handle_irq(dev->domain_data.phyirq); - local_irq_enable(); - } + if (dev->domain_data.phyirq > 0) + generic_handle_irq_safe(dev->domain_data.phyirq); } else { netdev_warn(dev->net, "unexpected interrupt: 0x%08x\n", intdata);