Received: by 2002:ac0:e34a:0:0:0:0:0 with SMTP id g10csp460385imn; Mon, 25 Jul 2022 23:41:57 -0700 (PDT) X-Google-Smtp-Source: AGRyM1subgv+/mosezACGY35VPF/vSkGYQrxKuu67JZncSHiLUtJ3/Lj5ae6h+jpl8INIacZTTk9 X-Received: by 2002:a17:906:118:b0:715:771b:251b with SMTP id 24-20020a170906011800b00715771b251bmr12599939eje.651.1658817717179; Mon, 25 Jul 2022 23:41:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658817717; cv=none; d=google.com; s=arc-20160816; b=TuzhmE74KdVaOQ5nlLQ91Zs8H+eQoukrGNbnOD8ZPJ38VPMazKVfVgEnbeED2F4b39 61KDZnIgJ5d6cXy6kWOGpmVjDI/2EuQ5gkyV8pgwRNLOkAsZgPaM/J8LjpAuolDR8L0I duDiKXJMvXtLQM6m9fnjL1ajNZTTvTMoq7pBaH5WGWe7MBIIzytt/edhWdPcKookDLk9 JQR+9N1hSHf1m1ncSh5h+9b+evA+Gcz5eQDJHcYXCK/hK9jxNRwUSufqvmzgmff8T98p NROIWNBs2t3RkRx/BN2umdkC2d4FDlZvSMFoETWvoNP1b9InXmF1agn8KrbPuzveyRx0 Jt1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=oqiaUstZrPNZbvGmC+OGqeMInj0ofQIcow7ykALf3T8=; b=ky6PDSTCnXlyBWD7eOwPjuOG8Pna53J+isVXWiECkwbl8QzUj0BEW50uDRKA6Fk0wa X6H6/CsaKjZhmN4pTkV7YhPzLFEZz7jUuMZqUbfeSM/ZuLHkIFeC6wLX9frhAFnuzD3Q mYsCjE6J2nuCH+MsAeScQpsvS5V+H/uJ3Hm2R3DloPXjJyr7twNHz8E1AHwSOvGiqLip gz3DkhI7E8InhlM2ql7WaUu7KI7VVxOshtawFtvtxJrte2I/e/MEOgUkeO7VezJ4Kxnj SUuuHLvMxPd7M54Ao6J9+pht33pHO3h+7N92oiTpHM7YGPjA4FlMCAsOf0MMTWrAdokY fy3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=ChbkDW40; 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=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f10-20020a056402354a00b0043c2ebeb23bsi1113662edd.117.2022.07.25.23.41.32; Mon, 25 Jul 2022 23:41:57 -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=@quicinc.com header.s=qcdkim header.b=ChbkDW40; 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=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232243AbiGZGfW (ORCPT + 99 others); Tue, 26 Jul 2022 02:35:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51766 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231764AbiGZGfT (ORCPT ); Tue, 26 Jul 2022 02:35:19 -0400 Received: from alexa-out-sd-01.qualcomm.com (alexa-out-sd-01.qualcomm.com [199.106.114.38]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E1C86617F; Mon, 25 Jul 2022 23:35:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1658817317; x=1690353317; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=oqiaUstZrPNZbvGmC+OGqeMInj0ofQIcow7ykALf3T8=; b=ChbkDW40TCKw8/ISjSFgG37LlCFC1LTzy9AzimDVntZXj26oYLX8LObX VVolmpT4qBdfqt/ST9JNIlKdssxRcb37V6xDF9niUbD6M2Zbh+SME6/Vo dA3+FN8Yw7ubI43td0kTW7yb4l0cgsXN6GFplE0cACpStOlUbWmCUlLiJ 8=; Received: from unknown (HELO ironmsg01-sd.qualcomm.com) ([10.53.140.141]) by alexa-out-sd-01.qualcomm.com with ESMTP; 25 Jul 2022 23:35:17 -0700 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg01-sd.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Jul 2022 23:35:16 -0700 Received: from nalasex01a.na.qualcomm.com (10.47.209.196) by nasanex01c.na.qualcomm.com (10.47.97.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Mon, 25 Jul 2022 23:35:16 -0700 Received: from [10.253.34.146] (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Mon, 25 Jul 2022 23:35:11 -0700 Message-ID: <35eb780d-93cf-be2c-deb5-239fad5f3abf@quicinc.com> Date: Tue, 26 Jul 2022 14:35:08 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 Subject: Re: [PATCH 1/2] scsi: ufs: Add Multi-Circular Queue support Content-Language: en-US To: Avri Altman , "bvanassche@acm.org" , "stanley.chu@mediatek.com" , "adrian.hunter@intel.com" , "alim.akhtar@samsung.com" , "beanhuo@micron.com" , "quic_asutoshd@quicinc.com" , "quic_nguyenb@quicinc.com" , "quic_ziqichen@quicinc.com" , "linux-scsi@vger.kernel.org" , "kernel-team@android.com" CC: "James E.J. Bottomley" , "Martin K. Petersen" , Daejun Park , Jinyoung Choi , Kiwoong Kim , open list References: <1658214120-22772-1-git-send-email-quic_cang@quicinc.com> <1658214120-22772-2-git-send-email-quic_cang@quicinc.com> From: Can Guo In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, 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 Hi Avri, On 7/24/2022 12:07 PM, Avri Altman wrote: >> @@ -2558,7 +2587,8 @@ void ufshcd_prepare_utp_scsi_cmd_upiu(struct >> ufshcd_lrb *lrbp, u8 upiu_flags) >> UPIU_TRANSACTION_COMMAND, upiu_flags, >> lrbp->lun, lrbp->task_tag); >> ucd_req_ptr->header.dword_1 = UPIU_HEADER_DWORD( >> - UPIU_COMMAND_SET_TYPE_SCSI, 0, 0, 0); >> + UPIU_COMMAND_SET_TYPE_SCSI | >> + (lrbp->hw_queue_id << 4), 0, 0, 0); > This is fine, as long as we have 16 queues or less. > Otherwise, we need to fill the EXT_IID as well (only if bEXTIIDEn = 1). > > Also, don't we need to do this for query commands as well? > Or at least add a comment that the queue id for query command is 0. As per UFS4.0 JEDEC draft, EXT_IID or IID is not required in QUERY REQUEST/RESPONSE UPIU, unless my doc is out dated, please let me know. Thanks, Can Guo. > > Thanks, > Avri