Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp27669rwr; Wed, 19 Apr 2023 02:57:16 -0700 (PDT) X-Google-Smtp-Source: AKy350bJeTsq0SKOGbxwzeAnoFybGKb1reiH3wFX2Bn0SWrmgIiY8aEAETZatewkGpMvcU/Eo2pZ X-Received: by 2002:a17:90b:4a8c:b0:23d:bbcb:c97f with SMTP id lp12-20020a17090b4a8c00b0023dbbcbc97fmr2448282pjb.1.1681898236436; Wed, 19 Apr 2023 02:57:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681898236; cv=none; d=google.com; s=arc-20160816; b=YtIYoU3cxnP14yIb1FvC0koia1EnCAzBEnyRaSH0XFwgcre7tcSHmKdfqyutmnEt9N 9UjMSaKKIeMrRc/Ngl9nBaAR6LVNUGwwbzvOkJyIc2h/T/EkcChfRPxIrmMZLkylpFNk gOXGJ8pdMg9mC5mvEXvpoouLTB4xSqPxSRtYTF4BP27E3pRY1Jo3hG6upxmV5Lf9uC7p eqywuI/ziYzslD5uqtw17zpzg44BWR5I08vHpHPPe9uI0mBORXSJNg56xraB8VybwGEJ o64FyDkaoZJEKzan/BrstM4YIVkpwCpQ3UO4X7Zu9aEKt5GXwMyBd3dnRqUsmVzuEmZ+ qd0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:dlp-filter:cms-type :content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dkim-signature:dkim-filter; bh=VFJuBEof/y38eZrTiAe8AhvGQtXPCzTDUesnipszi3w=; b=IfmcqYHv6MkVTkzZu17AfMUGMrpKHV7DpfiqprUJfW3tdFHpyPeWktXwsM0WLxIptf 1E6QMfuxjs2wTSc5352Egg2Uoowr393M2xtvP+gLXrRAWBJGSkJ4jeCcsVSP7tJcCkro E5U+bcz7cBF5tIhyBXUDAValQ0j/ccz/cl5KDzY4nhPP2WJlCsq79BQz/GvnN7VNYysX LcYCeEQwcxps0Bimsjh1avK8MkPnLO7jR87fUFIkokj/P6/qlEHW2xLr5LXIXqfZ/zOu GsOQ4lJX31Alsz0ca03QRkIUyifO8A9Wk0jCplDLCKX+uaNRQLFOyD25pRY2mQK9DKhF xTRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=DTfzV1on; 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=samsung.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id iz6-20020a170902ef8600b001a686b1dc64si15798846plb.412.2023.04.19.02.57.05; Wed, 19 Apr 2023 02:57:16 -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=@samsung.com header.s=mail20170921 header.b=DTfzV1on; 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=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232543AbjDSJsE (ORCPT + 99 others); Wed, 19 Apr 2023 05:48:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44338 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232513AbjDSJsC (ORCPT ); Wed, 19 Apr 2023 05:48:02 -0400 Received: from mailout3.samsung.com (mailout3.samsung.com [203.254.224.33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0FBF7559F for ; Wed, 19 Apr 2023 02:47:59 -0700 (PDT) Received: from epcas2p4.samsung.com (unknown [182.195.41.56]) by mailout3.samsung.com (KnoxPortal) with ESMTP id 20230419094757epoutp030c9467d636122a92ffdcd42bea2b3347~XTQbQULBn0647806478epoutp03T for ; Wed, 19 Apr 2023 09:47:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout3.samsung.com 20230419094757epoutp030c9467d636122a92ffdcd42bea2b3347~XTQbQULBn0647806478epoutp03T DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1681897677; bh=VFJuBEof/y38eZrTiAe8AhvGQtXPCzTDUesnipszi3w=; h=From:To:Cc:Subject:Date:References:From; b=DTfzV1onWOHBmY3ri5DScGAtMknhlqt3WyeWEbZzbHNiGQpQPCMxYw7xx7OmCfXgV arAxxpHPdf6Gekkfbck3bXtt4MMpXAp3SFVIOczOeacDxdd5r+UcK3wLZ4IcDyIaaN Rx/HYo9uK172grc9jhONrmlgzVajwkQRD31RBFRI= Received: from epsnrtp1.localdomain (unknown [182.195.42.162]) by epcas2p3.samsung.com (KnoxPortal) with ESMTP id 20230419094756epcas2p33b2148ddef3dc030b19019039677c621~XTQaeVgz61652816528epcas2p3F; Wed, 19 Apr 2023 09:47:56 +0000 (GMT) Received: from epsmges2p4.samsung.com (unknown [182.195.36.97]) by epsnrtp1.localdomain (Postfix) with ESMTP id 4Q1bZ36dZKz4x9Py; Wed, 19 Apr 2023 09:47:55 +0000 (GMT) Received: from epcas2p2.samsung.com ( [182.195.41.54]) by epsmges2p4.samsung.com (Symantec Messaging Gateway) with SMTP id 0D.40.09650.BC8BF346; Wed, 19 Apr 2023 18:47:55 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas2p3.samsung.com (KnoxPortal) with ESMTPA id 20230419094754epcas2p3901ad6f3171a2be1a144d957c2e0d8ad~XTQYmj7t_0901709017epcas2p3x; Wed, 19 Apr 2023 09:47:54 +0000 (GMT) Received: from epsmgms1p2.samsung.com (unknown [182.195.42.42]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20230419094754epsmtrp2d61a439e51d695b92ac277ecdba8adc8~XTQYlYn4f2251822518epsmtrp2s; Wed, 19 Apr 2023 09:47:54 +0000 (GMT) X-AuditID: b6c32a48-dc7ff700000025b2-83-643fb8cba246 Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p2.samsung.com (Symantec Messaging Gateway) with SMTP id C3.EA.08609.AC8BF346; Wed, 19 Apr 2023 18:47:54 +0900 (KST) Received: from rack03.dsn.sec.samsung.com (unknown [10.229.95.126]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20230419094754epsmtip1c90a028ae5921eda98715c5e5d8c3afd~XTQYWSC8H1590715907epsmtip11; Wed, 19 Apr 2023 09:47:54 +0000 (GMT) From: SEO HOYOUNG To: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, alim.akhtar@samsung.com, avri.altman@wdc.com, jejb@linux.ibm.com, martin.petersen@oracle.com, beanhuo@micron.com, bvanassche@acm.org, bhoon95.kim@samsung.com, kwmad.kim@samsung.com, sc.suh@samsung.com, quic_nguyenb@quicinc.com Cc: SEO HOYOUNG Subject: [PATCH v1] scsi: ufs: mcq: add 1 to the max Queues value Date: Wed, 19 Apr 2023 18:48:38 +0900 Message-Id: <20230419094838.136349-1-hy50.seo@samsung.com> X-Mailer: git-send-email 2.26.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrBJsWRmVeSWpSXmKPExsWy7bCmme7pHfYpBmvmGFk8mLeNzeLlz6ts FgcfdrJYfF36jNVi2oefzBarFz9gsVh0YxuTxc0tR1ksLu+aw2bRfX0Hm8Xy4/+YLKa+OM5u 0XX3BqMDr8flK94eExYdYPT4vr6DzePj01ssHhP31Hn0bVnF6PF5k5xH+4FupgCOqGybjNTE lNQihdS85PyUzLx0WyXv4HjneFMzA0NdQ0sLcyWFvMTcVFslF58AXbfMHKCLlRTKEnNKgUIB icXFSvp2NkX5pSWpChn5xSW2S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lz6ts FgcfdrJYfF36jNVi2oefzBarFz9gsVh0YxuTxc0tR1ksLu+aw2bRfX0Hm8Xy4/+YLKa+OM5u 0XX3BqMDr8flK94eExYdYPT4vr6DzePj01ssHhP31Hn0bVnF6PF5k5xH+4FupgCOKC6blNSc zLLUIn27BK6Mi4/esBcs4qq41beDsYFxN0cXIyeHhICJxNEF1xm7GLk4hAR2MErcvfeLFSIh IfF/cRMThC0scb/lCCtE0TdGiTV3J7CDJNgENCTWHDvEBJIQEdjGJHF/+SKwbmYBNYnPd5ex gNjCAo4SEzYuZwOxWQRUJX6cfQhm8wpYSTxq/Aa1TV5iUcNvJoi4oMTJmU+AejmA5qhLrJ8n BDFSXqJ562zmCYz8s5BUzUKomoWkagEj8ypGydSC4tz03GLDAqO81HK94sTc4tK8dL3k/NxN jOBY0dLawbhn1Qe9Q4xMHIyHGCU4mJVEeM+4WqUI8aYkVlalFuXHF5XmpBYfYpTmYFES573Q dTJeSCA9sSQ1OzW1ILUIJsvEwSnVwOSbNetrweYPRucW/bbpjSoRsjxxVFfjBrv7jQj5ZZeP zV7wWb1xAe9r9ZPfr9Vz5BmwS/Fm3Qx8YfvgkUQe//d0p3+s5YrTnMWWtxdUnvhitvadNJui nn3Bg8q6uctXHGd6v+aVlnzNzPmb5KpuZ1wLnj/Txu3kuT/8zBuffSuVazzrdqhkjuJfueva a5pXrL3Kz5bAfzfvxw6lFbl/HRXFt/+1kroxTb+V6zTbne+bZ/26t3mH9YKjLDtyvd6lR07b u7xiek7Ey5mzz8+2khDn4HcVmNBTpGrAKbiVUeGm/H4OX3NruQbbpQtjTzzo2bf9pvyvGVF3 2M24f2xbvOmpTo1WT+NhM1PPSw3+rZlKLMUZiYZazEXFiQAtXRRIBAMAAA== X-CMS-MailID: 20230419094754epcas2p3901ad6f3171a2be1a144d957c2e0d8ad X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-Sendblock-Type: AUTO_CONFIDENTIAL CMS-TYPE: 102P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20230419094754epcas2p3901ad6f3171a2be1a144d957c2e0d8ad References: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable 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 If read the MAXQ field value verbatim, can use a value that is one less than the supported Queue. So read the MAXQ field value and incremented it by one below is the specification Maximum number of Queues (MAXQ): Maximum number of Queues this controller can support. In this version of specification, maximum value is 31. NOTE To support 1:1 topology, the Host HW controller must support HW resources for MAXQ number of Completion Queues too. Host SW may use less number of completion queues for N:1 topology..:1 Queue 0: 1 Queue 1: 2 Queues … 31: 32 Queues 32-255 : reserved Signed-off-by: SEO HOYOUNG --- drivers/ufs/core/ufs-mcq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/ufs/core/ufs-mcq.c b/drivers/ufs/core/ufs-mcq.c index 31df052fbc41..a1ee3318c605 100644 --- a/drivers/ufs/core/ufs-mcq.c +++ b/drivers/ufs/core/ufs-mcq.c @@ -150,7 +150,7 @@ static int ufshcd_mcq_config_nr_queues(struct ufs_hba *hba) u32 hba_maxq, rem, tot_queues; struct Scsi_Host *host = hba->host; - hba_maxq = FIELD_GET(MAX_QUEUE_SUP, hba->mcq_capabilities); + hba_maxq = FIELD_GET(MAX_QUEUE_SUP, hba->mcq_capabilities) + 1; tot_queues = UFS_MCQ_NUM_DEV_CMD_QUEUES + read_queues + poll_queues + rw_queues; -- 2.26.0