win-pvdrivers

changeset 1095:42381a8db72c

Fix compile under Win8 DDK
author James Harper <james.harper@bendigoit.com.au>
date Mon Jan 13 20:26:53 2014 +1100 (2014-01-13)
parents 64ddfb914cd9
children 05efa89a4ef7
files xenvbd_storport/xenvbd.c
line diff
     1.1 --- a/xenvbd_storport/xenvbd.c	Mon Jan 13 20:25:51 2014 +1100
     1.2 +++ b/xenvbd_storport/xenvbd.c	Mon Jan 13 20:26:53 2014 +1100
     1.3 @@ -185,6 +185,12 @@ static ULONG
     1.4  XenVbd_HwStorFindAdapter(PVOID DeviceExtension, PVOID HwContext, PVOID BusInformation, PCHAR ArgumentString, PPORT_CONFIGURATION_INFORMATION ConfigInfo, PBOOLEAN Again)
     1.5  {
     1.6    PXENVBD_DEVICE_DATA xvdd = (PXENVBD_DEVICE_DATA)DeviceExtension;
     1.7 +#if defined(NTDDI_WIN8) && (NTDDI_VERSION >= NTDDI_WIN8)
     1.8 +  PVOID dump_data = ConfigInfo->MiniportDumpData;
     1.9 +#else 
    1.10 +  PVOID dump_data = ConfigInfo->Reserved;
    1.11 +#endif 
    1.12 +  
    1.13  
    1.14    UNREFERENCED_PARAMETER(HwContext);
    1.15    UNREFERENCED_PARAMETER(BusInformation);
    1.16 @@ -195,14 +201,14 @@ XenVbd_HwStorFindAdapter(PVOID DeviceExt
    1.17    FUNCTION_MSG("xvdd = %p\n", xvdd);
    1.18    FUNCTION_MSG("ArgumentString = %s\n", ArgumentString);
    1.19  
    1.20 -  memcpy(xvdd, ConfigInfo->Reserved, FIELD_OFFSET(XENVBD_DEVICE_DATA, aligned_buffer_data));
    1.21 +  memcpy(xvdd, dump_data, FIELD_OFFSET(XENVBD_DEVICE_DATA, aligned_buffer_data));
    1.22    if (xvdd->device_state != DEVICE_STATE_ACTIVE) {
    1.23      return SP_RETURN_ERROR;
    1.24    }
    1.25    /* restore hypercall_stubs into dump_xenpci */
    1.26    XnSetHypercallStubs(xvdd->hypercall_stubs);
    1.27    /* make sure original xvdd is set to DISCONNECTED or resume will not work */
    1.28 -  ((PXENVBD_DEVICE_DATA)ConfigInfo->Reserved)->device_state = DEVICE_STATE_DISCONNECTED;
    1.29 +  ((PXENVBD_DEVICE_DATA)dump_data)->device_state = DEVICE_STATE_DISCONNECTED;
    1.30    InitializeListHead(&xvdd->srb_list);
    1.31    xvdd->aligned_buffer_in_use = FALSE;
    1.32    /* align the buffer to PAGE_SIZE */
    1.33 @@ -227,7 +233,6 @@ XenVbd_HwStorFindAdapter(PVOID DeviceExt
    1.34    ConfigInfo->InitiatorBusId[0] = 1;
    1.35    ConfigInfo->MaximumNumberOfLogicalUnits = 1;
    1.36    ConfigInfo->MaximumNumberOfTargets = 2;
    1.37 -  ConfigInfo->VirtualDevice = FALSE;
    1.38    if (ConfigInfo->Dma64BitAddresses == SCSI_DMA64_SYSTEM_SUPPORTED) {
    1.39      ConfigInfo->Dma64BitAddresses = SCSI_DMA64_MINIPORT_SUPPORTED;
    1.40      FUNCTION_MSG("Dma64BitAddresses supported\n");