aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/nvme/host/nvme.h
diff options
context:
space:
mode:
authorIsrael Rukshin <israelr@mellanox.com>2019-10-13 19:57:31 +0300
committerJens Axboe <axboe@kernel.dk>2019-11-04 10:56:40 -0700
commit58a8df67e057e979e76f8dc881766da3f7137f99 (patch)
treecd51a6846725db606e2dca98f56cf18fadb3ac5b /drivers/nvme/host/nvme.h
parentnvme-fc: ensure association_id is cleared regardless of a Disconnect LS (diff)
downloadlinux-dev-58a8df67e057e979e76f8dc881766da3f7137f99.tar.xz
linux-dev-58a8df67e057e979e76f8dc881766da3f7137f99.zip
nvme: introduce nvme_is_aen_req function
This function improves code readability and reduces code duplication. Signed-off-by: Israel Rukshin <israelr@mellanox.com> Signed-off-by: Max Gurtovoy <maxg@mellanox.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Keith Busch <kbusch@kernel.org> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to '')
-rw-r--r--drivers/nvme/host/nvme.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h
index 38a83ef5bcd3..912f9500ed11 100644
--- a/drivers/nvme/host/nvme.h
+++ b/drivers/nvme/host/nvme.h
@@ -445,6 +445,11 @@ static inline void nvme_put_ctrl(struct nvme_ctrl *ctrl)
put_device(ctrl->device);
}
+static inline bool nvme_is_aen_req(u16 qid, __u16 command_id)
+{
+ return !qid && command_id >= NVME_AQ_BLK_MQ_DEPTH;
+}
+
void nvme_complete_rq(struct request *req);
bool nvme_cancel_request(struct request *req, void *data, bool reserved);
bool nvme_change_ctrl_state(struct nvme_ctrl *ctrl,