]> git.baikalelectronics.ru Git - kernel.git/commit
nvme-pci: fix nvme_setup_irqs()
authorMing Lei <ming.lei@redhat.com>
Thu, 3 Jan 2019 01:34:39 +0000 (09:34 +0800)
committerJens Axboe <axboe@kernel.dk>
Wed, 16 Jan 2019 16:44:28 +0000 (09:44 -0700)
commit5c863e4bb4370551a58c7ddd5ceee63805826b2f
treef8dc802dee1950b7419eb0e63669c5e0932d454b
parent2a83bbe90e4478c6e8188db74b1a56b8c912ce50
nvme-pci: fix nvme_setup_irqs()

When -ENOSPC is returned from pci_alloc_irq_vectors_affinity(),
we still try to allocate multiple irq vectors again, so irq queues
covers the admin queue actually. But we don't consider that, then
number of the allocated irq vector may be same with sum of
io_queues[HCTX_TYPE_DEFAULT] and io_queues[HCTX_TYPE_READ], this way
is obviously wrong, and finally breaks nvme_pci_map_queues(), and
warning from pci_irq_get_affinity() is triggered.

IRQ queues should cover admin queues, this patch makes this
point explicitely in nvme_calc_io_queues().

We got severl boot failure internal report on aarch64, so please
consider to fix it in v4.20.

Fixes: a6545c542c5f ("nvme: fix irq vs io_queue calculations")
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Reviewed-by: Keith Busch <keith.busch@intel.com>
Tested-by: fin4478 <fin4478@hotmail.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/nvme/host/pci.c