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 X-Spam-Level: X-Spam-Status: No, score=-8.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 B665CC433E0 for ; Tue, 16 Feb 2021 17:37:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9480464E08 for ; Tue, 16 Feb 2021 17:37:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230033AbhBPRhk (ORCPT ); Tue, 16 Feb 2021 12:37:40 -0500 Received: from z11.mailgun.us ([104.130.96.11]:44495 "EHLO z11.mailgun.us" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229879AbhBPRhi (ORCPT ); Tue, 16 Feb 2021 12:37:38 -0500 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1613497040; h=Message-ID: References: In-Reply-To: Reply-To: Subject: Cc: To: From: Date: Content-Transfer-Encoding: Content-Type: MIME-Version: Sender; bh=4TotQZ50sSfWZrTT8rH4ez4ieOzXl8RQM5CTNGHrW6M=; b=BsLclu3RBqhp/yxCy6/ffBW2aftGMLgZwSWPCbjllv9It5Kmsz356R4LgkQJciyLQil+ltee K8NJ3meDxjGoQJCrJpmhj4Kp3mkzy+Yy71zW9r38I+Nfywxz+s0ORDUeXGjkqL+BRRRJ4E8A Qr+Z0oIxE2vVnNebDXNYTTx3ROw= X-Mailgun-Sending-Ip: 104.130.96.11 X-Mailgun-Sid: WyI1MzIzYiIsICJsaW51eC1hcm0tbXNtQHZnZXIua2VybmVsLm9yZyIsICJiZTllNGEiXQ== Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n01.prod.us-west-2.postgun.com with SMTP id 602c02c4e3b5620c2ea5a642 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Tue, 16 Feb 2021 17:37:08 GMT Sender: bbhatt=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id CA78BC433C6; Tue, 16 Feb 2021 17:37:07 +0000 (UTC) Received: from mail.codeaurora.org (localhost.localdomain [127.0.0.1]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: bbhatt) by smtp.codeaurora.org (Postfix) with ESMTPSA id DD2B0C43462; Tue, 16 Feb 2021 17:37:05 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 16 Feb 2021 09:37:05 -0800 From: Bhaumik Bhatt To: Loic Poulain Cc: Manivannan Sadhasivam , Hemant Kumar , linux-arm-msm , Jeffrey Hugo Subject: Re: [PATCH v3] mhi: pci_generic: Ensure device readiness before starting MHI Organization: Qualcomm Innovation Center, Inc. Reply-To: bbhatt@codeaurora.org Mail-Reply-To: bbhatt@codeaurora.org In-Reply-To: References: <1613071507-31489-1-git-send-email-loic.poulain@linaro.org> Message-ID: X-Sender: bbhatt@codeaurora.org User-Agent: Roundcube Webmail/1.3.9 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org On 2021-02-14 11:30 PM, Loic Poulain wrote: > Hi Bhaumik, > > On Fri, 12 Feb 2021 at 02:41, Bhaumik Bhatt > wrote: >> >> Hi Loic, >> >> On 2021-02-11 11:25 AM, Loic Poulain wrote: >> > The PCI device may have not been bound from cold boot and be in >> > undefined state, or simply not yet ready for MHI operations. This >> > change ensures that the MHI layer is reset to initial state and >> > ready for MHI initialization and power up. >> > >> > Signed-off-by: Loic Poulain > [...] >> > + >> > err = mhi_sync_power_up(mhi_cntrl); >> > if (err) { >> > dev_err(&pdev->dev, "failed to power up MHI controller\n"); >> >> Can you share logs of what you're seeing as it is not clear why you >> would need >> this patch. >> >> We have a mechanism in place that Jeff added a while back [1], to >> check >> if device >> is in SYS_ERROR state and do the same: issue reset and later, wait for >> ready from >> within mhi_sync_power_up() API. >> >> Note that the MHI_IN_PBL() macro includes EDL and Pass Through modes >> as >> well and >> we do expect an MHI READY state move after Pass Through. > > I think this is a mix of several issues, that could be fixed by latest > Jeffrey's patch and > this one: "mhi: core: Move to polling method to wait for MHI ready". > > I assume it would be easier if you send this last one as standalone > fix, for review and merge. > Will do. > Regards, > Loic Thanks, Bhaumik --- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project