summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>2025-09-13 15:53:50 +0900
committerKeith Busch <kbusch@kernel.org>2025-12-01 13:45:56 -0800
commit3c1fb0ce60ef41eda52e8f847613b003e1ca35c9 (patch)
treec1a26f871288d2f871ac61b9effc7aff3b0ef1c4
parent511b3b644e28d9b66e32515a74c57ff599e89035 (diff)
nvmet: pci-epf: fix DMA channel debug print
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 by referreing to 'nvme_epf->rx_chan' and 'nvme_epf->tx_chan' and instead of the local variable 'chan'. Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com> Reviewed-by: Damien Le Moal <dlemoal@kernel.org> Signed-off-by: Keith Busch <kbusch@kernel.org>
-rw-r--r--drivers/nvme/target/pci-epf.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/nvme/target/pci-epf.c b/drivers/nvme/target/pci-epf.c
index 9c5b0f78ce8d..f858a6c9d7cb 100644
--- a/drivers/nvme/target/pci-epf.c
+++ b/drivers/nvme/target/pci-epf.c
@@ -320,12 +320,14 @@ 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)));
+ dma_chan_name(nvme_epf->dma_rx_chan),
+ dma_get_max_seg_size(dmaengine_get_dma_device(nvme_epf->
+ dma_rx_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)));
+ dma_chan_name(nvme_epf->dma_tx_chan),
+ dma_get_max_seg_size(dmaengine_get_dma_device(nvme_epf->
+ dma_tx_chan)));
return;