Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp760502ybb; Wed, 25 Mar 2020 09:05:19 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsdWDWWx8U9A/DwnAKGI4ny/kIXXCCHsUyAOA8xLyc+pByaLy8FHbXM1cn75V4HXOmuqwdP X-Received: by 2002:a05:6830:1f5a:: with SMTP id u26mr3061963oth.208.1585152319338; Wed, 25 Mar 2020 09:05:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585152319; cv=none; d=google.com; s=arc-20160816; b=tnNmmCu5qL+dbNBByFVKCOA4/ipygJccBhc5bR4lN8MYQzUK9vaVR1Sf4fwj+oCqOD s+mkmL95qFEFwbVzeW86klZ8neCXaFRIjQWm9Q+RPFwFRCbTpPtfhy84IpR1TORhnyRp IkVGckq+BZEFD/CKKmWFRQUnz4Lg1lEKphoTJV2P2AXAIY7aspw9aqE7eXJ0xzCBhOfY BCSvcOez3NwISG1DeQYTOloDm9oPTmXdJd1lFc9bN+xxccZa9lVGPT1iK1JpvyIAUgox sVGF+yC1NsFkp53xr5cHwGt9TbeEnMjpbXcih2JZlP/HjoVAO95ltf54KLpd76xHZ6Ar UR7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dmarc-filter :dkim-signature; bh=pdz5ZNlGXa/lJUXRST4+WuKTPrddM+7IkSwGYGumoXc=; b=IPHDvPOQjNI4k3QSbhX4H2audi9FgPHu+WN5x4wjOUn7rLLUEAsg2iN/bT87VHcPe7 +C2Zthtl30zUift+MiCE9s0swOqVEt+DB3vh1K9P20Jx+8rINYVYeZGk0xscibcS7HMe Disv+QPgadZxrfOw0+jJqHQNkp63Rcrf6tlDtMzxc3hejdlBWOxrePCbvzpJlTzwppH3 sgahu0gvundrSHxsrH/y8nH3kFuNO80KukOwecL8LISGB3jCiQTpIVsq4YAG1J7lHQ/f BQsuetifoO/s7taJuZNO7xb+WqQDR5vlzgyJIYTk3+ardtJo345ebpGjPbs1tXgi9Sl7 xA+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=FyGLRHeq; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p187si1647524oop.28.2020.03.25.09.04.49; Wed, 25 Mar 2020 09:05:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=FyGLRHeq; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727768AbgCYQDj (ORCPT + 99 others); Wed, 25 Mar 2020 12:03:39 -0400 Received: from mail27.static.mailgun.info ([104.130.122.27]:38646 "EHLO mail27.static.mailgun.info" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727386AbgCYQDj (ORCPT ); Wed, 25 Mar 2020 12:03:39 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1585152218; h=Content-Transfer-Encoding: Content-Type: In-Reply-To: MIME-Version: Date: Message-ID: From: References: Cc: To: Subject: Sender; bh=pdz5ZNlGXa/lJUXRST4+WuKTPrddM+7IkSwGYGumoXc=; b=FyGLRHeqA9N4V/Gt8+hMlaMfZvCLhXV3I+67mu78RNz2JfnkL+tFxOay5GyKkT84zpr2GU9J 34ifwNuoA20zScdJI1/12ZUD1IFLJwBdCC3nDbiLjUYJUb8PXbvf1cGFvneImgmrx5Yv+ymv k4n/p45dFXUq2wYLTGh6VeHFvJ4= X-Mailgun-Sending-Ip: 104.130.122.27 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 mxa.mailgun.org with ESMTP id 5e7b80d9.7f9bf7e63b58-smtp-out-n02; Wed, 25 Mar 2020 16:03:37 -0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 4632FC433D2; Wed, 25 Mar 2020 16:03:36 +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=-1.0 required=2.0 tests=ALL_TRUSTED,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.0 Received: from [10.226.58.28] (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: jhugo) by smtp.codeaurora.org (Postfix) with ESMTPSA id CF161C433F2; Wed, 25 Mar 2020 16:03:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org CF161C433F2 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=none smtp.mailfrom=jhugo@codeaurora.org Subject: Re: [PATCH v3 4/7] bus: mhi: core: Drop the references to mhi_dev in mhi_destroy_device() To: Manivannan Sadhasivam , gregkh@linuxfoundation.org, davem@davemloft.net Cc: smohanad@codeaurora.org, kvalo@codeaurora.org, bjorn.andersson@linaro.org, hemantk@codeaurora.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org References: <20200324061050.14845-1-manivannan.sadhasivam@linaro.org> <20200324061050.14845-5-manivannan.sadhasivam@linaro.org> From: Jeffrey Hugo Message-ID: <0c9be20f-c349-a5b7-cbf8-a3edaffc2d70@codeaurora.org> Date: Wed, 25 Mar 2020 10:03:32 -0600 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <20200324061050.14845-5-manivannan.sadhasivam@linaro.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/24/2020 12:10 AM, Manivannan Sadhasivam wrote: > For some scenarios like controller suspend and resume, mhi_destroy_device() > will get called without mhi_unregister_controller(). In that case, the > references to the mhi_dev created for the channels will not be dropped > but the channels will be destroyed as per the spec. This will cause issue > during resume as the channels will not be created due to the fact that > mhi_dev is not NULL. > > Hence, this change decrements the refcount for mhi_dev in > mhi_destroy_device() for concerned channels and also sets mhi_dev to NULL > in release_device(). > > Reported-by: Carl Huang > Signed-off-by: Manivannan Sadhasivam Reviewed-by: Jeffrey Hugo -- Jeffrey Hugo Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.