nvme.h (a6a5149b10ec8ab8b4a9479a8230265c1b573be0) | nvme.h (c5017e85705bfea721732e153305d1988ff965c2) |
---|---|
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 --- 124 unchanged lines hidden (view full) --- 133 struct blk_mq_tag_set *admin_tagset; 134 struct list_head namespaces; 135 struct mutex namespaces_mutex; 136 struct device ctrl_device; 137 struct device *device; /* char device */ 138 struct cdev cdev; 139 struct ida ns_ida; 140 struct work_struct reset_work; | 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 --- 124 unchanged lines hidden (view full) --- 133 struct blk_mq_tag_set *admin_tagset; 134 struct list_head namespaces; 135 struct mutex namespaces_mutex; 136 struct device ctrl_device; 137 struct device *device; /* char device */ 138 struct cdev cdev; 139 struct ida ns_ida; 140 struct work_struct reset_work; |
141 struct work_struct delete_work; |
|
141 142 struct opal_dev *opal_dev; 143 144 char name[12]; 145 char serial[20]; 146 char model[40]; 147 char firmware_rev[8]; 148 char subnqn[NVMF_NQN_SIZE]; --- 82 unchanged lines hidden (view full) --- 231 unsigned int flags; 232#define NVME_F_FABRICS (1 << 0) 233#define NVME_F_METADATA_SUPPORTED (1 << 1) 234 int (*reg_read32)(struct nvme_ctrl *ctrl, u32 off, u32 *val); 235 int (*reg_write32)(struct nvme_ctrl *ctrl, u32 off, u32 val); 236 int (*reg_read64)(struct nvme_ctrl *ctrl, u32 off, u64 *val); 237 void (*free_ctrl)(struct nvme_ctrl *ctrl); 238 void (*submit_async_event)(struct nvme_ctrl *ctrl, int aer_idx); | 142 143 struct opal_dev *opal_dev; 144 145 char name[12]; 146 char serial[20]; 147 char model[40]; 148 char firmware_rev[8]; 149 char subnqn[NVMF_NQN_SIZE]; --- 82 unchanged lines hidden (view full) --- 232 unsigned int flags; 233#define NVME_F_FABRICS (1 << 0) 234#define NVME_F_METADATA_SUPPORTED (1 << 1) 235 int (*reg_read32)(struct nvme_ctrl *ctrl, u32 off, u32 *val); 236 int (*reg_write32)(struct nvme_ctrl *ctrl, u32 off, u32 val); 237 int (*reg_read64)(struct nvme_ctrl *ctrl, u32 off, u64 *val); 238 void (*free_ctrl)(struct nvme_ctrl *ctrl); 239 void (*submit_async_event)(struct nvme_ctrl *ctrl, int aer_idx); |
239 int (*delete_ctrl)(struct nvme_ctrl *ctrl); | 240 void (*delete_ctrl)(struct nvme_ctrl *ctrl); |
240 int (*get_address)(struct nvme_ctrl *ctrl, char *buf, int size); 241 int (*reinit_request)(void *data, struct request *rq); 242}; 243 244static inline bool nvme_ctrl_ready(struct nvme_ctrl *ctrl) 245{ 246 u32 val = 0; 247 --- 86 unchanged lines hidden (view full) --- 334 void *buf, unsigned bufflen); 335int __nvme_submit_sync_cmd(struct request_queue *q, struct nvme_command *cmd, 336 union nvme_result *result, void *buffer, unsigned bufflen, 337 unsigned timeout, int qid, int at_head, int flags); 338int nvme_set_queue_count(struct nvme_ctrl *ctrl, int *count); 339void nvme_start_keep_alive(struct nvme_ctrl *ctrl); 340void nvme_stop_keep_alive(struct nvme_ctrl *ctrl); 341int nvme_reset_ctrl(struct nvme_ctrl *ctrl); | 241 int (*get_address)(struct nvme_ctrl *ctrl, char *buf, int size); 242 int (*reinit_request)(void *data, struct request *rq); 243}; 244 245static inline bool nvme_ctrl_ready(struct nvme_ctrl *ctrl) 246{ 247 u32 val = 0; 248 --- 86 unchanged lines hidden (view full) --- 335 void *buf, unsigned bufflen); 336int __nvme_submit_sync_cmd(struct request_queue *q, struct nvme_command *cmd, 337 union nvme_result *result, void *buffer, unsigned bufflen, 338 unsigned timeout, int qid, int at_head, int flags); 339int nvme_set_queue_count(struct nvme_ctrl *ctrl, int *count); 340void nvme_start_keep_alive(struct nvme_ctrl *ctrl); 341void nvme_stop_keep_alive(struct nvme_ctrl *ctrl); 342int nvme_reset_ctrl(struct nvme_ctrl *ctrl); |
343int nvme_delete_ctrl(struct nvme_ctrl *ctrl); 344int nvme_delete_ctrl_sync(struct nvme_ctrl *ctrl); |
|
342 343#ifdef CONFIG_NVM 344int nvme_nvm_register(struct nvme_ns *ns, char *disk_name, int node); 345void nvme_nvm_unregister(struct nvme_ns *ns); 346int nvme_nvm_register_sysfs(struct nvme_ns *ns); 347void nvme_nvm_unregister_sysfs(struct nvme_ns *ns); 348int nvme_nvm_ioctl(struct nvme_ns *ns, unsigned int cmd, unsigned long arg); 349#else --- 28 unchanged lines hidden --- | 345 346#ifdef CONFIG_NVM 347int nvme_nvm_register(struct nvme_ns *ns, char *disk_name, int node); 348void nvme_nvm_unregister(struct nvme_ns *ns); 349int nvme_nvm_register_sysfs(struct nvme_ns *ns); 350void nvme_nvm_unregister_sysfs(struct nvme_ns *ns); 351int nvme_nvm_ioctl(struct nvme_ns *ns, unsigned int cmd, unsigned long arg); 352#else --- 28 unchanged lines hidden --- |