[PATCH] nvmet: pci-epf: fix DMA channel debug print

Shinichiro Kawasaki shinichiro.kawasaki at wdc.com
Fri Sep 12 23:32:43 PDT 2025


On Sep 12, 2025 / 21:14, Damien Le Moal wrote:
> On 9/12/25 20:17, Shin'ichiro Kawasaki wrote:
> > 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)));
> > +
> 
> It would be better to keep this message after "nvme_epf->dma_enabled = true" so
> that it is not misleading.

I see, it sounds reasonable.

> So I think you need to have 2 channel variables (e.g.
> rxchan and txchan).

We have 'nvme_epf->rx_chan' and 'nvme_epf->tx_chan', so I think we can refer to
them instead of the two variables. Will send out v2 with the change.


More information about the Linux-nvme mailing list