nvme: remove handling of multiple AEN requests
[linux] / drivers / nvme / host / nvme.h
index ae60d83..b55c97e 100644 (file)
@@ -15,6 +15,7 @@
 #define _NVME_H
 
 #include <linux/nvme.h>
+#include <linux/cdev.h>
 #include <linux/pci.h>
 #include <linux/kref.h>
 #include <linux/blk-mq.h>
@@ -134,9 +135,10 @@ struct nvme_ctrl {
        struct mutex namespaces_mutex;
        struct device ctrl_device;
        struct device *device;  /* char device */
-       struct list_head node;
+       struct cdev cdev;
        struct ida ns_ida;
        struct work_struct reset_work;
+       struct work_struct delete_work;
 
        struct opal_dev *opal_dev;
 
@@ -160,7 +162,6 @@ struct nvme_ctrl {
        u16 nssa;
        u16 nr_streams;
        atomic_t abort_limit;
-       u8 event_limit;
        u8 vwc;
        u32 vs;
        u32 sgls;
@@ -172,6 +173,7 @@ struct nvme_ctrl {
        bool subsystem;
        unsigned long quirks;
        struct nvme_id_power_state psd[32];
+       struct nvme_effects_log *effects;
        struct work_struct scan_work;
        struct work_struct async_event_work;
        struct delayed_work ka_work;
@@ -234,8 +236,8 @@ struct nvme_ctrl_ops {
        int (*reg_write32)(struct nvme_ctrl *ctrl, u32 off, u32 val);
        int (*reg_read64)(struct nvme_ctrl *ctrl, u32 off, u64 *val);
        void (*free_ctrl)(struct nvme_ctrl *ctrl);
-       void (*submit_async_event)(struct nvme_ctrl *ctrl, int aer_idx);
-       int (*delete_ctrl)(struct nvme_ctrl *ctrl);
+       void (*submit_async_event)(struct nvme_ctrl *ctrl);
+       void (*delete_ctrl)(struct nvme_ctrl *ctrl);
        int (*get_address)(struct nvme_ctrl *ctrl, char *buf, int size);
        int (*reinit_request)(void *data, struct request *rq);
 };
@@ -310,7 +312,6 @@ void nvme_remove_namespaces(struct nvme_ctrl *ctrl);
 int nvme_sec_submit(void *data, u16 spsp, u8 secp, void *buffer, size_t len,
                bool send);
 
-#define NVME_NR_AERS   1
 void nvme_complete_async_event(struct nvme_ctrl *ctrl, __le16 status,
                union nvme_result *res);
 void nvme_queue_async_events(struct nvme_ctrl *ctrl);
@@ -338,6 +339,8 @@ int nvme_set_queue_count(struct nvme_ctrl *ctrl, int *count);
 void nvme_start_keep_alive(struct nvme_ctrl *ctrl);
 void nvme_stop_keep_alive(struct nvme_ctrl *ctrl);
 int nvme_reset_ctrl(struct nvme_ctrl *ctrl);
+int nvme_delete_ctrl(struct nvme_ctrl *ctrl);
+int nvme_delete_ctrl_sync(struct nvme_ctrl *ctrl);
 
 #ifdef CONFIG_NVM
 int nvme_nvm_register(struct nvme_ns *ns, char *disk_name, int node);