diff options
author | Christoph Hellwig <hch@lst.de> | 2016-04-26 13:52:00 +0200 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2016-05-02 09:09:26 -0600 |
commit | f866fc4282a81673ef973ad54c68235a3263b42e (patch) | |
tree | af293a09ae3cc133f29075630ca3e34edc94bf96 /drivers/nvme/host/nvme.h | |
parent | 5955be2144b3b56182e2175e7e3d2ddf27fb485d (diff) |
nvme: move AER handling to common code
The transport driver still needs to do the actual submission, but all the
higher level code can be shared.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'drivers/nvme/host/nvme.h')
-rw-r--r-- | drivers/nvme/host/nvme.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h index 9b63e719318a..631a11e15b7c 100644 --- a/drivers/nvme/host/nvme.h +++ b/drivers/nvme/host/nvme.h @@ -109,6 +109,7 @@ struct nvme_ctrl { bool subsystem; unsigned long quirks; struct work_struct scan_work; + struct work_struct async_event_work; }; /* @@ -149,6 +150,7 @@ struct nvme_ctrl_ops { int (*reset_ctrl)(struct nvme_ctrl *ctrl); void (*free_ctrl)(struct nvme_ctrl *ctrl); void (*post_scan)(struct nvme_ctrl *ctrl); + void (*submit_async_event)(struct nvme_ctrl *ctrl, int aer_idx); }; static inline bool nvme_ctrl_ready(struct nvme_ctrl *ctrl) @@ -212,6 +214,11 @@ int nvme_init_identify(struct nvme_ctrl *ctrl); void nvme_queue_scan(struct nvme_ctrl *ctrl); void nvme_remove_namespaces(struct nvme_ctrl *ctrl); +#define NVME_NR_AERS 1 +void nvme_complete_async_event(struct nvme_ctrl *ctrl, + struct nvme_completion *cqe); +void nvme_queue_async_events(struct nvme_ctrl *ctrl); + void nvme_stop_queues(struct nvme_ctrl *ctrl); void nvme_start_queues(struct nvme_ctrl *ctrl); void nvme_kill_queues(struct nvme_ctrl *ctrl); |