[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [win-pv-devel] [PATCH xenvkbd] Fix the revision table
XENVKBD delegates interface queries for XENBUS_STORE and XENBUS_SUSPEND and hence it should encode revisions for these and create PDOs with appropriate CompatibleIDs. Signed-off-by: Paul Durrant <pdurrant@xxxxxxxxxx> --- include/revision.h | 10 +++++++--- src/coinst/coinst.c | 2 +- src/xenvkbd/pdo.c | 29 ++++++++++++++++++++++++----- 3 files changed, 32 insertions(+), 9 deletions(-) diff --git a/include/revision.h b/include/revision.h index 7e77a2a..8aed6df 100644 --- a/include/revision.h +++ b/include/revision.h @@ -34,9 +34,13 @@ // Key: // H - XENHID_HID_INTERFACE +// ST - XENBUS_STORE_INTERFACE +// SU - XENBUS_SUSPEND_INTERFACE -// REVISION H -#define DEFINE_REVISION_TABLE \ - DEFINE_REVISION(0x09000000, 1) +// REVISION H ST SU +#define DEFINE_REVISION_TABLE \ + DEFINE_REVISION(0x09000000, 1, 0, 0), \ + DEFINE_REVISION(0x09000001, 1, 1, 1), \ + DEFINE_REVISION(0x09000002, 1, 2, 1) #endif // _REVISION_H diff --git a/src/coinst/coinst.c b/src/coinst/coinst.c index 780ffd1..da2c59e 100644 --- a/src/coinst/coinst.c +++ b/src/coinst/coinst.c @@ -724,7 +724,7 @@ fail1: return FALSE; } -#define DEFINE_REVISION(_N, _H) \ +#define DEFINE_REVISION(_N, _H, _ST, _SU) \ (_N) static DWORD DeviceRevision[] = { diff --git a/src/xenvkbd/pdo.c b/src/xenvkbd/pdo.c index 00fee0c..f0a3836 100644 --- a/src/xenvkbd/pdo.c +++ b/src/xenvkbd/pdo.c @@ -343,10 +343,12 @@ PdoIsEjectRequested( typedef struct _XENVKBD_PDO_REVISION { ULONG Number; ULONG HidInterfaceVersion; + ULONG StoreInterfaceVersion; + ULONG SuspendInterfaceVersion; } XENVKBD_PDO_REVISION, *PXENVKBD_PDO_REVISION; -#define DEFINE_REVISION(_N, _H) \ - { (_N), (_H) } +#define DEFINE_REVISION(_N, _H, _ST, _SU) \ + { (_N), (_H), (_ST), (_SU) } static XENVKBD_PDO_REVISION PdoRevision[] = { DEFINE_REVISION_TABLE @@ -371,10 +373,28 @@ PdoDumpRevisions( ASSERT(IMPLY(Index == ARRAYSIZE(PdoRevision) - 1, Revision->HidInterfaceVersion == XENHID_HID_INTERFACE_VERSION_MAX)); + if (Revision->StoreInterfaceVersion != 0) { + ASSERT3U(Revision->StoreInterfaceVersion, >=, XENBUS_STORE_INTERFACE_VERSION_MIN); + ASSERT3U(Revision->StoreInterfaceVersion, <=, XENBUS_STORE_INTERFACE_VERSION_MAX); + ASSERT(IMPLY(Index == ARRAYSIZE(PdoRevision) - 1, + Revision->StoreInterfaceVersion == XENBUS_STORE_INTERFACE_VERSION_MAX)); + } + + if (Revision->SuspendInterfaceVersion != 0) { + ASSERT3U(Revision->SuspendInterfaceVersion, >=, XENBUS_SUSPEND_INTERFACE_VERSION_MIN); + ASSERT3U(Revision->SuspendInterfaceVersion, <=, XENBUS_SUSPEND_INTERFACE_VERSION_MAX); + ASSERT(IMPLY(Index == ARRAYSIZE(PdoRevision) - 1, + Revision->SuspendInterfaceVersion == XENBUS_SUSPEND_INTERFACE_VERSION_MAX)); + } + Info("%08X -> " - "HID v%u\n", + "HID v%u " + "STORE v%u " + "SUSPEND v%u\n", Revision->Number, - Revision->HidInterfaceVersion); + Revision->HidInterfaceVersion, + Revision->StoreInterfaceVersion, + Revision->SuspendInterfaceVersion); } } @@ -1003,7 +1023,6 @@ struct _INTERFACE_ENTRY { struct _INTERFACE_ENTRY PdoInterfaceTable[] = { { &GUID_BUS_INTERFACE_STANDARD, "BUS_INTERFACE", PdoQueryBusInterface }, { &GUID_XENHID_HID_INTERFACE, "HID_INTERFACE", PdoQueryHidInterface }, - { &GUID_XENBUS_CACHE_INTERFACE, "CACHE_INTERFACE", PdoDelegateIrp }, { &GUID_XENBUS_STORE_INTERFACE, "STORE_INTERFACE", PdoDelegateIrp }, { &GUID_XENBUS_SUSPEND_INTERFACE, "SUSPEND_INTERFACE", PdoDelegateIrp }, { NULL, NULL, NULL } -- 2.17.1 _______________________________________________ win-pv-devel mailing list win-pv-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/win-pv-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |