]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
nvme-pci: don't create a read hctx mapping without read queues
authorAlan Mikhak <alan.mikhak@sifive.com>
Mon, 8 Jul 2019 17:24:12 +0000 (10:24 -0700)
committerChristoph Hellwig <hch@lst.de>
Tue, 9 Jul 2019 20:44:44 +0000 (13:44 -0700)
commit0298d5435276e7795b0b939d74827f6e775e7009
tree99115a44bc7c164b68715dca7cc0bc80cc4e4f81
parent4fe06923f5181d57178e01add4ba54e269c59e9e
nvme-pci: don't create a read hctx mapping without read queues

Only request an IRQ mapping for read queues if at least one read queue
is being allocted, as nvme_pci_map_queues() will later on ignore the
unnecessary mapping request should nvme_dev_add() request such an IRQ
mapping even though no read queues are being allocated.  However,
nvme_dev_add() can avoid making the request by checking the number of
read queues without assuming. This would bring it more in line with
nvme_setup_irqs() and nvme_calc_irq_sets().

Signed-off-by: Alan Mikhak <alan.mikhak@sifive.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/host/pci.c