]> git.baikalelectronics.ru Git - kernel.git/commit
nvme: Fix sync controller reset return
authorCharles Machalow <charles.machalow@intel.com>
Thu, 10 May 2018 23:01:38 +0000 (16:01 -0700)
committerKeith Busch <keith.busch@intel.com>
Fri, 11 May 2018 16:51:45 +0000 (10:51 -0600)
commit6b55c29835acad8e506316c165123bec4d5bb193
tree34f53556f597922875004c500b741de5a10400c1
parentd873dca92481bd3ba91835774d7accaf333e211d
nvme: Fix sync controller reset return

If a controller reset is requested while the device has no namespaces,
we were incorrectly returning ENETRESET. This patch adds the check for
ADMIN_ONLY controller state to indicate a successful reset.

Fixes: cf58d793a2 ("nvme-rdma: fix sysfs invoked reset_ctrl error flow ")
Cc: <stable@vger.kernel.org>
Signed-off-by: Charles Machalow <charles.machalow@intel.com>
[changelog]
Signed-off-by: Keith Busch <keith.busch@intel.com>
drivers/nvme/host/core.c