Re: [PATCH v2] nvme-pci: Use PCI bus address for data/queues in CMB

From: Christoph Hellwig
Date: Sun Oct 01 2017 - 03:42:13 EST

This looks very convoluted, mostly because the existing code is
doing weird things. For one thing what is sq_dma_addr currently
is not a DMA adddress - we either need the resource address
for the ioremap, but we don't need to stash that away, and second
the one programmed into the controller should be a pci_bus_addr_t.

Second we already have a nice PCI-layer helper called pci_bus_address
to get the bus address for us and we should use it.

Something like the patch below should solve the issue: