From patchwork Mon Nov 9 22:44:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhaumik Bhatt X-Patchwork-Id: 11892737 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 042FB139F for ; Mon, 9 Nov 2020 22:44:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CB083206B6 for ; Mon, 9 Nov 2020 22:44:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=mg.codeaurora.org header.i=@mg.codeaurora.org header.b="pAUMadVH" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730147AbgKIWoS (ORCPT ); Mon, 9 Nov 2020 17:44:18 -0500 Received: from m42-4.mailgun.net ([69.72.42.4]:17629 "EHLO m42-4.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729452AbgKIWoR (ORCPT ); Mon, 9 Nov 2020 17:44:17 -0500 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1604961857; h=Message-Id: Date: Subject: Cc: To: From: Sender; bh=aK2UqZvkU1MuzYeT8UpwfTUlCR2UK/lktar5r/gcyQ8=; b=pAUMadVHi+AJUlTzPwHKjjTDtzKzZUCc3aniBXvhcG65X/iZvQ9l5wihtSrRDR0KsGUNaVfM QgYEqlSI3mz8mxL1ITgmniE+NgJP/MydocprcvNYw1zRxUC8FWFomSzkYT1gHx7Qqp/vi0jU ZMlWI2rB1JkMRQ+Eyzs0gsrQYxw= X-Mailgun-Sending-Ip: 69.72.42.4 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-n04.prod.us-west-2.postgun.com with SMTP id 5fa9c64018b2aa4b1f32d094 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Mon, 09 Nov 2020 22:44:16 GMT Sender: bbhatt=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 3CCC0C433C8; Mon, 9 Nov 2020 22:44:16 +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,SPF_FAIL autolearn=no autolearn_force=no version=3.4.0 Received: from malabar-linux.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: bbhatt) by smtp.codeaurora.org (Postfix) with ESMTPSA id 347C7C433C8; Mon, 9 Nov 2020 22:44:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 347C7C433C8 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=bbhatt@codeaurora.org From: Bhaumik Bhatt To: manivannan.sadhasivam@linaro.org Cc: linux-arm-msm@vger.kernel.org, hemantk@codeaurora.org, jhugo@codeaurora.org, loic.poulain@linaro.org, linux-kernel@vger.kernel.org, Bhaumik Bhatt Subject: [PATCH v1 0/4] Updates to MHI channel handling Date: Mon, 9 Nov 2020 14:44:06 -0800 Message-Id: <1604961850-27671-1-git-send-email-bbhatt@codeaurora.org> X-Mailer: git-send-email 2.7.4 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org MHI specification shows a state machine with support for STOP channel command and the validity of certain state transitions. MHI host currently does not provide any mechanism to stop a channel and restart it without resetting it. There are also times when the device moves on to a different execution environment while client drivers on the host are unaware of it and still attempt to reset the channels facing unnecessary timeouts. This series addresses the above areas to provide support for stopping an MHI channel, resuming it back, and improving upon channel state machine handling in general. This set of patches was tested on arm64 architecture. Bhaumik Bhatt (4): bus: mhi: core: Allow receiving a STOP channel command response bus: mhi: core: Improvements to the channel handling state machine bus: mhi: core: Add support to pause or resume channel data transfers bus: mhi: core: Check execution environment for channel before issuing reset drivers/bus/mhi/core/init.c | 11 +- drivers/bus/mhi/core/internal.h | 12 +++ drivers/bus/mhi/core/main.c | 218 ++++++++++++++++++++++++++++------------ include/linux/mhi.h | 16 +++ 4 files changed, 192 insertions(+), 65 deletions(-)