win-pvdrivers

changeset 692:1fe30f6966eb 0.10.0.134

Fix bug where changing network adapter properties would not reload the adapter correctly
author James Harper <james.harper@bendigoit.com.au>
date Sun Nov 08 22:24:33 2009 +1100 (2009-11-08)
parents 7232a030f662
children d7c20d6438b9
files xenpci/xenpci.h xenpci/xenpci_pdo.c
line diff
     1.1 --- a/xenpci/xenpci.h	Sun Nov 08 21:53:31 2009 +1100
     1.2 +++ b/xenpci/xenpci.h	Sun Nov 08 22:24:33 2009 +1100
     1.3 @@ -234,8 +234,7 @@ typedef struct {
     1.4    XENPCI_DEVICE_STATE device_state;
     1.5    BOOLEAN restart_on_resume;
     1.6    
     1.7 -  BOOLEAN hiber_usage_kludge;
     1.8 -  
     1.9 +  BOOLEAN hiber_usage_kludge;  
    1.10  } XENPCI_PDO_DEVICE_DATA, *PXENPCI_PDO_DEVICE_DATA;
    1.11  
    1.12  WDF_DECLARE_CONTEXT_TYPE_WITH_NAME(XENPCI_PDO_DEVICE_DATA, GetXppdd)
     2.1 --- a/xenpci/xenpci_pdo.c	Sun Nov 08 21:53:31 2009 +1100
     2.2 +++ b/xenpci/xenpci_pdo.c	Sun Nov 08 22:24:33 2009 +1100
     2.3 @@ -124,8 +124,11 @@ XenPci_UpdateBackendState(PVOID context)
     2.4  
     2.5    case XenbusStateClosing:
     2.6      KdPrint((__DRIVER_NAME "     Backend State Changed to Closing\n"));
     2.7 -    KdPrint((__DRIVER_NAME "     Requesting eject\n"));
     2.8 -    WdfPdoRequestEject(device);
     2.9 +    if (xppdd->frontend_state != XenbusStateClosing)
    2.10 +    {
    2.11 +      KdPrint((__DRIVER_NAME "     Requesting eject\n"));
    2.12 +      WdfPdoRequestEject(device);
    2.13 +    }
    2.14      break;
    2.15  
    2.16    case XenbusStateClosed:
    2.17 @@ -1152,7 +1155,7 @@ XenPciPdo_EvtDeviceD0Exit(WDFDEVICE devi
    2.18      KdPrint((__DRIVER_NAME "     Unknown WdfPowerDevice state %d\n", target_state));
    2.19      break;  
    2.20    }
    2.21 -
    2.22 +  
    2.23    if (target_state == WdfPowerDevicePrepareForHibernation
    2.24        || (target_state == WdfPowerDeviceD3 && xppdd->hiber_usage_kludge))
    2.25    {