+16
−7
Loading
NVMe 1.2 introduced a new Identify Controller field, RTD3E ("RTD3 Entry
Latency"), which allows the device to report the expected time for a
normal shutdown. Use this as the timeout for the shutdown process when
available instead of hard-coding 5 seconds.
Some devices may report a RTD3E time that is shorter than their actual
shutdown time in practice; force the timeout to be at least 10 seconds
to allow for a reasonable amount of shutdown time.
This doesn't add any extra delay for devices that do complete the
shutdown process within their reported RTD3E time, since we will return
as soon as the device reports that it is finished shutting down.
Change-Id: Ibc04b3fc08a3486cf785ae969bba9243c572cd31
Signed-off-by:
Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/386688
Reviewed-by:
Jim Harris <james.r.harris@intel.com>
Reviewed-by:
Ben Walker <benjamin.walker@intel.com>
Tested-by:
SPDK Automated Test System <sys_sgsw@intel.com>