From patchwork Fri May 8 12:34:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 226241 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=-6.8 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, 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 28623C47254 for ; Fri, 8 May 2020 12:48:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 08F6E24969 for ; Fri, 8 May 2020 12:48:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588942082; bh=S8DKXB9PEAxLvWBWOyJyiuxF/b8JR1221vT76XoCgLQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=RuSHKnwsdNxD+wGcM8YQGSMMWOFLiKGmgXbvk3bVUz9E0DjLkPMXtcr3SEvp6wNpi T5yDPWQFvbTnRLCsYLegjRBycucjU6KUndR1ZezsdU0K35rBpXMT8PQq05CVteTR0c /pKRuwcRs7R9KljP8RmOpQZrr80i/EWaluzWhnGE= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729615AbgEHMsA (ORCPT ); Fri, 8 May 2020 08:48:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:51136 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729012AbgEHMr7 (ORCPT ); Fri, 8 May 2020 08:47:59 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6BF4D221F7; Fri, 8 May 2020 12:47:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588942078; bh=S8DKXB9PEAxLvWBWOyJyiuxF/b8JR1221vT76XoCgLQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=U8ejE8RueF2C1NDwgCfUfTEiidQQ1IRTBPDLzhptWPwFOKaWTQx9E9L9lE7pCmcGm uaLHphNHxtOZON9/ScqGvKCgOAZf1dXIxB5FloU32a24Z+V4C7oh37hQwFntcZqfHg hNozkGtxgjudqZap+7wpSbTjEmmtsuUZsHpDmF5M= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Geert Uytterhoeven , Sergei Shtylyov , "David S. Miller" Subject: [PATCH 4.4 289/312] ravb: Add missing free_irq() call to ravb_close() Date: Fri, 8 May 2020 14:34:40 +0200 Message-Id: <20200508123144.711327872@linuxfoundation.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200508123124.574959822@linuxfoundation.org> References: <20200508123124.574959822@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Geert Uytterhoeven commit 7fa816b92c52e2c304f2ff6401e0d51e1d229ca5 upstream. When reopening the network device on ra7795/salvator-x, e.g. after a DHCP timeout: IP-Config: Reopening network devices... genirq: Flags mismatch irq 139. 00000000 (eth0:ch24:emac) vs. 00000000 (eth0:ch24:emac) ravb e6800000.ethernet eth0: cannot request IRQ eth0:ch24:emac IP-Config: Failed to open eth0 IP-Config: No network devices available The "mismatch" is due to requesting an IRQ that is already in use, while IRQF_PROBE_SHARED wasn't set. However, the real cause is that ravb_close() doesn't release the R-Car Gen3-specific secondary IRQ. Add the missing free_irq() call to fix this. Fixes: 22d4df8ff3a3cc72 ("ravb: Add support for r8a7795 SoC") Signed-off-by: Geert Uytterhoeven Acked-by: Sergei Shtylyov Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/renesas/ravb_main.c | 2 ++ 1 file changed, 2 insertions(+) --- a/drivers/net/ethernet/renesas/ravb_main.c +++ b/drivers/net/ethernet/renesas/ravb_main.c @@ -1528,6 +1528,8 @@ static int ravb_close(struct net_device priv->phydev = NULL; } + if (priv->chip_id == RCAR_GEN3) + free_irq(priv->emac_irq, ndev); free_irq(ndev->irq, ndev); napi_disable(&priv->napi[RAVB_NC]);