win-pvdrivers

changeset 260:952b8aa9c44c wdm

more enum updates.
cut down xenvbd to test.
xenvbd won't attach due to some error about missing information.
author James Harper <james.harper@bendigoit.com.au>
date Mon May 05 00:09:47 2008 +1000 (2008-05-05)
parents 161a8a26f3db
children aef4bd71120b
files dirs xenpci/xenpci.h xenpci/xenpci_fdo.c xenpci/xenpci_pdo.c xenvbd/makefile.inc xenvbd/sources xenvbd/xenvbd.c xenvbd/xenvbd.h xenvbd/xenvbd.inx
line diff
     1.1 --- a/dirs	Sun May 04 16:40:30 2008 +1000
     1.2 +++ b/dirs	Mon May 05 00:09:47 2008 +1000
     1.3 @@ -1,1 +1,1 @@
     1.4 -DIRS=xenpci xenhide xenvbd xenaddresource xenenum xennet xenstub xenscsi
     1.5 \ No newline at end of file
     1.6 +DIRS=xenpci xenhide xenvbd
     1.7 \ No newline at end of file
     2.1 --- a/xenpci/xenpci.h	Sun May 04 16:40:30 2008 +1000
     2.2 +++ b/xenpci/xenpci.h	Mon May 05 00:09:47 2008 +1000
     2.3 @@ -164,6 +164,7 @@ typedef struct {
     2.4    XENPCI_COMMON common;
     2.5    char path[128];
     2.6    ULONG index;
     2.7 +  PHYSICAL_ADDRESS mmio_phys;
     2.8  } XENPCI_PDO_DEVICE_DATA, *PXENPCI_PDO_DEVICE_DATA;
     2.9  
    2.10  typedef struct
     3.1 --- a/xenpci/xenpci_fdo.c	Sun May 04 16:40:30 2008 +1000
     3.2 +++ b/xenpci/xenpci_fdo.c	Mon May 05 00:09:47 2008 +1000
     3.3 @@ -542,7 +542,7 @@ XenPci_Pnp_QueryBusRelationsCallback(PDE
     3.4          KdPrint((__DRIVER_NAME "     New device %s\n", Types[i]));
     3.5          child = ExAllocatePoolWithTag(NonPagedPool, sizeof(XEN_CHILD), XENPCI_POOL_TAG);
     3.6          child->state = CHILD_STATE_ADDED;
     3.7 -        status = IoCreateDevice(xpdd->common.fdo->DriverObject, sizeof(XENPCI_COMMON), NULL, FILE_DEVICE_UNKNOWN, FILE_DEVICE_SECURE_OPEN, FALSE, &pdo);
     3.8 +        status = IoCreateDevice(xpdd->common.fdo->DriverObject, sizeof(XENPCI_PDO_DEVICE_DATA), NULL, FILE_DEVICE_UNKNOWN, FILE_DEVICE_SECURE_OPEN, FALSE, &pdo);
     3.9          if (!NT_SUCCESS(status))
    3.10            KdPrint((__DRIVER_NAME "     IoCreateDevice status = %08X\n", status));
    3.11          child->context = (PXENPCI_PDO_DEVICE_DATA)pdo->DeviceExtension;
    3.12 @@ -551,6 +551,7 @@ XenPci_Pnp_QueryBusRelationsCallback(PDE
    3.13          child->context->common.lower_do = NULL;
    3.14          strcpy(child->context->path, Types[i]);
    3.15          child->context->index = 0;
    3.16 +        child->context->mmio_phys = XenPci_AllocMMIO(xpdd, PAGE_SIZE);
    3.17          InsertTailList(&xpdd->child_list, (PLIST_ENTRY)child);
    3.18          devices++;
    3.19        }
    3.20 @@ -603,6 +604,57 @@ XenPci_Pnp_QueryBusRelations(PDEVICE_OBJ
    3.21    return STATUS_PENDING;
    3.22  }
    3.23  
    3.24 +static VOID
    3.25 +XenPci_Pnp_FilterResourceRequirementsCallback(PDEVICE_OBJECT device_object, PVOID context)
    3.26 +{
    3.27 +  NTSTATUS status = STATUS_SUCCESS;
    3.28 +  //PXENPCI_DEVICE_DATA xpdd = (PXENPCI_DEVICE_DATA)device_object->DeviceExtension;
    3.29 +  PIRP irp = context;
    3.30 +  PIO_RESOURCE_REQUIREMENTS_LIST irrl;
    3.31 +  ULONG irl;
    3.32 +  ULONG ird;
    3.33 +    
    3.34 +  KdPrint((__DRIVER_NAME " --> " __FUNCTION__ "\n"));
    3.35 +  
    3.36 +  irrl = (PIO_RESOURCE_REQUIREMENTS_LIST)irp->IoStatus.Information;
    3.37 +  for (irl = 0; irl < irrl->AlternativeLists; irl++)
    3.38 +  {
    3.39 +    for (ird = 0; ird < irrl->List[irl].Count; ird++)
    3.40 +    {
    3.41 +      if (irrl->List[irl].Descriptors[ird].Type == CmResourceTypeMemory)
    3.42 +      {
    3.43 +        irrl->List[irl].Descriptors[ird].ShareDisposition = CmResourceShareShared;
    3.44 +      }
    3.45 +    }
    3.46 +  }
    3.47 +  irp->IoStatus.Status = status;
    3.48 +  IoCompleteRequest (irp, IO_NO_INCREMENT);
    3.49 +  
    3.50 +  KdPrint((__DRIVER_NAME " <-- " __FUNCTION__"\n"));
    3.51 +
    3.52 +  return;
    3.53 +}
    3.54 + 
    3.55 +static NTSTATUS
    3.56 +XenPci_Pnp_FilterResourceRequirements(PDEVICE_OBJECT device_object, PIRP irp)
    3.57 +{
    3.58 +  NTSTATUS status;
    3.59 +
    3.60 +  UNREFERENCED_PARAMETER(device_object);
    3.61 +
    3.62 +  KdPrint((__DRIVER_NAME " --> " __FUNCTION__ "\n"));
    3.63 +
    3.64 +  IoMarkIrpPending(irp);
    3.65 +
    3.66 +  status = XenPci_SendAndWaitForIrp(device_object, irp);
    3.67 +
    3.68 +  XenPci_QueueWorkItem(device_object, XenPci_Pnp_FilterResourceRequirementsCallback, irp);
    3.69 +
    3.70 +  KdPrint((__DRIVER_NAME " <-- " __FUNCTION__"\n"));
    3.71 +
    3.72 +  return STATUS_PENDING;
    3.73 +}
    3.74 +
    3.75  NTSTATUS
    3.76  XenPci_Pnp_Fdo(PDEVICE_OBJECT device_object, PIRP irp)
    3.77  {
    3.78 @@ -680,6 +732,10 @@ XenPci_Pnp_Fdo(PDEVICE_OBJECT device_obj
    3.79        break;  
    3.80      }
    3.81      break;
    3.82 +    
    3.83 +  case IRP_MN_FILTER_RESOURCE_REQUIREMENTS:
    3.84 +    KdPrint((__DRIVER_NAME "     IRP_MN_FILTER_RESOURCE_REQUIREMENTS\n"));
    3.85 +    return XenPci_Pnp_FilterResourceRequirements(device_object, irp);
    3.86  
    3.87    default:
    3.88      KdPrint((__DRIVER_NAME "     Unhandled Minor = %d\n", stack->MinorFunction));
     4.1 --- a/xenpci/xenpci_pdo.c	Sun May 04 16:40:30 2008 +1000
     4.2 +++ b/xenpci/xenpci_pdo.c	Mon May 05 00:09:47 2008 +1000
     4.3 @@ -37,6 +37,52 @@ XenPci_Power_Pdo(PDEVICE_OBJECT device_o
     4.4    return irp->IoStatus.Status;
     4.5  }
     4.6  
     4.7 +static NTSTATUS
     4.8 +XenPci_QueryResourceRequirements(PDEVICE_OBJECT device_object, PIRP irp)
     4.9 +{
    4.10 +  PXENPCI_PDO_DEVICE_DATA xppdd = (PXENPCI_PDO_DEVICE_DATA)device_object->DeviceExtension;
    4.11 +  PIO_RESOURCE_REQUIREMENTS_LIST irrl;
    4.12 +  PIO_RESOURCE_DESCRIPTOR ird;
    4.13 +  ULONG length;
    4.14 +  
    4.15 +  length = FIELD_OFFSET(IO_RESOURCE_REQUIREMENTS_LIST, List) +
    4.16 +    FIELD_OFFSET(IO_RESOURCE_LIST, Descriptors) +
    4.17 +    sizeof(IO_RESOURCE_DESCRIPTOR) * 2;
    4.18 +  irrl = ExAllocatePoolWithTag(PagedPool,
    4.19 +    length,
    4.20 +    XENPCI_POOL_TAG);
    4.21 +  
    4.22 +  irrl->ListSize = length;
    4.23 +  irrl->InterfaceType = Internal;
    4.24 +  irrl->BusNumber = 0;
    4.25 +  irrl->SlotNumber = 0;
    4.26 +  irrl->AlternativeLists = 1;
    4.27 +  irrl->List[0].Version = 1;
    4.28 +  irrl->List[0].Revision = 1;
    4.29 +  irrl->List[0].Count = 2;
    4.30 +
    4.31 +  ird = &irrl->List[0].Descriptors[0];
    4.32 +  ird->Option = 0;
    4.33 +  ird->Type = CmResourceTypeInterrupt;
    4.34 +  ird->ShareDisposition = CmResourceShareDeviceExclusive;
    4.35 +  ird->Flags = CM_RESOURCE_INTERRUPT_LEVEL_SENSITIVE;
    4.36 +  ird->u.Interrupt.MinimumVector = 1;
    4.37 +  ird->u.Interrupt.MaximumVector = 63;
    4.38 +
    4.39 +  ird = &irrl->List[0].Descriptors[1];
    4.40 +  ird->Option = 0;
    4.41 +  ird->Type = CmResourceTypeMemory;
    4.42 +  ird->ShareDisposition = CmResourceShareDeviceExclusive;
    4.43 +  ird->Flags = CM_RESOURCE_MEMORY_READ_WRITE|CM_RESOURCE_MEMORY_PREFETCHABLE|CM_RESOURCE_MEMORY_CACHEABLE;
    4.44 +  ird->u.Memory.Length = PAGE_SIZE;
    4.45 +  ird->u.Memory.Alignment = PAGE_SIZE;
    4.46 +  ird->u.Memory.MinimumAddress.QuadPart = xppdd->mmio_phys.QuadPart;
    4.47 +  ird->u.Memory.MaximumAddress.QuadPart = xppdd->mmio_phys.QuadPart + PAGE_SIZE - 1;
    4.48 +  
    4.49 +  irp->IoStatus.Information = (ULONG_PTR)irrl;
    4.50 +  return STATUS_SUCCESS;
    4.51 +}
    4.52 +
    4.53  NTSTATUS
    4.54  XenPci_Pnp_Pdo(PDEVICE_OBJECT device_object, PIRP irp)
    4.55  {
    4.56 @@ -46,6 +92,9 @@ XenPci_Pnp_Pdo(PDEVICE_OBJECT device_obj
    4.57    LPWSTR buffer;
    4.58    WCHAR widebuf[256];
    4.59    unsigned int i;
    4.60 +  PPNP_BUS_INFORMATION pbi;
    4.61 +  PDEVICE_CAPABILITIES dc;
    4.62 +  PCM_RESOURCE_LIST crl;
    4.63  
    4.64    KdPrint((__DRIVER_NAME " --> " __FUNCTION__ "\n"));
    4.65  
    4.66 @@ -113,7 +162,7 @@ XenPci_Pnp_Pdo(PDEVICE_OBJECT device_obj
    4.67        for (i = 0; i < strlen(xppdd->path); i++)
    4.68          widebuf[i] = xppdd->path[i];
    4.69        widebuf[i] = 0;
    4.70 -      RtlStringCbPrintfW(buffer, 512, L"Xen\\%ws\0", widebuf);
    4.71 +      RtlStringCbPrintfW(buffer, 512, L"Xen\\%ws", widebuf);
    4.72        KdPrint((__DRIVER_NAME "     %ls\n", buffer));
    4.73        irp->IoStatus.Information = (ULONG_PTR)buffer;
    4.74        status = STATUS_SUCCESS;
    4.75 @@ -124,7 +173,11 @@ XenPci_Pnp_Pdo(PDEVICE_OBJECT device_obj
    4.76        for (i = 0; i < strlen(xppdd->path); i++)
    4.77          widebuf[i] = xppdd->path[i];
    4.78        widebuf[i] = 0;
    4.79 -      RtlStringCbPrintfW(buffer, 512, L"Xen\\%ws\0", widebuf);
    4.80 +      RtlStringCbPrintfW(buffer, 512, L"Xen\\%ws", widebuf);
    4.81 +      for (i = 0; buffer[i] != 0; i++);
    4.82 +      buffer[i + 1] = 0;      
    4.83 +//      for (i = 0; i < 256; i++)
    4.84 +//        KdPrint((__DRIVER_NAME "     %04X: %04X %wc\n", i, buffer[i], buffer[i]));
    4.85        KdPrint((__DRIVER_NAME "     %ls\n", buffer));
    4.86        irp->IoStatus.Information = (ULONG_PTR)buffer;
    4.87        status = STATUS_SUCCESS;
    4.88 @@ -135,7 +188,9 @@ XenPci_Pnp_Pdo(PDEVICE_OBJECT device_obj
    4.89        for (i = 0; i < strlen(xppdd->path); i++)
    4.90          widebuf[i] = xppdd->path[i];
    4.91        widebuf[i] = 0;
    4.92 -      RtlStringCbPrintfW(buffer, 512, L"Xen\\%ws\0", widebuf);
    4.93 +      RtlStringCbPrintfW(buffer, 512, L"Xen\\%ws", widebuf);
    4.94 +      for (i = 0; buffer[i] != 0; i++);
    4.95 +      buffer[i + 1] = 0;
    4.96        KdPrint((__DRIVER_NAME "     %ls\n", buffer));
    4.97        irp->IoStatus.Information = (ULONG_PTR)buffer;
    4.98        status = STATUS_SUCCESS;
    4.99 @@ -162,7 +217,7 @@ XenPci_Pnp_Pdo(PDEVICE_OBJECT device_obj
   4.100      {
   4.101      case DeviceTextDescription:
   4.102        KdPrint((__DRIVER_NAME "     DeviceTextDescription\n"));
   4.103 -      buffer = ExAllocatePoolWithTag(NonPagedPool, 512, XENPCI_POOL_TAG);
   4.104 +      buffer = ExAllocatePoolWithTag(PagedPool, 512, XENPCI_POOL_TAG);
   4.105        for (i = 0; i < strlen(xppdd->path); i++)
   4.106          widebuf[i] = xppdd->path[i];
   4.107        widebuf[i] = 0;
   4.108 @@ -173,7 +228,7 @@ XenPci_Pnp_Pdo(PDEVICE_OBJECT device_obj
   4.109        break;
   4.110      case DeviceTextLocationInformation:
   4.111        KdPrint((__DRIVER_NAME "     DeviceTextLocationInformation\n"));
   4.112 -      buffer = ExAllocatePoolWithTag(NonPagedPool, 512, XENPCI_POOL_TAG);
   4.113 +      buffer = ExAllocatePoolWithTag(PagedPool, 512, XENPCI_POOL_TAG);
   4.114        RtlStringCbPrintfW(buffer, 512, L"Xen Bus");
   4.115        KdPrint((__DRIVER_NAME "     %ls\n", buffer));
   4.116        irp->IoStatus.Information = (ULONG_PTR)buffer;
   4.117 @@ -186,11 +241,59 @@ XenPci_Pnp_Pdo(PDEVICE_OBJECT device_obj
   4.118        break;
   4.119      }
   4.120      break;
   4.121 +    
   4.122 +    case IRP_MN_QUERY_RESOURCE_REQUIREMENTS:
   4.123 +      KdPrint((__DRIVER_NAME "     IRP_MN_QUERY_RESOURCE_REQUIREMENTS\n"));
   4.124 +      status = XenPci_QueryResourceRequirements(device_object, irp);
   4.125 +      break;
   4.126  
   4.127 +    case IRP_MN_QUERY_CAPABILITIES:
   4.128 +      KdPrint((__DRIVER_NAME "     IRP_MN_QUERY_CAPABILITIES\n"));
   4.129 +      dc = stack->Parameters.DeviceCapabilities.Capabilities;
   4.130 +      dc->LockSupported = FALSE;
   4.131 +      dc->EjectSupported = FALSE;
   4.132 +      dc->Removable = FALSE;
   4.133 +      dc->DockDevice = FALSE;
   4.134 +      dc->UniqueID = FALSE;
   4.135 +      dc->SilentInstall = FALSE;
   4.136 +      dc->RawDeviceOK = FALSE;
   4.137 +      dc->SurpriseRemovalOK = FALSE;
   4.138 +      dc->HardwareDisabled = FALSE;
   4.139 +      dc->NoDisplayInUI = FALSE;
   4.140 +      //dc->DeviceWake = PowerDeviceUndefined;
   4.141 +      dc->D1Latency = 0;
   4.142 +      dc->D2Latency = 0;
   4.143 +      dc->D3Latency = 0;
   4.144 +      status = STATUS_SUCCESS;
   4.145 +      break;
   4.146 +
   4.147 +    case IRP_MN_QUERY_BUS_INFORMATION:
   4.148 +      KdPrint((__DRIVER_NAME "     IRP_MN_QUERY_BUS_INFORMATION\n"));
   4.149 +      pbi = (PPNP_BUS_INFORMATION)ExAllocatePoolWithTag(PagedPool, sizeof(PNP_BUS_INFORMATION), XENPCI_POOL_TAG);
   4.150 +      pbi->BusTypeGuid = GUID_XENPCI_DEVCLASS;
   4.151 +      pbi->LegacyBusType = Internal;
   4.152 +      pbi->BusNumber = 0;
   4.153 +      irp->IoStatus.Information = (ULONG_PTR)pbi;
   4.154 +      status = STATUS_SUCCESS;
   4.155 +      break;
   4.156 +
   4.157 +    case IRP_MN_QUERY_RESOURCES:
   4.158 +      KdPrint((__DRIVER_NAME "     IRP_MN_QUERY_RESOURCES\n"));
   4.159 +      crl = (PCM_RESOURCE_LIST)ExAllocatePoolWithTag(PagedPool, sizeof(CM_RESOURCE_LIST) - sizeof(CM_PARTIAL_RESOURCE_DESCRIPTOR), XENPCI_POOL_TAG);
   4.160 +      crl->Count = 1;
   4.161 +      crl->List[0].InterfaceType = Internal;
   4.162 +      crl->List[0].BusNumber = 0;
   4.163 +      crl->List[0].PartialResourceList.Version = 0;
   4.164 +      crl->List[0].PartialResourceList.Revision = 0;
   4.165 +      crl->List[0].PartialResourceList.Count = 0;
   4.166 +      irp->IoStatus.Information = (ULONG_PTR)crl;
   4.167 +      status = STATUS_SUCCESS;
   4.168 +      break;
   4.169 +        
   4.170      default:
   4.171        KdPrint((__DRIVER_NAME "     Unhandled Minor = %d\n", stack->MinorFunction));
   4.172        status = STATUS_NOT_SUPPORTED;
   4.173 -    break;
   4.174 +      break;
   4.175    }
   4.176  
   4.177    irp->IoStatus.Status = status;
     5.1 --- a/xenvbd/makefile.inc	Sun May 04 16:40:30 2008 +1000
     5.2 +++ b/xenvbd/makefile.inc	Mon May 05 00:09:47 2008 +1000
     5.3 @@ -1,5 +1,5 @@
     5.4  _LNG=$(LANGUAGE)
     5.5 -STAMP=stampinf -f $@ -a $(_BUILDARCH) -d * -k $(KMDF_VERSION_MAJOR).$(KMDF_VERSION_MINOR) -v $(VERSION)
     5.6 +STAMP=stampinf -f $@ -a $(_BUILDARCH) -d * -v $(VERSION)
     5.7  
     5.8  ..\Target\$(DDK_TARGET_OS)\$(INF_NAME).inf: $(INF_NAME).inx sources ..\common.inc
     5.9      copy $(@B).inx $@
     6.1 --- a/xenvbd/sources	Sun May 04 16:40:30 2008 +1000
     6.2 +++ b/xenvbd/sources	Mon May 05 00:09:47 2008 +1000
     6.3 @@ -1,7 +1,9 @@
     6.4 -!include "..\common.inc"
     6.5 +!INCLUDE "..\common.inc"
     6.6 +!UNDEF KMDF_VERSION
     6.7 +!UNDEF KMDF_VERSION_MAJOR
     6.8  TARGETNAME=xenvbd
     6.9  TARGETTYPE=DRIVER
    6.10  INF_NAME=$(TARGETNAME)
    6.11 +MISCFILES=..\Target\$(DDK_TARGET_OS)\$(INF_NAME).inf
    6.12  TARGETLIBS=$(TARGETLIBS) $(DDK_LIB_PATH)\scsiport.lib
    6.13 -MISCFILES=..\Target\$(DDK_TARGET_OS)\$(INF_NAME).inf
    6.14  SOURCES=xenvbd.c
     7.1 --- a/xenvbd/xenvbd.c	Sun May 04 16:40:30 2008 +1000
     7.2 +++ b/xenvbd/xenvbd.c	Mon May 05 00:09:47 2008 +1000
     7.3 @@ -260,6 +260,7 @@ XenVbd_HwScsiInterrupt(PVOID DeviceExten
     7.4    return FALSE;
     7.5  }
     7.6  
     7.7 +#if 0
     7.8  static VOID
     7.9  XenVbd_BackEndStateHandler(char *Path, PVOID Data)
    7.10  {
    7.11 @@ -709,6 +710,7 @@ XenVbd_InitDeviceData(PXENVBD_DEVICE_DAT
    7.12    KdPrint((__DRIVER_NAME " <-- " __FUNCTION__ "\n"));
    7.13  }
    7.14  
    7.15 +#endif
    7.16  static ULONG
    7.17  XenVbd_HwScsiFindAdapter(PVOID DeviceExtension, PVOID HwContext, PVOID BusInformation, PCHAR ArgumentString, PPORT_CONFIGURATION_INFORMATION ConfigInfo, PBOOLEAN Again)
    7.18  {
    7.19 @@ -716,7 +718,7 @@ XenVbd_HwScsiFindAdapter(PVOID DeviceExt
    7.20  //  PACCESS_RANGE AccessRange;
    7.21    PXENVBD_DEVICE_DATA DeviceData; // = ((PXENVBD_DEVICE_EXTENSION)DeviceExtension)->XenVbdDeviceData;
    7.22  //  ULONG status;
    7.23 -  PXENPCI_XEN_DEVICE_DATA XenDeviceData;
    7.24 +//  PXENPCI_XEN_DEVICE_DATA XenDeviceData;
    7.25  
    7.26    UNREFERENCED_PARAMETER(HwContext);
    7.27    UNREFERENCED_PARAMETER(BusInformation);
    7.28 @@ -733,10 +735,11 @@ XenVbd_HwScsiFindAdapter(PVOID DeviceExt
    7.29    if (KeGetCurrentIrql() == PASSIVE_LEVEL)
    7.30    {
    7.31      DeviceData = ((PXENVBD_DEVICE_EXTENSION)DeviceExtension)->XenVbdDeviceData = ExAllocatePoolWithTag(NonPagedPool, sizeof(XENVBD_DEVICE_DATA), XENVBD_POOL_TAG);
    7.32 -    XenVbd_InitDeviceData(DeviceData, ConfigInfo);
    7.33 -    if (DeviceData->XenDeviceData->Magic != XEN_DATA_MAGIC)
    7.34 -      return SP_RETURN_NOT_FOUND;
    7.35 +//    XenVbd_InitDeviceData(DeviceData, ConfigInfo);
    7.36 +//    if (DeviceData->XenDeviceData->Magic != XEN_DATA_MAGIC)
    7.37 +//      return SP_RETURN_NOT_FOUND;
    7.38    }
    7.39 +#if 0
    7.40    else
    7.41    {
    7.42      DumpMode = TRUE;
    7.43 @@ -763,6 +766,7 @@ XenVbd_HwScsiFindAdapter(PVOID DeviceExt
    7.44      }
    7.45    }
    7.46    KdPrint((__DRIVER_NAME "     DeviceData = %p\n", DeviceData));
    7.47 +#endif
    7.48  
    7.49    DeviceData->DeviceExtension = DeviceExtension;
    7.50  
    7.51 @@ -984,6 +988,11 @@ XenVbd_HwScsiStartIo(PVOID DeviceExtensi
    7.52    unsigned int i;
    7.53    int notify;
    7.54  
    7.55 +Srb->SrbStatus = SRB_STATUS_NO_DEVICE;
    7.56 +ScsiPortNotification(RequestComplete, DeviceExtension, Srb);
    7.57 +ScsiPortNotification(NextRequest, DeviceExtension, NULL);
    7.58 +
    7.59 +#if 0
    7.60  //  KdPrint((__DRIVER_NAME " --> HwScsiStartIo PathId = %d, TargetId = %d, Lun = %d\n", Srb->PathId, Srb->TargetId, Srb->Lun));
    7.61  //  KdPrint((__DRIVER_NAME "     IRQL = %d\n", KeGetCurrentIrql()));
    7.62  
    7.63 @@ -1296,7 +1305,7 @@ XenVbd_HwScsiStartIo(PVOID DeviceExtensi
    7.64    }
    7.65  
    7.66  //  KdPrint((__DRIVER_NAME " <-- " __FUNCTION__ "\n"));
    7.67 -
    7.68 +#endif
    7.69    return TRUE;
    7.70  }
    7.71  
     8.1 --- a/xenvbd/xenvbd.h	Sun May 04 16:40:30 2008 +1000
     8.2 +++ b/xenvbd/xenvbd.h	Mon May 05 00:09:47 2008 +1000
     8.3 @@ -4,7 +4,6 @@
     8.4  #include <ntifs.h>
     8.5  #include <ntddk.h>
     8.6  #include <wdm.h>
     8.7 -#include <wdf.h>
     8.8  #include <initguid.h>
     8.9  #include <ntdddisk.h>
    8.10  #include <srb.h>
    8.11 @@ -109,7 +108,7 @@ struct
    8.12  
    8.13  struct
    8.14  {
    8.15 -  PXENPCI_XEN_DEVICE_DATA XenDeviceData;
    8.16 +//  PXENPCI_XEN_DEVICE_DATA XenDeviceData;
    8.17    XENVBD_BUS_DATA BusData[SCSI_BUSES];
    8.18  
    8.19    KSPIN_LOCK Lock;
     9.1 --- a/xenvbd/xenvbd.inx	Sun May 04 16:40:30 2008 +1000
     9.2 +++ b/xenvbd/xenvbd.inx	Mon May 05 00:09:47 2008 +1000
     9.3 @@ -6,8 +6,6 @@ Provider=%XenGplPv%
     9.4  
     9.5  [DestinationDirs]
     9.6  DefaultDestDir = 12
     9.7 -ClassInstall32_CopyFiles=11
     9.8 -CoInstaller_CopyFiles = 11
     9.9  
    9.10  [ControlFlags]
    9.11  ExcludeFromSelect=*
    9.12 @@ -27,11 +25,11 @@ CopyFiles=XenVbd.CopyFiles
    9.13  
    9.14  [XenVbd.CopyFiles]
    9.15  xenvbd.sys
    9.16 -xenaddresource.sys
    9.17 +;xenaddresource.sys
    9.18  
    9.19  [XenVbd_Inst.NT.Services]
    9.20  AddService=XenVbd,2,XenVbd_Service, XenVbd_EventLog
    9.21 -AddService=XenAddResource,,XenAddResource_Service
    9.22 +;AddService=XenAddResource,,XenAddResource_Service
    9.23  
    9.24  [XenVbd_Service]
    9.25  DisplayName    = %XenVbd.SVCDESC%                            
    9.26 @@ -52,66 +50,45 @@ AddReg = XenVbd_EventLog_AddReg
    9.27  HKR,,EventMessageFile,0x00020000,"%SystemRoot%\System32\IoLogMsg.dll;%SystemRoot%\System32\drivers\XenVbd.sys"
    9.28  HKR,,TypesSupported,0x00010001,7
    9.29  
    9.30 -[XenVbd_Inst.NT.CoInstallers]
    9.31 -AddReg=CoInstaller_AddReg
    9.32 -CopyFiles=CoInstaller_CopyFiles
    9.33 -
    9.34 -[XenVbd_Inst.NT.Wdf]
    9.35 -KmdfService = xenvbd, xenvbd_wdfsect
    9.36 -
    9.37  [XenVbd_Inst.NT.HW]
    9.38  AddReg = XenVbd_Inst_HW_AddReg
    9.39  
    9.40  [XenVbd_Inst_HW_AddReg]
    9.41 -HKR,,"UpperFilters",0x00010000,"xenaddresource"
    9.42 -
    9.43 -[XenAddResource_Inst.NT]
    9.44 -CopyFiles=XenAddResource.CopyFiles
    9.45 -
    9.46 -[XenAddResource_Inst.NT.Services]
    9.47 -AddService=XenAddResource,,XenAddResource_Service 
    9.48 -
    9.49 -[XenAddResource_Inst.NT.HW]
    9.50 -AddReg = XenAddResource_Inst_HW_AddReg
    9.51 -
    9.52 -[XenAddResource_Inst_HW_AddReg]
    9.53 -HKR,,"LowerFilters",0x00010000,"xenaddresource"
    9.54 -
    9.55 -[XenAddResource.CopyFiles]
    9.56 -xenaddresource.sys
    9.57 +;HKR,,"UpperFilters",0x00010000,"xenaddresource"
    9.58  
    9.59 -[XenAddResource_Service]
    9.60 -DisplayName    = "Xen Resource Adder"
    9.61 -ServiceType    = 1
    9.62 -StartType      = 0
    9.63 -ErrorControl   = 1
    9.64 -LoadOrderGroup = System Bus Extender
    9.65 -ServiceBinary  = %12%\xenaddresource.sys
    9.66 -AddReg = XenAddResource_Service_AddReg
    9.67 -
    9.68 -[XenAddResource.CopyFiles]
    9.69 -xenaddresource.sys
    9.70 +;[XenAddResource_Inst.NT]
    9.71 +;CopyFiles=XenAddResource.CopyFiles
    9.72  
    9.73 -[XenAddResource_Service_AddReg]
    9.74 -HKR,"Parameters\PnpInterface", "0", 0x00010001, 0x00000001
    9.75 -
    9.76 -[XenAddResource_Inst.NT.CoInstallers]
    9.77 -AddReg=CoInstaller_AddReg
    9.78 -CopyFiles=CoInstaller_CopyFiles
    9.79 +;[XenAddResource_Inst.NT.Services]
    9.80 +;AddService=XenAddResource,,XenAddResource_Service 
    9.81  
    9.82 -[XenAddResource_Inst.NT.Wdf]
    9.83 -KmdfService = xenaddresource, xenaddresource_wdfsect
    9.84 +;[XenAddResource_Inst.NT.HW]
    9.85 +;AddReg = XenAddResource_Inst_HW_AddReg
    9.86  
    9.87 -[xenvbd_wdfsect]
    9.88 -KmdfLibraryVersion = $KMDFVERSION$
    9.89 +;[XenAddResource_Inst_HW_AddReg]
    9.90 +;HKR,,"LowerFilters",0x00010000,"xenaddresource"
    9.91  
    9.92 -[xenaddresource_wdfsect]
    9.93 -KmdfLibraryVersion = $KMDFVERSION$
    9.94 +;[XenAddResource.CopyFiles]
    9.95 +;xenaddresource.sys
    9.96 +
    9.97 +;[XenAddResource_Service]
    9.98 +;DisplayName    = "Xen Resource Adder"
    9.99 +;ServiceType    = 1
   9.100 +;StartType      = 0
   9.101 +;ErrorControl   = 1
   9.102 +;LoadOrderGroup = System Bus Extender
   9.103 +;ServiceBinary  = %12%\xenaddresource.sys
   9.104 +;AddReg = XenAddResource_Service_AddReg
   9.105 +
   9.106 +;[XenAddResource.CopyFiles]
   9.107 +;xenaddresource.sys
   9.108 +
   9.109 +;[XenAddResource_Service_AddReg]
   9.110 +;HKR,"Parameters\PnpInterface", "0", 0x00010001, 0x00000001
   9.111  
   9.112  [SourceDisksFiles]
   9.113  xenvbd.sys=1
   9.114 -xenaddresource.sys=1
   9.115 -WdfCoinstaller$KMDFCOINSTALLERVERSION$.dll=1,,
   9.116 +;xenaddresource.sys=1
   9.117  
   9.118  [SourceDisksNames.x86]
   9.119  1 = %DISK_NAME%,,,\i386
   9.120 @@ -119,15 +96,9 @@ 1 = %DISK_NAME%,,,\i386
   9.121  [SourceDisksNames.amd64]
   9.122  1 = %DISK_NAME%,,,\amd64
   9.123  
   9.124 -[CoInstaller_CopyFiles]
   9.125 -WdfCoinstaller$KMDFCOINSTALLERVERSION$.dll,,,2
   9.126 -
   9.127 -[CoInstaller_AddReg]
   9.128 -HKR,,CoInstallers32,0x00010000, "WdfCoinstaller$KMDFCOINSTALLERVERSION$.dll,WdfCoInstaller"
   9.129 -
   9.130  [Strings]
   9.131  XenGplPv = "Xen GPL PV Driver Developers"
   9.132  XenVbd.SVCDESC = "Xen Block Device Driver"
   9.133  XenVbd.DRVDESC = "Xen Block Device Driver"
   9.134 -XenAddResource.DRVDESC = "Xen Resource Adder"
   9.135 +;XenAddResource.DRVDESC = "Xen Resource Adder"
   9.136  DISK_NAME = "Xen Block Device Driver Install Disk"