From: Keith Busch Date: Thu, 11 Feb 2016 20:05:39 +0000 (-0700) Subject: NVMe: Fix io incapable return values X-Git-Tag: v5.15~14194^2~8 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4f76d0e49835d3da33aa54811157421f7061805e;p=platform%2Fkernel%2Flinux-starfive.git NVMe: Fix io incapable return values The function returns true when the controller can't handle IO. Signed-off-by: Keith Busch Reviewed-by: Sagi Grimberg Reviewed-by: Johannes Thumshirn Acked-by: Christoph Hellwig Signed-off-by: Jens Axboe --- diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h index 4fb5bb737868..9664d07d807d 100644 --- a/drivers/nvme/host/nvme.h +++ b/drivers/nvme/host/nvme.h @@ -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; }