All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Chun-Hung Wu (巫駿宏)" <Chun-hung.Wu@mediatek.com>
To: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-mediatek@lists.infradead.org"
	<linux-mediatek@lists.infradead.org>,
	"jejb@linux.ibm.com" <jejb@linux.ibm.com>,
	"avri.altman@wdc.com" <avri.altman@wdc.com>,
	"bvanassche@acm.org" <bvanassche@acm.org>,
	"martin.petersen@oracle.com" <martin.petersen@oracle.com>,
	"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	"alim.akhtar@samsung.com" <alim.akhtar@samsung.com>,
	"quic_asutoshd@quicinc.com" <quic_asutoshd@quicinc.com>,
	"Naomi Chu (朱詠田)" <Naomi.Chu@mediatek.com>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"mani@kernel.org" <mani@kernel.org>,
	"matthias.bgg@gmail.com" <matthias.bgg@gmail.com>,
	"quic_cang@quicinc.com" <quic_cang@quicinc.com>,
	"angelogioacchino.delregno@collabora.com"
	<angelogioacchino.delregno@collabora.com>
Cc: "Powen Kao (高伯文)" <Powen.Kao@mediatek.com>,
	wsd_upstream <wsd_upstream@mediatek.com>,
	"Casper Li (李中榮)" <casper.li@mediatek.com>,
	"Peter Wang (王信友)" <peter.wang@mediatek.com>,
	"Alice Chao (趙珮均)" <Alice.Chao@mediatek.com>,
	"CC Chou (周志杰)" <cc.chou@mediatek.com>,
	"Eddie Huang (黃智傑)" <eddie.huang@mediatek.com>
Subject: Re: [PATCH v3 1/1] ufs: core: Expand MCQ queue slot to DeviceQueueDepth + 1
Date: Fri, 3 Nov 2023 02:35:48 +0000	[thread overview]
Message-ID: <0561b22db688eda38e63ecc9cec26682cf88cc03.camel@mediatek.com> (raw)
In-Reply-To: <20231102052426.12006-2-naomi.chu@mediatek.com>

On Thu, 2023-11-02 at 13:24 +0800, naomi.chu@mediatek.com wrote:
> From: Naomi Chu <naomi.chu@mediatek.com>
> 
> 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 <naomi.chu@mediatek.com>
> ---
>  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
> 

Reviewed-by: Chun-Hung<chun-hung.wu@mediatek.com>

WARNING: multiple messages have this Message-ID (diff)
From: "Chun-Hung Wu (巫駿宏)" <Chun-hung.Wu@mediatek.com>
To: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-mediatek@lists.infradead.org"
	<linux-mediatek@lists.infradead.org>,
	"jejb@linux.ibm.com" <jejb@linux.ibm.com>,
	"avri.altman@wdc.com" <avri.altman@wdc.com>,
	"bvanassche@acm.org" <bvanassche@acm.org>,
	"martin.petersen@oracle.com" <martin.petersen@oracle.com>,
	"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	"alim.akhtar@samsung.com" <alim.akhtar@samsung.com>,
	"quic_asutoshd@quicinc.com" <quic_asutoshd@quicinc.com>,
	"Naomi Chu (朱詠田)" <Naomi.Chu@mediatek.com>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"mani@kernel.org" <mani@kernel.org>,
	"matthias.bgg@gmail.com" <matthias.bgg@gmail.com>,
	"quic_cang@quicinc.com" <quic_cang@quicinc.com>,
	"angelogioacchino.delregno@collabora.com"
	<angelogioacchino.delregno@collabora.com>
Cc: "Powen Kao (高伯文)" <Powen.Kao@mediatek.com>,
	wsd_upstream <wsd_upstream@mediatek.com>,
	"Casper Li (李中榮)" <casper.li@mediatek.com>,
	"Peter Wang (王信友)" <peter.wang@mediatek.com>,
	"Alice Chao (趙珮均)" <Alice.Chao@mediatek.com>,
	"CC Chou (周志杰)" <cc.chou@mediatek.com>,
	"Eddie Huang (黃智傑)" <eddie.huang@mediatek.com>
Subject: Re: [PATCH v3 1/1] ufs: core: Expand MCQ queue slot to DeviceQueueDepth + 1
Date: Fri, 3 Nov 2023 02:35:48 +0000	[thread overview]
Message-ID: <0561b22db688eda38e63ecc9cec26682cf88cc03.camel@mediatek.com> (raw)
In-Reply-To: <20231102052426.12006-2-naomi.chu@mediatek.com>

On Thu, 2023-11-02 at 13:24 +0800, naomi.chu@mediatek.com wrote:
> From: Naomi Chu <naomi.chu@mediatek.com>
> 
> 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 <naomi.chu@mediatek.com>
> ---
>  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
> 

Reviewed-by: Chun-Hung<chun-hung.wu@mediatek.com>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2023-11-03  2:36 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-02  5:24 [PATCH v3 0/1] ufs: core: Expand MCQ queue slot to DeviceQueueDepth + 1 naomi.chu
2023-11-02  5:24 ` naomi.chu
2023-11-02  5:24 ` [PATCH v3 1/1] " naomi.chu
2023-11-02  5:24   ` naomi.chu
2023-11-02 13:23   ` Stanley Chu
2023-11-02 13:23     ` Stanley Chu
2023-11-02 16:37   ` Manivannan Sadhasivam
2023-11-02 16:37     ` Manivannan Sadhasivam
2023-11-02 19:15     ` Bart Van Assche
2023-11-02 19:15       ` Bart Van Assche
2023-11-02 19:16   ` Bart Van Assche
2023-11-02 19:16     ` Bart Van Assche
2023-11-03  2:19   ` Peter Wang (王信友)
2023-11-03  2:19     ` Peter Wang (王信友)
2023-11-03  2:35   ` Chun-Hung Wu (巫駿宏) [this message]
2023-11-03  2:35     ` Chun-Hung Wu (巫駿宏)
2023-11-09  2:35   ` Martin K. Petersen
2023-11-09  2:35     ` Martin K. Petersen
2023-11-15 15:13 ` [PATCH v3 0/1] " Martin K. Petersen
2023-11-15 15:13   ` Martin K. Petersen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0561b22db688eda38e63ecc9cec26682cf88cc03.camel@mediatek.com \
    --to=chun-hung.wu@mediatek.com \
    --cc=Alice.Chao@mediatek.com \
    --cc=Naomi.Chu@mediatek.com \
    --cc=Powen.Kao@mediatek.com \
    --cc=alim.akhtar@samsung.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=avri.altman@wdc.com \
    --cc=bvanassche@acm.org \
    --cc=casper.li@mediatek.com \
    --cc=cc.chou@mediatek.com \
    --cc=eddie.huang@mediatek.com \
    --cc=jejb@linux.ibm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=mani@kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=matthias.bgg@gmail.com \
    --cc=peter.wang@mediatek.com \
    --cc=quic_asutoshd@quicinc.com \
    --cc=quic_cang@quicinc.com \
    --cc=wsd_upstream@mediatek.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.