Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp3399723rwa; Tue, 23 Aug 2022 04:15:44 -0700 (PDT) X-Google-Smtp-Source: AA6agR7e22A3KangLr9f5U1s/KoQ3yYuk6d72VQf+5oWAwCPS3/RUKMs/2M2PFnHuVzdhXYtc5Kz X-Received: by 2002:a17:903:1205:b0:171:4f8d:22a7 with SMTP id l5-20020a170903120500b001714f8d22a7mr24044062plh.164.1661253344656; Tue, 23 Aug 2022 04:15:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661253344; cv=none; d=google.com; s=arc-20160816; b=lpRo991my+eVVUhTku/3ww03pZGYL8N1ctwIKq7ihc+7k8v7FkIQ3ct04NpXOu2cYI LznCksCZOCqijenlWMqhRGXF6JlQC2zZKUy5Ev3k6Pl/QNjKXGW8o+FTXN9lc+1iK5ux LNe1Bjz+6IYFMYRi2mJYofXNEellOcoHq1Ect5nMwP/h9Qy2EVDdsv9PLuEB1v5pc6av s+KBbgnPmHOx7EqwY2uXmjhxDrM5wGPVYhaJZDTua+HRGmFmRz9NyLv+hgoQagNKymzQ z5n9P891/QDUYh12aOxHzZwzUYqtt/XGKgx85bYBqK7RUDq8PcoEGO4zpH5FAnBsRKNN ukOg== 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=zo5Hw9LmSUO53f4YL4Nt7CRMKkl1f4QbMnAYR9zZ/Zc=; b=MFtREgloIT1FXpU5ZWuZKTIg1tLRyvzEW/D6pvMkwj/RTuUSPJjQjEi1UkNtN1Bb+m bS4Fi+icSZrdIwoHF11P/gISDLLb9vTOT+yVL+ICsucom2et58GG9E1LnDJIzJ01I8dR E9To+5VaAy7OJyWgS/iHjZaiBIMSOL4h2UDqfgOOBEUVPrsKbptB25MlHbfsLJird5kU Tw6gOzZkWicW9HgPZn1/WSfCxdZvqu0IgP0++j7WNncu+o6QD4G5JpkLZEUU2+Nf+wr6 F3X2RNxafMRc6Enh0s4ULHHawiR5hZXnsWB9HPmxSiDmGgQxIK2fRMKyXYlnewPwt8YU OXwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=XxKKaeNz; 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 b14-20020a056a000a8e00b0052edbdb0910si8618088pfl.128.2022.08.23.04.15.33; Tue, 23 Aug 2022 04:15:44 -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=XxKKaeNz; 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 S1356087AbiHWKq1 (ORCPT + 99 others); Tue, 23 Aug 2022 06:46:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51140 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1355553AbiHWKjN (ORCPT ); Tue, 23 Aug 2022 06:39:13 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2C334A7221; Tue, 23 Aug 2022 02:07:59 -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 dfw.source.kernel.org (Postfix) with ESMTPS id BE1FC6159A; Tue, 23 Aug 2022 09:07:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C4304C433C1; Tue, 23 Aug 2022 09:07:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1661245678; bh=RUCb4Wufwc6kH8giP5LlkCfjdRcwlVShfA9Qcx7N+xk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XxKKaeNzWpKx/XaqopOSBEZN1u/tJFGByi3yfiwJaAnj6PntXYjJjKbw07KDd3EAI 9/B8yAIdCrwV+Jr4uqch024GmihVJAzVSa+VeBA6NWJ59yUcO+71nkyazPiay3fjVs FCUYbhBa7k/QE4whNUUMlfTNzuIarq5L7Dy1j52A= 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 4.19 155/287] remoteproc: qcom: wcnss: Fix handling of IRQs Date: Tue, 23 Aug 2022 10:25:24 +0200 Message-Id: <20220823080105.861982236@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220823080100.268827165@linuxfoundation.org> References: <20220823080100.268827165@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 6cc0f9a5533e..63726d8fb332 100644 --- a/drivers/remoteproc/qcom_wcnss.c +++ b/drivers/remoteproc/qcom_wcnss.c @@ -415,6 +415,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) { @@ -425,14 +426,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