From: Chaitanya Kulkarni <kch@nvidia.com>
To: <linux-block@vger.kernel.org>
Cc: <axboe@kernel.dk>, <kch@nvidia.com>, <hch@lst.de>,
<damien.lemoal@opensource.wdc.com>, <johannes.thumshirn@wdc.com>,
<bvanassche@acm.org>, <ming.lei@redhat.com>,
<shinichiro.kawasaki@wdc.com>, <vincent.fu@samsung.com>
Subject: [RFC PATCH 4/6] nvme-apple: use init alloc tagset helper
Date: Mon, 10 Oct 2022 10:00:24 -0700 [thread overview]
Message-ID: <20221010170026.49808-5-kch@nvidia.com> (raw)
In-Reply-To: <20221010170026.49808-1-kch@nvidia.com>
Signed-off-by: Chaitanya Kulkarni <kch@nvidia.com>
---
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
next prev parent reply other threads:[~2022-10-10 17:01 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-10 17:00 [RFC PATCH 0/6] block: add and use tagset init helper Chaitanya Kulkarni
2022-10-10 17:00 ` [RFC PATCH 1/6] " Chaitanya Kulkarni
2022-10-10 17:00 ` [RFC PATCH 2/6] nbd: use init alloc tagset helper Chaitanya Kulkarni
2022-10-10 17:00 ` [RFC PATCH 3/6] virtio-blk: " Chaitanya Kulkarni
2022-10-10 17:00 ` Chaitanya Kulkarni [this message]
2022-10-11 11:53 ` [RFC PATCH 4/6] nvme-apple: " kernel test robot
2022-10-11 13:07 ` Chaitanya Kulkarni
2022-10-11 13:07 ` Chaitanya Kulkarni
2022-10-10 17:00 ` [RFC PATCH 5/6] nvme-core: " Chaitanya Kulkarni
2022-10-10 17:00 ` [RFC PATCH 6/6] nvme-pci: " Chaitanya Kulkarni
2022-10-10 17:40 ` [RFC PATCH 0/6] block: add and use tagset init helper Chaitanya Kulkarni
2022-10-11 6:06 ` Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221010170026.49808-5-kch@nvidia.com \
--to=kch@nvidia.com \
--cc=axboe@kernel.dk \
--cc=bvanassche@acm.org \
--cc=damien.lemoal@opensource.wdc.com \
--cc=hch@lst.de \
--cc=johannes.thumshirn@wdc.com \
--cc=linux-block@vger.kernel.org \
--cc=ming.lei@redhat.com \
--cc=shinichiro.kawasaki@wdc.com \
--cc=vincent.fu@samsung.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.