]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Improve NVMe hot unplug handling.
authormav <mav@FreeBSD.org>
Wed, 21 Aug 2019 20:17:30 +0000 (20:17 +0000)
committermav <mav@FreeBSD.org>
Wed, 21 Aug 2019 20:17:30 +0000 (20:17 +0000)
commitf53e968d2a7b5f155106d2bad4a7dd2b5136f2ea
tree74b82a674fe8ff911009ae55fff10d0b0acd037a
parent0e0b78d1ab13847c681dbc5b09d66712b6e44bcc
Improve NVMe hot unplug handling.

If device is unplugged from the system (CSTS register reads return
0xffffffff), it makes no sense to send any more recovery requests or
expect any responses back.  If there is a detach call in such state,
just stop all activity and free resources.  If there is no detach
call (hot-plug is not supported), rely on normal timeout handling,
but when it trigger controller reset, do not wait for impossible and
quickly report failure.

MFC after: 2 weeks
Sponsored by: iXsystems, Inc.
sys/dev/nvme/nvme_ctrlr.c
sys/dev/nvme/nvme_qpair.c