From: Keith Busch Date: Thu, 15 Oct 2020 18:36:29 +0000 (-0700) Subject: nvme: use queuedata for nvme_req_qid X-Git-Tag: v5.10.7~1310^2~1^2~9 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=643c476d6f78cf0349fb8e07334962dd056a3c90;p=platform%2Fkernel%2Flinux-rpi.git nvme: use queuedata for nvme_req_qid The request's rq_disk isn't set for passthrough IO commands, so tracing uses qid 0 for these which incorrectly decodes as an admin command. Use the request_queue's queuedata instead since that value is always set for the IO queues, and never set for the admin queue. Signed-off-by: Keith Busch Signed-off-by: Christoph Hellwig --- diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h index e7c88b4..cc11113 100644 --- a/drivers/nvme/host/nvme.h +++ b/drivers/nvme/host/nvme.h @@ -176,7 +176,7 @@ static inline struct nvme_request *nvme_req(struct request *req) static inline u16 nvme_req_qid(struct request *req) { - if (!req->rq_disk) + if (!req->q->queuedata) return 0; return blk_mq_unique_tag_to_hwq(blk_mq_unique_tag(req)) + 1; }