Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp603604pxb; Wed, 11 Nov 2020 11:23:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJzvfa4wdtOTsl/m+3ExVKA0F9EnRLqHB+s50a0seLdl+B3TVcLi9RQoLBY/7U7znGacLTw0 X-Received: by 2002:a17:907:374:: with SMTP id rs20mr21860839ejb.191.1605122616835; Wed, 11 Nov 2020 11:23:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605122616; cv=none; d=google.com; s=arc-20160816; b=ZrZX6SnxP+WNa+FRKGCCSAh9edmmTwTag66/T4Gub8TQ10lcYi3pX1d1bmXbDRLTzT +HNERMfXC6iBoemBls5EDQoi/8LtUwa6jRpTIq8fV26t3t3p8wyFFbErYSr/JvSRZwJO GP8xFbIaC2OL2DBvxMfLYxs/vqubKmqyGC8KXK+nb2g23jGE0EK9s8P7jNHVJNNngdvK a/vBo4kMJRvlFYCeYb7BKxNrj29aEof8A1R696g3PXhm3Z/h84dIl+A0QnD55C7p8Ium 70sRyP3GCQNAagdGYxFFznPlxZ8OkVhjbPohavi3Vr5yulwGNM6mjOWDMgaChBTD1cTb RWyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from:dmarc-filter :sender:dkim-signature; bh=57kvVF2ThDFDHaXRqrUE7yn622CwYm6PBAuR+h72F0Q=; b=YIVmswh6HWyjCI+kNVfdfpLO0ruWiXQTJhOMd3n4GB0Ju2FFqjtZQt5PzEvFl5/r2e LleSs6fGbO0NS8DMwy4JrzfTWrZhdGxFH25tSer5QlGrvb2iI5tKWfkHH+6F9yYs3bp+ /8JyNk/jX4d9gDt8PBZNXIsAfkDaioY/hmthL/QFy8/fCBmw9U6lA9WQDTnb12uyfugw ebwYNvUZaVBxTyk2G40NfnxowWKDJLIdKq62DGnNMqW7BwTyAwyH11R7JW+AE0OgJBqY 9gQ5gMTo5kFSFtDbxB9t64EzA8VYexeE/uhCVU4mwfITHzswfo9QVsCbkGoYuLJ3WKQR 6fTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=cfON35yj; 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 s18si2357623eji.422.2020.11.11.11.23.13; Wed, 11 Nov 2020 11:23:36 -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=cfON35yj; 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 S1727789AbgKKTVe (ORCPT + 99 others); Wed, 11 Nov 2020 14:21:34 -0500 Received: from m42-4.mailgun.net ([69.72.42.4]:33184 "EHLO m42-4.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727626AbgKKTVY (ORCPT ); Wed, 11 Nov 2020 14:21:24 -0500 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1605122483; h=Message-Id: Date: Subject: Cc: To: From: Sender; bh=57kvVF2ThDFDHaXRqrUE7yn622CwYm6PBAuR+h72F0Q=; b=cfON35yjfpzh3RqUydwTZvLY9YMpnLouOp7cyKsx8PPwxSi+KpTxsGbNVQ3NtzmWZShqwrr+ R7yygMs0SUx4fbup53bgUIVqbPLYz19gjBRuaWNu/0xWNkL7z3QofPDe0hgz0/+Rm0rqMNhb HnH8Vl8KqK5YykTE4aHcggr0Og0= X-Mailgun-Sending-Ip: 69.72.42.4 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-east-1.postgun.com with SMTP id 5fac39b0b8c6a84a5c9130f5 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Wed, 11 Nov 2020 19:21:20 GMT Sender: bbhatt=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id C21DFC433FE; Wed, 11 Nov 2020 19:21:19 +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 E4825C433C6; Wed, 11 Nov 2020 19:21:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org E4825C433C6 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, kvalo@codeaurora.org, linux-kernel@vger.kernel.org, Bhaumik Bhatt Subject: [PATCH v2 0/6] Updates to MHI channel handling Date: Wed, 11 Nov 2020 11:21:07 -0800 Message-Id: <1605122473-12179-1-git-send-email-bbhatt@codeaurora.org> X-Mailer: git-send-email 2.7.4 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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, improved documentation and improving upon channel state machine handling in general. This set of patches was tested on arm64 architecture. v2: -Renamed the newly introduced APIs to mhi_start_transfer() / mhi_stop_transfer() -Added improved documentation to avoid confusion with the new APIs -Removed the __ prefix from mhi_unprepare_channel() API for consistency. Bhaumik Bhatt (6): 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 stop or start channel data transfers bus: mhi: core: Check execution environment for channel before issuing reset bus: mhi: core: Remove __ prefix for MHI channel unprepare function bus: mhi: Improve documentation on channel transfer setup APIs drivers/bus/mhi/core/init.c | 11 +- drivers/bus/mhi/core/internal.h | 12 +++ drivers/bus/mhi/core/main.c | 226 ++++++++++++++++++++++++++++------------ include/linux/mhi.h | 37 ++++++- 4 files changed, 215 insertions(+), 71 deletions(-) -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project