Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3094636rwb; Mon, 15 Aug 2022 18:00:10 -0700 (PDT) X-Google-Smtp-Source: AA6agR52SV0CDZBHfFHydbd/+7BG4mOTE1PQF3l77LJhG1xly/ixJ66lYA+wDQPqCikuYCfm9Slb X-Received: by 2002:a17:907:1dd7:b0:730:8dfd:9e13 with SMTP id og23-20020a1709071dd700b007308dfd9e13mr11662358ejc.239.1660611610274; Mon, 15 Aug 2022 18:00:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660611610; cv=none; d=google.com; s=arc-20160816; b=MDuPGjwZeNvXMIK5JHq9vzBEdx0MNry+ViOXoAe77ZqHRRN1UlCbS7KDH+u/p0SGfa k4fmhzIfeATVh57gRhLEwUtsDFGLnykXgbhRwuldtz0VpzQnobJK/POLo2KzkjpS0uVP SMgVV43YBQ/PzWoZ+tkezRQY5eOLOFTtN3Q25NG5uRPPiYBVRo4U07MtkzhAS8fdC6MX vDjR+lY09Mg2w4609Bvrl33xnYFMBEs/71S7ZsMtYZNzBeedBEBrhMx5FbKmpWb7HQ28 rfNqa6+obYK1sAbkNdVKnAi4ZOLxPxxPjzoxuZzV+4CtbToswmWnPT88gelprEdN9vX4 CGkA== 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=Jo3ruQYfVKMl5j1R3qszt1LxVuRZV2SXpBPi1P/LtkIn4esdO5pPR12G3soYi9cDnk +2ibq2Hy48Uu8KImeWr0Ke9LEevDQb88Y0a92MvbX2YLF2U7wvPE3ixYVGcHHGmZ/rbJ KQUbOp3DUq6j9jYlebG2WGgE9RLrP88Se7WxT4VAWgE/7hQlporOM0xQAZzTEwC+x2L6 mMcFtNB2XKH47QDvMIsHl5j51mZ+J3Omvv3BQ8A35C8XbsIwf3JpPzs1cMuxpkr1kvc/ JI1d+ff7Fi/ji0+emlo2QRPgYMbqEQnjtSDC1wVUjSbK1/nufyf4UT6w0zGv9OynX4Fa 3ggQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=1n9RRyMv; 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 c10-20020a05640227ca00b0043c77b9ca58si10817049ede.82.2022.08.15.17.59.39; Mon, 15 Aug 2022 18:00:10 -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=1n9RRyMv; 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 S242624AbiHPAtl (ORCPT + 99 others); Mon, 15 Aug 2022 20:49:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56256 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347315AbiHPApz (ORCPT ); Mon, 15 Aug 2022 20:45:55 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A79D0AEDA8; Mon, 15 Aug 2022 13:41:39 -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 447366122B; Mon, 15 Aug 2022 20:41:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 41CF6C433C1; Mon, 15 Aug 2022 20:41:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660596098; bh=EYeWNRRdqeLTH60vOeNeougrx1JxpB34+HdpnISTfl4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1n9RRyMvx0sTjDTZ3dkJcBiK/opGc33CrnJqMQmvfmoi8QhEZsatLcnaywQJ3ILsS NzRXzqEqb1/fVkfMjEuU7xzU6OA2vOlW+G8N8W67lyyXIpKfOHO4imUOiLwKoi4xjO T8MVbd6FwMGZvQEppart3cBEkZNYQ6xDLbbcNlvY= 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.19 0937/1157] remoteproc: qcom: wcnss: Fix handling of IRQs Date: Mon, 15 Aug 2022 20:04:53 +0200 Message-Id: <20220815180516.989931223@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180439.416659447@linuxfoundation.org> References: <20220815180439.416659447@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