29 DPRINT1(
"InitializeConfiguration(%p %p %lu %lu)\n",
40 PortConfig->SystemIoBusNumber =
BusNumber;
42 PortConfig->AdapterInterfaceType = InitData->AdapterInterfaceType;
50 PortConfig->Master =
TRUE;
53 PortConfig->Dma32BitAddresses =
TRUE;
54 PortConfig->DemandMode =
FALSE;
55 PortConfig->MapBuffers = InitData->MapBuffers;
57 PortConfig->NeedPhysicalAddresses =
TRUE;
58 PortConfig->TaggedQueuing =
TRUE;
59 PortConfig->AutoRequestSense =
TRUE;
60 PortConfig->MultipleRequestPerLu =
TRUE;
61 PortConfig->ReceiveEvent = InitData->ReceiveEvent;
62 PortConfig->RealModeInitialized =
FALSE;
63 PortConfig->BufferAccessScsiPortControlled =
TRUE;
66 PortConfig->SpecificLuExtensionSize = InitData->SpecificLuExtensionSize;
67 PortConfig->SrbExtensionSize = InitData->SrbExtensionSize;
69 PortConfig->WmiDataProvider =
TRUE;
71 PortConfig->NumberOfAccessRanges = InitData->NumberOfAccessRanges;
72 DPRINT1(
"NumberOfAccessRanges: %lu\n", PortConfig->NumberOfAccessRanges);
73 if (PortConfig->NumberOfAccessRanges != 0)
78 if (PortConfig->AccessRanges ==
NULL)
82 PortConfig->NumberOfAccessRanges *
sizeof(
ACCESS_RANGE));
108 DPRINT1(
"AssignResourceToConfiguration(%p %p %lu)\n",
116 for (
j = 0;
j < PartialResourceList->
Count;
j++)
120 switch (PartialDescriptor->
Type)
123 DPRINT1(
"Port: 0x%I64x (0x%lx)\n",
124 PartialDescriptor->
u.
Port.Start.QuadPart,
125 PartialDescriptor->
u.
Port.Length);
126 if (RangeNumber < NumberOfAccessRanges)
128 AccessRange = &((*(PortConfiguration->AccessRanges))[RangeNumber]);
137 DPRINT1(
"Memory: 0x%I64x (0x%lx)\n",
138 PartialDescriptor->
u.
Memory.Start.QuadPart,
139 PartialDescriptor->
u.
Memory.Length);
140 if (RangeNumber < NumberOfAccessRanges)
142 AccessRange = &((*(PortConfiguration->AccessRanges))[RangeNumber]);
151 DPRINT1(
"Interrupt: Level %lu Vector %lu\n",
157 PortConfiguration->BusInterruptLevel = PartialDescriptor->
u.
Interrupt.Level;
158 PortConfiguration->BusInterruptVector = PartialDescriptor->
u.
Interrupt.Vector;
163 PortConfiguration->InterruptMode =
Latched;
173 PortConfiguration->BusInterruptLevel2 = PartialDescriptor->
u.
Interrupt.Level;
174 PortConfiguration->BusInterruptVector2 = PartialDescriptor->
u.
Interrupt.Vector;
179 PortConfiguration->InterruptMode2 =
Latched;
190 DPRINT1(
"Dma: Channel: %lu Port: %lu\n",
191 PartialDescriptor->
u.
Dma.Channel,
192 PartialDescriptor->
u.
Dma.Port);
195 PortConfiguration->DmaChannel = PartialDescriptor->
u.
Dma.Channel;
196 PortConfiguration->DmaPort = PartialDescriptor->
u.
Dma.Port;
208 PortConfiguration->DmaChannel2 = PartialDescriptor->
u.
Dma.Channel;
209 PortConfiguration->DmaPort2 = PartialDescriptor->
u.
Dma.Port;
245 DPRINT1(
"MiniportInitialize(%p %p %p)\n",
246 Miniport, DeviceExtension, InitData);
248 Miniport->DeviceExtension = DeviceExtension;
249 Miniport->InitData = InitData;
253 Miniport->InitData->DeviceExtensionSize;
259 if (MiniportExtension ==
NULL)
264 MiniportExtension->
Miniport = Miniport;
265 Miniport->MiniportExtension = MiniportExtension;
270 DeviceExtension->BusNumber,
271 DeviceExtension->SlotNumber);
277 DeviceExtension->AllocatedResources,
278 InitData->NumberOfAccessRanges);
292 DPRINT1(
"MiniportFindAdapter(%p)\n", Miniport);
295 Result = Miniport->InitData->HwFindAdapter(&Miniport->MiniportExtension->HwDeviceExtension,
299 &Miniport->PortConfig,
307 DPRINT1(
"SP_RETURN_NOT_FOUND\n");
322 DPRINT1(
"SP_RETURN_BAD_CONFIG\n");
342 DPRINT1(
"MiniportHwInitialize(%p)\n", Miniport);
345 Result = Miniport->InitData->HwInitialize(&Miniport->MiniportExtension->HwDeviceExtension);
358 DPRINT1(
"MiniportHwInterrupt(%p)\n",
361 Result = Miniport->InitData->HwInterrupt(&Miniport->MiniportExtension->HwDeviceExtension);
375 DPRINT1(
"MiniportHwStartIo(%p %p)\n",
378 Result = Miniport->InitData->HwStartIo(&Miniport->MiniportExtension->HwDeviceExtension,
Srb);
_In_ PSCSI_REQUEST_BLOCK Srb
#define NT_SUCCESS(StatCode)
#define SCSI_MAXIMUM_TARGETS_PER_BUS
#define SCSI_MAXIMUM_LOGICAL_UNITS
struct _PORT_CONFIGURATION_INFORMATION PORT_CONFIGURATION_INFORMATION
#define SP_RETURN_BAD_CONFIG
#define SP_RETURN_NOT_FOUND
#define SP_UNINITIALIZED_VALUE
#define TAG_ACCRESS_RANGE
#define TAG_MINIPORT_DATA
struct _MINIPORT_DEVICE_EXTENSION MINIPORT_DEVICE_EXTENSION
#define ExAllocatePoolWithTag(hernya, size, tag)
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
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 GLint GLint j
struct _CM_FULL_RESOURCE_DESCRIPTOR * PCM_FULL_RESOURCE_DESCRIPTOR
#define CmResourceTypeMemory
#define CmResourceTypeDma
#define CmResourceTypePort
#define CmResourceTypeInterrupt
PCONFIGURATION_INFORMATION NTAPI IoGetConfigurationInformation(VOID)
Returns a pointer to the I/O manager's global configuration information structure.
#define CM_RESOURCE_DMA_8_AND_16
#define CM_RESOURCE_DMA_8
#define CM_RESOURCE_INTERRUPT_LEVEL_SENSITIVE
#define CM_RESOURCE_DMA_32
#define CM_RESOURCE_DMA_16
#define CM_RESOURCE_INTERRUPT_LATCHED
#define STATUS_INTERNAL_ERROR
#define STATUS_DEVICE_CONFIGURATION_ERROR
#define STATUS_ADAPTER_HARDWARE_ERROR
static VOID AssignResourcesToConfiguration(_In_ PPORT_CONFIGURATION_INFORMATION PortConfiguration, _In_ PCM_RESOURCE_LIST ResourceList, _In_ ULONG NumberOfAccessRanges)
NTSTATUS MiniportFindAdapter(_In_ PMINIPORT Miniport)
BOOLEAN MiniportHwInterrupt(_In_ PMINIPORT Miniport)
NTSTATUS MiniportInitialize(_In_ PMINIPORT Miniport, _In_ PFDO_DEVICE_EXTENSION DeviceExtension, _In_ PHW_INITIALIZATION_DATA InitData)
BOOLEAN MiniportStartIo(_In_ PMINIPORT Miniport, _In_ PSCSI_REQUEST_BLOCK Srb)
static NTSTATUS InitializeConfiguration(_In_ PPORT_CONFIGURATION_INFORMATION PortConfig, _In_ PHW_INITIALIZATION_DATA InitData, _In_ ULONG BusNumber, _In_ ULONG SlotNumber)
NTSTATUS MiniportHwInitialize(_In_ PMINIPORT Miniport)
SCSI_PHYSICAL_ADDRESS RangeStart
CM_PARTIAL_RESOURCE_LIST PartialResourceList
struct _CM_PARTIAL_RESOURCE_DESCRIPTOR::@391::@393 Port
struct _CM_PARTIAL_RESOURCE_DESCRIPTOR::@391::@396 Memory
union _CM_PARTIAL_RESOURCE_DESCRIPTOR::@391 u
struct _CM_PARTIAL_RESOURCE_DESCRIPTOR::@391::@394 Interrupt
struct _CM_PARTIAL_RESOURCE_DESCRIPTOR::@391::@397 Dma
CM_PARTIAL_RESOURCE_DESCRIPTOR PartialDescriptors[1]
struct _MINIPORT * Miniport
#define RtlZeroMemory(Destination, Length)
#define STATUS_UNSUCCESSFUL
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_INTERRUPT_CONFIG _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFINTERRUPT * Interrupt
_Must_inspect_result_ _In_ WDFIORESREQLIST _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFIORESLIST * ResourceList
_In_ WDFIORESREQLIST _In_ ULONG SlotNumber
_Reserved_ PVOID Reserved
_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
_In_opt_ PUNICODE_STRING _In_ PDRIVER_OBJECT _In_ PDEVICE_OBJECT _In_ INTERFACE_TYPE _In_ ULONG BusNumber