aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/nvme/host
diff options
context:
space:
mode:
authorMing Lin <ming.l@samsung.com>2016-05-18 17:05:01 -0400
committerJens Axboe <axboe@fb.com>2016-06-07 15:43:02 -0400
commite1958e6534a2d4ebb2dfcd0b3f16ff8e277a5b0c (patch)
treeac0ff05a0772ac072cca58a4b32fa044d60ada35 /drivers/nvme/host
parent28a8f0d317bf225ff15008f5dd66ae16242dd843 (diff)
nvme: update and rename nvme_cancel_io to nvme_cancel_request
nvme_cancel_io is a bit confusing (given the distinction of io/admin), so rename it to nvme_cancel_request. And update it a bit to pass in struct nvme_ctrl, so it can be used by Fabrics driver also. Signed-off-by: Ming Lin <ming.l@samsung.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Suggested-by: Sagi Grimberg <sagi@grimberg.me> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Reviewed-by: Keith Busch <keith.bsuch@intel.com> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'drivers/nvme/host')
-rw-r--r--drivers/nvme/host/pci.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index 78dca3193ca4..4af61c909353 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -919,14 +919,14 @@ static enum blk_eh_timer_return nvme_timeout(struct request *req, bool reserved)
919 return BLK_EH_RESET_TIMER; 919 return BLK_EH_RESET_TIMER;
920} 920}
921 921
922static void nvme_cancel_io(struct request *req, void *data, bool reserved) 922static void nvme_cancel_request(struct request *req, void *data, bool reserved)
923{ 923{
924 int status; 924 int status;
925 925
926 if (!blk_mq_request_started(req)) 926 if (!blk_mq_request_started(req))
927 return; 927 return;
928 928
929 dev_dbg_ratelimited(((struct nvme_dev *) data)->ctrl.device, 929 dev_dbg_ratelimited(((struct nvme_ctrl *) data)->device,
930 "Cancelling I/O %d", req->tag); 930 "Cancelling I/O %d", req->tag);
931 931
932 status = NVME_SC_ABORT_REQ; 932 status = NVME_SC_ABORT_REQ;
@@ -1722,8 +1722,8 @@ static void nvme_dev_disable(struct nvme_dev *dev, bool shutdown)
1722 } 1722 }
1723 nvme_pci_disable(dev); 1723 nvme_pci_disable(dev);
1724 1724
1725 blk_mq_tagset_busy_iter(&dev->tagset, nvme_cancel_io, dev); 1725 blk_mq_tagset_busy_iter(&dev->tagset, nvme_cancel_request, &dev->ctrl);
1726 blk_mq_tagset_busy_iter(&dev->admin_tagset, nvme_cancel_io, dev); 1726 blk_mq_tagset_busy_iter(&dev->admin_tagset, nvme_cancel_request, &dev->ctrl);
1727 mutex_unlock(&dev->shutdown_lock); 1727 mutex_unlock(&dev->shutdown_lock);
1728} 1728}
1729 1729