Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2883424rwb; Mon, 15 Aug 2022 13:15:38 -0700 (PDT) X-Google-Smtp-Source: AA6agR6tTZXZX5UCqB8ok4Q+U1TZMykho4HTMantdDOJTQiHSMXZz7QBzZy2qRIH13DogFOaMRqQ X-Received: by 2002:a05:6402:2989:b0:43e:91be:fd20 with SMTP id eq9-20020a056402298900b0043e91befd20mr16113588edb.109.1660594538442; Mon, 15 Aug 2022 13:15:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660594538; cv=none; d=google.com; s=arc-20160816; b=qLrRtZVRQvkxVg6AbXFz4PHpPc+MJ2FaO6X0nwvB/UBC/0EoJSaWlLAd4q+L+rGD7m AV8l647eeM3BkU7CDXY5L/lWHYpJHvxrCzVWpjLbNreUOoPzON3WB1HDoc5gHTu9MTec OE2iNnmKsp7j9Ln5sDDKHdYjtJ3lSZgFNTvavd2K+9M/oPLa4QViGkr2uzKEAOO8Tia/ FJUXWeflhUu+Fuk5Qg3xJe7LY5ddR210PlL3g2sY3i7YW5fo6YFdUFLMSYeqjpJpLwjX B8zfXNHFKdUJ0CCcDG7ZrWKZX2R2U5dST9JoisXZSNPmwxRYultRUdt8+78aHDLUhHol lbrQ== 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=kF/HbH48T9NTn6XZ3TOaR0/uWk6ZhEPqtJmgGoqWfQM=; b=WuuLY41Bq4Gpo83TzViZ38wcKM3UXVCM4XzZeW56LUE96c6RZIeirhRyc0Z54sbFhA LNp2bk1bLCcx5EwGrCIWf0c35LOclP1DapBrUL0JCSPWRvGVSfwgfHE3ZGhtk1B5n52o v1Rx47SPTv6stGGTvmNrK+2f08AWytQwQfWZ//FTKDAN7a/cbJ2tK/jj+pj8dYVGotJw 1VqYrcKR+L5HErPEIgij3kqdGCan1FnelcFKhlLnP6gY+Dc6/Zc+M4Hrk0Ngu1evo3xe Q2CtnU0IsL8FMH6g0+66FksjyCKmixjMLwifQE/H2vthui2BCs3T76vk6jbNW0Kdu69T bXaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Qi54lZTd; 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 sb35-20020a1709076da300b00732f7264d62si7554453ejc.746.2022.08.15.13.15.11; Mon, 15 Aug 2022 13:15:38 -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=Qi54lZTd; 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 S1344372AbiHOTgh (ORCPT + 99 others); Mon, 15 Aug 2022 15:36:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37958 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343984AbiHOTbD (ORCPT ); Mon, 15 Aug 2022 15:31:03 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B9015FADF; Mon, 15 Aug 2022 11:44:23 -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 ams.source.kernel.org (Postfix) with ESMTPS id B820DB81081; Mon, 15 Aug 2022 18:44:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E9D67C433C1; Mon, 15 Aug 2022 18:44:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660589060; bh=nB3DazRTjFbJzl5tmLUkm9iShBqPVj9wrCAhLar+mp8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Qi54lZTd1RY9SkXhw5XMIqCi9JBStbL7RxmPfIZ+9n8AJvPgK6+O1sRjKNR0cm5d/ wbSufnp3v4CPkn0aZQXXkRJYihEPYc1jyvDKN/Sy0MRcj6GsIqfV/XcxQpb8+Llp2F oQ2CRV3U+NJSeEwpXd4KaKuJDzVO3zbeufjMumHI= 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.15 593/779] remoteproc: qcom: wcnss: Fix handling of IRQs Date: Mon, 15 Aug 2022 20:03:57 +0200 Message-Id: <20220815180402.684575532@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180337.130757997@linuxfoundation.org> References: <20220815180337.130757997@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 b17742eac9ff..97a0c0dc4c77 100644 --- a/drivers/remoteproc/qcom_wcnss.c +++ b/drivers/remoteproc/qcom_wcnss.c @@ -468,6 +468,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) { @@ -478,14 +479,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