From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.0 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6BFBBC54FCF for ; Wed, 25 Mar 2020 16:03:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4426D20409 for ; Wed, 25 Mar 2020 16:03:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=mg.codeaurora.org header.i=@mg.codeaurora.org header.b="FyGLRHeq" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727990AbgCYQDj (ORCPT ); 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) 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.