]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
NVMe: Fix io incapable return values
authorKeith Busch <keith.busch@intel.com>
Thu, 11 Feb 2016 20:05:39 +0000 (13:05 -0700)
committerChuck Anderson <chuck.anderson@oracle.com>
Thu, 1 Jun 2017 20:41:01 +0000 (13:41 -0700)
The function returns true when the controller can't handle IO.

Signed-off-by: Keith Busch <keith.busch@intel.com>
Reviewed-by: Sagi Grimberg <sagig@mellanox.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Acked-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
(cherry picked from commit 2850713576e81e3b887cd92a9965fba0dd1717c0)

Orabug: 25130845

Signed-off-by: Ashok Vairavan <ashok.vairavan@oracle.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/nvme/host/nvme.h

index 8b8ef9bdf4d637b0460401cb3c955c60877ac881..a01eb264a1b77dee17346209a6fb6658367223d8 100644 (file)
@@ -133,9 +133,9 @@ static inline bool nvme_io_incapable(struct nvme_ctrl *ctrl)
        u32 val = 0;
 
        if (ctrl->ops->io_incapable(ctrl))
-               return false;
+               return true;
        if (ctrl->ops->reg_read32(ctrl, NVME_REG_CSTS, &val))
-               return false;
+               return true;
        return val & NVME_CSTS_CFS;
 }