From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E180FC4321E for ; Fri, 18 Nov 2022 14:19:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242275AbiKROTb (ORCPT ); Fri, 18 Nov 2022 09:19:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52990 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242251AbiKROTa (ORCPT ); Fri, 18 Nov 2022 09:19:30 -0500 Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [IPv6:2a00:1450:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 820EBCE0F for ; Fri, 18 Nov 2022 06:19:28 -0800 (PST) Received: by mail-ej1-x634.google.com with SMTP id n20so13537619ejh.0 for ; Fri, 18 Nov 2022 06:19:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=huayGJZuEj82T3VVhDBfYhkqbqsIQAROvGUjJHMy0A4=; b=BSd6d199NcnnzDGi4lrYRPT//cxZq4puzQawgEGxmol7u3hAoc1R4UMctzanxVT5ZI 9uM/GXS/0GijzL2xZSc+KKGGaUTXHnqyWyPrONkVi1jcBKpn51yK+sX7MgpWcc+gInLG TgxDdjLCyRzL3juUiZQ+V0GBo1uvK/LuMaE3n677+33i6Evh9pA0K8SLvu7MrqRiv02Y 5pb1wabXt3b6VHtT5djc+i38irWqod0/WQtZGt67U/kiqblPZtyMaD2uoOr6tr+z+6rt aed2mErkQy1gikw+kZFROJrFhAX6Eg+gfhGeskWFkOinrGtrSfvvlDDr5LuSpGVP91A6 Igmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=huayGJZuEj82T3VVhDBfYhkqbqsIQAROvGUjJHMy0A4=; b=tAjKsdGBvZm5xSL4XKNKhPJOPy7NYSp+sggiPVpD7f8B9zC4sf4cdoNaMW4e6eBDcT dvA0/5yU4LeVrlJy+/G3JygAz0t6lbczjcjzyxh9h6aWFQQYy0hivwdWEKuVfqxnpGQ0 Ri/QHQM5H89goitNfZrmx6YfwA29145MQgWuKrHvoPQzXo0E2zPIYGu2c2L/1eSLX2FK /QnjikMX/N8GnK/Jo2FdhcTVg0luFpCJclplxjGF9X52E4sCWFutchNFxdMWfatB34Tv is3QfM9XEpNP8CgbEz0pjehXMxWLEd9/aFBa3m/aBKUBnuAUk0gasGtsJZ9Pcsk0vBc2 QzYA== X-Gm-Message-State: ANoB5plYON1vTQ0i3ydjWb+S3vDIeCv/emZDKA2idGK84lxg3wuwoMQa Wbna+oAdw6xzeaMd5rbZtSBFZkzNgTluTA== X-Google-Smtp-Source: AA0mqf6uK3wLOR2f3cv8+L5adpdIIy9QHfdrqKmoyY5V4tC4oEGoKDk8aU1bKav2RGmAnpcMQdBaUQ== X-Received: by 2002:a17:906:c24e:b0:778:d81d:b1f0 with SMTP id bl14-20020a170906c24e00b00778d81db1f0mr6113608ejb.731.1668781167068; Fri, 18 Nov 2022 06:19:27 -0800 (PST) Received: from [192.168.156.208] (92.40.169.209.threembb.co.uk. [92.40.169.209]) by smtp.gmail.com with ESMTPSA id ky13-20020a170907778d00b0077a1dd3e7b7sm1717981ejc.102.2022.11.18.06.19.24 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 18 Nov 2022 06:19:26 -0800 (PST) Message-ID: <4e8c2d46-ef74-42ad-e70f-dfc9a796f13a@linaro.org> Date: Fri, 18 Nov 2022 14:19:23 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.1 Subject: Re: [PATCH v2 1/2] remoteproc: qcom_q6v5_pas: disable wakeup on probe fail or remove Content-Language: en-US To: Luca Weiss , linux-arm-msm@vger.kernel.org Cc: ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, Mukesh Ojha , Andy Gross , Bjorn Andersson , Konrad Dybcio , Mathieu Poirier , Rishabh Bhatnagar , Siddharth Gupta , Sibi Sankar , linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org References: <20221118090816.100012-1-luca.weiss@fairphone.com> From: Caleb Connolly In-Reply-To: <20221118090816.100012-1-luca.weiss@fairphone.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-remoteproc@vger.kernel.org On 18/11/2022 09:08, Luca Weiss wrote: > Leaving wakeup enabled during probe fail (-EPROBE_DEFER) or remove makes > the subsequent probe fail. > > [ 3.749454] remoteproc remoteproc0: releasing 3000000.remoteproc > [ 3.752949] qcom_q6v5_pas: probe of 3000000.remoteproc failed with error -17 > [ 3.878935] remoteproc remoteproc0: releasing 4080000.remoteproc > [ 3.887602] qcom_q6v5_pas: probe of 4080000.remoteproc failed with error -17 > [ 4.319552] remoteproc remoteproc0: releasing 8300000.remoteproc > [ 4.332716] qcom_q6v5_pas: probe of 8300000.remoteproc failed with error -17 > > Fix this by disabling wakeup in both cases so the driver can properly > probe on the next try. > > Fixes: a781e5aa5911 ("remoteproc: core: Prevent system suspend during remoteproc recovery") > Fixes: dc86c129b4fb ("remoteproc: qcom: pas: Mark devices as wakeup capable") > Reviewed-by: Mukesh Ojha > Signed-off-by: Luca Weiss Reviewed-by: Caleb Connolly > --- > Changes in v2: > * move new line before rproc_free which frees 'adsp' as well > * pick up tags > > drivers/remoteproc/qcom_q6v5_pas.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/remoteproc/qcom_q6v5_pas.c b/drivers/remoteproc/qcom_q6v5_pas.c > index 6afd0941e552..67f5152e2398 100644 > --- a/drivers/remoteproc/qcom_q6v5_pas.c > +++ b/drivers/remoteproc/qcom_q6v5_pas.c > @@ -556,6 +556,7 @@ static int adsp_probe(struct platform_device *pdev) > detach_proxy_pds: > adsp_pds_detach(adsp, adsp->proxy_pds, adsp->proxy_pd_count); > free_rproc: > + device_init_wakeup(adsp->dev, false); > rproc_free(rproc); > > return ret; > @@ -572,6 +573,7 @@ static int adsp_remove(struct platform_device *pdev) > qcom_remove_sysmon_subdev(adsp->sysmon); > qcom_remove_smd_subdev(adsp->rproc, &adsp->smd_subdev); > qcom_remove_ssr_subdev(adsp->rproc, &adsp->ssr_subdev); > + device_init_wakeup(adsp->dev, false); > rproc_free(adsp->rproc); > > return 0; > -- > 2.38.1 > -- Kind Regards, Caleb (they/them)