[PATCH] nvmet: pci-epf: fix DMA channel debug print
Shin'ichiro Kawasaki
shinichiro.kawasaki at wdc.com
Fri Sep 12 04:17:03 PDT 2025
Currently, nvmet_pci_epf_init_dma() has two dev_dbg() calls intended to
print debug information about the DMA channels for RX and TX. However,
both calls mistakenly are made for the TX channel. Fix it so that one
call prints the RX channel as intended.
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki at wdc.com>
---
drivers/nvme/target/pci-epf.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/nvme/target/pci-epf.c b/drivers/nvme/target/pci-epf.c
index 2e78397a7373..cee3ae6f5be7 100644
--- a/drivers/nvme/target/pci-epf.c
+++ b/drivers/nvme/target/pci-epf.c
@@ -310,6 +310,10 @@ static void nvmet_pci_epf_init_dma(struct nvmet_pci_epf *nvme_epf)
nvme_epf->dma_rx_chan = chan;
+ dev_dbg(dev, "Using DMA RX channel %s, maximum segment size %u B\n",
+ dma_chan_name(chan),
+ dma_get_max_seg_size(dmaengine_get_dma_device(chan)));
+
filter.dma_mask = BIT(DMA_MEM_TO_DEV);
chan = dma_request_channel(mask, nvmet_pci_epf_dma_filter, &filter);
if (!chan)
@@ -319,10 +323,6 @@ static void nvmet_pci_epf_init_dma(struct nvmet_pci_epf *nvme_epf)
nvme_epf->dma_enabled = true;
- dev_dbg(dev, "Using DMA RX channel %s, maximum segment size %u B\n",
- dma_chan_name(chan),
- dma_get_max_seg_size(dmaengine_get_dma_device(chan)));
-
dev_dbg(dev, "Using DMA TX channel %s, maximum segment size %u B\n",
dma_chan_name(chan),
dma_get_max_seg_size(dmaengine_get_dma_device(chan)));
--
2.51.0
More information about the Linux-nvme
mailing list