diff options
author | Matthew Wilcox <matthew.r.wilcox@intel.com> | 2011-02-03 10:58:26 -0500 |
---|---|---|
committer | Matthew Wilcox <matthew.r.wilcox@intel.com> | 2011-11-04 15:52:54 -0400 |
commit | 6ee44cdced04a53dc4f27eb97067e6cd33784726 (patch) | |
tree | 1f018425a216da0a58c7f36b830925fbb9aa41a7 /include/linux/nvme.h | |
parent | 7a63e07b9a98b77dd075e06b93c1d8dc871ddad5 (diff) |
NVMe: Add download / activate firmware ioctls
Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
Diffstat (limited to 'include/linux/nvme.h')
-rw-r--r-- | include/linux/nvme.h | 33 |
1 files changed, 27 insertions, 6 deletions
diff --git a/include/linux/nvme.h b/include/linux/nvme.h index dbbdc126401b..8eed0e432eef 100644 --- a/include/linux/nvme.h +++ b/include/linux/nvme.h | |||
@@ -262,7 +262,7 @@ struct nvme_create_cq { | |||
262 | __u8 opcode; | 262 | __u8 opcode; |
263 | __u8 flags; | 263 | __u8 flags; |
264 | __u16 command_id; | 264 | __u16 command_id; |
265 | __le32 rsvd1[5]; | 265 | __u32 rsvd1[5]; |
266 | __le64 prp1; | 266 | __le64 prp1; |
267 | __u64 rsvd8; | 267 | __u64 rsvd8; |
268 | __le16 cqid; | 268 | __le16 cqid; |
@@ -276,14 +276,14 @@ struct nvme_create_sq { | |||
276 | __u8 opcode; | 276 | __u8 opcode; |
277 | __u8 flags; | 277 | __u8 flags; |
278 | __u16 command_id; | 278 | __u16 command_id; |
279 | __le32 rsvd1[5]; | 279 | __u32 rsvd1[5]; |
280 | __le64 prp1; | 280 | __le64 prp1; |
281 | __u64 rsvd8; | 281 | __u64 rsvd8; |
282 | __le16 sqid; | 282 | __le16 sqid; |
283 | __le16 qsize; | 283 | __le16 qsize; |
284 | __le16 sq_flags; | 284 | __le16 sq_flags; |
285 | __le16 cqid; | 285 | __le16 cqid; |
286 | __le32 rsvd12[4]; | 286 | __u32 rsvd12[4]; |
287 | }; | 287 | }; |
288 | 288 | ||
289 | struct nvme_delete_queue { | 289 | struct nvme_delete_queue { |
@@ -292,8 +292,20 @@ struct nvme_delete_queue { | |||
292 | __u16 command_id; | 292 | __u16 command_id; |
293 | __u32 rsvd1[9]; | 293 | __u32 rsvd1[9]; |
294 | __le16 qid; | 294 | __le16 qid; |
295 | __le16 rsvd10; | 295 | __u16 rsvd10; |
296 | __le32 rsvd11[5]; | 296 | __u32 rsvd11[5]; |
297 | }; | ||
298 | |||
299 | struct nvme_download_firmware { | ||
300 | __u8 opcode; | ||
301 | __u8 flags; | ||
302 | __u16 command_id; | ||
303 | __u32 rsvd1[5]; | ||
304 | __le64 prp1; | ||
305 | __le64 prp2; | ||
306 | __le32 numd; | ||
307 | __le32 offset; | ||
308 | __u32 rsvd12[4]; | ||
297 | }; | 309 | }; |
298 | 310 | ||
299 | struct nvme_command { | 311 | struct nvme_command { |
@@ -305,6 +317,7 @@ struct nvme_command { | |||
305 | struct nvme_create_cq create_cq; | 317 | struct nvme_create_cq create_cq; |
306 | struct nvme_create_sq create_sq; | 318 | struct nvme_create_sq create_sq; |
307 | struct nvme_delete_queue delete_queue; | 319 | struct nvme_delete_queue delete_queue; |
320 | struct nvme_download_firmware dlfw; | ||
308 | }; | 321 | }; |
309 | }; | 322 | }; |
310 | 323 | ||
@@ -348,7 +361,7 @@ enum { | |||
348 | 361 | ||
349 | struct nvme_completion { | 362 | struct nvme_completion { |
350 | __le32 result; /* Used by admin commands to return data */ | 363 | __le32 result; /* Used by admin commands to return data */ |
351 | __le32 rsvd; | 364 | __u32 rsvd; |
352 | __le16 sq_head; /* how much of this queue may be reclaimed */ | 365 | __le16 sq_head; /* how much of this queue may be reclaimed */ |
353 | __le16 sq_id; /* submission queue that generated this entry */ | 366 | __le16 sq_id; /* submission queue that generated this entry */ |
354 | __u16 command_id; /* of the command which completed */ | 367 | __u16 command_id; /* of the command which completed */ |
@@ -372,9 +385,17 @@ struct nvme_user_io { | |||
372 | __u32 result; | 385 | __u32 result; |
373 | }; | 386 | }; |
374 | 387 | ||
388 | struct nvme_dlfw { | ||
389 | __u64 addr; | ||
390 | __u32 length; /* In dwords */ | ||
391 | __u32 offset; /* In dwords */ | ||
392 | }; | ||
393 | |||
375 | #define NVME_IOCTL_IDENTIFY_NS _IOW('N', 0x40, struct nvme_id_ns) | 394 | #define NVME_IOCTL_IDENTIFY_NS _IOW('N', 0x40, struct nvme_id_ns) |
376 | #define NVME_IOCTL_IDENTIFY_CTRL _IOW('N', 0x41, struct nvme_id_ctrl) | 395 | #define NVME_IOCTL_IDENTIFY_CTRL _IOW('N', 0x41, struct nvme_id_ctrl) |
377 | #define NVME_IOCTL_GET_RANGE_TYPE _IOW('N', 0x42, struct nvme_lba_range_type) | 396 | #define NVME_IOCTL_GET_RANGE_TYPE _IOW('N', 0x42, struct nvme_lba_range_type) |
378 | #define NVME_IOCTL_SUBMIT_IO _IOWR('N', 0x43, struct nvme_rw_command) | 397 | #define NVME_IOCTL_SUBMIT_IO _IOWR('N', 0x43, struct nvme_rw_command) |
398 | #define NVME_IOCTL_DOWNLOAD_FW _IOR('N', 0x44, struct nvme_dlfw) | ||
399 | #define NVME_IOCTL_ACTIVATE_FW _IO('N', 0x45) | ||
379 | 400 | ||
380 | #endif /* _LINUX_NVME_H */ | 401 | #endif /* _LINUX_NVME_H */ |