Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp1212716ybj; Thu, 7 May 2020 18:01:49 -0700 (PDT) X-Google-Smtp-Source: APiQypI1ljKu5X9x8ybz4udXdh05nBxgUwGuZtjOOvOH4+xxtmY0lJzO6cKXT3l8XYU1FjHefObm X-Received: by 2002:a05:6402:206f:: with SMTP id bd15mr142166edb.24.1588899709001; Thu, 07 May 2020 18:01:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588899708; cv=none; d=google.com; s=arc-20160816; b=E4aDULySAbrV8LMJ44f1iqn2EtlapZdmeGI9C5EWqBB6CcXrYGD+b0b0QixhTZBv0w zqerNsDgt0EAnawRd/Dpo+DpwL0ylgdeWJsJpGiKZR3Wu4dUVFLZEazD/TLBkd6ftXBx DkXyz9QJzaLG/GLGCKA6YMd5TJQRgncvt0KxNzDZllvY+RJW+ZlzExDoL+sECzaQnPz4 eslbLNML9xAgIhnCFNPZMpvHbs8lBP/ouPfjwj7yl7u9YDv7NwkrZSVSfK7iIXbbaGxD Ld/enmm7D6qERi5zfn2u7+AhePSRPLGSSkeN/cEra98EfJnCRleSXimvFNoNQsIFOnXw Oj1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:from:references:cc:to:subject; bh=WB6WTJjgZ3Lt500KY4uUkwBVNYsShOidG0IimHCe/II=; b=dOe7SYuszBx8ootfGFuxkZIauxek7Xm0s3B1MpdMqipnALvf5HFEMSc1tX+uDyc7yZ H9iWKVE7KuCS5dIRTX1NGaDlaPG++mqGbIS+4q/YsnJS8uLGareXzEj/doy3UpUr/t32 7ulJdkB4qKv2JIs0HJC0dG0QJ7QxcIxid2g0P+WBrYsBZm8+Bogp78T3V6y8qz1khu1Z oZxTbx58qvwgYjNcuLIY0chsrox9E7G+dB8/orho1SMF0HzgLZn7Pm9kg+JaW6mUbX0/ 6xlLvPTAXXQfdcZVTxXssSlyukPHo5kauw8rNIHHzSgNcE/KztJb6w90cshYM5cDjAZL aj3g== ARC-Authentication-Results: i=1; mx.google.com; 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 dv13si43842ejb.458.2020.05.07.18.01.24; Thu, 07 May 2020 18:01:48 -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; 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 S1726712AbgEHA75 (ORCPT + 99 others); Thu, 7 May 2020 20:59:57 -0400 Received: from mail-pf1-f194.google.com ([209.85.210.194]:43356 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726509AbgEHA74 (ORCPT ); Thu, 7 May 2020 20:59:56 -0400 Received: by mail-pf1-f194.google.com with SMTP id v63so25521pfb.10; Thu, 07 May 2020 17:59:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=WB6WTJjgZ3Lt500KY4uUkwBVNYsShOidG0IimHCe/II=; b=lV/rB+EHlZVDb1IcqsDUzeO4HR7+kOMXX+HR/b3nZaBhlaY6ww7vCI2eM/p4+3Eo4h xSo7jqZpkB1IUzNpzOINWeBQjdQxEE0KahPWtoUeq5qwVN6AAsjymOGTnzZH0p/IVK20 hum7vnqpqOnFQq9b++7Rc6yCFFa4Gi0BXB6CGN7LnZZtZIakqjeEakhuf+0biqEGgyRp 5slLPMjhfr13N18nL272bvcLVO8loGIe6IDiaVOtQ+rXnh8sNHt7Mw6BQMnTqMbkXTkE C+NNF3PU+6Va35uGIKxO0xKjUKAfh4L1TwC3LP3u1pQxogfj31RKPZiODiKvOlKOLsMK aFJQ== X-Gm-Message-State: AGi0PuazBPuK7kyOwUuioGpV8fiNypXPZjLNWPByl64hs0Z33k78BMmq m4flY+zzCz1lgMP+HxG/RCw= X-Received: by 2002:a62:7547:: with SMTP id q68mr71602pfc.55.1588899594341; Thu, 07 May 2020 17:59:54 -0700 (PDT) Received: from ?IPv6:2601:647:4000:d7:8ce8:d4c:1f4f:21e0? ([2601:647:4000:d7:8ce8:d4c:1f4f:21e0]) by smtp.gmail.com with ESMTPSA id w2sm914559pja.53.2020.05.07.17.59.52 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 07 May 2020 17:59:53 -0700 (PDT) Subject: Re: [RESENT PATCH RFC v3 1/5] scsi; ufs: add device descriptor for Host Performance Booster To: huobean@gmail.com, alim.akhtar@samsung.com, avri.altman@wdc.com, asutoshd@codeaurora.org, jejb@linux.ibm.com, martin.petersen@oracle.com, stanley.chu@mediatek.com, beanhuo@micron.com, tomas.winkler@intel.com, cang@codeaurora.org, rdunlap@infradead.org Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, hch@infradead.org References: <20200504142032.16619-1-beanhuo@micron.com> <20200504142032.16619-2-beanhuo@micron.com> From: Bart Van Assche Autocrypt: addr=bvanassche@acm.org; prefer-encrypt=mutual; keydata= mQENBFSOu4oBCADcRWxVUvkkvRmmwTwIjIJvZOu6wNm+dz5AF4z0FHW2KNZL3oheO3P8UZWr LQOrCfRcK8e/sIs2Y2D3Lg/SL7qqbMehGEYcJptu6mKkywBfoYbtBkVoJ/jQsi2H0vBiiCOy fmxMHIPcYxaJdXxrOG2UO4B60Y/BzE6OrPDT44w4cZA9DH5xialli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o998alUfn5XU0RQDYdwp6/kMEXMdmT oH0F0xB3SQ8WVSXA9rrc4EBvZruWQ+5/zjVrhhfUAx12CzL4oQ9Ro2k45daYaonKTANYG22y //x8dLe2Fv1By4SKGhmzwH87uXxbTJAUxiWIi1np0z3/RDnoVyfmfbbL1DY7zf2hYXLLzsJR mSsED/1nlJ9Oq5fALdNEPgDyPUerqHxcmIub+pF0AzJoYHK5punqpqfGmqPbjxrJLPJfHVKy goMj5DlBMoYqEgpbwdUYkH6QdizJJCur4icy8GUNbisFYABeoJ91pnD4IGei3MTdvINSZI5e Message-ID: <6d06ec34-04d2-93ff-1ff5-dc1317c3d060@acm.org> Date: Thu, 7 May 2020 17:59:52 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <20200504142032.16619-2-beanhuo@micron.com> Content-Type: text/plain; charset=utf-8 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 2020-05-04 07:20, huobean@gmail.com wrote: > diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c > index 698e8d20b4ba..de13d2333f1f 100644 > --- a/drivers/scsi/ufs/ufshcd.c > +++ b/drivers/scsi/ufs/ufshcd.c > @@ -6627,6 +6627,17 @@ static int ufs_get_device_desc(struct ufs_hba *hba) > goto out; > } > > + if (desc_buf[DEVICE_DESC_PARAM_UFS_FEAT] & 0x80) { > + hba->dev_info.hpb_control_mode = > + desc_buf[DEVICE_DESC_PARAM_HPB_CTRL_MODE]; > + hba->dev_info.hpb_ver = > + (u16) (desc_buf[DEVICE_DESC_PARAM_HPB_VER] << 8) | > + desc_buf[DEVICE_DESC_PARAM_HPB_VER + 1]; > + dev_info(hba->dev, "HPB Version: 0x%2x\n", > + hba->dev_info.hpb_ver); > + dev_info(hba->dev, "HPB control mode: %d\n", > + hba->dev_info.hpb_control_mode); > + } > /* > * getting vendor (manufacturerID) and Bank Index in big endian > * format Please introduce a symbolic name for the constant 0x80, e.g. UFS_FEATURE_HPB. Please use get_unaligned_be16() instead of open-coding it. Thanks, Bart.