win-pvdrivers

changeset 933:f64a6d173e8d

Fix regression - fake mmio resource must be uncached for some versions of Windows.
author James Harper <james.harper@bendigoit.com.au>
date Sun Jun 12 15:23:31 2011 +1000 (2011-06-12)
parents f03bcaa67233
children 6d2ca0f1a48a
files xennet/xennet5.c xenpci/xenpci_pdo.c xenvbd/xenvbd_scsiport.c
line diff
     1.1 --- a/xennet/xennet5.c	Sun Jun 12 14:05:50 2011 +1000
     1.2 +++ b/xennet/xennet5.c	Sun Jun 12 15:23:31 2011 +1000
     1.3 @@ -560,7 +560,7 @@ XenNet_Init(
     1.4      |NDIS_ATTRIBUTE_DESERIALIZE
     1.5      |NDIS_ATTRIBUTE_SURPRISE_REMOVE_OK
     1.6      |NDIS_ATTRIBUTE_BUS_MASTER,
     1.7 -    NdisInterfaceInternal);
     1.8 +    NdisInterfaceInternal); /* PnpBus option doesn't exist... */
     1.9    xi->multicast_list_size = 0;
    1.10    xi->current_lookahead = MIN_LOOKAHEAD_LENGTH;
    1.11  
     2.1 --- a/xenpci/xenpci_pdo.c	Sun Jun 12 14:05:50 2011 +1000
     2.2 +++ b/xenpci/xenpci_pdo.c	Sun Jun 12 15:23:31 2011 +1000
     2.3 @@ -902,7 +902,7 @@ XenPci_XenConfigDevice(WDFDEVICE device)
     2.4    PXENPCI_PDO_DEVICE_DATA xppdd = GetXppdd(device);
     2.5  
     2.6    src = ExAllocatePoolWithTag(NonPagedPool, xppdd->config_page_length, XENPCI_POOL_TAG);
     2.7 -  dst = MmMapIoSpace(xppdd->config_page_phys, xppdd->config_page_length, MmCached);
     2.8 +  dst = MmMapIoSpace(xppdd->config_page_phys, xppdd->config_page_length, MmNonCached);
     2.9    memcpy(src, dst, xppdd->config_page_length);
    2.10    
    2.11    status = XenPci_XenConfigDeviceSpecifyBuffers(device, src, dst);
    2.12 @@ -1128,7 +1128,7 @@ XenPciPdo_EvtDeviceD0Entry(WDFDEVICE dev
    2.13      xppdd->requested_resources_ptr = xppdd->requested_resources_start = ExAllocatePoolWithTag(NonPagedPool, PAGE_SIZE, XENPCI_POOL_TAG);
    2.14      xppdd->assigned_resources_ptr = xppdd->assigned_resources_start;
    2.15  
    2.16 -    dst = MmMapIoSpace(xppdd->config_page_phys, xppdd->config_page_length, MmCached);
    2.17 +    dst = MmMapIoSpace(xppdd->config_page_phys, xppdd->config_page_length, MmNonCached);
    2.18  
    2.19      status = XenPci_XenConfigDeviceSpecifyBuffers(device, src, dst);
    2.20  
    2.21 @@ -1392,7 +1392,7 @@ XenPci_EvtChildListCreateDevice(WDFCHILD
    2.22    xppdd->wdf_device = child_device;
    2.23    xppdd->wdf_device_bus_fdo = WdfChildListGetDevice(child_list);
    2.24  
    2.25 -  xppdd->config_page_mdl = AllocatePage();
    2.26 +  xppdd->config_page_mdl = AllocateUncachedPage();
    2.27  
    2.28    xppdd->device_state.magic = XEN_DEVICE_STATE_MAGIC;
    2.29    xppdd->device_state.length = sizeof(XENPCI_DEVICE_STATE);
    2.30 @@ -1560,7 +1560,7 @@ XenPci_Pdo_Resume(WDFDEVICE device)
    2.31        xppdd->requested_resources_ptr = xppdd->requested_resources_start = ExAllocatePoolWithTag(NonPagedPool, PAGE_SIZE, XENPCI_POOL_TAG);;
    2.32        xppdd->assigned_resources_ptr = xppdd->assigned_resources_start;
    2.33  
    2.34 -      dst = MmMapIoSpace(xppdd->config_page_phys, xppdd->config_page_length, MmCached);
    2.35 +      dst = MmMapIoSpace(xppdd->config_page_phys, xppdd->config_page_length, MmNonCached);
    2.36  
    2.37        status = XenPci_XenConfigDeviceSpecifyBuffers(device, src, dst);
    2.38  
     3.1 --- a/xenvbd/xenvbd_scsiport.c	Sun Jun 12 14:05:50 2011 +1000
     3.2 +++ b/xenvbd/xenvbd_scsiport.c	Sun Jun 12 15:23:31 2011 +1000
     3.3 @@ -576,7 +576,7 @@ XenVbd_HwScsiFindAdapter(PVOID DeviceExt
     3.4      !access_range->RangeInMemory);
     3.5    if (!xvdd->device_base)
     3.6    {
     3.7 -    KdPrint((__DRIVER_NAME "     Invalid config\n"));
     3.8 +    FUNCTION_MSG("ScsiPortGetDeviceBase failed\n"));
     3.9      FUNCTION_EXIT(); 
    3.10      return SP_RETURN_BAD_CONFIG;
    3.11    }