nvme.h (1a353d85b02d010e9daa7bd189d203ba1f2614a1) nvme.h (07bfcd09a288551b4377836a11c6250e1fd01e6d)
1/*
2 * Copyright (c) 2011-2014, Intel Corporation.
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms and conditions of the GNU General Public License,
6 * version 2, as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope it will be useful, but WITHOUT

--- 66 unchanged lines hidden (view full) ---

75 NVME_CTRL_DEAD,
76};
77
78struct nvme_ctrl {
79 enum nvme_ctrl_state state;
80 spinlock_t lock;
81 const struct nvme_ctrl_ops *ops;
82 struct request_queue *admin_q;
1/*
2 * Copyright (c) 2011-2014, Intel Corporation.
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms and conditions of the GNU General Public License,
6 * version 2, as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope it will be useful, but WITHOUT

--- 66 unchanged lines hidden (view full) ---

75 NVME_CTRL_DEAD,
76};
77
78struct nvme_ctrl {
79 enum nvme_ctrl_state state;
80 spinlock_t lock;
81 const struct nvme_ctrl_ops *ops;
82 struct request_queue *admin_q;
83 struct request_queue *connect_q;
83 struct device *dev;
84 struct kref kref;
85 int instance;
86 struct blk_mq_tag_set *tagset;
87 struct list_head namespaces;
88 struct mutex namespaces_mutex;
89 struct device *device; /* char device */
90 struct list_head node;

--- 11 unchanged lines hidden (view full) ---

102 u32 max_hw_sectors;
103 u32 stripe_size;
104 u16 oncs;
105 u16 vid;
106 atomic_t abort_limit;
107 u8 event_limit;
108 u8 vwc;
109 u32 vs;
84 struct device *dev;
85 struct kref kref;
86 int instance;
87 struct blk_mq_tag_set *tagset;
88 struct list_head namespaces;
89 struct mutex namespaces_mutex;
90 struct device *device; /* char device */
91 struct list_head node;

--- 11 unchanged lines hidden (view full) ---

103 u32 max_hw_sectors;
104 u32 stripe_size;
105 u16 oncs;
106 u16 vid;
107 atomic_t abort_limit;
108 u8 event_limit;
109 u8 vwc;
110 u32 vs;
111 u32 sgls;
110 bool subsystem;
111 unsigned long quirks;
112 struct work_struct scan_work;
113 struct work_struct async_event_work;
112 bool subsystem;
113 unsigned long quirks;
114 struct work_struct scan_work;
115 struct work_struct async_event_work;
116
117 /* Fabrics only */
118 u16 sqsize;
119 u32 ioccsz;
120 u32 iorcsz;
121 u16 icdoff;
122 u16 maxcmd;
123 struct nvmf_ctrl_options *opts;
114};
115
116/*
117 * An NVM Express namespace is equivalent to a SCSI LUN
118 */
119struct nvme_ns {
120 struct list_head list;
121

--- 19 unchanged lines hidden (view full) ---

141
142 u64 mode_select_num_blocks;
143 u32 mode_select_block_len;
144};
145
146struct nvme_ctrl_ops {
147 const char *name;
148 struct module *module;
124};
125
126/*
127 * An NVM Express namespace is equivalent to a SCSI LUN
128 */
129struct nvme_ns {
130 struct list_head list;
131

--- 19 unchanged lines hidden (view full) ---

151
152 u64 mode_select_num_blocks;
153 u32 mode_select_block_len;
154};
155
156struct nvme_ctrl_ops {
157 const char *name;
158 struct module *module;
159 bool is_fabrics;
149 int (*reg_read32)(struct nvme_ctrl *ctrl, u32 off, u32 *val);
150 int (*reg_write32)(struct nvme_ctrl *ctrl, u32 off, u32 val);
151 int (*reg_read64)(struct nvme_ctrl *ctrl, u32 off, u64 *val);
152 int (*reset_ctrl)(struct nvme_ctrl *ctrl);
153 void (*free_ctrl)(struct nvme_ctrl *ctrl);
154 void (*post_scan)(struct nvme_ctrl *ctrl);
155 void (*submit_async_event)(struct nvme_ctrl *ctrl, int aer_idx);
156 int (*delete_ctrl)(struct nvme_ctrl *ctrl);

--- 137 unchanged lines hidden ---
160 int (*reg_read32)(struct nvme_ctrl *ctrl, u32 off, u32 *val);
161 int (*reg_write32)(struct nvme_ctrl *ctrl, u32 off, u32 val);
162 int (*reg_read64)(struct nvme_ctrl *ctrl, u32 off, u64 *val);
163 int (*reset_ctrl)(struct nvme_ctrl *ctrl);
164 void (*free_ctrl)(struct nvme_ctrl *ctrl);
165 void (*post_scan)(struct nvme_ctrl *ctrl);
166 void (*submit_async_event)(struct nvme_ctrl *ctrl, int aer_idx);
167 int (*delete_ctrl)(struct nvme_ctrl *ctrl);

--- 137 unchanged lines hidden ---