Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 64ee0ac0 authored by Keith Busch's avatar Keith Busch Committed by Jens Axboe
Browse files

nvme-pci: Skip queue deletion if there are no queues



User reported controller always retains CSTS.RDY to 1, which fails
controller disabling when resetting the controller. This is also before
the admin queue is allocated, and trying to disable an unallocated queue
results in a NULL dereference.

Reported-by: default avatarAlex Gagniuc <Alex_Gagniuc@Dellteam.com>
Signed-off-by: default avatarKeith Busch <keith.busch@intel.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 6038aa53
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2201,7 +2201,7 @@ static void nvme_dev_disable(struct nvme_dev *dev, bool shutdown)

	nvme_stop_queues(&dev->ctrl);

	if (!dead) {
	if (!dead && dev->ctrl.queue_count > 0) {
		/*
		 * If the controller is still alive tell it to stop using the
		 * host memory buffer.  In theory the shutdown / reset should