Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp332036ybt; Wed, 17 Jun 2020 02:01:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxsi+XsdkdT4C269SUDIXcaWC0D0W5M1PbFT4caZ6FmS3ft+zAYYT1KvjY87PlkqHUg4OJd X-Received: by 2002:a17:906:f185:: with SMTP id gs5mr6378108ejb.223.1592384517527; Wed, 17 Jun 2020 02:01:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592384517; cv=none; d=google.com; s=arc-20160816; b=FRlD/dcsh+KosR8iK4XDjGWckt2jzXV9S3InkmiZ1DwXncB20Urf5pgLUT4q2I3TE2 Th7CjzvvWYnhTlZ2mE/Ye158uYUlyjFwL4l4KsOZ/HHDmCfu6U1OK5Tmn4H3lGnYYMIW UloojMx7TRqnoLdysRjnMNhUA4drWl4zel0PaX3WrvkVGpPSc8v/NiDx295N4cKRr/NH ddm+P907GNCyEXRCq4VY82NLksfM0uhPZY4sFoW+r3pDWKh9ua/0tSeyu/4E+wDod4qS vk8QpRNiPx/IeUyCNB1BiUFIW0pZg13SEhjkxBgAz4mEMYkn8jTN4c+WJK0MFjArX0G7 zKbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=e0GIsBatfapINbf1Qhrb6ieuf0yzr/q+/Cwq8LRbwso=; b=vBLpEE0ZHHBJVKk0Aa/LbJg4FIrRmoNJLtREVpvCUG/Q/uXfMeG1ysMAiDbkVq46ht L2+RQxmB//gXnjhN1OjxU9od1TXGxjEiQc/wlvsQ+fsRVYh+G1EcUYkGRWJ/t0Jujntb vl2E0cRD3FHH54707Q67r8L8wGjE5TGJL/AJqttpJ06HMPAxsbUgvbG3fQ5zSJwvZ7yB ZMlPw1peqqdxqDrN89kBQnpnDp4vTepc8WdeTXQO1Bvm+nmg8veyx8OG0wXddjol9UY1 uj6Igqd4rLr6TFQUTL4JQ2HbaS6fCsLhgXe/UgxOJYpGOUH+HDmE/jV2s/hCKM3g7OJ7 7dQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=thh63VHs; 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 b12si15359518edz.444.2020.06.17.02.01.35; Wed, 17 Jun 2020 02:01:57 -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=thh63VHs; 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 S1726271AbgFQI5z (ORCPT + 99 others); Wed, 17 Jun 2020 04:57:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35906 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725901AbgFQI5z (ORCPT ); Wed, 17 Jun 2020 04:57:55 -0400 Received: from mail-vs1-xe44.google.com (mail-vs1-xe44.google.com [IPv6:2607:f8b0:4864:20::e44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4F7A4C061573; Wed, 17 Jun 2020 01:57:55 -0700 (PDT) Received: by mail-vs1-xe44.google.com with SMTP id j13so937068vsn.3; Wed, 17 Jun 2020 01:57:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=e0GIsBatfapINbf1Qhrb6ieuf0yzr/q+/Cwq8LRbwso=; b=thh63VHsT+2xCdrOTfL871hB51pmQB0rlLEQYQ/D2M6BBadj7jBAS2z65tXfYR4Tr1 wR7WeY24w9GxeO8dDxW8QmOUriK9jg6VA0m8OBsgFs2UT6IBWmPeK/H0qpKmzsbFkDhB +tS4KpohwMSQwCTUu8n1kBn0vnepV71BshhNwvVODL5DpczpxvnnqoLD4N3VYYSt0dCz ic78H2v3vDFdJ9rfVcCn+zBFlemn0htT7oBz8BnkILsQEEsL9RA0RFNevonUcoEbn0Ke i2OYagDGxBBInJ95+Za7ZZrUTzF0s7j3gFL+Gn+9RKr6boXRrNPz8fFWqNeh4sFBiz0+ yBow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=e0GIsBatfapINbf1Qhrb6ieuf0yzr/q+/Cwq8LRbwso=; b=CIKDpvUFsFAqowGk4ZEpoQkT9nUCfuVUb8EELLkCNX+s4uDdZFfPuZKDIkewyFnF9z ApHTmfjbwOiasbWCRrAo5vWdwxPVys64Yc0unlbt9gaUafc5GIxkZGHp785DDtOSexU8 YZJshu+d+AAy+StbR3VC5QwfiCFxFuMsI/5oqaSJb2Y2tRz9xNlbTajY6BzGFxQFQItm S7oqN+c5yn0SzZo2bTgDPn+tfCnCy6eDv+loRrxsPBSKaQKPxkvL4ODE1tFDRCnMBiG4 cb09Mcll3uCREB6FAKQ3JLwMFvNCJWBkc5DKKdwysukafEAqlIY52DOyB3XTq50c62GY y7Lg== X-Gm-Message-State: AOAM53230nHzdLjSXwa5+wpZunHcsMVBHM5bl0znepG36HNQwRwF0K4q mhmyzctaekcRWhtCfU9ggCxJLAfP02HS45Fsj3c= X-Received: by 2002:a67:a64c:: with SMTP id r12mr4847402vsh.127.1592384274215; Wed, 17 Jun 2020 01:57:54 -0700 (PDT) MIME-Version: 1.0 References: <47dcc56312229fc8f25f39c2beeb3a8ba811f3e9.camel@gmail.com> <336371513.41592205783606.JavaMail.epsvc@epcpadp2> <231786897.01592205482200.JavaMail.epsvc@epcpadp2> <231786897.01592212081335.JavaMail.epsvc@epcpadp2> <1210830415.21592275802431.JavaMail.epsvc@epcpadp1> In-Reply-To: From: Alim Akhtar Date: Wed, 17 Jun 2020 14:27:19 +0530 Message-ID: Subject: Re: [RFC PATCH v2 2/5] scsi: ufs: Add UFS-feature layer To: Avri Altman Cc: "daejun7.park@samsung.com" , Bean Huo , ALIM AKHTAR , "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" , "linux-scsi@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Sang-yoon Oh , Sung-Jun Park , yongmyung lee , Jinyoung CHOI , Adel Choi , BoRam Shin Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 17, 2020 at 12:27 PM Avri Altman wrote: > > > > > Hi, Bean > > > > > > 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. > > OK, changing it seems no problem. But I want to know what other people > > think > > about this version checking code. > HPB1.0 isn't part of ufs3.1, but published only later. > Allowing earlier versions will required to quirk the descriptor sizes. > I see Bean's point here, but I vote for adding it in a single quirk, when the time comes. > I second Avri here, older devices need a quirk to handle, let do that as a separate patch. > Thanks, > Avri -- Regards, Alim