* [PATCH] nvme: Stop probing a removed device
@ 2016-10-11 17:31 Keith Busch
2016-10-12 14:40 ` Jens Axboe
0 siblings, 1 reply; 6+ messages in thread
From: Keith Busch @ 2016-10-11 17:31 UTC (permalink / raw)
There is no reason the nvme controller can ever return all 1's from
reading the CSTS register. This patch returns an error if we observe
that status. Without this, we may incorrectly proceed with controller
initialization and unnecessarilly rely on error handling to clean this.
Signed-off-by: Keith Busch <keith.busch at intel.com>
---
drivers/nvme/host/core.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 62bdbe6..f80ed33 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -1086,6 +1086,8 @@ static int nvme_wait_ready(struct nvme_ctrl *ctrl, u64 cap, bool enabled)
int ret;
while ((ret = ctrl->ops->reg_read32(ctrl, NVME_REG_CSTS, &csts)) == 0) {
+ if (csts == ~0)
+ return -ENODEV;
if ((csts & NVME_CSTS_RDY) == bit)
break;
--
2.7.2
^ permalink raw reply related [flat|nested] 6+ messages in thread* [PATCH] nvme: Stop probing a removed device
2016-10-11 17:31 [PATCH] nvme: Stop probing a removed device Keith Busch
@ 2016-10-12 14:40 ` Jens Axboe
2016-10-12 15:16 ` Keith Busch
0 siblings, 1 reply; 6+ messages in thread
From: Jens Axboe @ 2016-10-12 14:40 UTC (permalink / raw)
On 10/11/2016 11:31 AM, Keith Busch wrote:
> There is no reason the nvme controller can ever return all 1's from
> reading the CSTS register. This patch returns an error if we observe
> that status. Without this, we may incorrectly proceed with controller
> initialization and unnecessarilly rely on error handling to clean this.
Applied for this series.
Due to being away for a bit, I'm currently a bit behind on patches. I'll
be going over those today. But if you, or anyone else, have things
pending that I haven't picked up yet, do send me a ping.
--
Jens Axboe
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] nvme: Stop probing a removed device
2016-10-12 14:40 ` Jens Axboe
@ 2016-10-12 15:16 ` Keith Busch
2016-10-12 15:26 ` Jens Axboe
0 siblings, 1 reply; 6+ messages in thread
From: Keith Busch @ 2016-10-12 15:16 UTC (permalink / raw)
On Wed, Oct 12, 2016@08:40:57AM -0600, Jens Axboe wrote:
> On 10/11/2016 11:31 AM, Keith Busch wrote:
> > There is no reason the nvme controller can ever return all 1's from
> > reading the CSTS register. This patch returns an error if we observe
> > that status. Without this, we may incorrectly proceed with controller
> > initialization and unnecessarilly rely on error handling to clean this.
>
> Applied for this series.
>
> Due to being away for a bit, I'm currently a bit behind on patches. I'll
> be going over those today. But if you, or anyone else, have things
> pending that I haven't picked up yet, do send me a ping.
Thanks! From me, I have two small patches I think are good to go, with
reviews from Christoph and others:
IO queue deltion fix:
http://lists.infradead.org/pipermail/linux-nvme/2016-October/006549.html
Double reset fix:
http://lists.infradead.org/pipermail/linux-nvme/2016-October/006524.html
I've been trying to catch up on everything else, and haven't finished
reviewing the latest proposals either. I do like Bart's block quiesce
patch series and lightly tested it, but haven't had time to provide any
feedback. I don't want to be in the way if everyone else is okay with it,
or I'll have time next week if it's not hoping to go in this merge window.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] nvme: Stop probing a removed device
2016-10-12 15:16 ` Keith Busch
@ 2016-10-12 15:26 ` Jens Axboe
2016-10-12 15:48 ` Keith Busch
0 siblings, 1 reply; 6+ messages in thread
From: Jens Axboe @ 2016-10-12 15:26 UTC (permalink / raw)
On 10/12/2016 09:16 AM, Keith Busch wrote:
> On Wed, Oct 12, 2016@08:40:57AM -0600, Jens Axboe wrote:
>> On 10/11/2016 11:31 AM, Keith Busch wrote:
>>> There is no reason the nvme controller can ever return all 1's from
>>> reading the CSTS register. This patch returns an error if we observe
>>> that status. Without this, we may incorrectly proceed with controller
>>> initialization and unnecessarilly rely on error handling to clean this.
>>
>> Applied for this series.
>>
>> Due to being away for a bit, I'm currently a bit behind on patches. I'll
>> be going over those today. But if you, or anyone else, have things
>> pending that I haven't picked up yet, do send me a ping.
>
> Thanks! From me, I have two small patches I think are good to go, with
> reviews from Christoph and others:
>
> IO queue deltion fix:
>
> https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.infradead.org_pipermail_linux-2Dnvme_2016-2DOctober_006549.html&d=DQIBAg&c=5VD0RTtNlTh3ycd41b3MUw&r=cK1a7KivzZRh1fKQMjSm2A&m=USHj4BTLL7XH6RKDrQcfVaoEtYrs9X7WlWp86a7V7T4&s=g1WSuwsvtlK6IgJlP3yBlW4tiSJXSRgm_rgADvHVYVA&e=
Hand applied (last hunk reject).
> Double reset fix:
>
> https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.infradead.org_pipermail_linux-2Dnvme_2016-2DOctober_006524.html&d=DQIBAg&c=5VD0RTtNlTh3ycd41b3MUw&r=cK1a7KivzZRh1fKQMjSm2A&m=USHj4BTLL7XH6RKDrQcfVaoEtYrs9X7WlWp86a7V7T4&s=Fv5eRNi1aBBJhmPHkNJhteHMxe_yylooeBA5-uJEkQs&e=
Applied 1/2 - you mentioned a v2 of 2/2, and it doesn't apply since it
actually conflicts with the very patch referenced above.
--
Jens Axboe
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] nvme: Stop probing a removed device
2016-10-12 15:26 ` Jens Axboe
@ 2016-10-12 15:48 ` Keith Busch
2016-10-12 15:40 ` Jens Axboe
0 siblings, 1 reply; 6+ messages in thread
From: Keith Busch @ 2016-10-12 15:48 UTC (permalink / raw)
On Wed, Oct 12, 2016@09:26:31AM -0600, Jens Axboe wrote:
> On 10/12/2016 09:16 AM, Keith Busch wrote:
> > IO queue deltion fix:
> >
> > https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.infradead.org_pipermail_linux-2Dnvme_2016-2DOctober_006549.html&d=DQIBAg&c=5VD0RTtNlTh3ycd41b3MUw&r=cK1a7KivzZRh1fKQMjSm2A&m=USHj4BTLL7XH6RKDrQcfVaoEtYrs9X7WlWp86a7V7T4&s=g1WSuwsvtlK6IgJlP3yBlW4tiSJXSRgm_rgADvHVYVA&e=
>
> Hand applied (last hunk reject).
>
> > Double reset fix:
> >
> > https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.infradead.org_pipermail_linux-2Dnvme_2016-2DOctober_006524.html&d=DQIBAg&c=5VD0RTtNlTh3ycd41b3MUw&r=cK1a7KivzZRh1fKQMjSm2A&m=USHj4BTLL7XH6RKDrQcfVaoEtYrs9X7WlWp86a7V7T4&s=Fv5eRNi1aBBJhmPHkNJhteHMxe_yylooeBA5-uJEkQs&e=
>
> Applied 1/2 - you mentioned a v2 of 2/2, and it doesn't apply since it
> actually conflicts with the very patch referenced above.
Sorry, I make this more difficult than it should be, but you have the
intended result. The "IO queue deletion" link was the final revision of
2/2, but sent separately since not related or dependent on 1/2.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] nvme: Stop probing a removed device
2016-10-12 15:48 ` Keith Busch
@ 2016-10-12 15:40 ` Jens Axboe
0 siblings, 0 replies; 6+ messages in thread
From: Jens Axboe @ 2016-10-12 15:40 UTC (permalink / raw)
On 10/12/2016 09:48 AM, Keith Busch wrote:
> On Wed, Oct 12, 2016@09:26:31AM -0600, Jens Axboe wrote:
>> On 10/12/2016 09:16 AM, Keith Busch wrote:
>>> IO queue deltion fix:
>>>
>>> https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.infradead.org_pipermail_linux-2Dnvme_2016-2DOctober_006549.html&d=DQIBAg&c=5VD0RTtNlTh3ycd41b3MUw&r=cK1a7KivzZRh1fKQMjSm2A&m=USHj4BTLL7XH6RKDrQcfVaoEtYrs9X7WlWp86a7V7T4&s=g1WSuwsvtlK6IgJlP3yBlW4tiSJXSRgm_rgADvHVYVA&e=
>>
>> Hand applied (last hunk reject).
>>
>>> Double reset fix:
>>>
>>> https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.infradead.org_pipermail_linux-2Dnvme_2016-2DOctober_006524.html&d=DQIBAg&c=5VD0RTtNlTh3ycd41b3MUw&r=cK1a7KivzZRh1fKQMjSm2A&m=USHj4BTLL7XH6RKDrQcfVaoEtYrs9X7WlWp86a7V7T4&s=Fv5eRNi1aBBJhmPHkNJhteHMxe_yylooeBA5-uJEkQs&e=
>>
>> Applied 1/2 - you mentioned a v2 of 2/2, and it doesn't apply since it
>> actually conflicts with the very patch referenced above.
>
> Sorry, I make this more difficult than it should be, but you have the
> intended result. The "IO queue deletion" link was the final revision of
> 2/2, but sent separately since not related or dependent on 1/2.
I thought so, thanks for confirming.
--
Jens Axboe
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-10-12 15:48 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-11 17:31 [PATCH] nvme: Stop probing a removed device Keith Busch
2016-10-12 14:40 ` Jens Axboe
2016-10-12 15:16 ` Keith Busch
2016-10-12 15:26 ` Jens Axboe
2016-10-12 15:48 ` Keith Busch
2016-10-12 15:40 ` Jens Axboe
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.