[PATCH] nvmet: pci-epf: Move DMA initialization to EPC init callback
Damien Le Moal
dlemoal at kernel.org
Tue Sep 9 18:07:02 PDT 2025
On 9/9/25 8:21 PM, Niklas Cassel wrote:
> From: Shin'ichiro Kawasaki <shinichiro.kawasaki at wdc.com>
>
> 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 60bd3e039aa2 ("PCI: endpoint: pci-epf-{mhi/test}: Move DMA
> initialization to EPC init callback").
>
> Cc: stable at vger.kernel.org
> Fixes: 0faa0fe6f90e ("nvmet: New NVMe PCI endpoint function target driver")
> Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki at wdc.com>
> Signed-off-by: Niklas Cassel <cassel at kernel.org>
Looks good.
Reviewed-by: Damien Le Moal <dlemoal at kernel.org>
--
Damien Le Moal
Western Digital Research
More information about the Linux-nvme
mailing list