]> git.baikalelectronics.ru Git - kernel.git/commit
nvme-fabrics: fix and refine state checks in __nvmf_check_ready
authorChristoph Hellwig <hch@lst.de>
Mon, 11 Jun 2018 15:41:11 +0000 (17:41 +0200)
committerChristoph Hellwig <hch@lst.de>
Fri, 15 Jun 2018 09:21:00 +0000 (11:21 +0200)
commitb8d4420102fa729abb908dfd8e4a11e922c5a368
treec5197fa28e89654982bdd5b1ef385f1dc2c718e8
parent5081b341e3d2777f2fb2c55a909e28ed8a42a45a
nvme-fabrics: fix and refine state checks in __nvmf_check_ready

 - make sure we only allow internally generates commands in any non-live
   state
 - only allow connect commands on non-live queues when actually in the
   new or connecting states
 - treat all other non-live, non-dead states the same as a default
   cach-all

This fixes a regression where we could not shutdown a controller
orderly as we didn't allow the internal generated Property Set
command, and also ensures we don't accidentally let a Connect command
through in the wrong state.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: James Smart <james.smart@broadcom.com>
drivers/nvme/host/fabrics.c