Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp604058pxf; Wed, 10 Mar 2021 12:59:04 -0800 (PST) X-Google-Smtp-Source: ABdhPJzW66SVw3rhmtMA19TYJrgeo1yv7MdnLQrLXWmLuB89eHc9lYz/K5RyxiWQboP7e4ld22mx X-Received: by 2002:aa7:d416:: with SMTP id z22mr5265221edq.239.1615409943895; Wed, 10 Mar 2021 12:59:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615409943; cv=none; d=google.com; s=arc-20160816; b=XBvPELFu339DrIjmnI7pBAyGvD88T+zNFUnfHkscJJiNmXi/mdztWIu2HWB/uNVqTU kWbio6knFEIMbK0Qc88FcCkGtA/KsRj4+/Kdb5aSsbRCZy9K8+F5aXvGVI2fgcgdOtgN tTpmVRltYpccauwYn5VC5Iw79srz9kpCfgqluBJa9VZSKGdi9g6TObszESJTKGbfS8KI 1eiGJY5WAdraRhf4Kq8OxBP0MJtIlcqEvWutLmbtewsco6rup5OYQWOqqgn+/SYP7gb2 mp49V5ampI4tQbaXWSL19UIDHrRwqPHyPafFnWuT5cqwbKtksAkrWU/fzH0GcBBhC0CV nSjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dmarc-filter:sender:dkim-signature; bh=5XWw8PFNwF6LFhiLkbPkKIEa4bbVxzhuAVG5qfayj/w=; b=m5z6vd8/28D0vl2Hht0nr5NwvV2fBmdfkr5igI+VombKqJxmd5E/qgKsTWri6WX/I3 bUK31qlvdK618AKAr6GgGxAxyGwul+Z/rMK6SmYfU+OXLAxwgohLwABPW/2SLv/TlRQf xG0TNZUs9cyaS29geHrfPftubT9Dn5iqMeyGfHBHOXvAjG1mqDZsbTciDcEm6vqA5p9b s4FaA7OhXD3umNB4txFmQwre3QM7SpjagJtM2h2RyMnK+RXskkQx/F10+U2NVvEM2bp6 +DYPKaPnH85Dh+DH+n45vvvdAsbB5o3oECzIllw6KS/YR8ooPUnkdQBsExECpOA8Yh5t lzZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=wmWgaETE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m20si326122edv.175.2021.03.10.12.58.41; Wed, 10 Mar 2021 12:59:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=wmWgaETE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231231AbhCJU5b (ORCPT + 99 others); Wed, 10 Mar 2021 15:57:31 -0500 Received: from z11.mailgun.us ([104.130.96.11]:36835 "EHLO z11.mailgun.us" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231808AbhCJU5E (ORCPT ); Wed, 10 Mar 2021 15:57:04 -0500 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1615409824; h=Content-Transfer-Encoding: Content-Type: In-Reply-To: MIME-Version: Date: Message-ID: From: References: Cc: To: Subject: Sender; bh=5XWw8PFNwF6LFhiLkbPkKIEa4bbVxzhuAVG5qfayj/w=; b=wmWgaETEFC3UweVOu45u+jx8RNzd6RjWJEqIB4Zp2rNeySieQ8d3KzMKSU6QZ1QegRNokc1u JDoSJIAPHMqXcKmIW2FMrDZsMZG39iTrNImCKuGfPkyEKydgVRG48z3i9wLG9c47L/4JQ2/P wVxnGwTcC5ylihy0EYFTTwJHJo4= X-Mailgun-Sending-Ip: 104.130.96.11 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n07.prod.us-west-2.postgun.com with SMTP id 6049329c155a7cd23434f6eb (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Wed, 10 Mar 2021 20:57:00 GMT Sender: hemantk=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 70F22C433C6; Wed, 10 Mar 2021 20:57:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=ALL_TRUSTED,BAYES_00, NICE_REPLY_A,SPF_FAIL,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from [10.46.162.249] (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: hemantk) by smtp.codeaurora.org (Postfix) with ESMTPSA id C8164C433CA; Wed, 10 Mar 2021 20:56:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org C8164C433CA Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=fail smtp.mailfrom=hemantk@codeaurora.org Subject: Re: [PATCH v2 RESEND] bus: mhi: core: Wait for ready state after reset To: Jeffrey Hugo , manivannan.sadhasivam@linaro.org Cc: bbhatt@codeaurora.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org References: <1615408918-7242-1-git-send-email-jhugo@codeaurora.org> From: Hemant Kumar Message-ID: <80b6c87a-001c-96ae-d0ce-f41b48362d80@codeaurora.org> Date: Wed, 10 Mar 2021 12:56:59 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <1615408918-7242-1-git-send-email-jhugo@codeaurora.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/10/21 12:41 PM, Jeffrey Hugo wrote: > After the device has signaled the end of reset by clearing the reset bit, > it will automatically reinit MHI and the internal device structures. Once > That is done, the device will signal it has entered the ready state. > > Signaling the ready state involves sending an interrupt (MSI) to the host > which might cause IOMMU faults if it occurs at the wrong time. > > If the controller is being powered down, and possibly removed, then the > reset flow would only wait for the end of reset. At which point, the host > and device would start a race. The host may complete its reset work, and > remove the interrupt handler, which would cause the interrupt to be > disabled in the IOMMU. If that occurs before the device signals the ready > state, then the IOMMU will fault since it blocked an interrupt. While > harmless, the fault would appear like a serious issue has occurred so let's > silence it by making sure the device hits the ready state before the host > completes its reset processing. > > Signed-off-by: Jeffrey Hugo Reviewed-by: Hemant Kumar -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project