win-pvdrivers

changeset 761:acc551273d8b

cleanup
author James Harper <james.harper@bendigoit.com.au>
date Sat Jan 16 22:20:25 2010 +1100 (2010-01-16)
parents 11a00d18ed6a
children b7bd812a615d
files xenpci/xenpci_pdo.c
line diff
     1.1 --- a/xenpci/xenpci_pdo.c	Wed Jan 13 20:43:36 2010 +1100
     1.2 +++ b/xenpci/xenpci_pdo.c	Sat Jan 16 22:20:25 2010 +1100
     1.3 @@ -644,68 +644,6 @@ XenPci_XenConfigDeviceSpecifyBuffers(WDF
     1.4    
     1.5    ADD_XEN_INIT_RSP(&out_ptr, XEN_INIT_TYPE_VECTORS, NULL, &vectors, NULL);
     1.6    ADD_XEN_INIT_RSP(&out_ptr, XEN_INIT_TYPE_STATE_PTR, NULL, &xppdd->device_state, NULL);
     1.7 -
     1.8 -#if 0
     1.9 -  while((type = GET_XEN_INIT_REQ(&in_ptr, (PVOID)&setting, (PVOID)&value, (PVOID)&value2)) != XEN_INIT_TYPE_END)
    1.10 -  {
    1.11 -    BOOLEAN condition;
    1.12 -    PCHAR xb_value;
    1.13 -    switch (type)
    1.14 -    {
    1.15 -    case XEN_INIT_TYPE_MATCH_FRONT:
    1.16 -    case XEN_INIT_TYPE_MATCH_BACK:
    1.17 -      if (type == XEN_INIT_TYPE_MATCH_FRONT)
    1.18 -      {
    1.19 -        RtlStringCbPrintfA(path, ARRAY_SIZE(path), "%s/%s", xppdd->path, setting);
    1.20 -      }
    1.21 -      else
    1.22 -      {
    1.23 -        RtlStringCbPrintfA(path, ARRAY_SIZE(path), "%s/%s", xppdd->backend_path, setting);
    1.24 -      }
    1.25 -      KdPrint((__DRIVER_NAME "     testing path = %s\n", path));
    1.26 -      res = XenBus_Read(xpdd, XBT_NIL, path, &xb_value);
    1.27 -      if (res)
    1.28 -      {
    1.29 -        KdPrint((__DRIVER_NAME "     read failed (%s)\n", res));
    1.30 -        XenPci_FreeMem(res);
    1.31 -      }
    1.32 -      else
    1.33 -      {
    1.34 -        KdPrint((__DRIVER_NAME "     testing %s vs %s\n", xb_value, value));
    1.35 -        if (PtrToUlong(value2) & XEN_INIT_MATCH_TYPE_IF_MATCH)
    1.36 -          condition = (strcmp(xb_value, value) == 0)?TRUE:FALSE;
    1.37 -        else
    1.38 -          condition = (strcmp(xb_value, value) != 0)?TRUE:FALSE;
    1.39 -        KdPrint((__DRIVER_NAME "     condition = %d\n", condition));
    1.40 -  
    1.41 -        if ((PtrToUlong(value2) & XEN_INIT_MATCH_TYPE_ONLY_IF_QEMU_HIDE) && qemu_protocol_version && condition)
    1.42 -          condition = FALSE;
    1.43 -          
    1.44 -        if (condition)
    1.45 -        {
    1.46 -          if (PtrToUlong(value2) & XEN_INIT_MATCH_TYPE_SET_INACTIVE)
    1.47 -          {
    1.48 -            active = FALSE;
    1.49 -            KdPrint((__DRIVER_NAME "     set inactive\n"));
    1.50 -          }
    1.51 -          if (PtrToUlong(value2) & XEN_INIT_MATCH_TYPE_DONT_CONFIG)
    1.52 -          {
    1.53 -            dont_config = TRUE;
    1.54 -            KdPrint((__DRIVER_NAME "     set inactive with dont config\n"));
    1.55 -          }
    1.56 -        }
    1.57 -        XenPci_FreeMem(xb_value);
    1.58 -      }
    1.59 -      break;
    1.60 -    }
    1.61 -  }
    1.62 -  if (dont_config)
    1.63 -  {
    1.64 -    ADD_XEN_INIT_RSP(&out_ptr, XEN_INIT_TYPE_END, NULL, NULL, NULL);
    1.65 -    FUNCTION_EXIT();
    1.66 -    return status;
    1.67 -  }
    1.68 -#endif
    1.69    
    1.70    // first pass, possibly before state == Connected
    1.71    in_ptr = src;
    1.72 @@ -1257,7 +1195,7 @@ XenPciPdo_EvtDeviceUsageNotification(WDF
    1.73      break;
    1.74    }
    1.75  
    1.76 -  FUNCTION_EXIT();  
    1.77 +  FUNCTION_EXIT();
    1.78  }
    1.79  
    1.80  NTSTATUS