Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3326383pxb; Mon, 16 Nov 2020 11:27:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJxEyTTiHACIUp6aT2MOrEMJQjdiihCCxpcOPpckwQkpkWTirn1x0jD8EOaaSHqHQu2k7GU2 X-Received: by 2002:a05:6402:1746:: with SMTP id v6mr14146583edx.90.1605554834537; Mon, 16 Nov 2020 11:27:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605554834; cv=none; d=google.com; s=arc-20160816; b=sF997rmQzClX8BG5gB8mjduMb3zOa8w2DctAOFz4YAeMuHQSs4g5o3INICpxzMSMXb kfItsfnuaB2cnfSCblHCGQoNR452MlkOiBXSTEqmKJ/tEUPGM6mmVykSK5BkWRVcarHu 6AU7CEwUHXkn0/hMTRP6ecCW/VqZzrORG349zJtg3WEWXwmWQirsonuTgMYigbQCUXWU 2I1C/+AiFE+qFZsiQ8vDw6nyUSYijDHkLGpyMid7vSXrV2ixTkY/hKOJwefBEoe2awko wFfGFTdlo7TJAs7VMBjczNgJ7Fi5SCGTK9VIQW6U1+hpdAqxMg2cHTGAnndRgggZ9qVO llpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=l2bSY9WlU5lc2DfnpO44O14MxA4pcoXlRl5Cy2DxvQ8=; b=nwBN7jqNFcER7MymuKSISWSjCAWdytcBbrNsje6nDvMLLBwAq6XK4igw8r5KF79kud ywt58LSSxVNNcGg36pePmUpJicazpzHmuER/ikKE0uOjXQy+pZYbwvHgYKHoj6xIXqdO ViqYbCiDsUXKGSpWA3CMISHHouNsLgJ4g2hULXg29YCzkRIFWUZ85bWR5exwGUYVq9NZ fyl1t6fsM2d1o4Aud2DzCkZWALOnQyOQTaRoFQMXryw1DG1i6awo+V0jsRZBqMgibJmg ycQqqAg+JQ/o2geuHL1gpvumUdCBHHcrvYn2kKhtQxOLgQLGoyImw75tHx8HHPv+W9/R 2Iig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YwTPqcph; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c13si12293441edw.271.2020.11.16.11.26.51; Mon, 16 Nov 2020 11:27:14 -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=@linaro.org header.s=google header.b=YwTPqcph; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726768AbgKPHNs (ORCPT + 99 others); Mon, 16 Nov 2020 02:13:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33524 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726524AbgKPHNs (ORCPT ); Mon, 16 Nov 2020 02:13:48 -0500 Received: from mail-pg1-x544.google.com (mail-pg1-x544.google.com [IPv6:2607:f8b0:4864:20::544]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 02C5EC0613CF for ; Sun, 15 Nov 2020 23:13:48 -0800 (PST) Received: by mail-pg1-x544.google.com with SMTP id q28so1902408pgk.1 for ; Sun, 15 Nov 2020 23:13:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=l2bSY9WlU5lc2DfnpO44O14MxA4pcoXlRl5Cy2DxvQ8=; b=YwTPqcph+gHMFI1XrgFqiQAF7ekxmPFcPuYN2ccqa4Gk/mrerN7PNERD6e7z4rNWEu MIGLzn+h/Rud0brzcDtMbGpNZUWU6nGxWeN7J71j8kL4QxAO9iEbB2IGHVz51JoOSt7Z TD6/7c9TeI7egpbYMyrWd1W2ESgtRUIEGV+EyW+dyUJZmulbSneyyTWMG/sx71folXyp fBeB4/iIEdQAR/HJgK9cr70gHzSM6y9meQPiLxOt9k22FjwsfARVTmspl5sS8f0K1H8K NyFn74WLfzM7l1d1lm1RYaXRFoCDdhvnqQ+OSzN33Q1mmiHz6p14tyQwNeALNx1p5dTc oVbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=l2bSY9WlU5lc2DfnpO44O14MxA4pcoXlRl5Cy2DxvQ8=; b=Lnrt6JDrksaMaxXBW0sbm3kXEexhaAiTkcUYqQR7/qFXpPrL7gp9lFO3nodZnPL0tP lJBT7AHlBxsFshLomi+aqyNPH1RsbutGr8QHidZnA9IZ+9voorqo9M3zY/b6yXwaduyh 619ziusniUrccThMPl8c8u1k70z1/bcHXH+Xh1BB/QqDiLAFwozj2T29IN97VNS4IbhW AYA7lbVbdnbdX14CMRIhRiF0Ga7pnu9F6PIJJKmYS4SwVfkkyXnZGCPL1GLW6WxZrqVR 0fDcQKyKwAMDBsjtPeTtU3f8vn0ahFD+tt9mPd7eirCqZLML56G9zIAwmAXnB6C8beAu 6RQg== X-Gm-Message-State: AOAM530HKMVN7nzTMwaFXNh6iekqV1YsRJojS79v112XGH5+dBZOXdPR 5tXKgbE7Py7waht7Q6fYIKVh X-Received: by 2002:a17:90b:100f:: with SMTP id gm15mr13664333pjb.63.1605510827491; Sun, 15 Nov 2020 23:13:47 -0800 (PST) Received: from Mani-XPS-13-9360 ([2409:4072:618e:9b0a:75fd:1290:bf5c:a350]) by smtp.gmail.com with ESMTPSA id y3sm14846130pgq.40.2020.11.15.23.13.42 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 15 Nov 2020 23:13:46 -0800 (PST) Date: Mon, 16 Nov 2020 12:43:39 +0530 From: Manivannan Sadhasivam To: Bhaumik Bhatt 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 Subject: Re: [PATCH v2 1/6] bus: mhi: core: Allow receiving a STOP channel command response Message-ID: <20201116071339.GI3926@Mani-XPS-13-9360> References: <1605122473-12179-1-git-send-email-bbhatt@codeaurora.org> <1605122473-12179-2-git-send-email-bbhatt@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1605122473-12179-2-git-send-email-bbhatt@codeaurora.org> User-Agent: Mutt/1.9.4 (2018-02-28) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 11, 2020 at 11:21:08AM -0800, Bhaumik Bhatt wrote: > Add support to receive the response to a STOP channel command to the > MHI bus. If a client would like to STOP a channel instead of issuing > a RESET to it, this would provide support for it. > > Signed-off-by: Bhaumik Bhatt > --- > drivers/bus/mhi/core/init.c | 5 +++-- > drivers/bus/mhi/core/main.c | 5 +++++ > 2 files changed, 8 insertions(+), 2 deletions(-) > > diff --git a/drivers/bus/mhi/core/init.c b/drivers/bus/mhi/core/init.c > index 8cefa35..4d34d62 100644 > --- a/drivers/bus/mhi/core/init.c > +++ b/drivers/bus/mhi/core/init.c > @@ -1267,8 +1267,9 @@ static int mhi_driver_remove(struct device *dev) > > mutex_lock(&mhi_chan->mutex); > > - if (ch_state[dir] == MHI_CH_STATE_ENABLED && > - !mhi_chan->offload_ch) > + if ((ch_state[dir] == MHI_CH_STATE_ENABLED || > + ch_state[dir] == MHI_CH_STATE_STOP) && This enum is not defined in this patch so it'll break. Please add a separate patch which introduces the new state enums alone and then have patches 1/2 as a followup. Also this change is not belonging to this commit I believe. Thanks, Mani > + !mhi_chan->offload_ch) > mhi_deinit_chan_ctxt(mhi_cntrl, mhi_chan); > > mhi_chan->ch_state = MHI_CH_STATE_DISABLED; > diff --git a/drivers/bus/mhi/core/main.c b/drivers/bus/mhi/core/main.c > index f953e2a..ad881a1 100644 > --- a/drivers/bus/mhi/core/main.c > +++ b/drivers/bus/mhi/core/main.c > @@ -1194,6 +1194,11 @@ int mhi_send_cmd(struct mhi_controller *mhi_cntrl, > cmd_tre->dword[0] = MHI_TRE_CMD_RESET_DWORD0; > cmd_tre->dword[1] = MHI_TRE_CMD_RESET_DWORD1(chan); > break; > + case MHI_CMD_STOP_CHAN: > + cmd_tre->ptr = MHI_TRE_CMD_STOP_PTR; > + cmd_tre->dword[0] = MHI_TRE_CMD_STOP_DWORD0; > + cmd_tre->dword[1] = MHI_TRE_CMD_STOP_DWORD1(chan); > + break; > case MHI_CMD_START_CHAN: > cmd_tre->ptr = MHI_TRE_CMD_START_PTR; > cmd_tre->dword[0] = MHI_TRE_CMD_START_DWORD0; > -- > The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, > a Linux Foundation Collaborative Project >