Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2754127pxb; Mon, 1 Nov 2021 00:47:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyx5YlsCmG1wayWF/5c5eK58NlPqrDkAFWzTc73fj0kxG4PWDSGs/u8BEG1ZFQ6U6D9ds6T X-Received: by 2002:a17:906:2757:: with SMTP id a23mr34654188ejd.230.1635752875833; Mon, 01 Nov 2021 00:47:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635752875; cv=none; d=google.com; s=arc-20160816; b=hBNlFHRnJcZ76uqGlCNLVYIfqUskhRIYoR17n/GV//w3VK+Aayku5cO87PsLNKPa9K Nvt6swPrw6obs+nZx+hWqQ+cxtpNtf6u2ksxtHc//mo1iy9IVRoFtNKcZGIHmUTCA8cF z8s0SEwoGV9Dr6vIrSoC4duBT8Cz8nFHhhpAyQbpbWg7xjA53L+XVWWa8wWeG7tOWcvr urhd1EB0vfVGheEZ3awSWsW0Yfi0DF4HTAVNoaVHZLHuTnIdOKok2ye2wqbAevXOfjxr 8hROcO8M6OiDCjGGZdKGo+UCveRaT93hME/UIfXPkVGtsNky9igwqcJe3m4UHL8aJtK1 c6uQ== 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=C2vRlVeW74o4dsN9nH8xz3Cp8TBOqVAWGXZh6qi3tzQ=; b=UWz+yXaTmPE92pG/k0ZVKoDgDi0413KBVl8GEAnfQB0XbQprcIxAoUtpIA3/MnmJ16 IEpP+lar0oHtgUQ3SYa4hXgb90I8trjzp65hotXEDa9BIrZaGTO2YhCf6jbdQtxzcNut LXPJ9k8rFo/ZUSGSRxeYzo4uVYp6JXTN3XxZJB/+4ZyVVR5DRkPZExqfsn/A8cyX27T3 spXaG9uLhzRE2iHuc2nUhpWdQNoX3p0W41/YtQsyxFz9AF6Q+jdFcmxYWQKE91HO2Vfh xTf/u9kWXEu41c68zO/Mw9jejk0M3THZG3OKbJAvyHZbUeRXI1XyKVPm3np4oCu9MmcY lGsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=OPCgxhZZ; 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 ec22si20268504ejb.177.2021.11.01.00.47.31; Mon, 01 Nov 2021 00:47:55 -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=OPCgxhZZ; 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 S231205AbhKAHrl (ORCPT + 99 others); Mon, 1 Nov 2021 03:47:41 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:19683 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230400AbhKAHrj (ORCPT ); Mon, 1 Nov 2021 03:47:39 -0400 Received: from epcas3p3.samsung.com (unknown [182.195.41.21]) by mailout3.samsung.com (KnoxPortal) with ESMTP id 20211101074501epoutp03f8439a7445c12caa6c421bb1f019ea59~zXGp1rU_H2585525855epoutp03G for ; Mon, 1 Nov 2021 07:45:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout3.samsung.com 20211101074501epoutp03f8439a7445c12caa6c421bb1f019ea59~zXGp1rU_H2585525855epoutp03G DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1635752702; bh=C2vRlVeW74o4dsN9nH8xz3Cp8TBOqVAWGXZh6qi3tzQ=; h=Subject:Reply-To:From:To:CC:In-Reply-To:Date:References:From; b=OPCgxhZZZF4NEuzrzmaI3eqZsVXTjcPHKMOmrFCnkER0NMZl/TxI7w7kumq75pmCG cN9O3ShZFs7N5dXDv5WzQVdA3f21pfcEKuy4gUJfGQ1gEsEh6RR3tSHPemSlBn0F9E HNEKYv8nIGDmKM/6d4mshJyvkXf6W6Zj+ODpPdj0= Received: from epsnrtp2.localdomain (unknown [182.195.42.163]) by epcas3p2.samsung.com (KnoxPortal) with ESMTP id 20211101074501epcas3p2f9c3679bc19571f9d4a801b828df11ef~zXGpahMV_1938919389epcas3p2b; Mon, 1 Nov 2021 07:45:01 +0000 (GMT) Received: from epcpadp3 (unknown [182.195.40.17]) by epsnrtp2.localdomain (Postfix) with ESMTP id 4HjQ6j3NByz4x9QL; Mon, 1 Nov 2021 07:45:01 +0000 (GMT) Mime-Version: 1.0 Subject: RE: [PATCH] scsi: ufshpb: Properly handle max-single-cmd 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 X-Priority: 3 X-Content-Kind-Code: NORMAL In-Reply-To: <20211031123654.17719-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.01635752701431.JavaMail.epsvc@epcpadp3> Date: Mon, 01 Nov 2021 16:22:58 +0900 X-CMS-MailID: 20211101072258epcms2p77234fb52a6fb6e756d15a61e235fada2 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: 20211031123708epcas2p16645db36a077acf3bd6c0138e50fedc8 References: <20211031123654.17719-1-avri.altman@wdc.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Avri, > The spec recommends that for transfer length larger than the > max-single-cmd attribute (bMAX_ DATA_SIZE_FOR_HPB_SINGLE_CMD) it is > possible to couple pre-reqs with the HPB-READ command. Being a > recommendation, using pre-reqs can be perceived merely as a mean of > optimization. A common practice was to send pre-reqs for chunks within > some interval, and leave the READ10 untouched if larger. > > Anyway, now that the pre-reqs flows have been opt-out, all the commands > are single commands. So properly handle this attribute and do not send > HPB-READ for transfer lengths larger than max-single-cmd. > > Fixes: 09d9e4d04187 (scsi: ufs: ufshpb: Remove HPB2.0 flows) > > Signed-off-by: Avri Altman > --- > drivers/scsi/ufs/ufshpb.c | 29 +++++++++++++++-------------- > drivers/scsi/ufs/ufshpb.h | 1 - > 2 files changed, 15 insertions(+), 15 deletions(-) Reviewed-by: Daejun Park