OSDN Git Service

nvme-fc: change ctlr state assignments during reset/reconnect
authorJames Smart <jsmart2021@gmail.com>
Wed, 25 Oct 2017 23:43:14 +0000 (16:43 -0700)
committerChristoph Hellwig <hch@lst.de>
Wed, 1 Nov 2017 15:28:23 +0000 (16:28 +0100)
commit44c6ec77e12c387aaba420b30a54b94966f0d9e8
tree21fb28e9cc2fa7a1e62c7ad6c20c1739ec9e36ff
parent4054637c9b4fbe9feef0cf6f2516ef00d8053560
nvme-fc: change ctlr state assignments during reset/reconnect

Clean up some of the controller state checks and add the
RESETTING->RECONNECTING state transition.

Specifically:
- the movement of the RESETTING state change and schedule of reset_work
  to core doesn't work wiht nvme_fc_error_recovery setting state to
  RECONNECTING before attempting to reset.  Remove the state change as
  the reset request does it.
- In the rare cases where an error occurs right as we're transitioning
  to LIVE, defer the controller start actions.
- In error handling on teardown of associations while performing initial
  controller creation - avoid quiesce calls on the admin_q.  They are
  unneeded.
- Add the RESETTING->RECONNECTING transition in the reset handler.

Signed-off-by: James Smart <james.smart@broadcom.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/host/fc.c