File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -61,6 +61,7 @@ struct nvme_mi_ep *nvme_mi_init_ep(nvme_root_t root)
6161 ep -> root = root ;
6262 ep -> controllers_scanned = false;
6363 ep -> timeout = default_timeout ;
64+ ep -> mprt_max = 0 ;
6465 list_head_init (& ep -> controllers );
6566
6667 list_add (& root -> endpoints , & ep -> root_entry );
@@ -81,6 +82,11 @@ int nvme_mi_ep_set_timeout(nvme_mi_ep_t ep, unsigned int timeout_ms)
8182 return 0 ;
8283}
8384
85+ void nvme_mi_ep_set_mprt_max (nvme_mi_ep_t ep , unsigned int mprt_max_ms )
86+ {
87+ ep -> mprt_max = mprt_max_ms ;
88+ }
89+
8490unsigned int nvme_mi_ep_get_timeout (nvme_mi_ep_t ep )
8591{
8692 return ep -> timeout ;
Original file line number Diff line number Diff line change @@ -458,6 +458,24 @@ nvme_mi_ep_t nvme_mi_next_endpoint(nvme_root_t m, nvme_mi_ep_t e);
458458 */
459459int nvme_mi_ep_set_timeout (nvme_mi_ep_t ep , unsigned int timeout_ms );
460460
461+ /**
462+ * nvme_mi_ep_set_mprt_max - set the maximum wait time for a More Processing
463+ * Required response
464+ * @ep: MI endpoint object
465+ * @mprt_max_ms: Maximum more processing required wait time
466+ *
467+ * NVMe-MI endpoints may respond to a request with a "More Processing Required"
468+ * response; this also includes a hint on the worst-case processing time for
469+ * the eventual response data, with a specification-defined maximum of 65.535
470+ * seconds.
471+ *
472+ * This function provides a way to limit the maximum time we're prepared to
473+ * wait for the final response. Specify zero in @mprt_max_ms for no limit.
474+ * This should be larger than the command/response timeout set in
475+ * &nvme_mi_ep_set_timeout().
476+ */
477+ void nvme_mi_ep_set_mprt_max (nvme_mi_ep_t ep , unsigned int mprt_max_ms );
478+
461479/**
462480 * nvme_mi_ep_get_timeout - get the current timeout value for NVMe-MI responses
463481 * @ep: MI endpoint object
Original file line number Diff line number Diff line change @@ -194,6 +194,7 @@ struct nvme_mi_ep {
194194 struct list_head controllers ;
195195 bool controllers_scanned ;
196196 unsigned int timeout ;
197+ unsigned int mprt_max ;
197198};
198199
199200struct nvme_mi_ctrl {
You can’t perform that action at this time.
0 commit comments