[RFC PATCH 4/6] nvme-apple: use init alloc tagset helper

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Chaitanya Kulkarni <kch@xxxxxxxxxx>
---
 drivers/nvme/host/apple.c | 14 ++++----------
 1 file changed, 4 insertions(+), 10 deletions(-)

diff --git a/drivers/nvme/host/apple.c b/drivers/nvme/host/apple.c
index 5fc5ea196b40..baafee23e32a 100644
--- a/drivers/nvme/host/apple.c
+++ b/drivers/nvme/host/apple.c
@@ -1228,16 +1228,13 @@ static int apple_nvme_alloc_tagsets(struct apple_nvme *anv)
 {
 	int ret;
 
-	anv->admin_tagset.ops = &apple_nvme_mq_admin_ops;
-	anv->admin_tagset.nr_hw_queues = 1;
-	anv->admin_tagset.queue_depth = APPLE_NVME_AQ_MQ_TAG_DEPTH;
 	anv->admin_tagset.timeout = NVME_ADMIN_TIMEOUT;
 	anv->admin_tagset.numa_node = NUMA_NO_NODE;
 	anv->admin_tagset.cmd_size = sizeof(struct apple_nvme_iod);
 	anv->admin_tagset.flags = BLK_MQ_F_NO_SCHED;
-	anv->admin_tagset.driver_data = &anv->adminq;
 
-	ret = blk_mq_alloc_tag_set(&anv->admin_tagset);
+	ret = blk_mq_alloc_tag_set(&anv->admin_tagset, apple_nvme_mq_admin_ops,
+				   1, APPLE_NVME_AQ_MQ_TAG_DEPTH, &anv->adminq);
 	if (ret)
 		return ret;
 	ret = devm_add_action_or_reset(anv->dev, devm_apple_nvme_put_tag_set,
@@ -1245,8 +1242,6 @@ static int apple_nvme_alloc_tagsets(struct apple_nvme *anv)
 	if (ret)
 		return ret;
 
-	anv->tagset.ops = &apple_nvme_mq_ops;
-	anv->tagset.nr_hw_queues = 1;
 	anv->tagset.nr_maps = 1;
 	/*
 	 * Tags are used as an index to the NVMMU and must be unique across
@@ -1254,14 +1249,13 @@ static int apple_nvme_alloc_tagsets(struct apple_nvme *anv)
 	 * must be marked as reserved in the IO queue.
 	 */
 	anv->tagset.reserved_tags = APPLE_NVME_AQ_DEPTH;
-	anv->tagset.queue_depth = APPLE_ANS_MAX_QUEUE_DEPTH - 1;
 	anv->tagset.timeout = NVME_IO_TIMEOUT;
 	anv->tagset.numa_node = NUMA_NO_NODE;
 	anv->tagset.cmd_size = sizeof(struct apple_nvme_iod);
 	anv->tagset.flags = BLK_MQ_F_SHOULD_MERGE;
-	anv->tagset.driver_data = &anv->ioq;
 
-	ret = blk_mq_alloc_tag_set(&anv->tagset);
+	ret = blk_mq_alloc_tag_set(&anv->tagset, *apple_nvme_mq_ops, 1,
+			APPLE_ANS_MAX_QUEUE_DEPTH - 1, &anv->ioq);
 	if (ret)
 		return ret;
 	ret = devm_add_action_or_reset(anv->dev, devm_apple_nvme_put_tag_set,
-- 
2.29.0




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux