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 <[email protected]>
---
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
Hi,
SEO HOYOUNG <[email protected]> 於 2023年4月19日 週三 下午5:56寫道:
>
> 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 <[email protected]>
> ---
> 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
>
This seems to be the same patch uploaded by Powen:
https://patchwork.kernel.org/project/linux-scsi/patch/[email protected]/
> -----Original Message-----
> From: Stanley Chu <[email protected]>
> Sent: Wednesday, April 19, 2023 7:33 PM
> To: SEO HOYOUNG <[email protected]>
> Cc: [email protected]; [email protected];
> [email protected]; [email protected]; [email protected];
> [email protected]; [email protected]; [email protected];
> [email protected]; [email protected]; [email protected];
> [email protected]; Po-Wen Kao <[email protected]>;
> [email protected]
> Subject: Re: [PATCH v1] scsi: ufs: mcq: add 1 to the max Queues value
>
> Hi,
>
> SEO HOYOUNG <[email protected]> 於 2023年4月19日 週三 下午5:56寫道:
> >
> > 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 <[email protected]>
> > ---
> > 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
> >
>
> This seems to be the same patch uploaded by Powen:
> https://patchwork.kernel.org/project/linux-
> scsi/patch/[email protected]/
Hi,
Thanks for checking patch.
I didn't realize there was already a patch.
So I have to wait for that patchset to be merged?