diff options
author | Oliver Smith-Denny <osde@linux.microsoft.com> | 2023-04-28 01:36:21 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2023-05-08 01:56:16 +0000 |
commit | 293b97d0c4624c13a4e934294d2c4b161a09a91b (patch) | |
tree | e4733b03156cfbe1176a76beafa7c79a058fde2b /MdeModulePkg/Bus | |
parent | 4dea9e4a0e9db431240434279be9fbe45fd1651b (diff) | |
download | edk2-293b97d0c4624c13a4e934294d2c4b161a09a91b.tar.gz edk2-293b97d0c4624c13a4e934294d2c4b161a09a91b.tar.bz2 edk2-293b97d0c4624c13a4e934294d2c4b161a09a91b.zip |
Add the volatile keyword to NvmExpressDxe's Passthru CQ
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>
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
Acked-by: Michael Kubacki <michael.kubacki@microsoft.com>
Diffstat (limited to 'MdeModulePkg/Bus')
-rw-r--r-- | MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressPassthru.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressPassthru.c b/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressPassthru.c index f37baa626a..2ff2cb0e8d 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
|