Fix controller reset return
Subsystems (2)
PATCH 1/1 Fix controller reset return
From: Charles Machalow <[email protected]>
If the Controller Reset comes in when the device had no namespaces, we're incorrectly giving back ENETRESET.
--- drivers/nvme/host/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/nvme/host/core.c +2 -1
@@ -117,7 +117,8 @@ int nvme_reset_ctrl_sync(struct nvme_ctrl *ctrl) ret =nvme_reset_ctrl (ctrl);if (!ret) {flush_work (&ctrl->reset_work); -if (ctrl->state !=NVME_CTRL_LIVE ) +if (ctrl->state !=NVME_CTRL_LIVE && + ctrl->state !=NVME_CTRL_ADMIN_ONLY ) ret = -ENETRESET ; }
Signature · 1 line
2.14.3
PATCH 1/1 Fix controller reset return
I'll just need to append "nvme:" to the front of the changelog subject, otherwise I think this is a trivial fix.
For future, there are multiple places that look for LIVE and ADMIN_ONLY, so might be worth refactoring this into a function later.
Christoph Hellwig
AppliedPATCH 1/1 Fix controller reset return
In reply to Keith BuschThanks,
applied to nvme-4.18-2
PATCH 1/1 Fix controller reset return
Quoted 3 lines · Christoph Hellwig
Thanks,
applied to nvme-4.18-2
I'd included this one in an earlier 4.17 pull request. The regression caused some major problems in test automation, and the fix was trivial.
Christoph Hellwig
maintainerPATCH 1/1 Fix controller reset return
Quoted 7 lines · Keith Busch
Quoted 3 lines · Christoph Hellwig
Thanks,
applied to nvme-4.18-2
I'd included this one in an earlier 4.17 pull request. The regression caused some major problems in test automation, and the fix was trivial.
ok, I'll drop it again to avoid a duplicate commit.