Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp617073pxx; Mon, 26 Oct 2020 17:03:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxIl1derNFWG/3Huo/QTwl7Za/UUZNYua0WFTDyuvCfXsBKCJBnXv5UlyFGvQfYcng7WVA2 X-Received: by 2002:aa7:d702:: with SMTP id t2mr9635869edq.196.1603756981453; Mon, 26 Oct 2020 17:03:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603756981; cv=none; d=google.com; s=arc-20160816; b=v8LNGdBrKXF0fzIg6RFqPenaQs5vVtSyMiSd47UzmG2I5EeQkjXDdIbdPaiFHT+6O7 T7wVLzWplolERPvSdN3CcCmzOVaZLYujgjPHdGxdq4GZqWSQ4T4Y+eXC1D3iK/MrKhIe I2SMy1ihxySJZ+euGHQcWkGghWkSSy00sRQg8Yw//q9uDIcpIwS/+/UIYQ2AWt+77Voy fLKoeCiDXhmdvR/Mrk40f2+yKBPNpE3UF/e0KhLwqQTqefdENVTFcdSwMfr6NBDJUV+u CxoMC77ufMA/2bvueKG9i+0Gqs4C2b3V0atruQpbYy+K0O8cuyokrCJ1LhsRG3rGfGGs jaXg== 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=oFDR6qmZLnKNEKIuDsewlJH60yHYnynf6ZZ7kWQJihw=; b=vMOfYT4GXughg7ekKrEn+t8tJ54wf8xo8weWSUD020OKpnrQD9zXBMBmTHFPaWrtLT /MqYGhTAHR/AO1qss0K0j/WQeC4O4Its28LHoUJOqgwkG/yqo0lfbwuCe5v/vhn6Fk6t O7uxzns2Qvrb8yXVAcwWogTY0t6vX/LoEv1LVmmoemVDgJbXkx2ynsZDsufVKSAdDbwS 74OL1HRES7P2Ja6Nm57N8mbefrg3th/6QoWXH/4kNe70pxuvCQ/UbZNH1byq8PS6Ol4E Oc3JzwNg68LIFUf7wMAq+lz7pUJwErw8dmwV+DOrjS+fA4n/+1TVc/VOOf8rwdfjbRF+ iuag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=JOMCXQK0; 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 n9si8234788ejx.364.2020.10.26.17.02.38; Mon, 26 Oct 2020 17:03:01 -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=JOMCXQK0; 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 S1726144AbgJZUsp (ORCPT + 99 others); Mon, 26 Oct 2020 16:48:45 -0400 Received: from m42-4.mailgun.net ([69.72.42.4]:27668 "EHLO m42-4.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726060AbgJZUso (ORCPT ); Mon, 26 Oct 2020 16:48:44 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1603745323; h=Message-ID: References: In-Reply-To: Subject: Cc: To: From: Date: Content-Transfer-Encoding: Content-Type: MIME-Version: Sender; bh=oFDR6qmZLnKNEKIuDsewlJH60yHYnynf6ZZ7kWQJihw=; b=JOMCXQK0MlQl4xJ40CSJCj7eJ7X2UGCEQ8Dt9hmVp4Sn0o0iDGPHGdxcgG/yll6E4R6n4cW0 vNe5eU+3zcrEW1Af0Gn9ZoQSqF5307jAYR4PNDD869szsNMg/jD1/obnKw850fC1mKNvQLIX GCeMn1lO5X7zhM3c8tWfS/GJkbQ= 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-n05.prod.us-east-1.postgun.com with SMTP id 5f97362b2421c5ebfbd5f9de (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Mon, 26 Oct 2020 20:48:43 GMT Sender: nguyenb=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 57F53C43382; Mon, 26 Oct 2020 20:48:42 +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 A4A3FC433FE; Mon, 26 Oct 2020 20:48:41 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Mon, 26 Oct 2020 13:48:41 -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: 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, Could you please help review? Thank you.