Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp960637pxb; Wed, 3 Mar 2021 22:36:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJwsMPpp3ACRMVW0oAt2/6mjlXcbxkluxqsbCqo+VBVqjRquRcxKRAXXzfQG1+gLVcNnady6 X-Received: by 2002:a05:6402:b41:: with SMTP id bx1mr2702441edb.69.1614839790712; Wed, 03 Mar 2021 22:36:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614839790; cv=none; d=google.com; s=arc-20160816; b=IBNpYJKfNwco3OkVuITgpBtFC2gMYDZ6i5aTXYu0UkRMkrW8KGKXJn4b/dV69GCM2u CGomifShcg2VfK4+B8FcSYEqUVR6Zrofx7KTgsz038x66PFZHGR8PYKLfIwrvYUfnaji /AEKCJAgt2OwXYB9MDocNKjmE9oOE43Xz72Cl9rY9yjUKjoD8JEbRZ9HxdsThGr8j1+g bNczl16TIF63/sogW3W43bZ9TZOSV64KBPZw1x0BtqY7+26p2jmuJfO8u5NW/G14x+Uc tAWFoFuMIForQTGpsFZuB0ZqA2rlBJ4Ojr/h+VHyzxl8Zly6MhZ3W9cwaoHxwSw2k/1C fuGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :dkim-signature; bh=Am1a6SP1lIBYmPhsqzqN/wdobE8TF1PX/9qBt9ePMdE=; b=j4ZlfrVHBqpkJWhfWw81yf34fRteFsbqaamabE/vFBsAfJ7jwJ7bui5rWSrs1FUmta s8Kx/NsFpxJKhKeHhIE4j0blL/LPRxLxaBZ2vydSNBg/xp2Ny1fR9Fs9GD0YEas6xZ7e EBzXcZkwAEgurufySl5Vs0SVIUSBYPogrYqKhqDpb6XmqshUGzZCQC6xfDlWCL753LrL sxha55PsR6K0z7xeS+P+KqhcFA6eQ1+WyYQh/O/FYtpy+eliezjDxfKOVlOsRgnlGZiJ AkPfsrbUvRefm5sFqbWnjtk3MX6ihGQ8GO9tECEOpvK/TQMgPS5JPNyvDAsI9+Y6yUhH tH1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=qPtUCPCo; 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 go37si669377ejc.406.2021.03.03.22.36.08; Wed, 03 Mar 2021 22:36:30 -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=@gmail.com header.s=20161025 header.b=qPtUCPCo; 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 S1577240AbhCBSrm (ORCPT + 99 others); Tue, 2 Mar 2021 13:47:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56646 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1839026AbhCBP4M (ORCPT ); Tue, 2 Mar 2021 10:56:12 -0500 Received: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [IPv6:2a00:1450:4864:20::533]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0CC17C0617A7; Tue, 2 Mar 2021 06:32:28 -0800 (PST) Received: by mail-ed1-x533.google.com with SMTP id bd6so12198568edb.10; Tue, 02 Mar 2021 06:32:28 -0800 (PST) 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=Am1a6SP1lIBYmPhsqzqN/wdobE8TF1PX/9qBt9ePMdE=; b=qPtUCPCo1olJ3B9E9rwQl3QrypoiL2tKAnbCXopbsVVBvw6fdTNtawzozZGwFXz9iD nkNmfJBtOt0HAx1f5PQcv2NihpNJOlvlihR8p1m/IM3pVH569sQLwLPFCUCuUWsEfdCF O31nNIGaHoyyyg5I1+2lsMGm+JiELOeE5H2FW0FkcMn/ci+wwD+SVB8y2wFXldhx5HAe 6tb/a0SLA1S3UHWpp9LA+X+j3o4gsoO5JrDE5aJMhXSeIO3esejgrc4NSgr1TSqbgTPV IWaZOXr1KGhthoVJwBftWZZxkJ0cX8Dr0SZ4gSDW026KtIUbeXWp01oTUl5uGkT7TA2A 7eog== 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=Am1a6SP1lIBYmPhsqzqN/wdobE8TF1PX/9qBt9ePMdE=; b=SjK/UYGf7Uib20J2c9Ca4Fsai9QJ0YFnajwFqcKpE104J6cRuOEal1IziaV+6IvSkv l0Ce2oaqVCXSPylJtnHE3ebxxlhgVr+/Z4wUifSeyuBKGEjwPOzW+pihMAHbQ/P59Mvp 0IOHq4i28+gaegRRxpz2lUdMk3D4UD2HdNI28vuD2CAi8f8cq2Jxpbewp59sr5J4V6bN iH1tDBbOE8o/knkTtA4MuacQgVSlra/6lg3u4sjlZr76Jyr9OAfTtScjvYTghA86FPvb AzRXsKQBj/0JMIcpLe+ckcEWMvtW01G9ksy6Ru1ijH/o1tQ1i3bN3lq1Xuh9aggImLMJ 5qUA== X-Gm-Message-State: AOAM532K24Bz8eZyaevVr3tPMwsuU9wjNVMKwLJD+b28CqXMyLkAeoHk hzH00MURrEcjcovK7qOE62M= X-Received: by 2002:a50:a086:: with SMTP id 6mr20503152edo.70.1614695547654; Tue, 02 Mar 2021 06:32:27 -0800 (PST) Received: from ubuntu-laptop (ip5f5bec5d.dynamic.kabel-deutschland.de. [95.91.236.93]) by smtp.googlemail.com with ESMTPSA id s13sm17250242edr.86.2021.03.02.06.32.26 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 02 Mar 2021 06:32:27 -0800 (PST) Message-ID: <1988de01138118e8361b90acce25332adb2c1e24.camel@gmail.com> Subject: Re: [PATCH v25 4/4] scsi: ufs: Add HPB 2.0 support From: Bean Huo To: Avri Altman , "daejun7.park@samsung.com" , Greg KH , "jejb@linux.ibm.com" , "martin.petersen@oracle.com" , "asutoshd@codeaurora.org" , "stanley.chu@mediatek.com" , "cang@codeaurora.org" , "bvanassche@acm.org" , ALIM AKHTAR , Javier Gonzalez Cc: "linux-scsi@vger.kernel.org" , "linux-kernel@vger.kernel.org" , JinHwan Park , SEUNGUK SHIN , Sung-Jun Park , yongmyung lee , Jinyoung CHOI , BoRam Shin Date: Tue, 02 Mar 2021 15:32:25 +0100 In-Reply-To: References: <20210226073233epcms2p80fca2dffabea03143a9414838f757633@epcms2p8> <20210226073525epcms2p5e7ddd6e92b2f76b2b3dcded49f8ff256@epcms2p5> 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2021-03-02 at 13:15 +0000, Avri Altman wrote: > > > > On Fri, 2021-02-26 at 16:35 +0900, Daejun Park wrote: > > > +static void ufshpb_set_unmap_cmd(unsigned char *cdb, struct > > > ufshpb_region *rgn) > > > +{ > > > + cdb[0] = UFSHPB_WRITE_BUFFER; > > > + cdb[1] = rgn ? UFSHPB_WRITE_BUFFER_INACT_SINGLE_ID : > > > + UFSHPB_WRITE_BUFFER_INACT_ALL_ID; > > > > Here is wrong, > > Valid HPB Region is (0 ~ (Ceiling( Region size calculated by > > bHPBRegionSize )- 1) ). how do you know the region==0 is not > > a single normal region? > > Please note that rgn here is a ufshpb_region *rgn > I see, thanks. > Thanks, > Avri