]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
nvme: remove the io_incapable method
authorChristoph Hellwig <hch@lst.de>
Tue, 26 Apr 2016 11:51:56 +0000 (13:51 +0200)
committerChuck Anderson <chuck.anderson@oracle.com>
Thu, 1 Jun 2017 20:41:19 +0000 (13:41 -0700)
It's unused since "NVMe: Move error handling to failed reset handler".

Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Jon Derrick <jonathan.derrick@intel.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Jens Axboe <axboe@fb.com>
(cherry picked from commit 04a934d4c7251e6458a7898c2b4d6c2da29b132c)

Orabug: 25130845

Signed-off-by: Ashok Vairavan <ashok.vairavan@oracle.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/nvme/host/nvme.h
drivers/nvme/host/pci.c

index 0f0868ac8cb2bcd3729fa348489421581628def1..67d8c4eb959b4ab0e659c5ae3e1b557753fe71ab 100644 (file)
@@ -123,7 +123,6 @@ struct nvme_ctrl_ops {
        int (*reg_read32)(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);
-       bool (*io_incapable)(struct nvme_ctrl *ctrl);
        int (*reset_ctrl)(struct nvme_ctrl *ctrl);
        void (*free_ctrl)(struct nvme_ctrl *ctrl);
 };
@@ -137,17 +136,6 @@ static inline bool nvme_ctrl_ready(struct nvme_ctrl *ctrl)
        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)
 {
        if (!ctrl->subsystem)
index f8d9b00c6dd7a7905c90e6f44311e5aec0d11182..36bf4e5fbcf3fc8d6c4c1c7e1b93faa858c2cdd6 100644 (file)
@@ -1997,13 +1997,6 @@ static int nvme_pci_reg_read64(struct nvme_ctrl *ctrl, u32 off, u64 *val)
        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)
 {
        return nvme_reset(to_nvme_dev(ctrl));
@@ -2014,7 +2007,6 @@ static const struct nvme_ctrl_ops nvme_pci_ctrl_ops = {
        .reg_read32             = nvme_pci_reg_read32,
        .reg_write32            = nvme_pci_reg_write32,
        .reg_read64             = nvme_pci_reg_read64,
-       .io_incapable           = nvme_pci_io_incapable,
        .reset_ctrl             = nvme_pci_reset_ctrl,
        .free_ctrl              = nvme_pci_free_ctrl,
 };