19#undef ScsiPortMoveMemory
242 DPRINT(
"ScsiPortCompleteRequest() called\n");
246 MiniPortDeviceExtension);
249 for (
UINT8 pathId = 0; pathId < DeviceExtension->NumberOfBuses; pathId++)
256 lunEntry = lunEntry->
Flink)
269 DPRINT1(
"Completing abort request without setting SrbStatus!\n");
310 DPRINT(
"ScsiPortFlushDma()\n");
329 MiniPortDeviceExtension);
332 NextMa = DeviceExtension->MappedAddressList;
343 if (NextMa == DeviceExtension->MappedAddressList)
378 DPRINT(
"ScsiPortGetBusData()\n");
408 DPRINT(
"ScsiPortSetBusDataByOffset()\n");
438 MiniPortDeviceExtension);
461 if (DeviceBase ==
NULL)
462 return MappedAddress;
467 DeviceBase->
BusNumber = SystemIoBusNumber;
471 DeviceExtension->MappedAddressList = DeviceBase;
473 return MappedAddress;
488 DPRINT(
"ScsiPortGetLogicalUnit() called\n");
492 MiniPortDeviceExtension);
495 if (!DeviceExtension->LunExtensionSize)
511 return (LunExtension + 1);
531 DPRINT(
"ScsiPortGetPhysicalAddress(%p %p %p %p)\n",
536 MiniPortDeviceExtension);
546 else if (DeviceExtension->MapRegisters)
590 DPRINT1(
"ScsiPortGetSrb() unimplemented\n");
606 ULONG MapRegistersCount;
609 DPRINT(
"ScsiPortGetUncachedExtension(%p %p %lu)\n",
614 MiniPortDeviceExtension);
619 DPRINT1(
"The HBA has already got a common DMA buffer!\n");
649 DPRINT1(
"HalGetAdapter() failed\n");
654 if (ConfigInfo->NumberOfPhysicalBreaks != 0 &&
655 MapRegistersCount > ConfigInfo->NumberOfPhysicalBreaks)
658 ConfigInfo->NumberOfPhysicalBreaks;
667 DeviceExtension->SupportsAutoSense = ConfigInfo->AutoRequestSense;
675 DeviceExtension->NeedSrbExtensionAlloc =
TRUE;
682 DPRINT1(
"SpiAllocateCommonBuffer() failed with Status = 0x%08X!\n",
Status);
703 if (DeviceExtension->SupportsAutoSense)
725 &DeviceExtension->PhysicalAddress,
746 CommonBufferLength -= NonCachedSize;
754 if (DeviceExtension->NeedSrbExtensionAlloc)
757 DeviceExtension->SrbDataCount = CommonBufferLength /
BufSize;
761 DeviceExtension->FreeSrbExtensions = SrbExtension;
764 while (CommonBufferLength >= 2 *
BufSize)
767 SrbExtension = *SrbExtension;
788 DPRINT(
"ScsiPortGetVirtualAddress(%p %I64x)\n",
793 MiniPortDeviceExtension);
848 ULONG DeviceExtensionSize;
849 ULONG PortConfigSize;
863 DPRINT(
"ScsiPortInitialize() called!\n");
880 if (!driverExtension)
885 (
PVOID *)&driverExtension);
889 DPRINT1(
"Failed to allocate the driver extension! Status 0x%x\n",
Status);
947 DPRINT(
"AdapterInterfaceType: %lu\n",
952 WCHAR NameBuffer[27];
955 L"\\Device\\ScsiPort%lu",
959 DPRINT1(
"Failed to allocate memory for device name!\n");
961 PortDeviceObject =
NULL;
978 DPRINT1(
"IoCreateDevice call failed! (Status 0x%lX)\n",
Status);
979 PortDeviceObject =
NULL;
990 DeviceExtension->Common.DeviceObject = PortDeviceObject;
991 DeviceExtension->Common.IsFDO =
TRUE;
992 DeviceExtension->Length = DeviceExtensionSize;
1005 DeviceExtension->LunExtensionSize =
1012 DeviceExtension->RequestsNumber = 16;
1023 DeviceExtension->TimerCount = -1;
1043 if (DeviceExtension->PortConfig ==
NULL)
1052 DeviceExtension->PortConfig,
1057 DPRINT(
"SpiCreatePortConfig() failed with Status 0x%08X\n",
Status);
1061 PortConfig = DeviceExtension->PortConfig;
1099 DeviceExtension->PortConfig =
NULL;
1102 goto CreatePortConfig;
1108 DeviceExtension->PortConfig =
NULL;
1110 goto CreatePortConfig;
1124 PortConfig, &Again);
1126 DPRINT(
"HwFindAdapter() Result: %lu Again: %s\n",
Result, (Again) ?
"True" :
"False");
1129 if (DeviceExtension->MapRegisterBase !=
NULL)
1131 ExFreePool(DeviceExtension->MapRegisterBase);
1132 DeviceExtension->MapRegisterBase =
NULL;
1146 DeviceExtension->PortConfig =
NULL;
1148 goto CreatePortConfig;
1157 "ScsiPortInitialize(): Found HBA! (%x), adapter Id %d\n",
1188 DPRINT1(
"IoReportDetectedDevice failed. Status: 0x%x\n",
Status);
1195 ASSERT(DeviceExtension->Common.LowerDevice);
1197 PortDeviceObject->
Flags &= ~DO_DEVICE_INITIALIZING;
1211 DeviceExtension->CachesData = PortConfig->
CachesData;
1212 DeviceExtension->ReceiveEvent = PortConfig->
ReceiveEvent;
1213 DeviceExtension->SupportsTaggedQueuing = PortConfig->
TaggedQueuing;
1217 size_t BusConfigSize = DeviceExtension->NumberOfBuses *
sizeof(*DeviceExtension->Buses);
1219 if (!DeviceExtension->Buses)
1221 DPRINT1(
"Out of resources!\n");
1227 for (
UINT8 pathId = 0; pathId < DeviceExtension->NumberOfBuses; pathId++)
1229 DeviceExtension->Buses[pathId].BusIdentifier =
1230 DeviceExtension->PortConfig->InitiatorBusId[pathId];
1242 if (DeviceExtension->SupportsTaggedQueuing || DeviceExtension->MultipleReqsPerLun)
1244 DeviceExtension->NeedSrbDataAlloc =
TRUE;
1248 DeviceExtension->NeedSrbDataAlloc =
FALSE;
1255 DeviceExtension->MapBuffers = PortConfig->
MapBuffers;
1261 DPRINT1(
"DMA is not supported yet\n");
1269 DeviceExtension->NeedSrbExtensionAlloc =
TRUE;
1280 if (DeviceExtension->NeedSrbDataAlloc)
1285 if (DeviceExtension->SrbDataCount != 0)
1286 Count = DeviceExtension->SrbDataCount;
1288 Count = DeviceExtension->RequestsNumber * 2;
1293 if (SrbData ==
NULL)
1298 DeviceExtension->SrbInfo = SrbData;
1299 DeviceExtension->FreeSrbInfo = SrbData;
1300 DeviceExtension->SrbDataCount =
Count;
1323 PortCapabilities->
TaggedQueuing = DeviceExtension->SupportsTaggedQueuing;
1349 DPRINT1(
"Failed to start the legacy adapter. Status 0x%x\n",
Status);
1355 FirstConfigCall =
FALSE;
1390 DPRINT(
"ScsiPortInitialize() done, Status = 0x%08X, DeviceFound = %d!\n",
1405 DPRINT1(
"ScsiPortIoMapTransfer()\n");
1423 DPRINT1(
"ScsiPortLogError() called\n");
1424 DPRINT1(
"PathId: 0x%02x TargetId: 0x%02x Lun: 0x%02x ErrorCode: 0x%08lx UniqueId: 0x%08lx\n",
1430 DPRINT(
"ScsiPortLogError() done\n");
1456 DPRINT(
"ScsiPortNotification() called\n");
1461 DPRINT(
"DeviceExtension %p\n", DeviceExtension);
1474 DPRINT(
"Notify: RequestComplete (Srb %p)\n",
Srb);
1517 DeviceExtension->InterruptData.CompletedRequests = SrbData;
1523 DPRINT(
"Notify: NextRequest\n");
1539 "Notify: NextLuRequest(PathId %u TargetId %u Lun %u)\n",
PathId,
TargetId,
Lun);
1559 LunExtension->
ReadyLun = DeviceExtension->InterruptData.ReadyLun;
1560 DeviceExtension->InterruptData.ReadyLun = LunExtension;
1565 DPRINT(
"Notify: ResetDetected\n");
1571 DPRINT1(
"UNIMPLEMENTED SCSI Notification called: CallDisableInterrupts!\n");
1575 DPRINT1(
"UNIMPLEMENTED SCSI Notification called: CallEnableInterrupts!\n");
1579 DPRINT(
"Notify: RequestTimerCall\n");
1586 DPRINT1(
"UNIMPLEMENTED SCSI Notification called: BusChangeDetected!\n");
1611 DPRINT(
"ScsiPortValidateRange()\n");
1633 for (
Index = 0;
Index < ResourceDescriptor->PartialResourceList.Count;
Index++)
1635 PartialData = &ResourceDescriptor->PartialResourceList.PartialDescriptors[
Index];
1637 switch (PartialData->
Type)
1641 if (RangeNumber < HwInitializationData->NumberOfAccessRanges)
1643 AccessRange = &((*(PortConfig->AccessRanges))[RangeNumber]);
1655 if (RangeNumber < HwInitializationData->NumberOfAccessRanges)
1657 AccessRange = &((*(PortConfig->AccessRanges))[RangeNumber]);
1672 PortConfig->BusInterruptLevel = PartialData->
u.
Interrupt.Level;
1673 PortConfig->BusInterruptVector = PartialData->
u.
Interrupt.Vector;
1678 PortConfig->InterruptMode =
Latched;
1688 PortConfig->BusInterruptLevel2 = PartialData->
u.
Interrupt.Level;
1689 PortConfig->BusInterruptVector2 = PartialData->
u.
Interrupt.Vector;
1694 PortConfig->InterruptMode2 =
Latched;
1709 PortConfig->DmaChannel = PartialData->
u.
Dma.Channel;
1710 PortConfig->DmaPort = PartialData->
u.
Dma.Port;
1722 PortConfig->DmaChannel2 = PartialData->
u.
Dma.Channel;
1723 PortConfig->DmaPort2 = PartialData->
u.
Dma.Port;
1746 ULONG ListLength = 0,
i, FullSize;
1775 Interrupt = DeviceExtension->InterruptCount;
1804 ResourceList->List[0].PartialResourceList.Count = ListLength;
1805 ResourceDescriptor =
ResourceList->List[0].PartialResourceList.PartialDescriptors;
1832 ResourceDescriptor++;
1854 ResourceDescriptor->
u.
Interrupt.Affinity = 0;
1856 ResourceDescriptor++;
1867 ResourceDescriptor->
Flags = 0;
1877 ResourceDescriptor->
u.
Dma.Channel = 0;
1880 ResourceDescriptor->
u.
Dma.Port = 0;
1882 ResourceDescriptor++;
1903 ULONG FunctionNumber;
1904 CHAR VendorIdString[8];
1905 CHAR DeviceIdString[8];
1910 DPRINT (
"SpiGetPciConfiguration() called\n");
1920 for (FunctionNumber = NextSlotNumber->u.bits.FunctionNumber; FunctionNumber <
PCI_MAX_FUNCTION; FunctionNumber++)
1922 SlotNumber.u.bits.FunctionNumber = FunctionNumber;
1943 sprintf (VendorIdString,
"%04hx", PciConfig.VendorID);
1944 sprintf (DeviceIdString,
"%04hx", PciConfig.DeviceID);
1953 DPRINT(
"Found device 0x%04hx 0x%04hx at %1lu %2lu %1lu\n",
1984 NextSlotNumber->u.bits.FunctionNumber = FunctionNumber + 1;
1987 PortConfig->SlotNumber =
SlotNumber.u.AsULONG;
1991 NextSlotNumber->u.bits.FunctionNumber = 0;
1994 NextSlotNumber->u.bits.DeviceNumber = 0;
1995 DPRINT (
"No device found\n");
2027 DPRINT(
"ScsiPortCreateClose()\n");
2091 while (TotalLength < Srb->DataTransferLength)
2093 if (!ScatterGatherList)
2101 &ScatterGatherList->
Length,
2105 ScatterGatherList++;
2127 DPRINT(
"ScsiPortIsr() called!\n");
2146 DeviceExtension->CurrentIrp,
2161 DPRINT(
"SpiProcessTimeout() entered\n");
2163 DeviceExtension->TimerCount = -1;
2167 DeviceExtension->InterruptData.Flags &= ~SCSI_PORT_RESET;
2171 DeviceExtension->InterruptData.Flags &= ~SCSI_PORT_RESET_REQUEST;
2179 DPRINT(
"Resetting the bus\n");
2181 for (Bus = 0; Bus < DeviceExtension->NumberOfBuses; Bus++)
2187 DeviceExtension->TimerCount = 4;
2213 DeviceExtension->TimerCount = 4;
2241 DPRINT(
"ScsiPortIoTimer()\n");
2249 if (DeviceExtension->TimerCount > 0)
2252 DeviceExtension->TimerCount--;
2254 if (DeviceExtension->TimerCount == 0)
2259 DeviceExtension->Common.DeviceObject))
2261 DPRINT(
"Error happened during processing timeout, but nothing critical\n");
2272 for (
UINT8 pathId = 0; pathId < DeviceExtension->NumberOfBuses; pathId++)
2278 lunEntry = lunEntry->
Flink)
2284 if (!(LunExtension->
Flags &
2287 DPRINT(
"Retrying busy request\n");
2309 DPRINT(
"Request timed out, resetting bus\n");
2343 DPRINT(
"Miniport timer DPC\n");
2351 if (DeviceExtension->HwScsiTimer !=
NULL)
2362 DeviceExtension->Common.DeviceObject,
2380 WCHAR DeviceBuffer[16];
2381 WCHAR StrBuffer[512];
2442 DeviceExtension->Common.DeviceObject->DriverObject->HardwareDatabase,
2454 swprintf(StrBuffer,
L"ScsiAdapter\\%lu",
2476 DPRINT(
"Hardware info found at %S\n", StrBuffer);
2497 DPRINT(
"ZwOpenKey() failed with Status=0x%08X\n",
Status);
2665 DPRINT(
"Bad data type for MaximumLogicalUnit\n");
2669 DeviceExtension->MaxLunCount = *((
PUCHAR)
2676 DPRINT(
"MaximumLogicalUnit = %d\n", DeviceExtension->MaxLunCount);
2686 DPRINT(
"Bad data type for InitiatorTargetId\n");
2690 ConfigInfo->InitiatorBusId[0] = *((
PUCHAR)
2694 if (ConfigInfo->InitiatorBusId[0] > ConfigInfo->MaximumNumberOfTargets - 1)
2697 DPRINT(
"InitiatorTargetId = %d\n", ConfigInfo->InitiatorBusId[0]);
2704 DPRINT(
"ScsiDebug key not supported\n");
2711 DPRINT1(
"Breakpoint on entry requested!\n");
2716 if (
_wcsnicmp(KeyValueInformation->
Name,
L"DisableSynchronousTransfers",
2720 DPRINT(
"Synch transfers disabled\n");
2728 DPRINT(
"Disconnects disabled\n");
2732 if (
_wcsnicmp(KeyValueInformation->
Name,
L"DisableTaggedQueuing",
2735 InternalConfigInfo->DisableTaggedQueueing =
TRUE;
2736 DPRINT(
"Tagged queueing disabled\n");
2740 if (
_wcsnicmp(KeyValueInformation->
Name,
L"DisableMultipleRequests",
2743 InternalConfigInfo->DisableMultipleLun =
TRUE;
2744 DPRINT(
"Multiple requests disabled\n");
2756 if (InternalConfigInfo->Parameter !=
NULL)
2763 if (InternalConfigInfo->Parameter !=
NULL)
2769 InternalConfigInfo->Parameter,
2770 (PCCHAR)KeyValueInformation + KeyValueInformation->
DataOffset,
2779 (
PWSTR)((PCCHAR)KeyValueInformation + KeyValueInformation->
DataOffset);
2793 InternalConfigInfo->Parameter =
NULL;
2799 DPRINT(
"Found driver parameter\n");
2808 DPRINT(
"Bad data type for MaximumSGList\n");
2824 DPRINT(
"MaximumSGList = %d\n", ConfigInfo->NumberOfPhysicalBreaks);
2833 DPRINT(
"NumberOfRequests has wrong data type\n");
2840 if (DeviceExtension->RequestsNumber < 16)
2842 DeviceExtension->RequestsNumber = 16;
2844 else if (DeviceExtension->RequestsNumber > 512)
2846 DeviceExtension->RequestsNumber = 512;
2849 DPRINT(
"Number Of Requests = %d\n", DeviceExtension->RequestsNumber);
2861 DPRINT(
"Bad data type for ResourceList\n");
2866 DPRINT(
"Found ResourceList\n");
2873 ConfigInfo->SystemIoBusNumber = FullResource->
BusNumber;
2886 DPRINT(
"Resource data is of incorrect size\n");
2890 switch (PartialDescriptor->
Type)
2893 if (RangeCount >= ConfigInfo->NumberOfAccessRanges)
2895 DPRINT(
"Too many access ranges\n");
2899 InternalConfigInfo->AccessRanges[RangeCount].RangeInMemory =
FALSE;
2900 InternalConfigInfo->AccessRanges[RangeCount].RangeStart = PartialDescriptor->
u.
Port.Start;
2901 InternalConfigInfo->AccessRanges[RangeCount].RangeLength = PartialDescriptor->
u.
Port.Length;
2907 if (RangeCount >= ConfigInfo->NumberOfAccessRanges)
2909 DPRINT(
"Too many access ranges\n");
2913 InternalConfigInfo->AccessRanges[RangeCount].RangeInMemory =
TRUE;
2914 InternalConfigInfo->AccessRanges[RangeCount].RangeStart = PartialDescriptor->
u.
Memory.Start;
2915 InternalConfigInfo->AccessRanges[RangeCount].RangeLength = PartialDescriptor->
u.
Memory.Length;
2924 ConfigInfo->BusInterruptLevel =
2927 ConfigInfo->BusInterruptVector =
2934 ConfigInfo->BusInterruptLevel2 =
2937 ConfigInfo->BusInterruptVector2 =
2950 ConfigInfo->DmaChannel = PartialDescriptor->
u.
Dma.Channel;
2951 ConfigInfo->DmaPort = PartialDescriptor->
u.
Dma.Port;
2963 ConfigInfo->DmaChannel2 = PartialDescriptor->
u.
Dma.Channel;
2964 ConfigInfo->DmaPort2 = PartialDescriptor->
u.
Dma.Port;
2981 (
PCHAR) (PartialDescriptor + 1) - (
PCHAR)FullResource +
2985 DPRINT(
"Resource data length is incorrect");
3046#undef ScsiPortConvertPhysicalAddressToUlong
3053 DPRINT(
"ScsiPortConvertPhysicalAddressToUlong()\n");
static PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(PIRP Irp)
#define InterlockedIncrement
VOID NTAPI ScsiPortCompleteRequest(IN PVOID HwDeviceExtension, IN UCHAR PathId, IN UCHAR TargetId, IN UCHAR Lun, IN UCHAR SrbStatus)
ULONG NTAPI ScsiPortInitialize(IN PVOID Argument1, IN PVOID Argument2, IN PHW_INITIALIZATION_DATA HwInitializationData, IN PVOID HwContext OPTIONAL)
static BOOLEAN SpiGetPciConfigData(IN PHW_INITIALIZATION_DATA HwInitializationData, IN OUT PPORT_CONFIGURATION_INFORMATION PortConfig, IN ULONG BusNumber, IN OUT PPCI_SLOT_NUMBER NextSlotNumber)
SCSI_PHYSICAL_ADDRESS NTAPI ScsiPortGetPhysicalAddress(IN PVOID HwDeviceExtension, IN PSCSI_REQUEST_BLOCK Srb OPTIONAL, IN PVOID VirtualAddress, OUT ULONG *Length)
struct SCSI_PORT_DEVICE_EXTENSION * PSCSI_PORT_DEVICE_EXTENSION
VOID __cdecl ScsiPortNotification(IN SCSI_NOTIFICATION_TYPE NotificationType, IN PVOID HwDeviceExtension, IN ...)
PVOID NTAPI ScsiPortGetUncachedExtension(IN PVOID HwDeviceExtension, IN PPORT_CONFIGURATION_INFORMATION ConfigInfo, IN ULONG NumberOfBytes)
static NTSTATUS SpiAllocateCommonBuffer(IN OUT PSCSI_PORT_DEVICE_EXTENSION DeviceExtension, IN ULONG NonCachedSize)
BOOLEAN NTAPI ScsiPortValidateRange(IN PVOID HwDeviceExtension, IN INTERFACE_TYPE BusType, IN ULONG SystemIoBusNumber, IN SCSI_PHYSICAL_ADDRESS IoAddress, IN ULONG NumberOfBytes, IN BOOLEAN InIoSpace)
static NTSTATUS SpiCreatePortConfig(IN PSCSI_PORT_DEVICE_EXTENSION DeviceExtension, IN PHW_INITIALIZATION_DATA HwInitData, OUT PPORT_CONFIGURATION_INFORMATION ConfigInfo, IN BOOLEAN ZeroStruct)
VOID NTAPI ScsiPortLogError(IN PVOID HwDeviceExtension, IN PSCSI_REQUEST_BLOCK Srb OPTIONAL, IN UCHAR PathId, IN UCHAR TargetId, IN UCHAR Lun, IN ULONG ErrorCode, IN ULONG UniqueId)
VOID __cdecl ScsiDebugPrint(IN ULONG DebugPrintLevel, IN PCCHAR DebugMessage, IN ...)
VOID NTAPI ScsiPortMoveMemory(IN PVOID WriteBuffer, IN PVOID ReadBuffer, IN ULONG Length)
PVOID NTAPI ScsiPortGetLogicalUnit(IN PVOID HwDeviceExtension, IN UCHAR PathId, IN UCHAR TargetId, IN UCHAR Lun)
VOID NTAPI ScsiPortFreeDeviceBase(IN PVOID HwDeviceExtension, IN PVOID MappedAddress)
ULONG NTAPI ScsiPortSetBusDataByOffset(IN PVOID DeviceExtension, IN ULONG BusDataType, IN ULONG SystemIoBusNumber, IN ULONG SlotNumber, IN PVOID Buffer, IN ULONG Offset, IN ULONG Length)
PSCSI_REQUEST_BLOCK NTAPI ScsiPortGetSrb(IN PVOID DeviceExtension, IN UCHAR PathId, IN UCHAR TargetId, IN UCHAR Lun, IN LONG QueueTag)
VOID NTAPI ScsiPortFlushDma(IN PVOID DeviceExtension)
static VOID SpiResourceToConfig(IN PHW_INITIALIZATION_DATA HwInitializationData, IN PCM_FULL_RESOURCE_DESCRIPTOR ResourceDescriptor, IN OUT PPORT_CONFIGURATION_INFORMATION PortConfig)
PVOID NTAPI ScsiPortGetVirtualAddress(IN PVOID HwDeviceExtension, IN SCSI_PHYSICAL_ADDRESS PhysicalAddress)
ULONG NTAPI ScsiPortGetBusData(IN PVOID DeviceExtension, IN ULONG BusDataType, IN ULONG SystemIoBusNumber, IN ULONG SlotNumber, IN PVOID Buffer, IN ULONG Length)
VOID NTAPI ScsiPortIoMapTransfer(IN PVOID HwDeviceExtension, IN PSCSI_REQUEST_BLOCK Srb, IN PVOID LogicalAddress, IN ULONG Length)
#define SCSI_PORT_NEXT_REQUEST_READY
PVOID NTAPI ScsiPortGetDeviceBase(IN PVOID HwDeviceExtension, IN INTERFACE_TYPE BusType, IN ULONG SystemIoBusNumber, IN SCSI_PHYSICAL_ADDRESS IoAddress, IN ULONG NumberOfBytes, IN BOOLEAN InIoSpace)
PDEVICE_OBJECT PhysicalDeviceObject
_In_ PSCSI_REQUEST_BLOCK Srb
_In_ PSCSI_REQUEST_BLOCK _In_opt_ PVOID _In_ ULONG _In_ BOOLEAN WriteToDevice
struct _SENSE_DATA SENSE_DATA
#define FILE_DEVICE_SECURE_OPEN
_In_ ULONG _In_ BOOLEAN _In_ ULONG _In_ UCHAR _In_ UCHAR _In_ UCHAR Lun
_In_ ULONG _In_ BOOLEAN _In_ ULONG _In_ UCHAR PathId
_In_ ULONG _In_ BOOLEAN _In_ ULONG _In_ UCHAR _In_ UCHAR TargetId
_In_ PCHAR _In_ ULONG DeviceNumber
NTSYSAPI BOOLEAN NTAPI RtlCreateUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
#define NT_SUCCESS(StatCode)
#define _strnicmp(_String1, _String2, _MaxCount)
VOID NTAPI KeInitializeDpc(IN PKDPC Dpc, IN PKDEFERRED_ROUTINE DeferredRoutine, IN PVOID DeferredContext)
DRIVER_INITIALIZE DriverEntry
#define SCSI_MAXIMUM_TARGETS_PER_BUS
#define SRB_FLAGS_IS_ACTIVE
#define SRBEV_SCSI_ASYNC_NOTIFICATION
enum _SCSI_NOTIFICATION_TYPE SCSI_NOTIFICATION_TYPE
#define SRB_FLAGS_SGLIST_FROM_POOL
VOID(NTAPI * PHW_TIMER)(IN PVOID DeviceExtension)
#define SRB_FUNCTION_EXECUTE_SCSI
#define SRB_FLAGS_DATA_OUT
#define SRB_FLAGS_DISABLE_DISCONNECT
#define SRB_STATUS_PENDING
#define SCSI_MINIMUM_PHYSICAL_BREAKS
#define SCSI_MAXIMUM_PHYSICAL_BREAKS
#define SCSI_MAXIMUM_LOGICAL_UNITS
#define ScsiPortConvertPhysicalAddressToUlong(Address)
struct _SCSI_REQUEST_BLOCK * PSCSI_REQUEST_BLOCK
#define SCSI_MAXIMUM_TARGETS
struct _PORT_CONFIGURATION_INFORMATION PORT_CONFIGURATION_INFORMATION
#define SRB_FLAGS_DISABLE_SYNCH_TRANSFER
#define SP_RETURN_NOT_FOUND
#define SP_UNINITIALIZED_VALUE
#define SRB_STATUS_SUCCESS
#define SRB_FUNCTION_ABORT_COMMAND
NTSTATUS NTAPI ScsiPortDeviceControl(_In_ PDEVICE_OBJECT DeviceObject, _In_ PIRP Irp)
VOID SpiInitOpenKeys(_Inout_ PCONFIGURATION_INFO ConfigInfo, _In_ PSCSI_PORT_DRIVER_EXTENSION DriverExtension)
NTHALAPI NTSTATUS NTAPI HalAssignSlotResources(PUNICODE_STRING, PUNICODE_STRING, PDRIVER_OBJECT, PDEVICE_OBJECT, INTERFACE_TYPE, ULONG, ULONG, PCM_RESOURCE_LIST *)
IO_ALLOCATION_ACTION NTAPI SpiAdapterControl(PDEVICE_OBJECT DeviceObject, PIRP Irp, PVOID MapRegisterBase, PVOID Context)
NTHALAPI ULONG NTAPI HalGetBusData(BUS_DATA_TYPE, ULONG, ULONG, PVOID, ULONG)
VOID NTAPI SpiMiniportTimerDpc(IN struct _KDPC *Dpc, IN PVOID DeviceObject, IN PVOID SystemArgument1, IN PVOID SystemArgument2)
NTHALAPI ULONG NTAPI HalGetInterruptVector(INTERFACE_TYPE, ULONG, ULONG, ULONG, PKIRQL, PKAFFINITY)
BOOLEAN NTAPI SpiResetBus(PVOID ServiceContext)
VOID NTAPI SpiCompleteRequest(IN PVOID HwDeviceExtension, IN PSCSI_REQUEST_BLOCK_INFO SrbInfo, IN UCHAR SrbStatus)
BOOLEAN NTAPI SpiProcessTimeout(PVOID ServiceContext)
IO_ALLOCATION_ACTION NTAPI ScsiPortAllocateAdapterChannel(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, IN PVOID MapRegisterBase, IN PVOID Context)
static VOID NTAPI ScsiPortIoTimer(PDEVICE_OBJECT DeviceObject, PVOID Context)
NTSTATUS NTAPI ScsiPortDispatchPnp(PDEVICE_OBJECT DeviceObject, PIRP Irp)
NTSTATUS NTAPI SpQueryDeviceCallout(IN PVOID Context, IN PUNICODE_STRING PathName, IN INTERFACE_TYPE BusType, IN ULONG BusNumber, IN PKEY_VALUE_FULL_INFORMATION *BusInformation, IN CONFIGURATION_TYPE ControllerType, IN ULONG ControllerNumber, IN PKEY_VALUE_FULL_INFORMATION *ControllerInformation, IN CONFIGURATION_TYPE PeripheralType, IN ULONG PeripheralNumber, IN PKEY_VALUE_FULL_INFORMATION *PeripheralInformation)
static PCM_RESOURCE_LIST SpiConfigToResource(PSCSI_PORT_DEVICE_EXTENSION DeviceExtension, PPORT_CONFIGURATION_INFORMATION PortConfig)
VOID NTAPI ScsiPortUnload(_In_ PDRIVER_OBJECT DriverObject)
static NTSTATUS NTAPI ScsiPortCreateClose(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
static VOID SpiParseDeviceInfo(IN PSCSI_PORT_DEVICE_EXTENSION DeviceExtension, IN HANDLE Key, IN PPORT_CONFIGURATION_INFORMATION ConfigInfo, IN PCONFIGURATION_INFO InternalConfigInfo, IN PUCHAR Buffer)
NTSTATUS NTAPI ScsiPortAddDevice(_In_ PDRIVER_OBJECT DriverObject, _In_ PDEVICE_OBJECT PhysicalDeviceObject)
UNICODE_STRING * PUNICODE_STRING
#define ExAllocatePoolWithTag(hernya, size, tag)
struct _DEVICE_OBJECT * PDEVICE_OBJECT
#define KeReleaseSpinLock(sl, irql)
#define KeAcquireSpinLock(sl, irql)
#define InitializeListHead(ListHead)
#define KeInitializeSpinLock(sl)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
ULONG NTAPI HalSetBusDataByOffset(IN BUS_DATA_TYPE BusDataType, IN ULONG BusNumber, IN ULONG SlotNumber, IN PVOID Buffer, IN ULONG Offset, IN ULONG Length)
BOOLEAN NTAPI HalTranslateBusAddress(IN INTERFACE_TYPE InterfaceType, IN ULONG BusNumber, IN PHYSICAL_ADDRESS BusAddress, IN OUT PULONG AddressSpace, OUT PPHYSICAL_ADDRESS TranslatedAddress)
PVOID NTAPI HalAllocateCommonBuffer(IN PADAPTER_OBJECT AdapterObject, IN ULONG Length, IN PPHYSICAL_ADDRESS LogicalAddress, IN BOOLEAN CacheEnabled)
PADAPTER_OBJECT NTAPI HalGetAdapter(IN PDEVICE_DESCRIPTION DeviceDescription, OUT PULONG NumberOfMapRegisters)
PHYSICAL_ADDRESS NTAPI IoMapTransfer(IN PADAPTER_OBJECT AdapterObject, IN PMDL Mdl, IN PVOID MapRegisterBase, IN PVOID CurrentVa, IN OUT PULONG Length, IN BOOLEAN WriteToDevice)
struct _CM_FULL_RESOURCE_DESCRIPTOR * PCM_FULL_RESOURCE_DESCRIPTOR
struct _CM_RESOURCE_LIST CM_RESOURCE_LIST
#define CmResourceTypeMemory
struct _CM_RESOURCE_LIST * PCM_RESOURCE_LIST
#define CmResourceTypeDma
#define CmResourceTypeDeviceSpecific
struct _CM_PARTIAL_RESOURCE_DESCRIPTOR CM_PARTIAL_RESOURCE_DESCRIPTOR
enum _INTERFACE_TYPE INTERFACE_TYPE
#define CmResourceTypePort
#define CmResourceTypeInterrupt
int __cdecl vsprintf(char *_Dest, const char *_Format, va_list _Args)
#define OBJ_KERNEL_HANDLE
#define OBJ_CASE_INSENSITIVE
NTSYSAPI void WINAPI DbgBreakPoint(void)
void __cdecl __debugbreak(void)
PCONFIGURATION_INFORMATION NTAPI IoGetConfigurationInformation(VOID)
Returns a pointer to the I/O manager's global configuration information structure.
NTSTATUS NTAPI IoQueryDeviceDescription(_In_opt_ PINTERFACE_TYPE BusType, _In_opt_ PULONG BusNumber, _In_opt_ PCONFIGURATION_TYPE ControllerType, _In_opt_ PULONG ControllerNumber, _In_opt_ PCONFIGURATION_TYPE PeripheralType, _In_opt_ PULONG PeripheralNumber, _In_ PIO_QUERY_DEVICE_ROUTINE CalloutRoutine, _In_opt_ PVOID Context)
Reads and returns Hardware information from the appropriate hardware registry key.
VOID NTAPI MmUnmapIoSpace(IN PVOID BaseAddress, IN SIZE_T NumberOfBytes)
PVOID NTAPI MmMapIoSpace(IN PHYSICAL_ADDRESS PhysicalAddress, IN SIZE_T NumberOfBytes, IN MEMORY_CACHING_TYPE CacheType)
NTSTATUS NTAPI IoInitializeTimer(IN PDEVICE_OBJECT DeviceObject, IN PIO_TIMER_ROUTINE TimerRoutine, IN PVOID Context)
#define ExFreePoolWithTag(_P, _T)
#define sprintf(buf, format,...)
FORCEINLINE PVOID ExAllocatePoolZero(ULONG PoolType, SIZE_T NumberOfBytes, ULONG Tag)
#define InitializeObjectAttributes(p, n, a, r, s)
_In_ NDIS_STATUS _In_ ULONG _In_ USHORT _In_opt_ PVOID _In_ ULONG DataSize
_In_ NDIS_ERROR_CODE ErrorCode
_In_ UINT _In_ UINT _In_ PNDIS_PACKET Source
#define CM_RESOURCE_DMA_8_AND_16
#define CM_RESOURCE_PORT_IO
#define CM_RESOURCE_DMA_8
#define CM_RESOURCE_INTERRUPT_LEVEL_SENSITIVE
#define CM_RESOURCE_MEMORY_READ_WRITE
#define CM_RESOURCE_DMA_32
#define CM_RESOURCE_DMA_16
#define CM_RESOURCE_INTERRUPT_LATCHED
NTSYSAPI NTSTATUS NTAPI ZwClose(_In_ HANDLE Handle)
_In_ PUNICODE_STRING _Inout_ PUNICODE_STRING Destination
NTSYSAPI VOID NTAPI RtlCopyUnicodeString(PUNICODE_STRING DestinationString, PUNICODE_STRING SourceString)
NTSYSAPI NTSTATUS NTAPI RtlUnicodeStringToAnsiString(PANSI_STRING DestinationString, PUNICODE_STRING SourceString, BOOLEAN AllocateDestinationString)
@ KeyValueFullInformation
#define FILE_WORD_ALIGNMENT
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
struct _KEY_VALUE_FULL_INFORMATION * PKEY_VALUE_FULL_INFORMATION
#define REG_FULL_RESOURCE_DESCRIPTOR
_In_ ULONG _In_ ULONG Offset
_In_ ULONG _In_ ULONG _In_ ULONG Length
PDEVICE_OBJECT NTAPI IoAttachDeviceToDeviceStack(IN PDEVICE_OBJECT SourceDevice, IN PDEVICE_OBJECT TargetDevice)
NTSTATUS NTAPI IoCreateDevice(IN PDRIVER_OBJECT DriverObject, IN ULONG DeviceExtensionSize, IN PUNICODE_STRING DeviceName, IN DEVICE_TYPE DeviceType, IN ULONG DeviceCharacteristics, IN BOOLEAN Exclusive, OUT PDEVICE_OBJECT *DeviceObject)
VOID NTAPI IoStartPacket(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, IN PULONG Key, IN PDRIVER_CANCEL CancelFunction)
PVOID NTAPI IoGetDriverObjectExtension(IN PDRIVER_OBJECT DriverObject, IN PVOID ClientIdentificationAddress)
NTSTATUS NTAPI IoAllocateDriverObjectExtension(IN PDRIVER_OBJECT DriverObject, IN PVOID ClientIdentificationAddress, IN ULONG DriverObjectExtensionSize, OUT PVOID *DriverObjectExtension)
#define IoCompleteRequest
BOOLEAN NTAPI KeSynchronizeExecution(IN OUT PKINTERRUPT Interrupt, IN PKSYNCHRONIZE_ROUTINE SynchronizeRoutine, IN PVOID SynchronizeContext OPTIONAL)
#define STATUS_INTERNAL_ERROR
#define STATUS_DEVICE_DOES_NOT_EXIST
#define STATUS_REVISION_MISMATCH
NTSTATUS NTAPI IoReportDetectedDevice(_In_ PDRIVER_OBJECT DriverObject, _In_ INTERFACE_TYPE LegacyBusType, _In_ ULONG BusNumber, _In_ ULONG SlotNumber, _In_opt_ PCM_RESOURCE_LIST ResourceList, _In_opt_ PIO_RESOURCE_REQUIREMENTS_LIST ResourceRequirements, _In_ BOOLEAN ResourceAssigned, _Inout_ PDEVICE_OBJECT *DeviceObject)
#define FILE_DEVICE_CONTROLLER
#define IRP_MJ_DEVICE_CONTROL
struct _IO_SCSI_CAPABILITIES IO_SCSI_CAPABILITIES
DRIVER_DISPATCH ScsiPortDispatchPower
DRIVER_DISPATCH ScsiPortDispatchScsi
struct _SCSI_REQUEST_BLOCK_INFO * PSCSI_REQUEST_BLOCK_INFO
#define SCSI_PORT_TIMER_NEEDED
#define SCSI_PORT_NOTIFICATION_NEEDED
KSERVICE_ROUTINE ScsiPortIsr
DRIVER_STARTIO ScsiPortStartIo
KSYNCHRONIZE_ROUTINE ScsiPortStartPacket
#define SCSI_PORT_RESET_REQUEST
#define SCSI_PORT_DISABLE_INTERRUPTS
#define LUNEX_FROZEN_QUEUE
#define LUNEX_NEED_REQUEST_SENSE
#define SCSI_PORT_RESET_REPORTED
IO_DPC_ROUTINE ScsiPortDpcForIsr
struct _RESETBUS_PARAMS * PRESETBUS_PARAMS
_Check_return_ _CRTIMP int __cdecl _wcsnicmp(_In_reads_or_z_(_MaxCount) const wchar_t *_Str1, _In_reads_or_z_(_MaxCount) const wchar_t *_Str2, _In_ size_t _MaxCount)
enum _BUS_DATA_TYPE BUS_DATA_TYPE
_Must_inspect_result_ _In_ PVOID _In_ struct _HW_INITIALIZATION_DATA _In_ PVOID HwContext
_Must_inspect_result_ _In_ PVOID _In_ struct _HW_INITIALIZATION_DATA * HwInitializationData
enum _CONFIGURATION_TYPE CONFIGURATION_TYPE
#define KeAcquireSpinLockAtDpcLevel(SpinLock)
#define KeReleaseSpinLockFromDpcLevel(SpinLock)
PULONG MinorVersion OPTIONAL
NTSTATUS FdoStartAdapter(_In_ PSCSI_PORT_DEVICE_EXTENSION PortExtension)
VOID FdoScanAdapter(_In_ PSCSI_PORT_DEVICE_EXTENSION PortExtension)
NTSTATUS FdoDispatchPnp(_In_ PDEVICE_OBJECT DeviceObject, _Inout_ PIRP Irp)
NTSTATUS FdoCallHWInitialize(_In_ PSCSI_PORT_DEVICE_EXTENSION DeviceExtension)
Calls HwInitialize routine of the miniport and sets up interrupts Should be called inside ScsiPortIni...
NTSTATUS FdoRemoveAdapter(_In_ PSCSI_PORT_DEVICE_EXTENSION DeviceExtension)
PSCSI_REQUEST_BLOCK_INFO SpiGetSrbData(_In_ PSCSI_PORT_DEVICE_EXTENSION DeviceExtension, _In_ PSCSI_PORT_LUN_EXTENSION LunExtension, _In_ UCHAR QueueTag)
NTSTATUS PdoDispatchPnp(_In_ PDEVICE_OBJECT DeviceObject, _Inout_ PIRP Irp)
PSCSI_PORT_LUN_EXTENSION GetLunByPath(_In_ PSCSI_PORT_DEVICE_EXTENSION DeviceExtension, _In_ UCHAR PathId, _In_ UCHAR TargetId, _In_ UCHAR Lun)
PVOID MiniPortDeviceExtension
PHW_INITIALIZE HwInitialize
PADAPTER_OBJECT AdapterObject
PHW_INTERRUPT HwInterrupt
IO_SCSI_CAPABILITIES PortCapabilities
SCSI_PHYSICAL_ADDRESS RangeStart
CM_PARTIAL_RESOURCE_LIST PartialResourceList
struct _CM_PARTIAL_RESOURCE_DESCRIPTOR::@416::@421 Memory
struct _CM_PARTIAL_RESOURCE_DESCRIPTOR::@416::@418 Port
struct _CM_PARTIAL_RESOURCE_DESCRIPTOR::@416::@419 Interrupt
struct _CM_PARTIAL_RESOURCE_DESCRIPTOR::@416::@425 DeviceSpecificData
struct _CM_PARTIAL_RESOURCE_DESCRIPTOR::@416::@422 Dma
union _CM_PARTIAL_RESOURCE_DESCRIPTOR::@416 u
CM_PARTIAL_RESOURCE_DESCRIPTOR PartialDescriptors[1]
BOOLEAN DisableTaggedQueueing
PACCESS_RANGE AccessRanges
BOOLEAN DisableMultipleLun
ULONG AlignmentRequirement
PDRIVER_UNLOAD DriverUnload
BOOLEAN MultipleRequestPerLu
BOOLEAN NeedPhysicalAddresses
INTERFACE_TYPE AdapterInterfaceType
ULONG NumberOfAccessRanges
ULONG MaximumTransferLength
ULONG SupportedAsynchronousEvents
ULONG MaximumPhysicalPages
struct _IO_STACK_LOCATION::@4104::@4143 Others
PDEVICE_OBJECT DeviceObject
union _IO_STACK_LOCATION::@1611 Parameters
struct _LIST_ENTRY * Flink
struct _MAPPED_ADDRESS * NextMappedAddress
PSCSI_PORT_DEVICE_EXTENSION DeviceExtension
PDRIVER_OBJECT DriverObject
UNICODE_STRING RegistryPath
SCSI_PORT_COMMON_EXTENSION Common
SCSI_REQUEST_BLOCK_INFO SrbInfo
struct _SCSI_PORT_LUN_EXTENSION * CompletedAbortRequests
struct _SCSI_PORT_LUN_EXTENSION * ReadyLun
SCSI_SG_ADDRESS ScatterGatherList[MAX_SG_LIST]
ULONG NumberOfMapRegisters
struct _SCSI_REQUEST_BLOCK_INFO * CompletedRequests
PSCSI_SG_ADDRESS ScatterGather
PHYSICAL_ADDRESS PhysicalAddress
VOID NTAPI KeInitializeTimer(OUT PKTIMER Timer)
struct _LIST_ENTRY * PLIST_ENTRY
#define RtlCopyMemory(Destination, Source, Length)
#define RtlZeroMemory(Destination, Length)
#define RtlMoveMemory(Destination, Source, Length)
#define CONTAINING_RECORD(address, type, field)
#define STATUS_INSUFFICIENT_RESOURCES
#define ALIGN_UP(size, type)
#define ALIGN_UP_POINTER(ptr, type)
_In_ WDFCOLLECTION _In_ ULONG Index
_Must_inspect_result_ _In_ WDFDMAENABLER _In_ _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFCOMMONBUFFER * CommonBuffer
_In_ PDEVICE_OBJECT DeviceObject
_In_ WDF_SPECIAL_FILE_TYPE NotificationType
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG BufferLength
_In_ WDFDEVICE _In_ PPNP_BUS_INFORMATION BusInformation
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_opt_ PCUNICODE_STRING DeviceName
_Must_inspect_result_ _In_ WDFDMATRANSACTION _In_ PFN_WDF_PROGRAM_DMA _In_ WDF_DMA_DIRECTION _In_ PMDL _In_ PVOID VirtualAddress
_Must_inspect_result_ _In_ PWDF_DPC_CONFIG _In_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFDPC * Dpc
_Must_inspect_result_ _In_ PDRIVER_OBJECT _In_ PCUNICODE_STRING RegistryPath
_Must_inspect_result_ _In_ PDRIVER_OBJECT DriverObject
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID InterfaceType
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_INTERRUPT_CONFIG _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFINTERRUPT * Interrupt
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_ PCUNICODE_STRING DeviceDescription
_Must_inspect_result_ _In_ WDFIORESREQLIST _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFIORESLIST * ResourceList
_In_ WDFIORESREQLIST _In_ ULONG SlotNumber
void int int ULONGLONG int va_list * ap
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO
struct _CM_SCSI_DEVICE_DATA * PCM_SCSI_DEVICE_DATA
_IRQL_requires_same_ _In_opt_ PVOID Argument1
@ CmResourceShareDeviceExclusive
_In_opt_ PUNICODE_STRING _In_ PDRIVER_OBJECT _In_ PDEVICE_OBJECT _In_ INTERFACE_TYPE _In_ ULONG BusNumber
_In_opt_ PUNICODE_STRING _In_ PDRIVER_OBJECT _In_ PDEVICE_OBJECT _In_ INTERFACE_TYPE BusType
FORCEINLINE VOID IoInitializeDpcRequest(_In_ PDEVICE_OBJECT DeviceObject, _In_ PIO_DPC_ROUTINE DpcRoutine)
_In_ ULONG _In_ PHYSICAL_ADDRESS _Inout_ PULONG _Out_ PPHYSICAL_ADDRESS TranslatedAddress
FORCEINLINE VOID IoRequestDpc(_Inout_ PDEVICE_OBJECT DeviceObject, _In_opt_ PIRP Irp, _In_opt_ __drv_aliasesMem PVOID Context)
_In_ ULONG _In_ PHYSICAL_ADDRESS _Inout_ PULONG AddressSpace
_In_ PKSERVICE_ROUTINE _In_opt_ PVOID ServiceContext
#define PCI_INVALID_VENDORID
struct _DRIVER_OBJECT * PDRIVER_OBJECT
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS PhysicalAddress
#define DEVICE_DESCRIPTION_VERSION
_Inout_ struct _IRP _In_ PVOID MapRegisterBase
enum _IO_ALLOCATION_ACTION IO_ALLOCATION_ACTION
@ DeallocateObjectKeepRegisters
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS _Inout_ PLARGE_INTEGER NumberOfBytes
_In_opt_ PVOID _In_opt_ PVOID SystemArgument1
_In_opt_ PVOID _In_opt_ PVOID _In_opt_ PVOID SystemArgument2
#define ROUND_TO_PAGES(Size)
#define MmGetMdlVirtualAddress(_Mdl)
#define BYTES_TO_PAGES(Size)