Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3468061pxk; Mon, 28 Sep 2020 19:41:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwdAJ06TD76Vexsm7hqzXj7USpoiftKdRTTKQO31b1C80R7nadcSUwsETwbTF/ydJjfqJ5M X-Received: by 2002:a17:907:2078:: with SMTP id qp24mr1817746ejb.500.1601347291557; Mon, 28 Sep 2020 19:41:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601347291; cv=none; d=google.com; s=arc-20160816; b=LaonApfqYlxqGPiKz9OccFNaZZlrAhwZ//MtAfI8X8+PIOUBPbbIQ+L80q10WDodh3 5JRebPQH6BV7IF4jA7H6C31MPvlAFR1dXf7JgxHhxTxaYLxKQLFkju+CD5CJ85JAERR2 2ENK9riG4grL336thFlU7jwNymQX+b7iAyLNRwralLbAx/4KRlmvlEN0k+2s8Ogwg/pT bIQs8hlVSBFnJuzQg4PgRzG+J42rkKmx6unMsoCDITYoQtvPc0txDFOTn4DaMhKlLEhk V7uWZaJFcNPKPpmxq4k9Vm17H1npupJpVpxIEAKbOFG+JkoLVqtrItBm0k5JZ9lxPHMI 9tMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:message-id:references:in-reply-to :subject:cc:to:from:date:content-transfer-encoding:mime-version :sender:dkim-signature; bh=xq3wf0X2ufcQl3gIMU5+oewCRuLye7B7HD/VCKzxjPM=; b=hDNByt2G9gMxL2eqkakhQMeV212Z9qj4CnDmiywtp6GJ4P0m1lTm0BK8c74Ir8fbYP Pw703+XtYo1Tj00Qge0bX6WCP6H4IwrNSxF+AF02/N/HWlThoKgi4Zz8lmItjp0TTOyl jZRZBRUL9qRUxl1wxK/knSRCbBdG6E3KKoFTg2FiEnFPnSXnngJudk62/aPfcg6YLZl7 Cugx8t1GYvnuiYsFh3X7VJparX2gmkkke24QhKJyls1ohKtwpmsNdlaMwBYLcmAmJGf8 pSNKn7QfxgYhZbtjLURZr6+ky10Hi9t5mRr1tDaG1C00oFy7R3rSyW8U4iED3wdggG63 ajFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=hdgQQcMv; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c16si1830940ejs.573.2020.09.28.19.40.59; Mon, 28 Sep 2020 19:41:31 -0700 (PDT) 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=@mg.codeaurora.org header.s=smtp header.b=hdgQQcMv; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727301AbgI2Cg3 (ORCPT + 99 others); Mon, 28 Sep 2020 22:36:29 -0400 Received: from m42-4.mailgun.net ([69.72.42.4]:47301 "EHLO m42-4.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725272AbgI2Cg3 (ORCPT ); Mon, 28 Sep 2020 22:36:29 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1601346988; h=Message-ID: References: In-Reply-To: Subject: Cc: To: From: Date: Content-Transfer-Encoding: Content-Type: MIME-Version: Sender; bh=xq3wf0X2ufcQl3gIMU5+oewCRuLye7B7HD/VCKzxjPM=; b=hdgQQcMvYXDRrFBy14vhRN5MxC5uVVVaav75qzGuJE5I4z/ZQ15NlziGGqoM0jRU6g8Drpn8 UTYlKoWuT9VHgQsXkfoyO3t5IOOdSCFYaoi6tk3Bn1485yznsaSdxi3Ppk6LTDdDAW7Zp0ED TgCHRBkF0MoXUzQgFKri/Pe80ag= X-Mailgun-Sending-Ip: 69.72.42.4 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 smtp-out-n04.prod.us-east-1.postgun.com with SMTP id 5f729d8abe59ebabf3085adb (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Tue, 29 Sep 2020 02:35:54 GMT Sender: nguyenb=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 8671BC43387; Tue, 29 Sep 2020 02:35:53 +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=-2.9 required=2.0 tests=ALL_TRUSTED,BAYES_00, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.codeaurora.org (localhost.localdomain [127.0.0.1]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: nguyenb) by smtp.codeaurora.org (Postfix) with ESMTPSA id AD975C433C8; Tue, 29 Sep 2020 02:35:52 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Mon, 28 Sep 2020 19:35:52 -0700 From: nguyenb@codeaurora.org To: cang@codeaurora.org, asutoshd@codeaurora.org, martin.petersen@oracle.com, linux-scsi@vger.kernel.org Cc: linux-arm-msm@vger.kernel.org, Alim Akhtar , Avri Altman , "James E.J. Bottomley" , Stanley Chu , Bean Huo , Bart Van Assche , linux-kernel@vger.kernel.org Subject: Re: [PATCH v1 1/1] scsi: ufshcd: Properly set the device Icc Level In-Reply-To: <5c9d6f76303bbe5188bf839b2ea5e5bf530e7281.1598923023.git.nguyenb@codeaurora.org> References: <5c9d6f76303bbe5188bf839b2ea5e5bf530e7281.1598923023.git.nguyenb@codeaurora.org> Message-ID: <0edf03ca16e2ee6e4ed8e5ac72752a94@codeaurora.org> X-Sender: nguyenb@codeaurora.org User-Agent: Roundcube Webmail/1.3.9 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020-08-31 18:19, Bao D. Nguyen wrote: > UFS version 3.0 and later devices require Vcc and Vccq power supplies > with Vccq2 being optional. While earlier UFS version 2.0 and 2.1 > devices, the Vcc and Vccq2 are required with Vccq being optional. > Check the required power supplies used by the device > and set the device's supported Icc level properly. > > Signed-off-by: Can Guo > Signed-off-by: Asutosh Das > Signed-off-by: Bao D. Nguyen > --- > drivers/scsi/ufs/ufshcd.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c > index 06e2439..fdd1d3e 100644 > --- a/drivers/scsi/ufs/ufshcd.c > +++ b/drivers/scsi/ufs/ufshcd.c > @@ -6845,8 +6845,9 @@ static u32 > ufshcd_find_max_sup_active_icc_level(struct ufs_hba *hba, > { > u32 icc_level = 0; > > - if (!hba->vreg_info.vcc || !hba->vreg_info.vccq || > - !hba->vreg_info.vccq2) { > + if (!hba->vreg_info.vcc || > + (!hba->vreg_info.vccq && hba->dev_info.wspecversion >= 0x300) || > + (!hba->vreg_info.vccq2 && hba->dev_info.wspecversion < 0x300)) { > dev_err(hba->dev, > "%s: Regulator capability was not set, actvIccLevel=%d", > __func__, icc_level); Hello, Thank you for the comments on this change so far. It's been idle for some time, so I would like to ping and see if there is any other comment. Regards, Bao