Skip to content

Commit

Permalink
ioctl: add nvme_get_log_pull_model_ddc_req()
Browse files Browse the repository at this point in the history
Since added the NVMe 2.1 log page.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
  • Loading branch information
ikegami-t committed Jan 7, 2025
1 parent acb90d1 commit 30bd194
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/nvme/ioctl.h
Original file line number Diff line number Diff line change
Expand Up @@ -2378,6 +2378,22 @@ static inline int nvme_get_log_ave_discover(int fd, bool rae, __u32 len,
return nvme_get_nsid_log(fd, rae, NVME_LOG_LID_AVE_DISCOVER, NVME_NSID_ALL, len, log);
}

/**
* nvme_get_log_pull_model_ddc_req() - Retrieve Pull Model DDC Request Log
* @fd: File descriptor of nvme device
* @rae: Retain asynchronous events
* @len: The allocated length of the log page
* @log: User address to store the log page
*
* Return: The nvme command status if a response was received (see
* &enum nvme_status_field) or -1 with errno set otherwise
*/
static inline int nvme_get_log_pull_model_ddc_req(int fd, bool rae, __u32 len,
struct nvme_pull_model_ddc_req_log *log)
{
return nvme_get_nsid_log(fd, rae, NVME_LOG_LID_PULL_MODEL_DDC_REQ, NVME_NSID_ALL, len, log);
}

/**
* nvme_get_log_media_unit_stat() - Retrieve Media Unit Status
* @fd: File descriptor of nvme device
Expand Down
14 changes: 14 additions & 0 deletions src/nvme/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -7007,6 +7007,20 @@ struct nvme_ave_discover_log {
struct nvme_ave_discover_log_entry adlpe[];
};

/**
* struct nvme_pull_model_ddc_req_log - Pull Model DDC Request Log
* @ori: Operation Request Identifier
* @rsvd1: Reserved
* @tpdrpl: Total Pull Model DDC Request Log Page Length
* @osp: Operation Specific Parameters
*/
struct nvme_pull_model_ddc_req_log {
__u8 ori;
__u8 rsvd1[3];
__le32 tpdrpl;
__u8 osp[];
};

/**
* struct nvme_mi_read_nvm_ss_info - NVM Subsystem Information Data Structure
* @nump: Number of Ports
Expand Down

0 comments on commit 30bd194

Please sign in to comment.