]> xenbits.xensource.com Git - pvdrivers/win/xenbus.git/commitdiff
Windows Server 2008 compatibility fix
authorPaul Durrant <paul.durrant@citrix.com>
Mon, 30 Mar 2015 12:46:06 +0000 (13:46 +0100)
committerPaul Durrant <paul.durrant@citrix.com>
Mon, 30 Mar 2015 12:46:06 +0000 (13:46 +0100)
Use of the CONNECT_FULLY_SPECIFIED_GROUP flag to IoConnectInterruptEx() is
not supported prior to Windows 7, so when Group == 0 (which will always be
true for any OS prior to Windows 7) just use CONNECT_FULLY_SPECIFIED
in which case it is documented that Windows will assume Group == 0.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
src/xenbus/fdo.c

index 8d8b125121dd349ae3b2127b2e4545c333b16b02..3c3e9a091268737f0e52b8bb4e25bc66675673dc 100644 (file)
@@ -1857,7 +1857,6 @@ FdoConnectInterrupt(
         (*Interrupt)->Line = Raw->u.Interrupt.Vector;
 
     RtlZeroMemory(&Connect, sizeof (IO_CONNECT_INTERRUPT_PARAMETERS));
-    Connect.Version = CONNECT_FULLY_SPECIFIED_GROUP;
     Connect.FullySpecified.PhysicalDeviceObject = __FdoGetPhysicalDeviceObject(Fdo);
     Connect.FullySpecified.ShareVector = (BOOLEAN)(Translated->ShareDisposition == CmResourceShareShared);
     Connect.FullySpecified.InterruptMode = (*Interrupt)->InterruptMode;
@@ -1879,6 +1878,10 @@ FdoConnectInterrupt(
         Connect.FullySpecified.ProcessorEnableMask = Translated->u.Interrupt.Affinity;
     }
 
+    Connect.Version = (Connect.FullySpecified.Group != 0) ?
+                      CONNECT_FULLY_SPECIFIED_GROUP :
+                      CONNECT_FULLY_SPECIFIED;
+
     status = IoConnectInterruptEx(&Connect);
     if (!NT_SUCCESS(status))
         goto fail2;