Received: by 2002:a05:7412:b795:b0:e2:908c:2ebd with SMTP id iv21csp504944rdb; Thu, 2 Nov 2023 09:38:08 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHWFvVEw63eRvWgP6OI9O5/kqDfSAz0XP1JzlZsCXQZQEkBGzHt+qaNFcL+a5ymE/HtGnJo X-Received: by 2002:a17:902:d4cf:b0:1c5:ec97:1718 with SMTP id o15-20020a170902d4cf00b001c5ec971718mr24077247plg.6.1698943087813; Thu, 02 Nov 2023 09:38:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698943087; cv=none; d=google.com; s=arc-20160816; b=RgbThnFRz8tsNK78gjFVsVbA8fP0hdmzVIDOL4wJpakUeWl3HmV+8qjLTeVnUASJLG 2Hep4MoH4rMy5IIjkfJFHk+AhPDDjCMhC4UMcNRsCh6mM5jWW0LjIIxHbfkt2nsyHf7t hglj+Aw9WKjPgOufvwLAZ4pLXxriHPFs4kbA/Oj201wWID9pAztpO0/mRD4S70TJSIw7 e4g9ClwAQKBnMXHSrC9cp69FgYSu0qNLgRH5sf61j2koWdzU2uSYUBxZ+evTYhXI14zs PnGVSkNB5FH/Yu4rMOcxKnfgOUmS3vJf+0oCRqIACf4okZTy3rJq76jOgMncC3lypAy0 zilg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=jCWkZmprVanaX0XgbBNC9xPsyR3lJIRQ7BEnbBwQKDc=; fh=Y0yiMFyRl6cGGVdIiSkCLe9BemZhS0re5lyNgIgsfaM=; b=HFqbBDvEvCG1mPnmiXJUawD/FfDxh3CsscimVubv2RKaA8eCzaRT/0M0o3+jFz6Jjw zMynmDFqeiv5F0jWf7ejbg2p62blu2gUjujjPVQV4HO3CYzZdZ6vUZUKwfwqJ+Cvzrqp UX0fJnJe9ky10zu4Ged1SFutDRZnjqVJsirMVkWBJslmGSxvSeXhcVKSrczPK+Unfm5J 8bpk72/ANK8+88CRzydWbCltH57P8MSfV2YIpLYKr94N0vnRx4+pdCSPB7Zd7zZD2Y+j frTZKtP1jnPPbgomPH5dhjy8hntYGBgE70GyU189Fr1kSRyIpezFmjl9GtEIntDdfYRY /XqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="Yc/gvEa5"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id t18-20020a170902e85200b001c32fe6cdf9si121235plg.386.2023.11.02.09.37.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Nov 2023 09:38:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="Yc/gvEa5"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 9D7B68059369; Thu, 2 Nov 2023 09:37:55 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229566AbjKBQhu (ORCPT + 99 others); Thu, 2 Nov 2023 12:37:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39778 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229458AbjKBQht (ORCPT ); Thu, 2 Nov 2023 12:37:49 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0AEAE19D; Thu, 2 Nov 2023 09:37:46 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5709EC433C8; Thu, 2 Nov 2023 16:37:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1698943065; bh=qvOVCM5IgQflaA5f7AYT2wFzjqGywSPcCDJvjeJKZc0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Yc/gvEa51TgPuaboK/BESRlcaeX+G5Fis1TYjltmRS7skKUXyn5SCDo8BgeVcpqH3 5e7QJkrrsJ72bnBHvB/7ljY/GSojYQ4korVtZkD4UW3eQ4mKsHhflkPZNgmHGJsV9T qQMihW/BnXwyS5KPz6Y76NR49VItwH8Ulz0rhgcsepOSZlGkYMONGIO1m6oa9Qeakj jCAGUyr+5l+t4YqP/5SppicQEHvFoj47dzkDmFN3F0a6DaMJEnTVeWvAKG3Ag+iAxE hx/ikWexecIQL6g32a/tofRoTt6F1pi2OuiLrO1/qaAIJHaFn+CscP6/Xdvvc2GLhg YfqyBqVr8pykA== Date: Thu, 2 Nov 2023 22:07:28 +0530 From: Manivannan Sadhasivam To: naomi.chu@mediatek.com Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, Alim Akhtar , Avri Altman , Bart Van Assche , "James E.J. Bottomley" , "Martin K. Petersen" , Matthias Brugger , AngeloGioacchino Del Regno , Asutosh Das , Can Guo , wsd_upstream@mediatek.com, peter.wang@mediatek.com, casper.li@mediatek.com, powen.kao@mediatek.com, alice.chao@mediatek.com, chun-hung.wu@mediatek.com, cc.chou@mediatek.com, eddie.huang@mediatek.com Subject: Re: [PATCH v3 1/1] ufs: core: Expand MCQ queue slot to DeviceQueueDepth + 1 Message-ID: <20231102163728.GB20943@thinkpad> References: <20231102052426.12006-1-naomi.chu@mediatek.com> <20231102052426.12006-2-naomi.chu@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20231102052426.12006-2-naomi.chu@mediatek.com> X-Spam-Status: No, score=-1.6 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Thu, 02 Nov 2023 09:37:55 -0700 (PDT) On Thu, Nov 02, 2023 at 01:24:24PM +0800, naomi.chu@mediatek.com wrote: > From: Naomi Chu > > The UFSHCI 4.0 specification mandates that there should always be at > least one empty slot in each queue for distinguishing between full and > empty states. Enlarge the `hwq->max_entries` to `DeviceQueueDepth +1` > to allow UFSHCI 4.0 controllers to fully utilize MCQ queue slots. > > Fixes: 4682abfae2eb ("scsi: ufs: core: mcq: Allocate memory for MCQ mode") > Signed-off-by: Naomi Chu > --- Where is the changelog? - Mani > 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 2ba8ec254dce..5c75ab9d6bb5 100644 > --- a/drivers/ufs/core/ufs-mcq.c > +++ b/drivers/ufs/core/ufs-mcq.c > @@ -436,7 +436,7 @@ int ufshcd_mcq_init(struct ufs_hba *hba) > > for (i = 0; i < hba->nr_hw_queues; i++) { > hwq = &hba->uhq[i]; > - hwq->max_entries = hba->nutrs; > + hwq->max_entries = hba->nutrs + 1; > spin_lock_init(&hwq->sq_lock); > spin_lock_init(&hwq->cq_lock); > mutex_init(&hwq->sq_mutex); > -- > 2.18.0 > -- மணிவண்ணன் சதாசிவம்