NVMe: Fix io incapable return values

The function returns true when the controller can't handle IO.

Signed-off-by: Keith Busch <[email protected]>
Reviewed-by: Sagi Grimberg <[email protected]>
Reviewed-by: Johannes Thumshirn <[email protected]>
Acked-by: Christoph Hellwig <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
Keith Busch 2016-02-11 13:05:39 -07:00 • committed by Jens Axboe
commit 4f76d0e498

View file

@ -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;
}