Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp2090757ybg; Thu, 24 Oct 2019 04:42:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqyLb9k2MANNmNy+l6m2SCw6C5fRFq7Xb4POfBXANMmGkTZ3wMgS5vVet9ReztF4zJSHyc3o X-Received: by 2002:a50:8871:: with SMTP id c46mr24493316edc.24.1571917347503; Thu, 24 Oct 2019 04:42:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571917347; cv=none; d=google.com; s=arc-20160816; b=nSIQMqIgp5leglMZByEek8dpmI5H5A21NiYE2VVi+oS4EbInKKpJAKrc2lO8HZbZnU zGhsW6ErpBLUpwVaJXQ2HJQL/oltDKTD2EOt7ESwNtac/0/AlHsBUryUF2loB89lxWJB daqgnm5/yk5pJ8JjE0d87Yg3m1DRiN3KeRksDWAYzYSj3+G8wlxg35WGMmc1/EPPR6Pw F9XcoD5IGXYRUTjngntegNZy0cJHxNBt78C1wxKU6g98l945J1KIJw6MEiCh7e8w0B5W VkNScqBrZ44A06i43rjW6lfdvTzgxDP0e5Plq7ostRhBcOzBAOKGIeSod4PRUXC0uUeT HYZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:message-id:references :in-reply-to:subject:cc:to:from:date:content-transfer-encoding :mime-version:dkim-signature:dkim-signature; bh=bYYn/1ik+eHeCORaYGftNkcggquBwKTBKz7ABWEMrWs=; b=X7+0Tk1kd944X98WtI5ZxGeJjgSKag5Oxpg1fakkWi+LycsdJPK3lsKd2ML3l2Le+o WXA4PoEz/cV38FVcya9qCbEhEn92LSJf+gqu1eCI45flDt7g4f5bRYTxCZOmidCQGkCW ytCfqDiCEkqYHWy9NE+tko8KiTgqEY50OO6d7SIbAphs5Ncx6/5D/TlkGm1S5xY84ZbE iWRkmOLPQwowgYitcfT8Sk8KyKPIuknggArsT8LFjd09g0v2lEkrhamxg9zcPjj8RSJl VdNAVc4JsKiPmXYg/Tg7hD+9/wlfwnsJ26G9a2thn5ek8yWSQPPcs0dcztLahlghtNsC u1SQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=jGBop7eu; dkim=pass header.i=@codeaurora.org header.s=default header.b=n6PbH4Lr; 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 b13si409240edy.320.2019.10.24.04.42.03; Thu, 24 Oct 2019 04:42:27 -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=pass header.i=@codeaurora.org header.s=default header.b=jGBop7eu; dkim=pass header.i=@codeaurora.org header.s=default header.b=n6PbH4Lr; 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 S1726167AbfJWQrR (ORCPT + 99 others); Wed, 23 Oct 2019 12:47:17 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:55582 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725887AbfJWQrR (ORCPT ); Wed, 23 Oct 2019 12:47:17 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id B562960DF8; Wed, 23 Oct 2019 16:47:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1571849236; bh=4yOyFFubHSQ9A4eUC1YnKg7Z3r8l1kgCdVSXI5b4TLo=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=jGBop7eu5StPxx2pdr0Lwpww1VtWGFrvhM5fXcaAOXO8981KaQM9OAwiSf2N6k9iR yUQMy/lgsQCQ6wWxci8UHDDXKWKbuMJZQOX5QocBul6iu/yFZ8lotPz6/xRoGPVCI3 dxxaeg7qIUojwDvfrWD/EQdWwk9j2XuIOr+pbJbc= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_INVALID,DKIM_SIGNED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.codeaurora.org (Postfix) with ESMTP id 3811A60D95; Wed, 23 Oct 2019 16:47:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1571849233; bh=4yOyFFubHSQ9A4eUC1YnKg7Z3r8l1kgCdVSXI5b4TLo=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=n6PbH4LrMTTZ85k4t1ufgBf894XU0p6WMppYmAXo6iJp33MRWYZuDVBRwC7/tQQxt XFO1touKFIe4uNLMTXEO6T840Lyk4rq0aZr4Y0xQrFIIyn7IKAZ2BfnNIV1z6Kye2A p9YB4JukZpnKEdsxfeawdCfqcEb4KWD0eQubf3HU= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 23 Oct 2019 09:47:13 -0700 From: asutoshd@codeaurora.org To: cang@codeaurora.org, rnayak@codeaurora.org, vinholikatti@gmail.com, jejb@linux.vnet.ibm.com, martin.petersen@oracle.com Cc: linux-scsi@vger.kernel.org, kernel-team@android.com, saravanak@google.com, salyzyn@google.com, Andy Gross , Alim Akhtar , Avri Altman , Pedro Sousa , "James E.J. Bottomley" , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-scsi-owner@vger.kernel.org Subject: Re: [PATCH v2 2/2] scsi: ufs-qcom: enter and exit hibern8 during clock scaling In-Reply-To: <1571848785-27698-2-git-send-email-asutoshd@codeaurora.org> References: <1571848785-27698-1-git-send-email-asutoshd@codeaurora.org> <1571848785-27698-2-git-send-email-asutoshd@codeaurora.org> Message-ID: X-Sender: asutoshd@codeaurora.org User-Agent: Roundcube Webmail/1.2.5 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019-10-23 09:39, Asutosh Das wrote: > Qualcomm controller needs to be in hibern8 before scaling clocks. > This change puts the controller in hibern8 state before scaling > and brings it out after scaling of clocks. > > Signed-off-by: Asutosh Das > --- > drivers/scsi/ufs/ufs-qcom.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/drivers/scsi/ufs/ufs-qcom.c b/drivers/scsi/ufs/ufs-qcom.c > index a5b7148..d117088 100644 > --- a/drivers/scsi/ufs/ufs-qcom.c > +++ b/drivers/scsi/ufs/ufs-qcom.c > @@ -1305,6 +1305,9 @@ static int ufs_qcom_clk_scale_notify(struct > ufs_hba *hba, > int err = 0; > > if (status == PRE_CHANGE) { > + err = ufshcd_uic_hibern8_enter(hba); > + if (err) > + return err; > if (scale_up) > err = ufs_qcom_clk_scale_up_pre_change(hba); The error handling is not done here. > else > @@ -1324,6 +1327,7 @@ static int ufs_qcom_clk_scale_notify(struct > ufs_hba *hba, > dev_req_params->hs_rate, > false); > ufs_qcom_update_bus_bw_vote(host); > + ufshcd_uic_hibern8_exit(hba); > } > > out: In the post-change condition as well, the error handling is not done. On error, it should be brought out of hibernate. I'll put up another change fixing that. -asd