Skip to content

Commit 14daa26

Browse files
ikegami-tigaw
authored andcommitted
ioctl: add nvme_get_log_pull_model_ddc_req()
Since added the NVMe 2.1 log page. Signed-off-by: Tokunori Ikegami <[email protected]>
1 parent d13211d commit 14daa26

2 files changed

Lines changed: 30 additions & 0 deletions

File tree

src/nvme/ioctl.h

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2378,6 +2378,22 @@ static inline int nvme_get_log_ave_discover(int fd, bool rae, __u32 len,
23782378
return nvme_get_nsid_log(fd, rae, NVME_LOG_LID_AVE_DISCOVER, NVME_NSID_ALL, len, log);
23792379
}
23802380

2381+
/**
2382+
* nvme_get_log_pull_model_ddc_req() - Retrieve Pull Model DDC Request Log
2383+
* @fd: File descriptor of nvme device
2384+
* @rae: Retain asynchronous events
2385+
* @len: The allocated length of the log page
2386+
* @log: User address to store the log page
2387+
*
2388+
* Return: The nvme command status if a response was received (see
2389+
* &enum nvme_status_field) or -1 with errno set otherwise
2390+
*/
2391+
static inline int nvme_get_log_pull_model_ddc_req(int fd, bool rae, __u32 len,
2392+
struct nvme_pull_model_ddc_req_log *log)
2393+
{
2394+
return nvme_get_nsid_log(fd, rae, NVME_LOG_LID_PULL_MODEL_DDC_REQ, NVME_NSID_ALL, len, log);
2395+
}
2396+
23812397
/**
23822398
* nvme_get_log_media_unit_stat() - Retrieve Media Unit Status
23832399
* @fd: File descriptor of nvme device

src/nvme/types.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7007,6 +7007,20 @@ struct nvme_ave_discover_log {
70077007
struct nvme_ave_discover_log_entry adlpe[];
70087008
};
70097009

7010+
/**
7011+
* struct nvme_pull_model_ddc_req_log - Pull Model DDC Request Log
7012+
* @ori: Operation Request Identifier
7013+
* @rsvd1: Reserved
7014+
* @tpdrpl: Total Pull Model DDC Request Log Page Length
7015+
* @osp: Operation Specific Parameters
7016+
*/
7017+
struct nvme_pull_model_ddc_req_log {
7018+
__u8 ori;
7019+
__u8 rsvd1[3];
7020+
__le32 tpdrpl;
7021+
__u8 osp[];
7022+
};
7023+
70107024
/**
70117025
* struct nvme_mi_read_nvm_ss_info - NVM Subsystem Information Data Structure
70127026
* @nump: Number of Ports

0 commit comments

Comments
 (0)