Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp566296pxb; Fri, 29 Oct 2021 15:36:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxFyfzmQcpNu+ZG1i5y6t9ZPhABUmK4333msiW6hwz70XanvKkRTgPovu1X24P36/HgP6gg X-Received: by 2002:a05:6e02:b44:: with SMTP id f4mr9797229ilu.100.1635546980703; Fri, 29 Oct 2021 15:36:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635546980; cv=none; d=google.com; s=arc-20160816; b=eohLZjy4OnwbO9q5FUNojOy5mtX+n1dSvCpQhpqBqyrj7q2L4xtanybrjcSJmdO8A1 cVtaMiRDY8eTPKBjoNwZgRYCFfKvFkIcx0hxsUfEZWUzPunq1vO+TRoEQYtZYgYM+Jpv kfM/TY++nmqf/x4FIelBefUgGXtFKdpUH6u7gac5XU3iSEiY0lQVS2Winv4/NO6f5smJ oSPzASL1RJgxXry0X0s2P0XOO+1pDWwStAWt3H9VbGLV2hezpHrIW6PGtwdwJOTiVjbA WHd8ZOIpUp0j0iwxKMSZ/5gHWnzQBZjsnE4UOhHjCaWa5o7QVYjwEkL0UQamEUM567/9 pteg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:content-transfer-encoding:date :message-id:in-reply-to:cc:to:from:sender:reply-to:subject :mime-version:dkim-signature:dkim-filter; bh=hy7AFC4W265SDo8nviZEasmF4BSTyYkkCmu+yF93+Wo=; b=FdD02vXf/s82V9dD2O2T+phlxg9w59WGqhsx2TAoCML8wXwR0KQFv557kF3MXYr/ia tbf07cWaDVjwnznZgAiWG11Rj/2K3vNs+ZrEpr79CzrfqtaED8f8F964gkJjKjqT7iX8 ms3/anlWLbVL6iHNEZKWKBXzd1O0rb3xHQnbdnPIj6hqcrJZCr8Wkhz69JBr5g++OtMM Fpg2M8w/JRe0E/GEJt807Ys0X/+CM74Pwdh+rikvJSx3sspDpnn0a5D1fnJOmLNVFO9u mkmrbKCJdQdYP2nmI9mjMhz5RczjaktnI2sCUm36XmLmQu5FV26vOeluVQa0ABtbrJtc ZcMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=BZe9YQB1; 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=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s19si9451215jat.11.2021.10.29.15.36.09; Fri, 29 Oct 2021 15:36:20 -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=@samsung.com header.s=mail20170921 header.b=BZe9YQB1; 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=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231522AbhJ2Whe (ORCPT + 99 others); Fri, 29 Oct 2021 18:37:34 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:33447 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229546AbhJ2Whe (ORCPT ); Fri, 29 Oct 2021 18:37:34 -0400 Received: from epcas3p4.samsung.com (unknown [182.195.41.22]) by mailout4.samsung.com (KnoxPortal) with ESMTP id 20211029223503epoutp0476e4e1eaf4b90c66080427805d4408be~yoT4q-w0r0759407594epoutp04Y for ; Fri, 29 Oct 2021 22:35:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout4.samsung.com 20211029223503epoutp0476e4e1eaf4b90c66080427805d4408be~yoT4q-w0r0759407594epoutp04Y DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1635546903; bh=hy7AFC4W265SDo8nviZEasmF4BSTyYkkCmu+yF93+Wo=; h=Subject:Reply-To:From:To:CC:In-Reply-To:Date:References:From; b=BZe9YQB12j93f2msc29uf40FS62zumqLXlqeRUvQOuphlgntKqqbd+GFhKlaJVIrz 4P9adOnnUcHGTTFqIcYv8m7lXcSfESsN1otK1xv4REnAkqmkA90PrvHzsbRufaxAU5 jasnR29YMh5Hfec04Zu+equFytdPTU/mCBroOCsQ= Received: from epsnrtp3.localdomain (unknown [182.195.42.164]) by epcas3p2.samsung.com (KnoxPortal) with ESMTP id 20211029223502epcas3p2acacfc3bcd77f6589f9673739dd775db~yoT35i_9L2346223462epcas3p2c; Fri, 29 Oct 2021 22:35:02 +0000 (GMT) Received: from epcpadp3 (unknown [182.195.40.17]) by epsnrtp3.localdomain (Postfix) with ESMTP id 4Hgy121NjWz4x9Q1; Fri, 29 Oct 2021 22:35:02 +0000 (GMT) Mime-Version: 1.0 Subject: RE: [PATCH v2] scsi: ufshpb: Opt out pre-reqs from HPB2.0 flows Reply-To: daejun7.park@samsung.com Sender: Daejun Park From: Daejun Park To: Avri Altman , "James E . J . Bottomley" , "Martin K . Petersen" CC: "linux-scsi@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Bart Van Assche , Adrian Hunter , Bean Huo , Daejun Park , James Bottomley X-Priority: 3 X-Content-Kind-Code: NORMAL In-Reply-To: <20211029193002.4187-1-avri.altman@wdc.com> X-CPGS-Detection: blocking_info_exchange X-Drm-Type: N,general X-Msg-Generator: Mail X-Msg-Type: PERSONAL X-Reply-Demand: N Message-ID: <1891546521.01635546902168.JavaMail.epsvc@epcpadp3> Date: Sat, 30 Oct 2021 07:30:07 +0900 X-CMS-MailID: 20211029223007epcms2p100026018a238d5066d0946320c992056 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" X-Sendblock-Type: AUTO_CONFIDENTIAL X-CPGSPASS: Y X-CPGSPASS: Y X-Hop-Count: 3 X-CMS-RootMailID: 20211029193014epcas2p10300c03ccf0337f9dd3653f29e2057d1 References: <20211029193002.4187-1-avri.altman@wdc.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Avri, > @@ -1841,13 +1575,7 @@ static void ufshpb_lu_parameter_init(struct ufs_hba *hba, > u32 entries_per_rgn; > u64 rgn_mem_size, tmp; > > - /* for pre_req */ > - hpb->pre_req_min_tr_len = hpb_dev_info->max_hpb_single_cmd + 1; > - > - if (ufshpb_is_legacy(hba)) > - hpb->pre_req_max_tr_len = HPB_LEGACY_CHUNK_HIGH; > - else > - hpb->pre_req_max_tr_len = HPB_MULTI_CHUNK_HIGH; > + hpb->pre_req_max_tr_len = HPB_LEGACY_CHUNK_HIGH; They are should be not changed, because it makes ufshpb_is_supported_chunk() determine to non-HPB READ when the its size is bigger than 4KB. > > hpb->cur_read_id = 0; > > @@ -2858,8 +2586,7 @@ void ufshpb_get_geo_info(struct ufs_hba *hba, u8 *geo_buf) > void ufshpb_get_dev_info(struct ufs_hba *hba, u8 *desc_buf) > { > struct ufshpb_dev_info *hpb_dev_info = &hba->ufshpb_dev; > - int version, ret; > - u32 max_hpb_single_cmd = HPB_MULTI_CHUNK_LOW; > + int version; > > hpb_dev_info->control_mode = desc_buf[DEVICE_DESC_PARAM_HPB_CONTROL]; > > @@ -2875,13 +2602,6 @@ void ufshpb_get_dev_info(struct ufs_hba *hba, u8 *desc_buf) > if (version == HPB_SUPPORT_LEGACY_VERSION) > hpb_dev_info->is_legacy = true; > > - ret = ufshcd_query_attr_retry(hba, UPIU_QUERY_OPCODE_READ_ATTR, > - QUERY_ATTR_IDN_MAX_HPB_SINGLE_CMD, 0, 0, &max_hpb_single_cmd); > - if (ret) > - dev_err(hba->dev, "%s: idn: read max size of single hpb cmd query request failed", > - __func__); > - hpb_dev_info->max_hpb_single_cmd = max_hpb_single_cmd; > - > /* > * Get the number of user logical unit to check whether all > * scsi_device finish initialization > diff --git a/drivers/scsi/ufs/ufshpb.h b/drivers/scsi/ufs/ufshpb.h > index a79e07398970..a4e7e33d451e 100644 > --- a/drivers/scsi/ufs/ufshpb.h > +++ b/drivers/scsi/ufs/ufshpb.h > @@ -31,8 +31,6 @@ > > /* hpb support chunk size */ > #define HPB_LEGACY_CHUNK_HIGH 1 > -#define HPB_MULTI_CHUNK_LOW 7 > -#define HPB_MULTI_CHUNK_HIGH 255 Because of above issue, they should be remained. Thanks, Daejun