From: "Oliver Smith-Denny" <osde@linux.microsoft.com>
To: devel@edk2.groups.io
Cc: Hao A Wu <hao.a.wu@intel.com>, Ray Ni <ray.ni@intel.com>,
Jian J Wang <jian.j.wang@intel.com>,
Liming Gao <gaoliming@byosoft.com.cn>,
Michael Kubacki <mikuback@linux.microsoft.com>,
Sean Brogan <sean.brogan@microsoft.com>
Subject: [edk2-devel][PATCH v2 1/2] Add the volatile keyword to NvmExpressDxe's Passthru CQ
Date: Thu, 27 Apr 2023 10:36:21 -0700 [thread overview]
Message-ID: <20230427173622.10614-2-osde@linux.microsoft.com> (raw)
In-Reply-To: <20230427173622.10614-1-osde@linux.microsoft.com>
This updates the relevant functions that expect a non-volatile
structure to be passed to them to take casts of the CQ
now that it is volatile.
Cc: Hao A Wu <hao.a.wu@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Michael Kubacki <mikuback@linux.microsoft.com>
Cc: Sean Brogan <sean.brogan@microsoft.com>
Signed-off-by: Oliver Smith-Denny <osde@linux.microsoft.com>
---
MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressPassthru.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressPassthru.c b/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressPassthru.c
index f37baa626a16..2ff2cb0e8d36 100644
--- a/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressPassthru.c
+++ b/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressPassthru.c
@@ -460,7 +460,7 @@ NvmExpressPassThru (
EFI_STATUS PreviousStatus;
EFI_PCI_IO_PROTOCOL *PciIo;
NVME_SQ *Sq;
- NVME_CQ *Cq;
+ volatile NVME_CQ *Cq;
UINT16 QueueId;
UINT16 QueueSize;
UINT32 Bytes;
@@ -815,14 +815,14 @@ NvmExpressPassThru (
// Dump every completion entry status for debugging.
//
DEBUG_CODE_BEGIN ();
- NvmeDumpStatus (Cq);
+ NvmeDumpStatus ((NVME_CQ *)Cq);
DEBUG_CODE_END ();
}
//
// Copy the Respose Queue entry for this command to the callers response buffer
//
- CopyMem (Packet->NvmeCompletion, Cq, sizeof (EFI_NVM_EXPRESS_COMPLETION));
+ CopyMem (Packet->NvmeCompletion, (VOID *)Cq, sizeof (EFI_NVM_EXPRESS_COMPLETION));
} else {
//
// Timeout occurs for an NVMe command. Reset the controller to abort the
--
2.40.0
next prev parent reply other threads:[~2023-04-27 17:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-27 17:36 [edk2-devel][PATCH v2 0/2] Add Volatile Keyword to NvmExpress Passthru CQs Oliver Smith-Denny
2023-04-27 17:36 ` Oliver Smith-Denny [this message]
2023-04-27 17:36 ` [edk2-devel][PATCH v2 2/2] Add volatile keyword to NvmExpressPei's Passthru CQ Oliver Smith-Denny
2023-05-04 2:19 ` [edk2-devel][PATCH v2 0/2] Add Volatile Keyword to NvmExpress Passthru CQs Wu, Hao A
2023-05-08 2:33 ` Wu, Hao A
2023-05-05 1:51 ` Michael Kubacki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230427173622.10614-2-osde@linux.microsoft.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox