Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp355981ybt; Wed, 17 Jun 2020 02:46:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwkLGeWRk+609CAiUAiOGt5CSOaKSAPdbkrhajGnw/h2r0FKE24+/+fCMoPmncmm7Rgaf9O X-Received: by 2002:a17:906:648e:: with SMTP id e14mr6608824ejm.308.1592387184215; Wed, 17 Jun 2020 02:46:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592387184; cv=none; d=google.com; s=arc-20160816; b=m/6NYTiDPgJt2RCJE/po/zdesQoKrkomlB0nnXdRBgoRADPPfXIXQUvCLpgQsc9C/5 eObLQeNuJRYJpGF4WnyWwB6Z6UhmTILooW8fLlaEpg8lvBDBS3ZHBfsPSluudnG52KPh NyBHejJsKw8ad1F6VRztPTkU4VbtaRkMQOXagidqYXntV4Dl25wXdYQc2aJ95ZNczzgt s5MITJgLffpBx7GCi03YgoDBPlwlHswQTc0oTYK4IxPKsaBc9zT3D/7V2FSQp05ZadgW gTIS85BUCF1Cbu+LlxQPxbcU6m4+qIInUeYLvXKuesegwTknEvLJho4OKqzjURYpqyGe qBcw== 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=s5ozDVklybETfefE88F2sjZVkweD0ju+SZP/9NGLYa8=; b=bRGnIj+zgkVAL1kiiDLujtLtWj0LL21GLfOgu8lwEX/XAXvhzTseYWGROgQxU59vyh EXKtrrewUIOAaDUaJnMmpakQqkX/rJRvigk1zhZtoUFoWDPddoksKp6IYOGtoDaj1NHD YujCzKIUABwBGl+4x9U2Wa6VuvhGZZwUaIu6nVsk5TGV7bzitM2JwlEL9dD2Wd1M2U4l WSSh5QVBRfBulGAogPUtNqLrU5MP9YdH+iojk+OkSTDyRwC4Ps1hOLmeh9gmn0XPcSAp naUYx8I2AHAgZaugfTZN15gR0K4Jy/3tONj68aNPaMMlAxrdBDQI8Aq0txJEqvjUhSpA rxNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=gyT2C3Ez; 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 r26si12724408eja.652.2020.06.17.02.46.00; Wed, 17 Jun 2020 02:46:24 -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=gyT2C3Ez; 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 S1726582AbgFQJmL (ORCPT + 99 others); Wed, 17 Jun 2020 05:42:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42750 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725860AbgFQJmK (ORCPT ); Wed, 17 Jun 2020 05:42:10 -0400 Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 23533C061573; Wed, 17 Jun 2020 02:42:10 -0700 (PDT) Received: by mail-wr1-x441.google.com with SMTP id e1so1604711wrt.5; Wed, 17 Jun 2020 02:42:10 -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=s5ozDVklybETfefE88F2sjZVkweD0ju+SZP/9NGLYa8=; b=gyT2C3Ez7iMxPb7vqwPMGvcsX7VITaoe1qsg0YfpQqnm2CCBp28gq3zrZvTYcH50J1 gBRUdOnjlfqpJMEmW1O3AnemaiyJ6s4G0ENVj8F8nSrve7VBvurLcgbSW5xzp+5aC/ok UBtdkAp3A3RP+qklRFcpE+yZ1trLHnBQInQxfeEWz2Lg42ZFM2v/SJevmp9iOHP87SPr YKyDtaVzvzag0dOK7KuQEdEA69kNcDrXH9xacY7p5fXlLeq4XaLxDImZJJB4rfMiCe8/ 2D9Xf2e6tP3jUerNtqXFucHxXPKmASKPI5dwZ5WbyHLS6c8eMHhC1Dk9SAC69d3U8IqC jbbw== 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=s5ozDVklybETfefE88F2sjZVkweD0ju+SZP/9NGLYa8=; b=J1A1sZXwFAzSR7bgVgJ9TNOnlhSHzAblgRJJcCkl/EuYejTkw9pZg0GQUZv7kkjSEM i8bPAZZNWlNHaZqjMIRdpaEOQKX/jErAJyxstZIGB6N+AhuorWRDKkQODv3FhvAfKEmJ cUeuoEkhzhUGKQgBn5lT6cCXmbZzrePPsypzbo/9uoWFA5J+7QsLTqkumEwGFfrgXh0z GR9UuZZXjhtIc6dDwSF6PnEUAGen6eFO4JouChCTst7MwE7u6vRbVvBx3qdzrW1TFx07 NYWXXL6cEfxEvJCPqo0N11objswqAW0dx4DeCmexUyN/Imd2qjrEYe22oxmCmtRka0/M rDqg== X-Gm-Message-State: AOAM530AHMK76ojSMtZ2ID9OsV0nfeujmO2Kjx3zaKeALclXC0ZP6Vtg V8w74au/j3grPzFbi5p9SQ0= X-Received: by 2002:adf:a51a:: with SMTP id i26mr7395814wrb.406.1592386928901; Wed, 17 Jun 2020 02:42:08 -0700 (PDT) Received: from ubuntu-laptop ([2a01:598:a011:30c:e489:2676:2097:fdba]) by smtp.googlemail.com with ESMTPSA id j4sm8101512wma.7.2020.06.17.02.42.06 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 17 Jun 2020 02:42:08 -0700 (PDT) Message-ID: <653426a77669eaced17e9e5aa87259ad57514c47.camel@gmail.com> Subject: Re: [RFC PATCH v2 2/5] scsi: ufs: Add UFS-feature layer From: Bean Huo To: Alim Akhtar , Avri Altman Cc: "daejun7.park@samsung.com" , 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 Date: Wed, 17 Jun 2020 11:41:55 +0200 In-Reply-To: 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> 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 On Wed, 2020-06-17 at 14:27 +0530, Alim Akhtar wrote: > > > > > + 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 > > what is useful point of adding a quirk for this? From the customer side piont, they just get our FW image, and then do FFU. If adding a quirk here, that means they also need to change UFS driver. Also, you expand the qurik structure. from cambridge dictionary: Qurik: an unusual habit or part of someone's personality, or something that is strange and unexpected. HPB feature is unexpected?? please tell me the useful point of adding a Quirk. Bean >