block/nvme: Correctly initialize Admin Queue Attributes
commit3c363c073e024fae7b09cad916e63dae89ed46cc
authorPhilippe Mathieu-Daudé <philmd@redhat.com>
Thu, 29 Oct 2020 09:32:55 +0000 (29 10:32 +0100)
committerStefan Hajnoczi <stefanha@redhat.com>
Tue, 3 Nov 2020 19:06:21 +0000 (3 19:06 +0000)
treecf689c017997dce464faec18e252f7650622bd74
parent76a24781cc82d99251f933c399d78af52e1d9b0e
block/nvme: Correctly initialize Admin Queue Attributes

From the specification chapter 3.1.8 "AQA - Admin Queue Attributes"
the Admin Submission Queue Size field is a 0’s based value:

  Admin Submission Queue Size (ASQS):

    Defines the size of the Admin Submission Queue in entries.
    Enabling a controller while this field is cleared to 00h
    produces undefined results. The minimum size of the Admin
    Submission Queue is two entries. The maximum size of the
    Admin Submission Queue is 4096 entries.
    This is a 0’s based value.

This bug has never been hit because the device initialization
uses a single command synchronously :)

Reviewed-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Tested-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-id: 20201029093306.1063879-15-philmd@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Tested-by: Eric Auger <eric.auger@redhat.com>
block/nvme.c