Commit 4f76d0e4 authored by Keith Busch's avatar Keith Busch Committed by Jens Axboe

NVMe: Fix io incapable return values

The function returns true when the controller can't handle IO.
Signed-off-by: default avatarKeith Busch <keith.busch@intel.com>
Reviewed-by: default avatarSagi Grimberg <sagig@mellanox.com>
Reviewed-by: default avatarJohannes Thumshirn <jthumshirn@suse.de>
Acked-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarJens Axboe <axboe@fb.com>
parent a59e0f57
......@@ -139,9 +139,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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment