Skip to content

Commit

Permalink
NVMe: Fix io incapable return values
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Keith Busch authored and Jens Axboe committed Feb 11, 2016
1 parent a59e0f5 commit 4f76d0e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/nvme/host/nvme.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 4f76d0e

Please sign in to comment.