nvme: Stop probing a removed device
PATCH 1/1 nvme: Stop probing a removed device
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.
--- drivers/nvme/host/core.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/nvme/host/core.c +2 -0
@@ -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 ;
Signature · 1 line
2.7.2
PATCH 1/1 nvme: Stop probing a removed device
Quoted 4 lines · Keith Busch
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.
Signature · 1 line
Jens Axboe
PATCH 1/1 nvme: Stop probing a removed device
Quoted 11 lines · Jens Axboe
Quoted 4 lines · Keith Busch
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.
PATCH 1/1 nvme: Stop probing a removed device
Quoted 13 lines · Keith Busch
Quoted 11 lines · Jens Axboe
Quoted 4 lines · Keith Busch
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.
Quoted 6 lines
Thanks! From me, I have two small patches I think are good to go, with reviews from Christoph and others:
IO queue deltion fix:
Hand applied (last hunk reject).
Quoted 3 lines
Double reset fix:
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.
Signature · 1 line
Jens Axboe
PATCH 1/1 nvme: Stop probing a removed device
Quoted 5 lines · Jens Axboe
Quoted 3 lines · Keith Busch
IO queue deltion fix:
Quoted 8 lines
Hand applied (last hunk reject).
Quoted 3 lines
Double reset fix:
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.
PATCH 1/1 nvme: Stop probing a removed device
Quoted 10 lines · Keith Busch
Quoted 9 lines · Jens Axboe
Quoted 3 lines · Keith Busch
IO queue deltion fix:
Hand applied (last hunk reject).
Quoted 2 lines
Double reset fix:
Quoted 8 lines
Quoted 4 lines
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.
Signature · 1 line
Jens Axboe