diff options
Diffstat (limited to 'MdeModulePkg/Bus/Pci')
-rw-r--r-- | MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressPassthru.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressPassthru.c b/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressPassthru.c index 96e9d88e52..2c30009945 100644 --- a/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressPassthru.c +++ b/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressPassthru.c @@ -596,7 +596,7 @@ NvmExpressPassThru ( //
// Ring the submission queue doorbell.
//
- if (Event != NULL) {
+ if ((Event != NULL) && (QueueId != 0)) {
Private->SqTdbl[QueueId].Sqt =
(Private->SqTdbl[QueueId].Sqt + 1) % (NVME_ASYNC_CSQ_SIZE + 1);
} else {
@@ -616,7 +616,7 @@ NvmExpressPassThru ( // For non-blocking requests, return directly if the command is placed
// in the submission queue.
//
- if (Event != NULL) {
+ if ((Event != NULL) && (QueueId != 0)) {
AsyncRequest = AllocateZeroPool (sizeof (NVME_PASS_THRU_ASYNC_REQ));
if (AsyncRequest == NULL) {
Status = EFI_DEVICE_ERROR;
@@ -699,6 +699,15 @@ NvmExpressPassThru ( &Data
);
+ //
+ // For now, the code does not support the non-blocking feature for admin queue.
+ // If Event is not NULL for admin queue, signal the caller's event here.
+ //
+ if (Event != NULL) {
+ ASSERT (QueueId == 0);
+ gBS->SignalEvent (Event);
+ }
+
EXIT:
if (MapData != NULL) {
PciIo->Unmap (
|