Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp166523pxb; Wed, 24 Feb 2021 22:16:00 -0800 (PST) X-Google-Smtp-Source: ABdhPJxHZrwxGDEfsIGfa00UjrP+ZLCNnJUu6ANNrjIY+WTMETIo9n8uc95rbCn4QqRGOofI3ard X-Received: by 2002:a17:906:5495:: with SMTP id r21mr1199521ejo.59.1614233760797; Wed, 24 Feb 2021 22:16:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614233760; cv=none; d=google.com; s=arc-20160816; b=KD4nt5sEtVdreHNlE2wyWcL/lHHeRbH04eSn89BinpOJ+bOw9LlhhLg9J3GJsTHKS6 4gKe+2oSo/THmOz0R7blLFc729MVnK2GJ+nbTZRjdwtt2kgAlkxuU2tR4rxglIKRfS/8 1kDYP9gjUBzeqfuPiek8K+FHFN6vGC3sJ+yFve3bhdu80KoMSoTSkVYxTwuhvRXBAZwg N8rhbH+YwNUttupOh5q4wGv4Z99x3vUcxJqV8I1An4JEQPGyAA/66mCt3PPFF1JdhUzV wJAO4IZOAU1rmVY3VeuVDxkoV76nAq00pCoCcUTOpuaFmwrHfjH0e1IL7FAMzexcrgCW fIFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:dlp-filter:cms-type :content-transfer-encoding:date:message-id:in-reply-to:cc:to:from :sender:reply-to:subject:mime-version:dkim-signature:dkim-filter; bh=PUJ1RF9kKOIw3H5CgMQFMHd7cpsNDg6/7ze9waNJ49M=; b=051bx4Sz2YtFeIOX0bkMtYpcPZJ5Ye9YuO0V8phlZwkc2DG+2wS+mgsL3r16zAunpX XInAx+fCDRP2qcnQKWnqOECkL3z6SQkKhY6OVg4OsYmmurwSyR29Oo910XnsfH5wNgt1 z4KF1dNkVKKt3BFOOqZC+rO+/NRaMILuZNimWwHc4EZDNi2d821idabf9Lhv1jihcVHp KC1b9/mUX2iK4DfkzFSIv3oYJd2C/OOwa2keu3sFD0FLfe4eSuG+53DjPfKxHNbp21m8 vIRG5igLJa/d9Y6HMVm8RZ4jtFfyun5oYiVfnO/ISTS8VwaGgMAYkKAAJ6+28yVrBY+0 G1Ag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b="TTj87//7"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jr13si2910362ejb.269.2021.02.24.22.15.38; Wed, 24 Feb 2021 22:16:00 -0800 (PST) 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=@samsung.com header.s=mail20170921 header.b="TTj87//7"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231638AbhBYD1E (ORCPT + 99 others); Wed, 24 Feb 2021 22:27:04 -0500 Received: from mailout4.samsung.com ([203.254.224.34]:34594 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232276AbhBYD1B (ORCPT ); Wed, 24 Feb 2021 22:27:01 -0500 Received: from epcas2p3.samsung.com (unknown [182.195.41.55]) by mailout4.samsung.com (KnoxPortal) with ESMTP id 20210225032617epoutp044e225490e5e609f780c5da2c6bb95a5f~m38qQ_Wze0682306823epoutp04a for ; Thu, 25 Feb 2021 03:26:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout4.samsung.com 20210225032617epoutp044e225490e5e609f780c5da2c6bb95a5f~m38qQ_Wze0682306823epoutp04a DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1614223577; bh=PUJ1RF9kKOIw3H5CgMQFMHd7cpsNDg6/7ze9waNJ49M=; h=Subject:Reply-To:From:To:CC:In-Reply-To:Date:References:From; b=TTj87//7gGbOd+qTlHOlbzvE1S0SD4tPfppyMLTFpDLRsHZGHKxzkmh7yqxd4QWgz zRtrq1b2rd82U025rzSxrfG7U1q/IH5v8n/NiXw2YOG1PRnKfr5qmzYiMh9/yw70Z/ y12qc3PKFIMyr/AT8eN//TmvPoM24Eb8kLgq/0MM= Received: from epsnrtp3.localdomain (unknown [182.195.42.164]) by epcas2p3.samsung.com (KnoxPortal) with ESMTP id 20210225032617epcas2p3e32cdfd18f2f2507076571b056bbc287~m38pw7Zai2214722147epcas2p3t; Thu, 25 Feb 2021 03:26:17 +0000 (GMT) Received: from epsmges2p2.samsung.com (unknown [182.195.40.187]) by epsnrtp3.localdomain (Postfix) with ESMTP id 4DmJ934XRPz4x9Q8; Thu, 25 Feb 2021 03:26:15 +0000 (GMT) X-AuditID: b6c32a46-1efff7000000dbf8-70-603718d711c6 Received: from epcas2p2.samsung.com ( [182.195.41.54]) by epsmges2p2.samsung.com (Symantec Messaging Gateway) with SMTP id BF.C9.56312.7D817306; Thu, 25 Feb 2021 12:26:15 +0900 (KST) Mime-Version: 1.0 Subject: RE: RE: [PATCH v24 4/4] scsi: ufs: Add HPB 2.0 support Reply-To: daejun7.park@samsung.com Sender: Daejun Park From: Daejun Park To: Avri Altman , Daejun Park , Greg KH , "jejb@linux.ibm.com" , "martin.petersen@oracle.com" , "asutoshd@codeaurora.org" , "stanley.chu@mediatek.com" , "cang@codeaurora.org" , "bvanassche@acm.org" , "huobean@gmail.com" , ALIM AKHTAR CC: "linux-scsi@vger.kernel.org" , "linux-kernel@vger.kernel.org" , JinHwan Park , Javier Gonzalez , SEUNGUK SHIN , Sung-Jun Park , yongmyung lee , Jinyoung CHOI , BoRam Shin X-Priority: 3 X-Content-Kind-Code: NORMAL In-Reply-To: X-CPGS-Detection: blocking_info_exchange X-Drm-Type: N,general X-Msg-Generator: Mail X-Msg-Type: PERSONAL X-Reply-Demand: N Message-ID: <20210225032615epcms2p6679f3571205dc7a9c222f07398a9726c@epcms2p6> Date: Thu, 25 Feb 2021 12:26:15 +0900 X-CMS-MailID: 20210225032615epcms2p6679f3571205dc7a9c222f07398a9726c Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" X-Sendblock-Type: AUTO_CONFIDENTIAL X-CPGSPASS: Y X-CPGSPASS: Y CMS-TYPE: 102P X-Brightmail-Tracker: H4sIAAAAAAAAA51TbUxbVRj23HtpC1py+RrHbrp6hwpTSiltOYwxcU7SuIgmblk2XaCWG4rQ D3sLzCVkzcDB2BiYKbAOqoOUKZA12/goFPkoisBClLEPvtS6lWzIuiHMOMZAKS1u8af/nvOc 5z3P874nLwcP7GDzOBlqPa1Ty7Molh/R0hshjbwOY1OFVyZeQA5TCwt9e6SfjaYXrrJQ78Rd NiqfXcDRnKXOB03bI1C9Yw/Kr7WwUNWQAUMlpc0sdHNyno1qRlswVLpcSKCR9ioWOnbdykJn f1jG0ESTHzI3jwF0tKKRQDVnbERiiGzkyk7ZyIkSTNZm/JktK6vpBrKu6ka2rGCgi5D9MTVO yE401QPZ/IXnZYXdx7B3/fYZwFa5TqHMyKH5tFqhSctQpydQu3clRSKKr9Qw+gTq/WgkEkTH SQTiOIEodv+WaKFQJKH4armKTqAORHqrKb5OoV1R62lGr6MV9AqlS2T08nRawMhVTLY6XaDQ qCh+jjwre6WOitq2VUnL02gdP9UJlIOT67Xn2AcuHr+LGcAcUQw4HEiK4QPbzmLgxwkkrQAW HLnh4+a5ZABcsgYVA19OEPkarPlrkHDjQJKClmEj28ML4PhvjcCNWeSrsKL/V7b7nWByEYfD rnIf9wEnzThsmDLgbhUkubCycIrw4PWw9WwzcJv5kvthqZ3nocPhg7oSrzwEjjW42Gv4Xt+X wIOD4ae/DHk1AdCxYPPyz8I+2yzmwYdg8+RD4M4AyeMA9raN+3guouC1ovOrGbjk27BjfmC1 mCBfhK6KL7xmO6Dj9tiqBic3wlZXFe7OiZMR0NIe5ZnbJvjdOLHWleH8Ivu/GCf9YVHv0r+8 1eT0RnsJnluwYGVgk/HxpI1PeBkfe30F8HqwjtYyqnSaEWlFT37zBbC6AZuTrOBz16zADjAO sAPIwalg7sVlSWogN03+yUFap0nRZWfRjB0cXOnyM5wXotCsrJBanxItFYqkkhhxTIxELPnf tEQklQrjJEgiFSEqlMsIHSmBZLpcT2fStJbWrZljHF+eAcuMTSoWb2jt7F6SzbT3F9w7HYa3 kpPV4jz1yafum0f37fGvxeqyxeaHVvJGWYA5yJ7X80ZahLDJ77Qzd1fkN8nl1T9+fId6J7yT V/tmqT/I/bD70kejucO2yg2irmnhmb4e1u+VA90Db+X68jrNUzOJ88qQyx98zTs8H/7TgG9P 6PI1Z8shU5zJVPQyJ3726e3fb4+fbDALdxw/vO4UK9O0V7UY/Ddzykf8imWL1uV/+6rI6Qq7 JQ64/7pxUIcejfZdCr2cmG+bKbOYOjJ3l2iki3dgA7zpFM9ti3cQ1tGNt6xBXclDZCvRlpyf tffPZ8ijBhrkPVKF5Tx3smV28L1aimCU8ujNuI6R/wPhmILGzwQAAA== DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20210224045323epcms2p66cc6a4b73086621e050da37f12f432f0 References: <20210224045323epcms2p66cc6a4b73086621e050da37f12f432f0@epcms2p6> <20210224045532epcms2p2215025506b062e2fdbad73e51563dca6@epcms2p2> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > if (dev_info->wspecversion >= UFS_DEV_HPB_SUPPORT_VERSION && > > (b_ufs_feature_sup & UFS_DEV_HPB_SUPPORT)) { > > - dev_info->hpb_enabled = true; > > + bool hpb_en = false; > > + > > ufshpb_get_dev_info(hba, desc_buf); > > + > > + err = ufshcd_query_flag_retry(hba, > > UPIU_QUERY_OPCODE_READ_FLAG, > > + QUERY_FLAG_IDN_HPB_EN, 0, &hpb_en); > > + if (ufshpb_is_legacy(hba) || (!err && hpb_en)) > If is_legacy you shouldn't send fHPBen in the first place, not ignoring its failure. OK, > Also, using a Boolean is limiting you to HPB2.0 vs. HPB1.0. > What would you do in new flags/attributes/descriptors that HPB3.0 will introduce? It can be managed as enum. but it is enough now, I think. > > + dev_info->hpb_enabled = true; > > } Thanks, Daejun