nvme-pci: set the DMA mask earlier
authorChristoph Hellwig <hch@lst.de>
Mon, 13 Feb 2023 05:58:33 +0000 (06:58 +0100)
committerChristoph Hellwig <hch@lst.de>
Tue, 14 Feb 2023 05:36:40 +0000 (06:36 +0100)
commit924bd96ea27d53706147a94b8e576080535785df
tree545d5e661ed496d7bcfc4172a65a093cec883a29
parent5f69f009b7c445ddd219609c0085825c6270415a
nvme-pci: set the DMA mask earlier

Set the DMA mask before calling dma_addressing_limited, which depends on it.

Note that this stop checking the return value of dma_set_mask_and_coherent
as this function can only fail for masks < 32-bit.

Fixes: 3f30a79c2e2c ("nvme-pci: set constant paramters in nvme_pci_alloc_ctrl")
Reported-by: Michael Kelley <mikelley@microsoft.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Jens Axboe <axboe@kernel.dk>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Tested-by: Michael Kelley <mikelley@microsoft.com>
drivers/nvme/host/pci.c