2024-05-31 21:38:21

by Minwoo Im

[permalink] [raw]
Subject: [PATCH v2 0/2] ufs: pci: Add support UFSHCI 4.0 MCQ

This patchset introduces add support for MCQ introduced in UFSHCI 4.0. The
first patch adds a simple helper to get the address of MCQ queue config
registers. The second one enables MCQ feature by adding mandatory vops
callback functions required at MCQ initialization phase. The last one is to
prevent a case where number of MCQ is given 1 since driver allocates poll_queues
first rather than I/O queues to handle device commands. Instead of causing
exception handlers due to no I/O queue, failfast during the initialization time.

---
v2:
- https://lore.kernel.org/linux-scsi/[email protected]/T/#t
- Not separate the newly introduced function from the actuall caller in the
other patch by squash the second patch to the first one (Bart).
- Rename ufs_redhat_* in ufshcd-pci.c to ufs_qemu_* to represent that it's
for QEMU UFS PCI device (Bart).

Minwoo Im (2):
ufs: pci: Add support MCQ for QEMU-based UFS
ufs: mcq: Prevent no I/O queue case for MCQ

drivers/ufs/core/ufs-mcq.c | 23 +++++++++++++++++
drivers/ufs/host/ufshcd-pci.c | 48 ++++++++++++++++++++++++++++++++++-
include/ufs/ufshcd.h | 1 +
3 files changed, 71 insertions(+), 1 deletion(-)

--
2.34.1



2024-06-04 22:25:24

by Bart Van Assche

[permalink] [raw]
Subject: Re: [PATCH v2 0/2] ufs: pci: Add support UFSHCI 4.0 MCQ

On 5/31/24 15:22, Minwoo Im wrote:
> This patchset introduces add support for MCQ introduced in UFSHCI 4.0. The
> first patch adds a simple helper to get the address of MCQ queue config
> registers. The second one enables MCQ feature by adding mandatory vops
> callback functions required at MCQ initialization phase. The last one is to
> prevent a case where number of MCQ is given 1 since driver allocates poll_queues
> first rather than I/O queues to handle device commands. Instead of causing
> exception handlers due to no I/O queue, failfast during the initialization time.

For both patches, feel free to add:

Reviewed-by: Bart Van Assche <[email protected]>

2024-06-05 02:17:44

by Martin K. Petersen

[permalink] [raw]
Subject: Re: [PATCH v2 0/2] ufs: pci: Add support UFSHCI 4.0 MCQ


Minwoo,

> This patchset introduces add support for MCQ introduced in UFSHCI 4.0.
> The first patch adds a simple helper to get the address of MCQ queue
> config registers. The second one enables MCQ feature by adding
> mandatory vops callback functions required at MCQ initialization
> phase. The last one is to prevent a case where number of MCQ is given
> 1 since driver allocates poll_queues first rather than I/O queues to
> handle device commands. Instead of causing exception handlers due to
> no I/O queue, failfast during the initialization time.

Applied to 6.11/scsi-staging, thanks!

Martin

2024-06-12 02:00:18

by Martin K. Petersen

[permalink] [raw]
Subject: Re: [PATCH v2 0/2] ufs: pci: Add support UFSHCI 4.0 MCQ

On Sat, 01 Jun 2024 06:22:42 +0900, Minwoo Im wrote:

> This patchset introduces add support for MCQ introduced in UFSHCI 4.0. The
> first patch adds a simple helper to get the address of MCQ queue config
> registers. The second one enables MCQ feature by adding mandatory vops
> callback functions required at MCQ initialization phase. The last one is to
> prevent a case where number of MCQ is given 1 since driver allocates poll_queues
> first rather than I/O queues to handle device commands. Instead of causing
> exception handlers due to no I/O queue, failfast during the initialization time.
>
> [...]

Applied to 6.11/scsi-queue, thanks!

[1/2] ufs: pci: Add support MCQ for QEMU-based UFS
https://git.kernel.org/mkp/scsi/c/175d1825ca4d
[2/2] ufs: mcq: Prevent no I/O queue case for MCQ
https://git.kernel.org/mkp/scsi/c/a420a8ed0a92

--
Martin K. Petersen Oracle Linux Engineering