]> git.proxmox.com Git - mirror_edk2.git/commit
MdeModulePkg/NvmExpressDxe: Fix wrong queue size for async IO queues
authorSean Brogan <sean.brogan@microsoft.com>
Tue, 3 Sep 2019 23:52:26 +0000 (16:52 -0700)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Wed, 20 Nov 2019 02:47:19 +0000 (02:47 +0000)
commit7607174192166dd5d2d6913fc2fdb8ce539cd3c9
treec28e164d64ff6d1e89c895b09eb5b5358f6ccd9a
parent0b9ad0bc030bbd79073a26fc9b3527ff9128b9da
MdeModulePkg/NvmExpressDxe: Fix wrong queue size for async IO queues

REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2118

When a packet is queued/completed for the asynchronous IO queue, the logic
to roll over to the front of the queue doesn't account for actual size of
the IO Submission/Completion queue.

This causes a device to hang due to doorbell being outside of visible
queue. An example would be if an NVMe drive only supported a queue size of
128 while the driver supports 256.

Cc: Jian J Wang <jian.j.wang@intel.com>
Signed-off-by: Sean Brogan <sean.brogan@microsoft.com>
Signed-off-by: Hao A Wu <hao.a.wu@intel.com>
Acked-by: Ray Ni <ray.ni@intel.com>
MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpress.c
MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressPassthru.c