* [PATCH] Fix controller reset return
@ 2018-05-11 16:25 ` Keith Busch
0 siblings, 0 replies; 10+ messages in thread
From: Keith Busch @ 2018-05-11 16:25 UTC (permalink / raw)
To: linux-nvme, hch, sagi; +Cc: Charles Machalow, stable, Keith Busch
From: Charles Machalow <charles.machalow@intel.com>
If the Controller Reset comes in when the device had no namespaces,
we're incorrectly giving back ENETRESET.
Fixes: 8000d1fdb0 ("nvme-rdma: fix sysfs invoked reset_ctrl error flow ")
Cc: <stable@vger.kernel.org>
Signed-off-by: Charles Machalow <charles.machalow@intel.com>
Signed-off-by: Keith Busch <keith.busch@intel.com>
---
drivers/nvme/host/core.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index cd03f2bdac7b..b4eb74f14c02 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -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;
}
--
2.14.3
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH] Fix controller reset return
@ 2018-05-11 16:25 ` Keith Busch
0 siblings, 0 replies; 10+ messages in thread
From: Keith Busch @ 2018-05-11 16:25 UTC (permalink / raw)
From: Charles Machalow <charles.machalow@intel.com>
If the Controller Reset comes in when the device had no namespaces,
we're incorrectly giving back ENETRESET.
Fixes: 8000d1fdb0 ("nvme-rdma: fix sysfs invoked reset_ctrl error flow ")
Cc: <stable at vger.kernel.org>
Signed-off-by: Charles Machalow <charles.machalow at intel.com>
Signed-off-by: Keith Busch <keith.busch at intel.com>
---
drivers/nvme/host/core.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index cd03f2bdac7b..b4eb74f14c02 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -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;
}
--
2.14.3
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH] Fix controller reset return
2018-05-11 16:25 ` Keith Busch
@ 2018-05-11 16:36 ` Keith Busch
-1 siblings, 0 replies; 10+ messages in thread
From: Keith Busch @ 2018-05-11 16:36 UTC (permalink / raw)
To: linux-nvme, hch, sagi; +Cc: Machalow, Charles, stable
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.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH] Fix controller reset return
@ 2018-05-11 16:36 ` Keith Busch
0 siblings, 0 replies; 10+ messages in thread
From: Keith Busch @ 2018-05-11 16:36 UTC (permalink / raw)
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.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] Fix controller reset return
2018-05-11 16:25 ` Keith Busch
@ 2018-05-25 9:10 ` Christoph Hellwig
-1 siblings, 0 replies; 10+ messages in thread
From: Christoph Hellwig @ 2018-05-25 9:10 UTC (permalink / raw)
To: Keith Busch; +Cc: linux-nvme, hch, sagi, stable, Charles Machalow
Thanks,
applied to nvme-4.18-2
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH] Fix controller reset return
@ 2018-05-25 9:10 ` Christoph Hellwig
0 siblings, 0 replies; 10+ messages in thread
From: Christoph Hellwig @ 2018-05-25 9:10 UTC (permalink / raw)
Thanks,
applied to nvme-4.18-2
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] Fix controller reset return
2018-05-25 9:10 ` Christoph Hellwig
@ 2018-05-25 14:50 ` Keith Busch
-1 siblings, 0 replies; 10+ messages in thread
From: Keith Busch @ 2018-05-25 14:50 UTC (permalink / raw)
To: Christoph Hellwig
Cc: Keith Busch, stable, Charles Machalow, hch, linux-nvme, sagi
On Fri, May 25, 2018 at 02:10:56AM -0700, Christoph Hellwig wrote:
> 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.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH] Fix controller reset return
@ 2018-05-25 14:50 ` Keith Busch
0 siblings, 0 replies; 10+ messages in thread
From: Keith Busch @ 2018-05-25 14:50 UTC (permalink / raw)
On Fri, May 25, 2018@02:10:56AM -0700, Christoph Hellwig wrote:
> 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.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] Fix controller reset return
2018-05-25 14:50 ` Keith Busch
@ 2018-05-25 14:55 ` Christoph Hellwig
-1 siblings, 0 replies; 10+ messages in thread
From: Christoph Hellwig @ 2018-05-25 14:55 UTC (permalink / raw)
To: Keith Busch
Cc: Christoph Hellwig, Keith Busch, stable, Charles Machalow, hch,
linux-nvme, sagi
On Fri, May 25, 2018 at 08:50:09AM -0600, Keith Busch wrote:
> On Fri, May 25, 2018 at 02:10:56AM -0700, Christoph Hellwig wrote:
> > 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.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH] Fix controller reset return
@ 2018-05-25 14:55 ` Christoph Hellwig
0 siblings, 0 replies; 10+ messages in thread
From: Christoph Hellwig @ 2018-05-25 14:55 UTC (permalink / raw)
On Fri, May 25, 2018@08:50:09AM -0600, Keith Busch wrote:
> On Fri, May 25, 2018@02:10:56AM -0700, Christoph Hellwig wrote:
> > 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.
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2018-05-25 14:55 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-11 16:25 [PATCH] Fix controller reset return Keith Busch
2018-05-11 16:25 ` Keith Busch
2018-05-11 16:36 ` Keith Busch
2018-05-11 16:36 ` Keith Busch
2018-05-25 9:10 ` Christoph Hellwig
2018-05-25 9:10 ` Christoph Hellwig
2018-05-25 14:50 ` Keith Busch
2018-05-25 14:50 ` Keith Busch
2018-05-25 14:55 ` Christoph Hellwig
2018-05-25 14:55 ` Christoph Hellwig
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.