linux/drivers/nvme/target
Shin'ichiro Kawasaki 116f511839 nvmet: pci-epf: move DMA initialization to EPC init callback
commit 511b3b644e upstream.

For DMA initialization to work across all EPC drivers, the DMA
initialization has to be done in the .init() callback.

This is because not all EPC drivers will have a refclock (which is often
needed to access registers of a DMA controller embedded in a PCIe
controller) at the time the .bind() callback is called.

However, all EPC drivers are guaranteed to have a refclock by the time
the .init() callback is called.

Thus, move the DMA initialization to the .init() callback.

This change was already done for other EPF drivers in
commit 60bd3e039a ("PCI: endpoint: pci-epf-{mhi/test}: Move DMA
initialization to EPC init callback").

Cc: stable@vger.kernel.org
Fixes: 0faa0fe6f9 ("nvmet: New NVMe PCI endpoint function target driver")
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Signed-off-by: Niklas Cassel <cassel@kernel.org>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2026-01-08 10:17:01 +01:00
..
admin-cmd.c nvme: spelling fixes 2025-06-04 10:23:28 +02:00
auth.c nvmet-auth: update sc_c in target host hash calculation 2025-11-17 08:05:58 -08:00
configfs.c for-6.14/block-20250118 2025-01-20 19:38:46 -08:00
core.c nvmet: add safety check for subsys lock 2025-09-23 15:38:28 -07:00
debugfs.c These are objtool fixes and updates by Josh Poimboeuf, centered 2025-04-02 10:30:10 -07:00
debugfs.h nvmet: add debugfs support 2024-06-24 12:53:42 -07:00
discovery.c nvmet: replace strncpy with strscpy 2025-05-20 05:34:25 +02:00
fabrics-cmd-auth.c nvmet-auth: update sc_c in target host hash calculation 2025-11-17 08:05:58 -08:00
fabrics-cmd.c nvmet: fabrics: add CQ init and destroy 2025-05-20 05:34:25 +02:00
fc.c nvmet-fc: avoid scheduling association deletion twice 2025-09-15 08:52:57 -07:00
fcloop.c nvmet-fcloop: call done callback even when remote port is gone 2025-09-15 08:52:57 -07:00
io-cmd-bdev.c vfs-6.17-rc1.integrity 2025-07-28 15:12:00 -07:00
io-cmd-file.c nvmet: use bvec_set_page to initialize bvecs 2023-02-03 08:20:55 -07:00
Kconfig crash_dump, nvme: select CONFIGFS_FS as built-in 2025-05-27 19:40:33 -07:00
loop.c nvmet: simplify the nvmet_req_init() interface 2025-05-20 05:34:26 +02:00
Makefile nvmet: New NVMe PCI endpoint function target driver 2025-01-10 19:30:49 -08:00
nvmet.h nvmet-auth: update sc_c in target host hash calculation 2025-11-17 08:05:58 -08:00
passthru.c nvmet: add support for FDP in fabrics passthru path 2025-07-31 06:35:43 -07:00
pci-epf.c nvmet: pci-epf: move DMA initialization to EPC init callback 2026-01-08 10:17:01 +01:00
pr.c nvmet-loop: avoid using mutex in IO hotpath 2024-12-27 13:24:00 -08:00
rdma.c nvme: fix various comment typos 2025-07-31 06:35:58 -07:00
tcp.c block-6.16-20250718 2025-07-18 12:16:13 -07:00
trace.c nvmet: add tracing of reservation commands 2024-11-13 08:51:24 -08:00
trace.h nvme: trace: avoid memcpy overflow warning 2024-01-05 13:16:18 -08:00
zns.c nvme: fix multiple spelling and grammar issues in host drivers 2025-07-17 13:38:06 +02:00