Spdk/lib/nvme
Daniel Verkamp 4fd2131ea8 nvme: use RTD3E to determine shutdown timeout
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>
2017-11-14 18:20:50 -05:00
..
Makefile nvme: Monitor uevent for device insert and remove 2016-11-30 14:27:43 -07:00
nvme_ctrlr_cmd.c nvme: add controller option to specify host ID 2017-09-29 11:43:25 -04:00
nvme_ctrlr.c nvme: use RTD3E to determine shutdown timeout 2017-11-14 18:20:50 -05:00
nvme_internal.h nvme: add new spdk_nvme_connect() API to directly attach the ctrlr 2017-10-09 12:31:12 -04:00
nvme_ns_cmd.c nvme: decouple NVMe memory page size from PAGE_SIZE 2017-08-17 12:52:12 -04:00
nvme_ns.c log: rename SPDK_TRACELOG to SPDK_DEBUGLOG 2017-08-29 13:25:58 -04:00
nvme_pcie.c nvme: add new spdk_nvme_connect() API to directly attach the ctrlr 2017-10-09 12:31:12 -04:00
nvme_qpair.c nvme_spec: remove SGL Sub Type Invalid status code 2017-09-22 17:11:53 -04:00
nvme_quirks.c nvme: update the nvme devices quirks. 2017-09-01 12:35:57 -04:00
nvme_rdma.c nvme_rdma: set retry_count field in rdma_conn_param 2017-10-11 13:59:10 -04:00
nvme_transport.c nvme: add new spdk_nvme_connect() API to directly attach the ctrlr 2017-10-09 12:31:12 -04:00
nvme_uevent.c lib: replace strerror with strerror_r 2017-08-15 16:47:01 -04:00
nvme_uevent.h nvme: Remove pci_addr from probe_info 2016-12-12 10:46:50 -07:00
nvme.c nvme: add new spdk_nvme_connect() API to directly attach the ctrlr 2017-10-09 12:31:12 -04:00