linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] nvme-apple: use nvme core helper to cancel requests in tagset
@ 2022-07-08  3:06 Guixin Liu
  2022-07-08 10:01 ` liruozhu
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Guixin Liu @ 2022-07-08  3:06 UTC (permalink / raw)
  To: marcan, sven, alyssa, kbusch, axboe, hch, sagi, p.zabel
  Cc: linux-arm-kernel, linux-nvme

Use nvme core helper nvme_cancel_tagset and nvme_cancel_admin_tagset
instead of same logic code.

Signed-off-by: Guixin Liu <kanie@linux.alibaba.com>
---
 drivers/nvme/host/apple.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/nvme/host/apple.c b/drivers/nvme/host/apple.c
index d702d7d..7816b5a 100644
--- a/drivers/nvme/host/apple.c
+++ b/drivers/nvme/host/apple.c
@@ -845,11 +845,8 @@ static void apple_nvme_disable(struct apple_nvme *anv, bool shutdown)
 	apple_nvme_handle_cq(&anv->adminq, true);
 	spin_unlock_irqrestore(&anv->lock, flags);
 
-	blk_mq_tagset_busy_iter(&anv->tagset, nvme_cancel_request, &anv->ctrl);
-	blk_mq_tagset_busy_iter(&anv->admin_tagset, nvme_cancel_request,
-				&anv->ctrl);
-	blk_mq_tagset_wait_completed_request(&anv->tagset);
-	blk_mq_tagset_wait_completed_request(&anv->admin_tagset);
+	nvme_cancel_tagset(&anv->ctrl);
+	nvme_cancel_admin_tagset(&anv->ctrl);
 
 	/*
 	 * The driver will not be starting up queues again if shutting down so
-- 
1.8.3.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] nvme-apple: use nvme core helper to cancel requests in tagset
  2022-07-08  3:06 [PATCH] nvme-apple: use nvme core helper to cancel requests in tagset Guixin Liu
@ 2022-07-08 10:01 ` liruozhu
  2022-07-10 11:06 ` Sagi Grimberg
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: liruozhu @ 2022-07-08 10:01 UTC (permalink / raw)
  To: Guixin Liu, marcan, sven, alyssa, kbusch, axboe, hch, sagi,
	p.zabel
  Cc: linux-arm-kernel, linux-nvme

On 2022/7/8 11:06, Guixin Liu wrote:

> Use nvme core helper nvme_cancel_tagset and nvme_cancel_admin_tagset
> instead of same logic code.
>
> Signed-off-by: Guixin Liu <kanie@linux.alibaba.com>
> ---
>   drivers/nvme/host/apple.c | 7 ++-----
>   1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/nvme/host/apple.c b/drivers/nvme/host/apple.c
> index d702d7d..7816b5a 100644
> --- a/drivers/nvme/host/apple.c
> +++ b/drivers/nvme/host/apple.c
> @@ -845,11 +845,8 @@ static void apple_nvme_disable(struct apple_nvme *anv, bool shutdown)
>   	apple_nvme_handle_cq(&anv->adminq, true);
>   	spin_unlock_irqrestore(&anv->lock, flags);
>   
> -	blk_mq_tagset_busy_iter(&anv->tagset, nvme_cancel_request, &anv->ctrl);
> -	blk_mq_tagset_busy_iter(&anv->admin_tagset, nvme_cancel_request,
> -				&anv->ctrl);
> -	blk_mq_tagset_wait_completed_request(&anv->tagset);
> -	blk_mq_tagset_wait_completed_request(&anv->admin_tagset);
> +	nvme_cancel_tagset(&anv->ctrl);
> +	nvme_cancel_admin_tagset(&anv->ctrl);
>   
>   	/*
>   	 * The driver will not be starting up queues again if shutting down so
Looks good to me,

Reviewed-by: Ruozhu Li <liruozhu@huawei.com>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] nvme-apple: use nvme core helper to cancel requests in tagset
  2022-07-08  3:06 [PATCH] nvme-apple: use nvme core helper to cancel requests in tagset Guixin Liu
  2022-07-08 10:01 ` liruozhu
@ 2022-07-10 11:06 ` Sagi Grimberg
  2022-07-10 18:52 ` Sven Peter
  2022-07-12 15:36 ` Christoph Hellwig
  3 siblings, 0 replies; 5+ messages in thread
From: Sagi Grimberg @ 2022-07-10 11:06 UTC (permalink / raw)
  To: Guixin Liu, marcan, sven, alyssa, kbusch, axboe, hch, p.zabel
  Cc: linux-arm-kernel, linux-nvme

Reviewed-by: Sagi Grimberg <sagi@grimberg.me>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] nvme-apple: use nvme core helper to cancel requests in tagset
  2022-07-08  3:06 [PATCH] nvme-apple: use nvme core helper to cancel requests in tagset Guixin Liu
  2022-07-08 10:01 ` liruozhu
  2022-07-10 11:06 ` Sagi Grimberg
@ 2022-07-10 18:52 ` Sven Peter
  2022-07-12 15:36 ` Christoph Hellwig
  3 siblings, 0 replies; 5+ messages in thread
From: Sven Peter @ 2022-07-10 18:52 UTC (permalink / raw)
  To: Guixin Liu, Hector Martin, Alyssa Rosenzweig, Keith Busch,
	axboe@fb.com, hch@lst.de, sagi@grimberg.me, Philipp Zabel
  Cc: linux-arm-kernel, linux-nvme



On Fri, Jul 8, 2022, at 05:06, Guixin Liu wrote:
> Use nvme core helper nvme_cancel_tagset and nvme_cancel_admin_tagset
> instead of same logic code.
>
> Signed-off-by: Guixin Liu <kanie@linux.alibaba.com>
> ---

Reviewed-by: Sven Peter <sven@svenpeter.dev>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] nvme-apple: use nvme core helper to cancel requests in tagset
  2022-07-08  3:06 [PATCH] nvme-apple: use nvme core helper to cancel requests in tagset Guixin Liu
                   ` (2 preceding siblings ...)
  2022-07-10 18:52 ` Sven Peter
@ 2022-07-12 15:36 ` Christoph Hellwig
  3 siblings, 0 replies; 5+ messages in thread
From: Christoph Hellwig @ 2022-07-12 15:36 UTC (permalink / raw)
  To: Guixin Liu
  Cc: marcan, sven, alyssa, kbusch, axboe, hch, sagi, p.zabel,
	linux-arm-kernel, linux-nvme

Thanks,

applied to nvme-5.20.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-07-12 15:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-08  3:06 [PATCH] nvme-apple: use nvme core helper to cancel requests in tagset Guixin Liu
2022-07-08 10:01 ` liruozhu
2022-07-10 11:06 ` Sagi Grimberg
2022-07-10 18:52 ` Sven Peter
2022-07-12 15:36 ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).