]> git.baikalelectronics.ru Git - kernel.git/commit
nvme: fix boot hang with only being able to get one IRQ vector
authorJens Axboe <axboe@kernel.dk>
Wed, 14 Nov 2018 17:13:50 +0000 (10:13 -0700)
committerJens Axboe <axboe@kernel.dk>
Wed, 14 Nov 2018 17:13:50 +0000 (10:13 -0700)
commite287dde921a5af705112f44bdef8fef207a30775
tree3f75b8d7a2e3879410bac5a06ae56ea55a7ee64e
parentbb720fef827bd4229303405a8609d53d1dfbd625
nvme: fix boot hang with only being able to get one IRQ vector

NVMe always asks for io_queues + 1 worth of IRQ vectors, which
means that even when we scale all the way down, we still ask
for 2 vectors and get -ENOSPC in return if the system can't
support more than 1.

Getting just 1 vector is fine, it just means that we'll have
1 IO queue and 1 admin queue, with a shared vector between them.
Check for this case and don't add our + 1 if it happens.

Fixes: 4fd9375a7c8a ("nvme: utilize two queue maps, one for reads and one for writes")
Reported-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/nvme/host/pci.c