Commit 04a934d4 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Jens Axboe

nvme: remove the io_incapable method

It's unused since "NVMe: Move error handling to failed reset handler".
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Acked-by: default avatarJon Derrick <jonathan.derrick@intel.com>
Reviewed-by: default avatarSagi Grimberg <sagi@grimberg.me>
Signed-off-by: default avatarJens Axboe <axboe@fb.com>
parent 23bd63ce
...@@ -136,7 +136,6 @@ struct nvme_ctrl_ops { ...@@ -136,7 +136,6 @@ struct nvme_ctrl_ops {
int (*reg_read32)(struct nvme_ctrl *ctrl, u32 off, u32 *val); int (*reg_read32)(struct nvme_ctrl *ctrl, u32 off, u32 *val);
int (*reg_write32)(struct nvme_ctrl *ctrl, u32 off, u32 val); int (*reg_write32)(struct nvme_ctrl *ctrl, u32 off, u32 val);
int (*reg_read64)(struct nvme_ctrl *ctrl, u32 off, u64 *val); int (*reg_read64)(struct nvme_ctrl *ctrl, u32 off, u64 *val);
bool (*io_incapable)(struct nvme_ctrl *ctrl);
int (*reset_ctrl)(struct nvme_ctrl *ctrl); int (*reset_ctrl)(struct nvme_ctrl *ctrl);
void (*free_ctrl)(struct nvme_ctrl *ctrl); void (*free_ctrl)(struct nvme_ctrl *ctrl);
}; };
...@@ -150,17 +149,6 @@ static inline bool nvme_ctrl_ready(struct nvme_ctrl *ctrl) ...@@ -150,17 +149,6 @@ static inline bool nvme_ctrl_ready(struct nvme_ctrl *ctrl)
return val & NVME_CSTS_RDY; return val & NVME_CSTS_RDY;
} }
static inline bool nvme_io_incapable(struct nvme_ctrl *ctrl)
{
u32 val = 0;
if (ctrl->ops->io_incapable(ctrl))
return true;
if (ctrl->ops->reg_read32(ctrl, NVME_REG_CSTS, &val))
return true;
return val & NVME_CSTS_CFS;
}
static inline int nvme_reset_subsystem(struct nvme_ctrl *ctrl) static inline int nvme_reset_subsystem(struct nvme_ctrl *ctrl)
{ {
if (!ctrl->subsystem) if (!ctrl->subsystem)
......
...@@ -1942,13 +1942,6 @@ static int nvme_pci_reg_read64(struct nvme_ctrl *ctrl, u32 off, u64 *val) ...@@ -1942,13 +1942,6 @@ static int nvme_pci_reg_read64(struct nvme_ctrl *ctrl, u32 off, u64 *val)
return 0; return 0;
} }
static bool nvme_pci_io_incapable(struct nvme_ctrl *ctrl)
{
struct nvme_dev *dev = to_nvme_dev(ctrl);
return !dev->bar || dev->online_queues < 2;
}
static int nvme_pci_reset_ctrl(struct nvme_ctrl *ctrl) static int nvme_pci_reset_ctrl(struct nvme_ctrl *ctrl)
{ {
return nvme_reset(to_nvme_dev(ctrl)); return nvme_reset(to_nvme_dev(ctrl));
...@@ -1959,7 +1952,6 @@ static const struct nvme_ctrl_ops nvme_pci_ctrl_ops = { ...@@ -1959,7 +1952,6 @@ static const struct nvme_ctrl_ops nvme_pci_ctrl_ops = {
.reg_read32 = nvme_pci_reg_read32, .reg_read32 = nvme_pci_reg_read32,
.reg_write32 = nvme_pci_reg_write32, .reg_write32 = nvme_pci_reg_write32,
.reg_read64 = nvme_pci_reg_read64, .reg_read64 = nvme_pci_reg_read64,
.io_incapable = nvme_pci_io_incapable,
.reset_ctrl = nvme_pci_reset_ctrl, .reset_ctrl = nvme_pci_reset_ctrl,
.free_ctrl = nvme_pci_free_ctrl, .free_ctrl = nvme_pci_free_ctrl,
}; };
......
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