Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp624264rwb; Tue, 25 Jul 2023 23:26:54 -0700 (PDT) X-Google-Smtp-Source: APBJJlGHz3jbSyrtTq82WdwzPjx6eQBjlqplAOjw92fWShq4GlwZva+h+ocmlx7YcFlnn+I33g4g X-Received: by 2002:a17:907:9488:b0:99b:cadd:c2ee with SMTP id dm8-20020a170907948800b0099bcaddc2eemr303106ejc.29.1690352814449; Tue, 25 Jul 2023 23:26:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690352814; cv=none; d=google.com; s=arc-20160816; b=NqgbVKhyMVk8dLSMgr+975H3rVrCrZgWNMiCGvwf0v+M8YR/NrGsM2Hwix1J8i8Gfc n31coaXFFsj46aRJ+H0qF+Q5YAsSCIZxxFeWgqTOa7nYTce53ausWJR3k2+GAkrsPFE2 v0Z4RVA/AcgQqQZlq4tvaFmE6ZuzGJAK+NWERMpMwTvlsqiDNQJCbud06GzQ91cxf4eA pB9rP8/F5u2R0Mf5XhLa3wPeciQ3IvGaoaL4tjkKgCP+0HuWE0XCYUGMjrtAfeRuP0Ja ERXmlT+X56djrilDMV98rbHBHPP6Y+LnL7ze638hFGuM7j1P9H4cRdMhO7wrJ+WJP9Lg 4txQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=iCCFaofrhVMqwBYo3TKELlCSqwwcDHLnYQ/hTResVvQ=; fh=qOLWMADmjpskZZqiaHWui739ryECemPmxE1EiT99mXI=; b=YScpBodOw2zxfMltdn9livKwhmuqgb5yMYd1TzFabTPzW0yCp0SrmrViUdhaJ13eYt LmRnwfAABIZVfcUHXtMivpo/+fF2EwcEl3+cH4zdzOpyvnn0Y4ARzDeFFCSfkVqBgIvF mGB0ksufF5Giutqi3kXuuuKKxPG7ayBxMKowzzTfSwr1hmybpKQwWwZALAu2JjCBNJOb bVG39oKc4PhbKp8PVnARXF2IqkksK0wGo52L6iFBbQKGmLfMQeCPSqk+vTStwpX8aNPR aNgZ3nDhSXSUKMjx7oes/+0BU2yjjXmfz192pG42yb0ocCK5pwsGSpkuxhqRfeumRp+j HJow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=eoJ3hEzs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t27-20020a170906269b00b009931472bdb8si8568698ejc.965.2023.07.25.23.26.27; Tue, 25 Jul 2023 23:26:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=eoJ3hEzs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231601AbjGZFbL (ORCPT + 99 others); Wed, 26 Jul 2023 01:31:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34310 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230270AbjGZFbJ (ORCPT ); Wed, 26 Jul 2023 01:31:09 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9BFC8268D; Tue, 25 Jul 2023 22:31:07 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 30F186140F; Wed, 26 Jul 2023 05:31:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 084EEC433C7; Wed, 26 Jul 2023 05:31:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1690349466; bh=KU3vQCx18WHSd2+PMtdOeua7nW32gCD9MnK8C/cdnks=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=eoJ3hEzs4f0cM6vPwtOXikVDCSCfVtsEoqKhIk1EgmKgA8IxYYn+yQCy4MIazZ5Uf eZRlS3MRQTnA5SaUd8SCV2UM1yV5YGhMphxgLHJU5awjiiJ7AJfD7xEaCsDUN7/oQQ d9oAeYvt7FhhtfHN+zK0c+aNq0pi0931oQ8GSNo/qqoB7wMvvZldHUK3S1RvwNKFvO /ciy+EHwd6Ue289pqI3+BVgYoh1Fu6xNPM7hOs3YfI2I1cQH5fDgmTOXsH0pJ2CYnJ gZ1tAtgBU8IIljgpo3xg2iTO2x+qe2vVyn+qLf2RfboEU1V0wDxPJmVDPVQR9wzyth j2CPp57XGPcXQ== Date: Tue, 25 Jul 2023 22:34:18 -0700 From: Bjorn Andersson To: Nitin Rawat Cc: powen.kao@mediatek.com, bvanassche@acm.org, alim.akhtar@samsung.com, adrian.hunter@intel.com, jejb@linux.ibm.com, stanley.chu@mediatek.com, asutoshd@codeaurora.org, quic_cang@quicinc.com, mani@kernel.org, martin.petersen@oracle.com, beanhuo@micron.com, ebiggers@google.com, agross@kernel.org, Arthur.Simchaev@wdc.com, konrad.dybcio@linaro.org, quic_ziqichen@quicinc.com, quic_nguyenb@quicinc.com, quic_narepall@quicinc.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Manish Pandey Subject: Re: [PATCH V1 2/2] scsi: ufs: ufs-qcom: check host controller state Message-ID: References: <20230725192710.26698-1-quic_nitirawa@quicinc.com> <20230725192710.26698-3-quic_nitirawa@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230725192710.26698-3-quic_nitirawa@quicinc.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 26, 2023 at 12:57:10AM +0530, Nitin Rawat wrote: > Check host controller state before sending hibern8 command. > Please read https://docs.kernel.org/process/submitting-patches.html#describe-your-changes > Signed-off-by: Manish Pandey Please read https://docs.kernel.org/process/submitting-patches.html#sign-your-work-the-developer-s-certificate-of-origin > Signed-off-by: Nitin Rawat > --- > drivers/ufs/host/ufs-qcom.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/drivers/ufs/host/ufs-qcom.c b/drivers/ufs/host/ufs-qcom.c > index 8d6fd4c3324f..95412e98a598 100644 > --- a/drivers/ufs/host/ufs-qcom.c > +++ b/drivers/ufs/host/ufs-qcom.c > @@ -1254,6 +1254,10 @@ static int ufs_qcom_clk_scale_notify(struct ufs_hba *hba, > struct ufs_pa_layer_attr *dev_req_params = &host->dev_req_params; > int err = 0; > > + /* check the host controller state before sending hibern8 cmd */ That is exactly what the two lines does, but the comment does not provide any insight into why this is done. Keeping a comment here seems relevant, please make sure that it adds value. Thanks, Bjorn > + if (!ufshcd_is_hba_active(hba)) > + return 0; > + > if (status == PRE_CHANGE) { > err = ufshcd_uic_hibern8_enter(hba); > if (err) > -- > 2.17.1 >