Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1653925ybt; Mon, 15 Jun 2020 06:12:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzrcFwKzeKAb+ct58jZEmPe2Z6xU4ndnHOQGM5+56d2jtRCFDH2kgTGd6ZewULl8+1rQDkG X-Received: by 2002:a17:906:1386:: with SMTP id f6mr24571227ejc.66.1592226734094; Mon, 15 Jun 2020 06:12:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592226734; cv=none; d=google.com; s=arc-20160816; b=FPxkr8ve2/fPwKGaTCkbQvAs5KHiIY4mGuWSVJW469K4QbNKHETpB6KHI7MlK4Q1J+ 7Ert/pjh1LFdicuzOWYOqaff4c5DkNMndSaMGX11KxT5wsAwQpxBkLyqwDmUXFJhp7Sc WWB6hI2kSeMZjmCsZgEXP6OYLO4mhPuWowezUWwOYGwKaqtLKM9ysmGI9wZsBU/wQIIG a5GOt3sSvpmXFFpzs1v8zSNIPAwqAFjuBFyKzkPjsIccnAdpf4zRij2JESfzROEEM+Dj B3KTDKjFLMf7RN1KXQ7Mkz06KThIglAxCrk8+UsQCEXbhoqlnmo2IoV0RbEZHiUxEONq VZaQ== 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:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :dkim-signature; bh=2hNGEnaVoQal93lbWY/52qr5BHwkcMyXt4V9L1ZazME=; b=DGealuWszvcR0udQ7ASmStHXnDv5hbqqV4nJin0pyvOKMykXLabsFTaFnKN2A4qKtd K7gUJvytC0GH8VXjNAB7nSsk48rm1U8QY9Ewsblz57GJ5fHnDefQgof7lc0K4BE1WKxZ WkLnLzMFz9/Gz9zlhZirbtpJqanVECkkaiq1p8CdX7ef7zL0pDQ1djmhTsArigENTIWC 21SngPmoKWMTgNnp8oW2/9BEt4HIl2/Uhfn1ZYKmZYDt6PrOtmWAB/rakN3uE6xaBRU8 VT/TUaf7XPQotdevBp78lCyTHgCXSEeiTIM2eugC6A+c0VgyB3zsbuteJAfnEh2WPbIl r+3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=G5VTwYE0; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id du1si12946046ejc.616.2020.06.15.06.11.51; Mon, 15 Jun 2020 06:12:14 -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=@gmail.com header.s=20161025 header.b=G5VTwYE0; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730229AbgFONJm (ORCPT + 99 others); Mon, 15 Jun 2020 09:09:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53778 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729875AbgFONJm (ORCPT ); Mon, 15 Jun 2020 09:09:42 -0400 Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C4CE2C061A0E; Mon, 15 Jun 2020 06:09:40 -0700 (PDT) Received: by mail-wr1-x443.google.com with SMTP id y17so17034677wrn.11; Mon, 15 Jun 2020 06:09:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:subject:from:to:cc:date:in-reply-to:references :mime-version:content-transfer-encoding; bh=2hNGEnaVoQal93lbWY/52qr5BHwkcMyXt4V9L1ZazME=; b=G5VTwYE05Hk6xTerY0UHALfQgUm4ZA9zNF43JDgzQzmX7a9vFtFm/DNZWQKBTHuV/v T9fa23JAS7/fngxzS4BlWqvX5QustnRT6M4McOPfpP7jIAMgFHp0AJb1V7G9Uco3qjZE CvFR56tzw08bxyI+g35zy0Z0Rk5y2vJv3Z6TWhtXeh1RJlaAuHldcoHUNPSCYRdE6mq9 BlB6n7uE2H1Jj7mnAf25mo7xISovDdlaot4t1h+hl4u7fUmLPyzVK3I4nX9OXC6ByRsn vIXebOCAVv/3Vm/Ou1uIKZ2ApFfFf40qTyyla/F41iyBGFmkNcPj1xQVC4PsXn5RMMPt NPxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:mime-version:content-transfer-encoding; bh=2hNGEnaVoQal93lbWY/52qr5BHwkcMyXt4V9L1ZazME=; b=qplgHj0Mb68ze5fh0sxChH4ZyxUL9guogFAaZhfulqU6tWGmuddT7jcDXiOkR8/b42 Yd7ASQgFtDTQf4/zRUjLqh8QH/gR0mSh27lrHKMElqq0JSq5Ia2hCtCAaj5pPOrc6GeO BR/T/3YsJAmR7jABYPhv6c6K9UsIkqvJDNSlQRsn1Jv4tYdNzt58OnN+CQOcOX7cDNYN YHsmuz7yvyH4WBGH7J4tNe4/Pz3yjp827KE2iiJ3+sp1MNXEHv0VCzlEguCym1OAtmqr RPUb76YlUmFbPl7la4+kf8vucW87F1F5eO3PMTUrRIl2qCxAxXmd2NOLg91zJDhJi1iQ BnHQ== X-Gm-Message-State: AOAM531/vuZvBvbcMccn/k4sEAlyEQd5ZdmntzjEmFKASgQqFnO+lKnS kp4JEZdR2fjmrdWXGHETGTI= X-Received: by 2002:adf:f245:: with SMTP id b5mr28026570wrp.303.1592226579595; Mon, 15 Jun 2020 06:09:39 -0700 (PDT) Received: from ubuntu-laptop ([2a01:598:b10e:413b:41dc:307c:ea47:9556]) by smtp.googlemail.com with ESMTPSA id s2sm21459716wmh.11.2020.06.15.06.09.33 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 15 Jun 2020 06:09:39 -0700 (PDT) Message-ID: <47dcc56312229fc8f25f39c2beeb3a8ba811f3e9.camel@gmail.com> Subject: Re: [RFC PATCH v2 2/5] scsi: ufs: Add UFS-feature layer From: Bean Huo To: daejun7.park@samsung.com, ALIM AKHTAR , "avri.altman@wdc.com" , "jejb@linux.ibm.com" , "martin.petersen@oracle.com" , "asutoshd@codeaurora.org" , "beanhuo@micron.com" , "stanley.chu@mediatek.com" , "cang@codeaurora.org" , "bvanassche@acm.org" , "tomas.winkler@intel.com" Cc: "linux-scsi@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Sang-yoon Oh , Sung-Jun Park , yongmyung lee , Jinyoung CHOI , Adel Choi , BoRam Shin Date: Mon, 15 Jun 2020 15:09:28 +0200 In-Reply-To: <231786897.01592212081335.JavaMail.epsvc@epcpadp2> References: <336371513.41592205783606.JavaMail.epsvc@epcpadp2> <231786897.01592205482200.JavaMail.epsvc@epcpadp2> <231786897.01592212081335.JavaMail.epsvc@epcpadp2> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Daejun On Mon, 2020-06-15 at 16:23 +0900, Daejun Park wrote: > +void ufsf_scan_features(struct ufs_hba *hba) > +{ > + int ret; > + > + init_waitqueue_head(&hba->ufsf.sdev_wait); > + atomic_set(&hba->ufsf.slave_conf_cnt, 0); > + > + if (hba->dev_info.wspecversion >= HPB_SUPPORTED_VERSION && > + (hba->dev_info.b_ufs_feature_sup & UFS_DEV_HPB_SUPPORT)) How about removing this check "(hba->dev_info.wspecversion >= HPB_SUPPORTED_VERSION" since ufs with lower version than v3.1 can add HPB feature by FFU, if (hba->dev_info.b_ufs_feature_sup &UFS_FEATURE_SUPPORT_HPB_BIT) is enough. > > +#define HPB_SUPPORTED_VERSION 0x0310 Thank, Bean