win-pvdrivers

diff xenpci/xenpci_pdo.c @ 692:1fe30f6966eb

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 c13ccf5a629b
children 93b98effc8e7
line diff
     1.1 --- a/xenpci/xenpci_pdo.c	Sun Nov 08 21:53:31 2009 +1100
     1.2 +++ b/xenpci/xenpci_pdo.c	Sun Nov 08 22:24:33 2009 +1100
     1.3 @@ -124,8 +124,11 @@ XenPci_UpdateBackendState(PVOID context)
     1.4  
     1.5    case XenbusStateClosing:
     1.6      KdPrint((__DRIVER_NAME "     Backend State Changed to Closing\n"));
     1.7 -    KdPrint((__DRIVER_NAME "     Requesting eject\n"));
     1.8 -    WdfPdoRequestEject(device);
     1.9 +    if (xppdd->frontend_state != XenbusStateClosing)
    1.10 +    {
    1.11 +      KdPrint((__DRIVER_NAME "     Requesting eject\n"));
    1.12 +      WdfPdoRequestEject(device);
    1.13 +    }
    1.14      break;
    1.15  
    1.16    case XenbusStateClosed:
    1.17 @@ -1152,7 +1155,7 @@ XenPciPdo_EvtDeviceD0Exit(WDFDEVICE devi
    1.18      KdPrint((__DRIVER_NAME "     Unknown WdfPowerDevice state %d\n", target_state));
    1.19      break;  
    1.20    }
    1.21 -
    1.22 +  
    1.23    if (target_state == WdfPowerDevicePrepareForHibernation
    1.24        || (target_state == WdfPowerDeviceD3 && xppdd->hiber_usage_kludge))
    1.25    {