提交 4f76d0e4 编写于 作者: K Keith Busch 提交者: Jens Axboe

NVMe: Fix io incapable return values

The function returns true when the controller can't handle IO.
Signed-off-by: NKeith Busch <keith.busch@intel.com>
Reviewed-by: NSagi Grimberg <sagig@mellanox.com>
Reviewed-by: NJohannes Thumshirn <jthumshirn@suse.de>
Acked-by: NChristoph Hellwig <hch@lst.de>
Signed-off-by: NJens Axboe <axboe@fb.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册