Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3020771rwb; Mon, 15 Aug 2022 16:17:54 -0700 (PDT) X-Google-Smtp-Source: AA6agR6rwu6DSMyfS2UhJpkfnPNSH9lv1vSqFTMjWFa9R6rrEI7Um6CYu5URaVkTDu5tgGFvE2eN X-Received: by 2002:a05:6402:174b:b0:43d:7b29:5ce9 with SMTP id v11-20020a056402174b00b0043d7b295ce9mr15858589edx.313.1660605474563; Mon, 15 Aug 2022 16:17:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660605474; cv=none; d=google.com; s=arc-20160816; b=tJnnCwlCKvKg2t9vNOppPNYmOPUM50thMUSYNsg3ToewbwqEB7/jLaG7CkTwwUe0KJ CBWnG+AM+ZdCc+ETY9Se5glibGIejcqByuFvxqyf3eVCWKjwmP3NniAyzbuolBoG0O2T Hh5K9ZVoaWMnOIBb+UdoLFwVa07XwDeEk+8uIa1k4PrKV1CP7/+msTYES5om+2ky/Aot AnQOLruCYEFgmMfwiU80zLiJg5//evmZ4pK0ktxnMisUCJQbDmIjYoz2NDDtugftiONz E0bpDfKPSLfRpwU/2zASi5RpHHkaCrB7tPpToP4ZcL6af6SIVadDr1S02Cxf/C04WDPw aS+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=3cQuZS/yoI/nzAoNbj6243oT71rw1VIyU2wZxNDeoT0=; b=aI13bRWkQvyWeIIafINYFZJvBnmqDMAC9wQz1Nnaue+ppc5Bv952YivZgE/OBgPQhj YWdaTFwkBq0PYTlNnmDxLhalsv78Q1fdXq1i5cR5QWE4g0dIe2bGY4ClXNCKJOM4IXbF o60Eb06cK1UfXhg4n7t8FQYcHCHgTf9/qhq+lXAYmxh11ZI5eTPLZZOBtrtISLGw0lvt w4YJgVH5v+wxASw/rvd9h3XsC+tSbGHJL+PJSyltLzKyGx4dMKSCdsyjsEPyPDyiwoF7 gvdaCXX/jmS5jQsZH1j/WSbduRo7XrUxYHmx+Qshspwy75RvPRDok4X9xqA5HB7S8IMP PwbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=GfUilLVk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gh4-20020a170906e08400b0072a89cb4513si6816784ejb.494.2022.08.15.16.17.28; Mon, 15 Aug 2022 16:17:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=GfUilLVk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348614AbiHOWiL (ORCPT + 99 others); Mon, 15 Aug 2022 18:38:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53192 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350774AbiHOWcL (ORCPT ); Mon, 15 Aug 2022 18:32:11 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D314812D2A3; Mon, 15 Aug 2022 12:48:54 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id C4387CE12E0; Mon, 15 Aug 2022 19:48:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B08F5C433D6; Mon, 15 Aug 2022 19:48:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660592918; bh=EYeWNRRdqeLTH60vOeNeougrx1JxpB34+HdpnISTfl4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GfUilLVkh1zbakPGNJ0AhJeUTHh34KmGVTauTL5Xy7/A/aqW+FV+9D8rMb7AlS1w7 Kh9YIEzAUA3dm3QrXZMtla/gg5MJ+zmirD28r5Xpq5qqclNBa8IClxT3ddfZGaTeo0 yaEt8YueszpN33anwGKXA+nViduhndiNQz0as14w= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sireesh Kodali , Bjorn Andersson , Sasha Levin Subject: [PATCH 5.18 0866/1095] remoteproc: qcom: wcnss: Fix handling of IRQs Date: Mon, 15 Aug 2022 20:04:25 +0200 Message-Id: <20220815180505.199454822@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180429.240518113@linuxfoundation.org> References: <20220815180429.240518113@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Sireesh Kodali [ Upstream commit bed0adac1ded4cb486ba19a3a7e730fbd9a1c9c6 ] The wcnss_get_irq function is expected to return a value > 0 in the event that an IRQ is succssfully obtained, but it instead returns 0. This causes the stop and ready IRQs to never actually be used despite being defined in the device-tree. This patch fixes that. Fixes: aed361adca9f ("remoteproc: qcom: Introduce WCNSS peripheral image loader") Signed-off-by: Sireesh Kodali Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220526141740.15834-2-sireeshkodali1@gmail.com Signed-off-by: Sasha Levin --- drivers/remoteproc/qcom_wcnss.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/remoteproc/qcom_wcnss.c b/drivers/remoteproc/qcom_wcnss.c index 9a223d394087..68f37296b151 100644 --- a/drivers/remoteproc/qcom_wcnss.c +++ b/drivers/remoteproc/qcom_wcnss.c @@ -467,6 +467,7 @@ static int wcnss_request_irq(struct qcom_wcnss *wcnss, irq_handler_t thread_fn) { int ret; + int irq_number; ret = platform_get_irq_byname(pdev, name); if (ret < 0 && optional) { @@ -477,14 +478,19 @@ static int wcnss_request_irq(struct qcom_wcnss *wcnss, return ret; } + irq_number = ret; + ret = devm_request_threaded_irq(&pdev->dev, ret, NULL, thread_fn, IRQF_TRIGGER_RISING | IRQF_ONESHOT, "wcnss", wcnss); - if (ret) + if (ret) { dev_err(&pdev->dev, "request %s IRQ failed\n", name); + return ret; + } - return ret; + /* Return the IRQ number if the IRQ was successfully acquired */ + return irq_number; } static int wcnss_alloc_memory_region(struct qcom_wcnss *wcnss) -- 2.35.1