]> git.proxmox.com Git - mirror_edk2.git/commit
MdeModulePkg NvmExpressDxe: Fix invalid queue size when creating IO queues
authorHao Wu <hao.a.wu@intel.com>
Wed, 1 Jun 2016 08:32:03 +0000 (16:32 +0800)
committerHao Wu <hao.a.wu@intel.com>
Thu, 2 Jun 2016 08:40:17 +0000 (16:40 +0800)
commit05bf4747dd8e412d10fccbe35346aa2597b4167b
tree479448e8cebcf2f16b8889e55bee768d833dd1ca
parent6535266574ac0478314d65953f2abf4091d55ee2
MdeModulePkg NvmExpressDxe: Fix invalid queue size when creating IO queues

The Maximum Queue Entries Supported (MQES) field in the CAP (Controller
Capabilities) register for a NVMe controller restrict the maximum
individual queue size that the controller supports.

The origin code does not check this value and always uses a hardcode value
when creating I/O submission/completion queues for asynchronous
transmission. The hardcode value might be larger than the MQES field, this
will lead to an 'Invalid Queue Size' error when creating I/O
submission/completion queues.

The patch will add checks to make sure proper queue size is passed when
creating I/O submission/completion queues.

Cc: Feng Tian <feng.tian@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Feng Tian <feng.tian@Intel.com>
MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressHci.c