[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH 3/5] Remove unplug_interface.h
XenVkbd doesnt use the UNPLUG interface, so remove query interface calls and all references to Unplugs Signed-off-by: Owen Smith <owen.smith@xxxxxxxxx> --- include/unplug_interface.h | 116 ------------------------------------- src/xenvkbd/fdo.c | 21 ------- src/xenvkbd/fdo.h | 2 - src/xenvkbd/pdo.c | 13 ----- 4 files changed, 152 deletions(-) delete mode 100644 include/unplug_interface.h diff --git a/include/unplug_interface.h b/include/unplug_interface.h deleted file mode 100644 index e465e2e..0000000 --- a/include/unplug_interface.h +++ /dev/null @@ -1,116 +0,0 @@ -/* Copyright (c) Xen Project. - * Copyright (c) Cloud Software Group, Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, - * with or without modification, are permitted provided - * that the following conditions are met: - * - * * Redistributions of source code must retain the above - * copyright notice, this list of conditions and the - * following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the - * following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND - * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, - * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -/*! \file unplug_interface.h - \brief XENBUS UNPLUG Interface - - This interface provides a method to request emulated device unplug -*/ - -#ifndef _XENBUS_UNPLUG_INTERFACE_H -#define _XENBUS_UNPLUG_INTERFACE_H - -#ifndef _WINDLL - -/*! \typedef XENBUS_UNPLUG_ACQUIRE - \brief Acquire a reference to the UNPLUG interface - - \param Interface The interface header -*/ -typedef NTSTATUS -(*XENBUS_UNPLUG_ACQUIRE)( - IN PINTERFACE Interface - ); - -/*! \typedef XENBUS_UNPLUG_RELEASE - \brief Release a reference to the UNPLUG interface - - \param Interface The interface header -*/ -typedef VOID -(*XENBUS_UNPLUG_RELEASE)( - IN PINTERFACE Interface - ); - -/*! \enum _XENBUS_UNPLUG_DEVICE_TYPE - \brief Type of device to be unplugged -*/ -typedef enum _XENBUS_UNPLUG_DEVICE_TYPE { - XENBUS_UNPLUG_DEVICE_TYPE_INVALID = 0, - XENBUS_UNPLUG_DEVICE_TYPE_NICS, /*!< NICs */ - XENBUS_UNPLUG_DEVICE_TYPE_DISKS, /*!< Disks */ -} XENBUS_UNPLUG_DEVICE_TYPE, *PXENBUS_UNPLUG_DEVICE_TYPE; - -/*! \typedef XENBUS_UNPLUG_REQUEST - \brief Request unplug of a type of emulated device - - \param Interface The interface header - \param Type The type of device - \param Make Set to TRUE if the request is being made, FALSE if it is - being revoked. -*/ -typedef VOID -(*XENBUS_UNPLUG_REQUEST)( - IN PINTERFACE Interface, - IN XENBUS_UNPLUG_DEVICE_TYPE Type, - IN BOOLEAN Make - ); - -// {73db6517-3d06-4937-989f-199b7501e229} -DEFINE_GUID(GUID_XENBUS_UNPLUG_INTERFACE, -0x73db6517, 0x3d06, 0x4937, 0x98, 0x9f, 0x19, 0x9b, 0x75, 0x01, 0xe2, 0x29); - -/*! \struct _XENBUS_UNPLUG_INTERFACE_V1 - \brief UNPLUG interface version 1 - \ingroup interfaces -*/ -struct _XENBUS_UNPLUG_INTERFACE_V1 { - INTERFACE Interface; - XENBUS_UNPLUG_ACQUIRE UnplugAcquire; - XENBUS_UNPLUG_RELEASE UnplugRelease; - XENBUS_UNPLUG_REQUEST UnplugRequest; -}; - -typedef struct _XENBUS_UNPLUG_INTERFACE_V1 XENBUS_UNPLUG_INTERFACE, *PXENBUS_UNPLUG_INTERFACE; - -/*! \def XENBUS_UNPLUG - \brief Macro at assist in method invocation -*/ -#define XENBUS_UNPLUG(_Method, _Interface, ...) \ - (_Interface)->Unplug ## _Method((PINTERFACE)(_Interface), __VA_ARGS__) - -#endif // _WINDLL - -#define XENBUS_UNPLUG_INTERFACE_VERSION_MIN 1 -#define XENBUS_UNPLUG_INTERFACE_VERSION_MAX 1 - -#endif // _XENBUS_UNPLUG_INTERFACE_H diff --git a/src/xenvkbd/fdo.c b/src/xenvkbd/fdo.c index 5c00ee1..7a87ead 100644 --- a/src/xenvkbd/fdo.c +++ b/src/xenvkbd/fdo.c @@ -42,7 +42,6 @@ #include <store_interface.h> #include <gnttab_interface.h> #include <suspend_interface.h> -#include <unplug_interface.h> #include <version.h> #include "driver.h" @@ -103,7 +102,6 @@ struct _XENVKBD_FDO { XENBUS_RANGE_SET_INTERFACE RangeSetInterface; XENBUS_CACHE_INTERFACE CacheInterface; XENBUS_GNTTAB_INTERFACE GnttabInterface; - XENBUS_UNPLUG_INTERFACE UnplugInterface; PXENBUS_SUSPEND_CALLBACK SuspendCallbackLate; }; @@ -2995,7 +2993,6 @@ DEFINE_FDO_GET_INTERFACE(Store, PXENBUS_STORE_INTERFACE) DEFINE_FDO_GET_INTERFACE(RangeSet, PXENBUS_RANGE_SET_INTERFACE) DEFINE_FDO_GET_INTERFACE(Cache, PXENBUS_CACHE_INTERFACE) DEFINE_FDO_GET_INTERFACE(Gnttab, PXENBUS_GNTTAB_INTERFACE) -DEFINE_FDO_GET_INTERFACE(Unplug, PXENBUS_UNPLUG_INTERFACE) NTSTATUS FdoCreate( @@ -3125,15 +3122,6 @@ FdoCreate( if (!NT_SUCCESS(status)) goto fail13; - status = FDO_QUERY_INTERFACE(Fdo, - XENBUS, - UNPLUG, - (PINTERFACE)&Fdo->UnplugInterface, - sizeof (Fdo->UnplugInterface), - FALSE); - if (!NT_SUCCESS(status)) - goto fail14; - Dx->Fdo = Fdo; InitializeMutex(&Fdo->Mutex); @@ -3147,12 +3135,6 @@ FdoCreate( FunctionDeviceObject->Flags &= ~DO_DEVICE_INITIALIZING; return STATUS_SUCCESS; -fail14: - Error("fail14\n"); - - RtlZeroMemory(&Fdo->UnplugInterface, - sizeof (XENBUS_UNPLUG_INTERFACE)); - fail13: Error("fail13\n"); @@ -3259,9 +3241,6 @@ FdoDestroy( Dx->Fdo = NULL; - RtlZeroMemory(&Fdo->UnplugInterface, - sizeof (XENBUS_UNPLUG_INTERFACE)); - RtlZeroMemory(&Fdo->GnttabInterface, sizeof (XENBUS_GNTTAB_INTERFACE)); diff --git a/src/xenvkbd/fdo.h b/src/xenvkbd/fdo.h index d9ec308..b294080 100644 --- a/src/xenvkbd/fdo.h +++ b/src/xenvkbd/fdo.h @@ -41,7 +41,6 @@ #include <range_set_interface.h> #include <cache_interface.h> #include <gnttab_interface.h> -#include <unplug_interface.h> #include "driver.h" #include "types.h" @@ -143,7 +142,6 @@ DECLARE_FDO_GET_INTERFACE(Store, PXENBUS_STORE_INTERFACE) DECLARE_FDO_GET_INTERFACE(RangeSet, PXENBUS_RANGE_SET_INTERFACE) DECLARE_FDO_GET_INTERFACE(Cache, PXENBUS_CACHE_INTERFACE) DECLARE_FDO_GET_INTERFACE(Gnttab, PXENBUS_GNTTAB_INTERFACE) -DECLARE_FDO_GET_INTERFACE(Unplug, PXENBUS_UNPLUG_INTERFACE) extern NTSTATUS FdoCreate( diff --git a/src/xenvkbd/pdo.c b/src/xenvkbd/pdo.c index 5b52aad..f10aca0 100644 --- a/src/xenvkbd/pdo.c +++ b/src/xenvkbd/pdo.c @@ -40,7 +40,6 @@ #include <xen.h> #include <suspend_interface.h> -#include <unplug_interface.h> #include <debug_interface.h> #include "names.h" @@ -80,9 +79,6 @@ struct _XENVKBD_PDO { XENBUS_SUSPEND_INTERFACE SuspendInterface; PXENBUS_SUSPEND_CALLBACK SuspendCallbackLate; - XENBUS_UNPLUG_INTERFACE UnplugInterface; - BOOLEAN UnplugRequested; - PXENVKBD_FRONTEND Frontend; PXENVKBD_HID_CONTEXT HidContext; @@ -2013,7 +2009,6 @@ PdoCreate( goto fail7; FdoGetSuspendInterface(Fdo, &Pdo->SuspendInterface); - FdoGetUnplugInterface(Fdo, &Pdo->UnplugInterface); Dx->Pdo = Pdo; @@ -2046,9 +2041,6 @@ fail8: Dx->Pdo = NULL; - RtlZeroMemory(&Pdo->UnplugInterface, - sizeof (XENBUS_UNPLUG_INTERFACE)); - RtlZeroMemory(&Pdo->SuspendInterface, sizeof (XENBUS_SUSPEND_INTERFACE)); @@ -2109,8 +2101,6 @@ PdoDestroy( PDEVICE_OBJECT PhysicalDeviceObject = Dx->DeviceObject; PXENVKBD_FDO Fdo = __PdoGetFdo(Pdo); - Pdo->UnplugRequested = FALSE; - ASSERT3U(__PdoGetDevicePnpState(Pdo), ==, Deleted); ASSERT(__PdoIsMissing(Pdo)); @@ -2129,9 +2119,6 @@ PdoDestroy( Dx->Pdo = NULL; - RtlZeroMemory(&Pdo->UnplugInterface, - sizeof (XENBUS_UNPLUG_INTERFACE)); - RtlZeroMemory(&Pdo->SuspendInterface, sizeof (XENBUS_SUSPEND_INTERFACE)); -- 2.41.0.windows.3
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |