* [PATCH v3 0/1] ufs: core: Expand MCQ queue slot to DeviceQueueDepth + 1
@ 2023-11-02 5:24 naomi.chu
2023-11-02 5:24 ` [PATCH v3 1/1] " naomi.chu
2023-11-15 15:13 ` [PATCH v3 0/1] " Martin K. Petersen
0 siblings, 2 replies; 10+ messages in thread
From: naomi.chu @ 2023-11-02 5:24 UTC (permalink / raw)
To: linux-scsi, linux-kernel, linux-arm-kernel, linux-mediatek,
Matthias Brugger, AngeloGioacchino Del Regno
Cc: wsd_upstream, peter.wang, casper.li, powen.kao, alice.chao,
naomi.chu, chun-hung.wu, cc.chou, eddie.huang
From: Naomi Chu <naomi.chu@mediatek.com>
Expand the MCQ queue slots to comply with the UFSHCI 4.0 specification,
enabling host controllers to fully utilize the MCQ queue slots.
v2 -> v3
- Add patch description that why this patch is necessary
v1 -> v2
- Remove QUIRK_MCQ_EXPAND_QUEUE_SLOT quirk and make the change for all host controllers
v1
- Support quirk for host controllers not able to distinguish queue full or empty
Naomi Chu (1):
ufs: core: Expand MCQ queue slot to DeviceQueueDepth + 1
drivers/ufs/core/ufs-mcq.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--
2.18.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v3 1/1] ufs: core: Expand MCQ queue slot to DeviceQueueDepth + 1
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 13:23 ` Stanley Chu
` (5 more replies)
2023-11-15 15:13 ` [PATCH v3 0/1] " Martin K. Petersen
1 sibling, 6 replies; 10+ messages in thread
From: naomi.chu @ 2023-11-02 5:24 UTC (permalink / raw)
To: linux-scsi, linux-kernel, linux-arm-kernel, linux-mediatek,
Alim Akhtar, Avri Altman, Bart Van Assche, James E.J. Bottomley,
Martin K. Petersen, Matthias Brugger, AngeloGioacchino Del Regno,
Manivannan Sadhasivam, Asutosh Das, Can Guo
Cc: wsd_upstream, peter.wang, casper.li, powen.kao, alice.chao,
naomi.chu, chun-hung.wu, cc.chou, eddie.huang
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
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH v3 1/1] ufs: core: Expand MCQ queue slot to DeviceQueueDepth + 1
2023-11-02 5:24 ` [PATCH v3 1/1] " naomi.chu
@ 2023-11-02 13:23 ` Stanley Chu
2023-11-02 16:37 ` Manivannan Sadhasivam
` (4 subsequent siblings)
5 siblings, 0 replies; 10+ messages in thread
From: Stanley Chu @ 2023-11-02 13:23 UTC (permalink / raw)
To: naomi.chu
Cc: linux-scsi, linux-kernel, linux-arm-kernel, linux-mediatek,
Alim Akhtar, Avri Altman, Bart Van Assche, James E.J. Bottomley,
Martin K. Petersen, Matthias Brugger, AngeloGioacchino Del Regno,
Manivannan Sadhasivam, Asutosh Das, Can Guo, wsd_upstream,
peter.wang, casper.li, powen.kao, alice.chao, chun-hung.wu,
cc.chou, eddie.huang
On Thu, Nov 2, 2023 at 2:26 PM <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(-)
Reviewed-by: Stanley Chu <stanley.chu@mediatek.com>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v3 1/1] ufs: core: Expand MCQ queue slot to DeviceQueueDepth + 1
2023-11-02 5:24 ` [PATCH v3 1/1] " naomi.chu
2023-11-02 13:23 ` Stanley Chu
@ 2023-11-02 16:37 ` Manivannan Sadhasivam
2023-11-02 19:15 ` Bart Van Assche
2023-11-02 19:16 ` Bart Van Assche
` (3 subsequent siblings)
5 siblings, 1 reply; 10+ messages in thread
From: Manivannan Sadhasivam @ 2023-11-02 16:37 UTC (permalink / raw)
To: naomi.chu
Cc: linux-scsi, linux-kernel, linux-arm-kernel, linux-mediatek,
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, peter.wang, casper.li,
powen.kao, alice.chao, chun-hung.wu, cc.chou, eddie.huang
On Thu, Nov 02, 2023 at 01:24:24PM +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>
> ---
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
>
--
மணிவண்ணன் சதாசிவம்
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v3 1/1] ufs: core: Expand MCQ queue slot to DeviceQueueDepth + 1
2023-11-02 16:37 ` Manivannan Sadhasivam
@ 2023-11-02 19:15 ` Bart Van Assche
0 siblings, 0 replies; 10+ messages in thread
From: Bart Van Assche @ 2023-11-02 19:15 UTC (permalink / raw)
To: Manivannan Sadhasivam, naomi.chu
Cc: linux-scsi, linux-kernel, linux-arm-kernel, linux-mediatek,
Alim Akhtar, Avri Altman, James E.J. Bottomley,
Martin K. Petersen, Matthias Brugger, AngeloGioacchino Del Regno,
Asutosh Das, Can Guo, wsd_upstream, peter.wang, casper.li,
powen.kao, alice.chao, chun-hung.wu, cc.chou, eddie.huang
On 11/2/23 09:37, Manivannan Sadhasivam wrote:
> Where is the changelog?
I think it's here:
https://lore.kernel.org/linux-scsi/20231102052426.12006-1-naomi.chu@mediatek.com/
Bart.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v3 1/1] ufs: core: Expand MCQ queue slot to DeviceQueueDepth + 1
2023-11-02 5:24 ` [PATCH v3 1/1] " naomi.chu
2023-11-02 13:23 ` Stanley Chu
2023-11-02 16:37 ` Manivannan Sadhasivam
@ 2023-11-02 19:16 ` Bart Van Assche
2023-11-03 2:19 ` Peter Wang (王信友)
` (2 subsequent siblings)
5 siblings, 0 replies; 10+ messages in thread
From: Bart Van Assche @ 2023-11-02 19:16 UTC (permalink / raw)
To: naomi.chu, linux-scsi, linux-kernel, linux-arm-kernel,
linux-mediatek, Alim Akhtar, Avri Altman, James E.J. Bottomley,
Martin K. Petersen, Matthias Brugger, AngeloGioacchino Del Regno,
Manivannan Sadhasivam, Asutosh Das, Can Guo
Cc: wsd_upstream, peter.wang, casper.li, powen.kao, alice.chao,
chun-hung.wu, cc.chou, eddie.huang
On 11/1/23 22:24, naomi.chu@mediatek.com wrote:
> 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.
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v3 1/1] ufs: core: Expand MCQ queue slot to DeviceQueueDepth + 1
2023-11-02 5:24 ` [PATCH v3 1/1] " naomi.chu
` (2 preceding siblings ...)
2023-11-02 19:16 ` Bart Van Assche
@ 2023-11-03 2:19 ` Peter Wang (王信友)
2023-11-03 2:35 ` Chun-Hung Wu (巫駿宏)
2023-11-09 2:35 ` Martin K. Petersen
5 siblings, 0 replies; 10+ messages in thread
From: Peter Wang (王信友) @ 2023-11-03 2:19 UTC (permalink / raw)
To: linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org,
jejb@linux.ibm.com, avri.altman@wdc.com, bvanassche@acm.org,
martin.petersen@oracle.com, linux-scsi@vger.kernel.org,
alim.akhtar@samsung.com, quic_asutoshd@quicinc.com,
Naomi Chu (朱詠田),
linux-arm-kernel@lists.infradead.org, mani@kernel.org,
matthias.bgg@gmail.com, quic_cang@quicinc.com,
angelogioacchino.delregno@collabora.com
Cc: Powen Kao (高伯文), wsd_upstream,
Casper Li (李中榮),
CC Chou (周志杰),
Alice Chao (趙珮均),
Chun-Hung Wu (巫駿宏),
Eddie Huang (黃智傑)
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.
>
>
Reviewed-by: Peter Wang <peter.wang@mediatek.com>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v3 1/1] ufs: core: Expand MCQ queue slot to DeviceQueueDepth + 1
2023-11-02 5:24 ` [PATCH v3 1/1] " naomi.chu
` (3 preceding siblings ...)
2023-11-03 2:19 ` Peter Wang (王信友)
@ 2023-11-03 2:35 ` Chun-Hung Wu (巫駿宏)
2023-11-09 2:35 ` Martin K. Petersen
5 siblings, 0 replies; 10+ messages in thread
From: Chun-Hung Wu (巫駿宏) @ 2023-11-03 2:35 UTC (permalink / raw)
To: linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org,
jejb@linux.ibm.com, avri.altman@wdc.com, bvanassche@acm.org,
martin.petersen@oracle.com, linux-scsi@vger.kernel.org,
alim.akhtar@samsung.com, quic_asutoshd@quicinc.com,
Naomi Chu (朱詠田),
linux-arm-kernel@lists.infradead.org, mani@kernel.org,
matthias.bgg@gmail.com, quic_cang@quicinc.com,
angelogioacchino.delregno@collabora.com
Cc: Powen Kao (高伯文), wsd_upstream,
Casper Li (李中榮),
Peter Wang (王信友),
Alice Chao (趙珮均),
CC Chou (周志杰),
Eddie Huang (黃智傑)
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
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v3 1/1] ufs: core: Expand MCQ queue slot to DeviceQueueDepth + 1
2023-11-02 5:24 ` [PATCH v3 1/1] " naomi.chu
` (4 preceding siblings ...)
2023-11-03 2:35 ` Chun-Hung Wu (巫駿宏)
@ 2023-11-09 2:35 ` Martin K. Petersen
5 siblings, 0 replies; 10+ messages in thread
From: Martin K. Petersen @ 2023-11-09 2:35 UTC (permalink / raw)
To: naomi.chu
Cc: linux-scsi, linux-kernel, linux-arm-kernel, linux-mediatek,
Alim Akhtar, Avri Altman, Bart Van Assche, James E.J. Bottomley,
Martin K. Petersen, Matthias Brugger, AngeloGioacchino Del Regno,
Manivannan Sadhasivam, Asutosh Das, Can Guo, wsd_upstream,
peter.wang, casper.li, powen.kao, alice.chao, chun-hung.wu,
cc.chou, eddie.huang
> 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.
Applied to 6.7/scsi-staging, thanks!
--
Martin K. Petersen Oracle Linux Engineering
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v3 0/1] ufs: core: Expand MCQ queue slot to DeviceQueueDepth + 1
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 ` [PATCH v3 1/1] " naomi.chu
@ 2023-11-15 15:13 ` Martin K. Petersen
1 sibling, 0 replies; 10+ messages in thread
From: Martin K. Petersen @ 2023-11-15 15:13 UTC (permalink / raw)
To: linux-scsi, linux-kernel, linux-arm-kernel, linux-mediatek,
Matthias Brugger, AngeloGioacchino Del Regno, naomi.chu
Cc: Martin K . Petersen, wsd_upstream, peter.wang, casper.li,
powen.kao, alice.chao, chun-hung.wu, cc.chou, eddie.huang
On Thu, 02 Nov 2023 13:24:23 +0800, naomi.chu@mediatek.com wrote:
> Expand the MCQ queue slots to comply with the UFSHCI 4.0 specification,
> enabling host controllers to fully utilize the MCQ queue slots.
>
> v2 -> v3
> - Add patch description that why this patch is necessary
>
> v1 -> v2
> - Remove QUIRK_MCQ_EXPAND_QUEUE_SLOT quirk and make the change for all host controllers
>
> [...]
Applied to 6.7/scsi-fixes, thanks!
[1/1] ufs: core: Expand MCQ queue slot to DeviceQueueDepth + 1
https://git.kernel.org/mkp/scsi/c/defde5a50d91
--
Martin K. Petersen Oracle Linux Engineering
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2023-11-15 15:13 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH v3 1/1] " naomi.chu
2023-11-02 13:23 ` Stanley Chu
2023-11-02 16:37 ` Manivannan Sadhasivam
2023-11-02 19:15 ` Bart Van Assche
2023-11-02 19:16 ` Bart Van Assche
2023-11-03 2:19 ` Peter Wang (王信友)
2023-11-03 2:35 ` Chun-Hung Wu (巫駿宏)
2023-11-09 2:35 ` Martin K. Petersen
2023-11-15 15:13 ` [PATCH v3 0/1] " Martin K. Petersen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).