]> git.proxmox.com Git - mirror_edk2.git/blobdiff - OvmfPkg/VirtioNetDxe/Events.c
BaseTools: Make brotli a submodule
[mirror_edk2.git] / OvmfPkg / VirtioNetDxe / Events.c
index 3a5b6b492e3bb7ec126293b129dafbab397ce49b..83e96e5e5d91da21c07579716a749d54b13b46ab 100644 (file)
@@ -8,13 +8,7 @@
   Copyright (C) 2013, Red Hat, Inc.\r
   Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>\r
 \r
-  This program and the accompanying materials are licensed and made available\r
-  under the terms and conditions of the BSD License which accompanies this\r
-  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, WITHOUT\r
-  WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+  SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
 \r
@@ -61,9 +55,10 @@ VirtioNetIsPacketAvailable (
   //\r
   MemoryFence ();\r
   RxCurUsed = *Dev->RxRing.Used.Idx;\r
+  MemoryFence ();\r
 \r
   if (Dev->RxLastUsed != RxCurUsed) {\r
-    gBS->SignalEvent (&Dev->Snp.WaitForPacket);\r
+    gBS->SignalEvent (Dev->Snp.WaitForPacket);\r
   }\r
 }\r
 \r
@@ -83,8 +78,9 @@ VirtioNetExitBoot (
   //\r
   VNET_DEV *Dev;\r
 \r
+  DEBUG ((DEBUG_VERBOSE, "%a: Context=0x%p\n", __FUNCTION__, Context));\r
   Dev = Context;\r
   if (Dev->Snm.State == EfiSimpleNetworkInitialized) {\r
-    VIRTIO_CFG_WRITE (Dev, Generic.VhdrDeviceStatus, 0);\r
+    Dev->VirtIo->SetDeviceStatus (Dev->VirtIo, 0);\r
   }\r
 }\r