[PATCH 2/2] nvme: Delete created IO queues on reset

Gabriel Krisman Bertazi krisman at linux.vnet.ibm.com
Wed Oct 5 18:47:33 PDT 2016


Keith Busch <keith.busch at intel.com> writes:

> Commit c21377f8 (Suspend all queues before deletion) decrements the
> online queue count prior to our attempt to delete those IO queues, so
> the driver ended up not having the controller delete any. This patch
> uses the queue_count instead of online_queues.

hmm, this is obviously correct.  Nice catch.  Shame I missed it :(

Reviewed-by: Gabriel Krisman Bertazi <krisman at linux.vnet.ibm.com>

>
> Signed-off-by: Keith Busch <keith.busch at intel.com>
> ---
>  drivers/nvme/host/pci.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
> index 108d301..670f0cb 100644
> --- a/drivers/nvme/host/pci.c
> +++ b/drivers/nvme/host/pci.c
> @@ -1512,7 +1512,7 @@ static int nvme_delete_queue(struct nvme_queue *nvmeq, u8 opcode)
>
>  static void nvme_disable_io_queues(struct nvme_dev *dev)
>  {
> -	int pass, queues = dev->online_queues - 1;
> +	int pass, queues = dev->queue_count - 1;
>  	unsigned long timeout;
>  	u8 opcode = nvme_admin_delete_sq;

-- 
Gabriel Krisman Bertazi




More information about the Linux-nvme mailing list