Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp2669126pxb; Sun, 24 Apr 2022 22:53:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxGl/c8lCywsOYjCTvfrewq/gLL0A20drYbgqyo3MkAHOYgT2dzbN/jUIOllbm/A6VSAl4w X-Received: by 2002:a17:906:478d:b0:6ef:6b1d:4026 with SMTP id cw13-20020a170906478d00b006ef6b1d4026mr14989676ejc.700.1650866030633; Sun, 24 Apr 2022 22:53:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650866030; cv=none; d=google.com; s=arc-20160816; b=PgDF9yegPfKVqqrC8PSaiosWz2ZUZ1L69U+9IwqhXSdtIVh9Bp53IMt3Dfo8Cgzo0Z tVBbbKnfHMJ4AGkExPM1zDyE2cStEujeUS+jY7i6fRHgyp0gtnRcrIL8P9XEUOwSesTV KUFN43/16Ft/+sYjy72GMuuwv/JbZbgBz3uWfsO6YJLE3tYbDipwMxwKAafJcsBwViKy 3y149fbXk3R9TCuYUjDFnRzxrVd2QwZbdZ95CKj49HfZnSQEhPPrjoGujeSm3VzSWfti TCOlqWX/5ZW19/YIZIeAPd6yLBycHxhsR+1QNLV0PlFyRL4r0fYrq8FPiCN372IzlygK xE4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id:dkim-signature; bh=ULkvU6lbJY7Ze1LSiFl/YjCHBSBAU9f03/gS7iw6lwQ=; b=yCJFNgMoN/CR9vQOQkjLr9M0J4KgQzuXudsmMUiIiyX828xq0Ur/Gq8QGCq71A6Xni DZpalPkExHU7yW3Ux6F8hPOI1EBFK1GUS8AWkeeW0lSyU18KVR1WIep/tE6LrvGbsq9B jo1hbXcAjhnI3Ds8UhBsTuyJk705+XQQdpPETRSK4Ncn/TNRy91ZggwXaWPlAF5uBCYH pfsrAOjFZwBmS2vtaVVQhtPBBxk4SjnFvHX1ORrcQU9YtC4ZK7YTT1B4IXeC6kfAdJX+ /uYHXGUOhgG+96tvTUW5dSMXzWP1kfjd2ncvGO9MaXicwutioTfjjUxW0CvSomgvXljW Wa8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=dsS9eJdR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bx5-20020a170906a1c500b006e82ffe65b6si12374050ejb.935.2022.04.24.22.53.27; Sun, 24 Apr 2022 22:53:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=dsS9eJdR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S239747AbiDXWTN (ORCPT + 99 others); Sun, 24 Apr 2022 18:19:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41940 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229486AbiDXWTJ (ORCPT ); Sun, 24 Apr 2022 18:19:09 -0400 Received: from mail-ed1-x529.google.com (mail-ed1-x529.google.com [IPv6:2a00:1450:4864:20::529]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 19ACB644F2; Sun, 24 Apr 2022 15:16:08 -0700 (PDT) Received: by mail-ed1-x529.google.com with SMTP id d6so11335914ede.8; Sun, 24 Apr 2022 15:16:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:subject:from:to:cc:date:in-reply-to:references :content-transfer-encoding:user-agent:mime-version; bh=ULkvU6lbJY7Ze1LSiFl/YjCHBSBAU9f03/gS7iw6lwQ=; b=dsS9eJdRiPXgWB/2NTFf3hwTlRUFyiP9fNV45yTC5m9TgB9OJneWaVN54u3pXIKvnJ NaWm201kEHqCoxrOiYeZvgcn54cEtPGoUPdLSnqH2bqotH/IWiI3piwHRb0zDpZkFT7T 8XYFDFSaRFHAgqAPtHm2F1s6L2dYEayWePRVkpJRM0YMu7aiz4smhlrzGHmusxXKZmf+ BUTd9qB9rMqIGAmdXK+TsbyraFokmr092K9hW7257ktcTqn9a+wi2Ap8SuiHFxp9635K dehJ1aJ2KUawlmrvbtmdibiNIl6dr3UQ9QmzgBSJa6xopVJEGutPzdAmuQ0kK1gIXDlq yazw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:content-transfer-encoding:user-agent:mime-version; bh=ULkvU6lbJY7Ze1LSiFl/YjCHBSBAU9f03/gS7iw6lwQ=; b=Fb45GPffTMfE1pRKEs1zFZ1Mf/gQeLw0o3XJXpY6rFGkCmnbIuyyAO19CE2W/OevK+ MbZtJIukx0gezJjk6iTyYNoQNBsPc6x7FSaxenRg7fBelAlpfMYL8OV3gwffmsFygK0w 3lzuQqmqIYMltDGiMbjzBX7iyNXgK5HXN7DeYTaw5ZLmLEPVH7t6aFp1lwey0X9eTM6J xe/uYzMaOwv2RG9MA+eyDgXnSed/ut3mlETGiBjGQBbT+mPRciSLgdD+5mdDEjCTXy// ck/LQ/GHXH/qW+3A1N/JoE2qVAvdWm/Hs+Gvb4jcyKXzB9F16+8DjHXhno03cpfAtdLk hlxg== X-Gm-Message-State: AOAM533zcUViyBJAxG0SLV8/uZgoDIIm3ZCPnhVJQlhOgPMQW1RJWM4E YqRKiNnnr00nc9FrsNLB59w= X-Received: by 2002:a05:6402:1148:b0:416:a4fb:3c2e with SMTP id g8-20020a056402114800b00416a4fb3c2emr16054403edw.182.1650838566749; Sun, 24 Apr 2022 15:16:06 -0700 (PDT) Received: from [192.168.3.2] (p5dd1ed70.dip0.t-ipconnect.de. [93.209.237.112]) by smtp.googlemail.com with ESMTPSA id n25-20020aa7db59000000b00415965e9727sm3748272edt.18.2022.04.24.15.16.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Apr 2022 15:16:06 -0700 (PDT) Message-ID: Subject: Re: [PATCH v2 4/5] scsi: ufshpb: Add handing of device reset HPB regions Infos in HPB device mode From: Bean Huo To: keosung.park@samsung.com, ALIM AKHTAR , "avri.altman@wdc.com" , "asutoshd@codeaurora.org" , "jejb@linux.ibm.com" , "martin.petersen@oracle.com" , "stanley.chu@mediatek.com" , "beanhuo@micron.com" , "bvanassche@acm.org" , "tomas.winkler@intel.com" , "cang@codeaurora.org" , Daejun Park , "powen.kao@mediatek.com" , "peter.wang@mediatek.com" , cpgsproxy3 Cc: "linux-scsi@vger.kernel.org" , "linux-kernel@vger.kernel.org" Date: Mon, 25 Apr 2022 00:16:05 +0200 In-Reply-To: References: <20220419183044.789065-5-huobean@gmail.com> <20220419183044.789065-1-huobean@gmail.com> <1381713434.41650433982422.JavaMail.epsvc@epcpadp4> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.0-1 MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On Wed, 2022-04-20 at 14:31 +0900, Keoseong Park wrote: > > >=20 > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 /* > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 * Remove this regio= n from active region list and add it > > > to inactive list > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 */ > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 spin_lock(&hpb->rsp_list_= lock); > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ufshpb_update_inactive_in= fo(hpb, region_index); > > How about separating the "hpb->stats.rb_inactive_cnt++" code from > > ufshpb_update_inactive_info()? > > Because I think this code should only be used in > > ufshpb_rsp_req_region_update(). Hi Keoseong Park, I didn't take this hpb->stats.rb_inactive_cnt++ out, since I think if the host receives HPB operation:02h, which means the device recommends the host to de-activate all active regions on the host side. we need to add these de-activations to this parameter because the device has inactivated all active regions. Otherwise, we will find an inconsistent inactivation and activation counter. Please have a look a review the v3.=20 Kind regards, Bean