]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpress.h
MdeModulePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / MdeModulePkg / Bus / Pci / NvmExpressDxe / NvmExpress.h
index fa4a34ab53cb4b9a4dd378fa9ecc8aee7b9afb71..45a14475002f8b4ef7edcb23bbba1542c1088e59 100644 (file)
@@ -3,14 +3,8 @@
   NVM Express specification.\r
 \r
   (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>\r
-  Copyright (c) 2013 - 2016, Intel Corporation. All rights reserved.<BR>\r
-  This program and the accompanying materials\r
-  are licensed and made available under the terms and conditions of the BSD License\r
-  which accompanies this distribution.  The full text of the license may be found at\r
-  http://opensource.org/licenses/bsd-license.php.\r
-\r
-  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+  Copyright (c) 2013 - 2019, Intel Corporation. All rights reserved.<BR>\r
+  SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
 \r
@@ -34,6 +28,7 @@
 #include <Protocol/DiskInfo.h>\r
 #include <Protocol/DriverSupportedEfiVersion.h>\r
 #include <Protocol/StorageSecurityCommand.h>\r
+#include <Protocol/ResetNotification.h>\r
 \r
 #include <Library/BaseLib.h>\r
 #include <Library/BaseMemoryLib.h>\r
@@ -44,6 +39,7 @@
 #include <Library/MemoryAllocationLib.h>\r
 #include <Library/UefiBootServicesTableLib.h>\r
 #include <Library/UefiDriverEntryPoint.h>\r
+#include <Library/ReportStatusCodeLib.h>\r
 \r
 typedef struct _NVME_CONTROLLER_PRIVATE_DATA NVME_CONTROLLER_PRIVATE_DATA;\r
 typedef struct _NVME_DEVICE_PRIVATE_DATA     NVME_DEVICE_PRIVATE_DATA;\r
@@ -146,6 +142,11 @@ struct _NVME_CONTROLLER_PRIVATE_DATA {
   NVME_CQHDBL                         CqHdbl[NVME_MAX_QUEUES];\r
   UINT16                              AsyncSqHead;\r
 \r
+  //\r
+  // Flag to indicate internal IO queue creation.\r
+  //\r
+  BOOLEAN                             CreateIoQueue;\r
+\r
   UINT8                               Pt[NVME_MAX_QUEUES];\r
   UINT16                              Cid[NVME_MAX_QUEUES];\r
 \r
@@ -721,4 +722,24 @@ NvmeDumpStatus (
   IN NVME_CQ             *Cq\r
   );\r
 \r
+/**\r
+  Register the shutdown notification through the ResetNotification protocol.\r
+\r
+  Register the shutdown notification when mNvmeControllerNumber increased from 0 to 1.\r
+**/\r
+VOID\r
+NvmeRegisterShutdownNotification (\r
+  VOID\r
+  );\r
+\r
+/**\r
+  Unregister the shutdown notification through the ResetNotification protocol.\r
+\r
+  Unregister the shutdown notification when mNvmeControllerNumber decreased from 1 to 0.\r
+**/\r
+VOID\r
+NvmeUnregisterShutdownNotification (\r
+  VOID\r
+  );\r
+\r
 #endif\r