From: Bart Van Assche <bvanassche@acm.org>
To: Minwoo Im <minwoo.im@samsung.com>,
"James E . J . Bottomley" <James.Bottomley@HansenPartnership.com>,
"Martin K . Petersen" <martin.petersen@oracle.com>
Cc: Alim Akhtar <alim.akhtar@samsung.com>,
Avri Altman <avri.altman@wdc.com>,
gost.dev@samsung.com, linux-scsi@vger.kernel.org,
linux-kernel@vger.kernel.org, Jeuk Kim <jeuk20.kim@samsung.com>
Subject: Re: [PATCH 3/3] ufs: mcq: Prevent no I/O queue case for MCQ
Date: Fri, 31 May 2024 13:17:16 -0700 [thread overview]
Message-ID: <c49fe0fa-9924-4ff8-9775-080b7b470d41@acm.org> (raw)
In-Reply-To: <20240531103821.1583934-4-minwoo.im@samsung.com>
On 5/31/24 03:38, Minwoo Im wrote:
> If hba_maxq equals poll_queues, which means there are no I/O queues
> (HCTX_TYPE_DEFAULT, HCTX_TYPE_READ), the very first hw queue will be
> allocated as HCTX_TYPE_POLL and it will be used as the dev_cmd_queue.
> In this case, device commands such as QUERY cannot be properly handled.
>
> This patch prevents the initialization of MCQ when the number of I/O
> queues is not set and only the number of POLL queues is set.
>
> Signed-off-by: Minwoo Im <minwoo.im@samsung.com>
> ---
> drivers/ufs/core/ufs-mcq.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/drivers/ufs/core/ufs-mcq.c b/drivers/ufs/core/ufs-mcq.c
> index 46faa54aea94..4bcae410c268 100644
> --- a/drivers/ufs/core/ufs-mcq.c
> +++ b/drivers/ufs/core/ufs-mcq.c
> @@ -179,6 +179,15 @@ static int ufshcd_mcq_config_nr_queues(struct ufs_hba *hba)
> return -EOPNOTSUPP;
> }
>
> + /*
> + * Device should support at least one I/O queue to handle device
> + * commands via hba->dev_cmd_queue.
> + */
> + if (hba_maxq == poll_queues) {
> + dev_err(hba->dev, "At least one non-poll queue required\n");
> + return -EOPNOTSUPP;
> + }
> +
> rem = hba_maxq;
>
> if (rw_queues) {
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
prev parent reply other threads:[~2024-05-31 20:17 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20240531104947epcas2p31961bda5ee0eb313c0d9a7d63d5461ba@epcas2p3.samsung.com>
2024-05-31 10:38 ` [PATCH 0/3] ufs: pci: Add support UFSHCI 4.0 MCQ Minwoo Im
2024-05-31 10:38 ` [PATCH 1/3] ufs: mcq: Add ufshcd_mcq_queue_cfg_addr helper Minwoo Im
2024-05-31 20:15 ` Bart Van Assche
2024-05-31 20:55 ` Minwoo Im
2024-05-31 10:38 ` [PATCH 2/3] ufs: pci: Add support MCQ for QEMU-based UFS Minwoo Im
2024-05-31 20:16 ` Bart Van Assche
2024-05-31 20:54 ` Minwoo Im
2024-05-31 10:38 ` [PATCH 3/3] ufs: mcq: Prevent no I/O queue case for MCQ Minwoo Im
2024-05-31 20:17 ` Bart Van Assche [this message]
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=c49fe0fa-9924-4ff8-9775-080b7b470d41@acm.org \
--to=bvanassche@acm.org \
--cc=James.Bottomley@HansenPartnership.com \
--cc=alim.akhtar@samsung.com \
--cc=avri.altman@wdc.com \
--cc=gost.dev@samsung.com \
--cc=jeuk20.kim@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=minwoo.im@samsung.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox