nvme-pci: queue creation fixes
authorKeith Busch <[email protected]>
Wed, 6 Jun 2018 14:13:06 +0000 (08:13 -0600)
committerJens Axboe <[email protected]>
Fri, 8 Jun 2018 18:51:11 +0000 (12:51 -0600)
commitded45505dbfdcaf1e49ae0349e5dafb59c9efbe5
tree190b52254902749ccf70927a9432ab3668438a91
parent397c699fb096e7a822990990c17c6b43e829cfc4
nvme-pci: queue creation fixes

We've been ignoring NVMe error status on queue creations. Fortunately they
are uncommon, but we should handle these anyway. This patch adds checks
for the a positive error return value that indicates an NVMe status.

If we do see a negative return, the controller isn't usable, so this
patch returns immediately in since we can't unwind that failure.

Signed-off-by: Keith Busch <[email protected]>
Reviewed-by: Jens Axboe <[email protected]>
Reviewed-by: Sagi Grimberg <[email protected]>
Reviewed-by: Johannes Thumshirn <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
drivers/nvme/host/pci.c