diff options
Diffstat (limited to 'src/nvme/mi.h')
-rw-r--r-- | src/nvme/mi.h | 38 |
1 files changed, 35 insertions, 3 deletions
diff --git a/src/nvme/mi.h b/src/nvme/mi.h index 81cb00f..a7ed240 100644 --- a/src/nvme/mi.h +++ b/src/nvme/mi.h @@ -451,6 +451,39 @@ nvme_mi_ep_t nvme_mi_next_endpoint(nvme_root_t m, nvme_mi_ep_t e); e != NULL; \ e = _e, _e = nvme_mi_next_endpoint(m, e)) +/** + * nvme_mi_ep_set_timeout - set a timeout for NVMe-MI responses + * @ep: MI endpoint object + * @timeout_ms: Timeout for MI responses, given in milliseconds + */ +int nvme_mi_ep_set_timeout(nvme_mi_ep_t ep, unsigned int timeout_ms); + +/** + * nvme_mi_ep_set_mprt_max - set the maximum wait time for a More Processing + * Required response + * @ep: MI endpoint object + * @mprt_max_ms: Maximum more processing required wait time + * + * NVMe-MI endpoints may respond to a request with a "More Processing Required" + * response; this also includes a hint on the worst-case processing time for + * the eventual response data, with a specification-defined maximum of 65.535 + * seconds. + * + * This function provides a way to limit the maximum time we're prepared to + * wait for the final response. Specify zero in @mprt_max_ms for no limit. + * This should be larger than the command/response timeout set in + * &nvme_mi_ep_set_timeout(). + */ +void nvme_mi_ep_set_mprt_max(nvme_mi_ep_t ep, unsigned int mprt_max_ms); + +/** + * nvme_mi_ep_get_timeout - get the current timeout value for NVMe-MI responses + * @ep: MI endpoint object + * + * Returns the current timeout value, in milliseconds, for this endpoint. + */ +unsigned int nvme_mi_ep_get_timeout(nvme_mi_ep_t ep); + struct nvme_mi_ctrl; /** @@ -1046,7 +1079,7 @@ static inline int nvme_mi_admin_identify_ctrl_list(nvme_mi_ctrl_t ctrl, } /** - * nvme_mi_admin_get_log_page() - Retrieve log page data from controller + * nvme_mi_admin_get_log() - Retrieve log page data from controller * @ctrl: Controller to query * @args: Get Log Page command arguments * @@ -1062,8 +1095,7 @@ static inline int nvme_mi_admin_identify_ctrl_list(nvme_mi_ctrl_t ctrl, * * See: &struct nvme_get_log_args */ -int nvme_mi_admin_get_log_page(nvme_mi_ctrl_t ctrl, - struct nvme_get_log_args *args); +int nvme_mi_admin_get_log(nvme_mi_ctrl_t ctrl, struct nvme_get_log_args *args); /** * nvme_mi_admin_security_send() - Perform a Security Send command on a |