From patchwork Thu Aug 20 09:19:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "gregkh@linuxfoundation.org" X-Patchwork-Id: 265856 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=-9.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable 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 EEE3EC433E1 for ; Thu, 20 Aug 2020 09:29:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C53422173E for ; Thu, 20 Aug 2020 09:29:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597915783; bh=nfgCGoTCSYZV/HWOTSgdJtuoqoTvoAl+MUxVncVuKnI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=aWkaqZCpmQ+5rlw26TKNcDfkQCD0N1w2R2PqaxcAQeLPieMAQUkXHIVpODxLOAXUg YpeHQ7cG91sBlr0TsTgA7lFvnu9s8UkIfaYJLuTBowWKUYa5sxEq+/toUIDficY+xe YqSwO+5fp3tIQkiENohQqb85hMtOfx1VwND6vIzc= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728063AbgHTJ3Z (ORCPT ); Thu, 20 Aug 2020 05:29:25 -0400 Received: from mail.kernel.org ([198.145.29.99]:37100 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727078AbgHTJ2b (ORCPT ); Thu, 20 Aug 2020 05:28:31 -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 465272224D; Thu, 20 Aug 2020 09:28:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597915709; bh=nfgCGoTCSYZV/HWOTSgdJtuoqoTvoAl+MUxVncVuKnI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=r1sR0U+SAw6c3cwwJzU0Xg9y1AObaZXw/+1R8wTDceHcupRTcEjDrengM+7nGFsro GOXo5Wuo32sRzc7SDpTxtdM2wM/flHZwZr12qqRLrQVlvG1z8fGDlTp5NPNxiLkS0T qjw33ROsUju4Ub9PE1WQBdtsFxsqfF3I53Ueh3rM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Evan Green , Sibi Sankar , Bjorn Andersson Subject: [PATCH 5.8 108/232] remoteproc: qcom: q6v5: Update running state before requesting stop Date: Thu, 20 Aug 2020 11:19:19 +0200 Message-Id: <20200820091618.051284155@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200820091612.692383444@linuxfoundation.org> References: <20200820091612.692383444@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: Sibi Sankar commit 5b7be880074c73540948f8fc597e0407b98fabfa upstream. Sometimes the stop triggers a watchdog rather than a stop-ack. Update the running state to false on requesting stop to skip the watchdog instead. Error Logs: $ echo stop > /sys/class/remoteproc/remoteproc0/state ipa 1e40000.ipa: received modem stopping event remoteproc-modem: watchdog received: sys_m_smsm_mpss.c:291:APPS force stop qcom-q6v5-mss 4080000.remoteproc-modem: port failed halt ipa 1e40000.ipa: received modem offline event remoteproc0: stopped remote processor 4080000.remoteproc-modem Reviewed-by: Evan Green Fixes: 3b415c8fb263 ("remoteproc: q6v5: Extract common resource handling") Cc: stable@vger.kernel.org Signed-off-by: Sibi Sankar Link: https://lore.kernel.org/r/20200602163257.26978-1-sibis@codeaurora.org Signed-off-by: Bjorn Andersson Signed-off-by: Greg Kroah-Hartman --- drivers/remoteproc/qcom_q6v5.c | 2 ++ 1 file changed, 2 insertions(+) --- a/drivers/remoteproc/qcom_q6v5.c +++ b/drivers/remoteproc/qcom_q6v5.c @@ -153,6 +153,8 @@ int qcom_q6v5_request_stop(struct qcom_q { int ret; + q6v5->running = false; + qcom_smem_state_update_bits(q6v5->state, BIT(q6v5->stop_bit), BIT(q6v5->stop_bit));