21#define TAG_SCSIPORT 'ISCS'
29#define SCSI_PORT_DEVICE_BUSY 0x00001
30#define SCSI_PORT_LU_ACTIVE 0x00002
31#define SCSI_PORT_NOTIFICATION_NEEDED 0x00004
32#define SCSI_PORT_NEXT_REQUEST_READY 0x00008
33#define SCSI_PORT_FLUSH_ADAPTERS 0x00010
34#define SCSI_PORT_MAP_TRANSFER 0x00020
35#define SCSI_PORT_RESET 0x00080
36#define SCSI_PORT_RESET_REQUEST 0x00100
37#define SCSI_PORT_RESET_REPORTED 0x00200
38#define SCSI_PORT_REQUEST_PENDING 0x00800
39#define SCSI_PORT_DISCONNECT_ALLOWED 0x01000
40#define SCSI_PORT_DISABLE_INT_REQUESET 0x02000
41#define SCSI_PORT_DISABLE_INTERRUPTS 0x04000
42#define SCSI_PORT_ENABLE_INT_REQUEST 0x08000
43#define SCSI_PORT_TIMER_NEEDED 0x10000
46#define LUNEX_FROZEN_QUEUE 0x0001
47#define LUNEX_NEED_REQUEST_SENSE 0x0004
48#define LUNEX_BUSY 0x0008
49#define LUNEX_FULL_QUEUE 0x0010
50#define LUNEX_REQUEST_PENDING 0x0020
51#define SCSI_PORT_SCAN_IN_PROGRESS 0x8000
221#define ALIGNAS_PTR DECLSPEC_ALIGN(8)
223#define ALIGNAS_PTR DECLSPEC_ALIGN(4)
348 Irp->IoStatus.Information =
Size;
363 Irp->IoStatus.Information =
Size;
static PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(PIRP Irp)
_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
VOID(NTAPI * PHW_DMA_STARTED)(IN PVOID DeviceExtension)
BOOLEAN(NTAPI * PHW_INTERRUPT)(IN PVOID DeviceExtension)
VOID(NTAPI * PHW_TIMER)(IN PVOID DeviceExtension)
BOOLEAN(NTAPI * PHW_STARTIO)(IN PVOID DeviceExtension, IN PSCSI_REQUEST_BLOCK Srb)
BOOLEAN(NTAPI * PHW_RESET_BUS)(IN PVOID DeviceExtension, IN ULONG PathId)
BOOLEAN(NTAPI * PHW_INITIALIZE)(IN PVOID DeviceExtension)
DRIVER_DISPATCH(nfs41_FsdDispatch)
PPCI_DRIVER_EXTENSION DriverExtension
VOID SpiGetNextRequestFromLun(_In_ PSCSI_PORT_DEVICE_EXTENSION DeviceExtension, _Inout_ PSCSI_PORT_LUN_EXTENSION LunExtension, _Inout_opt_ PKIRQL OldIrql)
DRIVER_DISPATCH ScsiPortDispatchPower
DRIVER_DISPATCH ScsiPortDispatchScsi
struct _SCSI_PORT_COMMON_EXTENSION * PSCSI_PORT_COMMON_EXTENSION
IO_ALLOCATION_ACTION NTAPI SpiAdapterControl(_In_ PDEVICE_OBJECT DeviceObject, _In_ PIRP Irp, _In_ PVOID MapRegisterBase, _In_ PVOID Context)
struct _SCSI_PORT_DEVICE_EXTENSION SCSI_PORT_DEVICE_EXTENSION
VOID SpiInitOpenKeys(_Inout_ PCONFIGURATION_INFO ConfigInfo, _In_ PSCSI_PORT_DRIVER_EXTENSION DriverExtension)
struct _SCSI_PORT_LUN_EXTENSION * PSCSI_PORT_LUN_EXTENSION
enum _SCSI_PORT_TIMER_STATES SCSI_PORT_TIMER_STATES
struct _STORAGE_ADAPTER_DESCRIPTOR_WIN8 * PSTORAGE_ADAPTER_DESCRIPTOR_WIN8
struct _SCSI_REQUEST_BLOCK_INFO * PSCSI_REQUEST_BLOCK_INFO
struct _SCSI_PORT_SAVE_INTERRUPT SCSI_PORT_SAVE_INTERRUPT
KSERVICE_ROUTINE ScsiPortIsr
DRIVER_STARTIO ScsiPortStartIo
struct _SCSI_SG_ADDRESS SCSI_SG_ADDRESS
struct _SCSI_PORT_SAVE_INTERRUPT * PSCSI_PORT_SAVE_INTERRUPT
KSYNCHRONIZE_ROUTINE ScsiPortStartPacket
IO_ALLOCATION_ACTION NTAPI ScsiPortAllocateAdapterChannel(_In_ PDEVICE_OBJECT DeviceObject, _In_ PIRP Irp, _In_ PVOID MapRegisterBase, _In_ PVOID Context)
@ IDETimerResetWaitForDrdyAssert
@ IDETimerResetWaitForBusyNegate
NTSTATUS RegistryInitAdapterKey(_Inout_ PSCSI_PORT_DEVICE_EXTENSION DeviceExtension)
struct _SCSI_PORT_INTERRUPT_DATA SCSI_PORT_INTERRUPT_DATA
PDEVICE_OBJECT PdoCreateLunDevice(_In_ PSCSI_PORT_DEVICE_EXTENSION DeviceExtension)
struct _CONFIGURATION_INFO CONFIGURATION_INFO
NTSTATUS RegistryInitLunKey(_Inout_ PSCSI_PORT_LUN_EXTENSION LunExtension)
struct _SCSI_PORT_DEVICE_BASE SCSI_PORT_DEVICE_BASE
struct _SCSI_PORT_DEVICE_BASE * PSCSI_PORT_DEVICE_BASE
struct _SCSIPORT_DRIVER_EXTENSION SCSI_PORT_DRIVER_EXTENSION
FORCEINLINE BOOLEAN VerifyIrpInBufferSize(_In_ PIRP Irp, _In_ SIZE_T Size)
struct _SCSI_REQUEST_BLOCK_INFO SCSI_REQUEST_BLOCK_INFO
struct _SCSIPORT_DRIVER_EXTENSION * PSCSI_PORT_DRIVER_EXTENSION
struct _SCSI_BUS_INFO SCSI_BUS_INFO
IO_DPC_ROUTINE ScsiPortDpcForIsr
PSCSI_REQUEST_BLOCK_INFO SpiGetSrbData(_In_ PSCSI_PORT_DEVICE_EXTENSION DeviceExtension, _In_ PSCSI_PORT_LUN_EXTENSION LunExtension, _In_ UCHAR QueueTag)
struct _SCSI_BUS_INFO * PSCSI_BUS_INFO
FORCEINLINE BOOLEAN VerifyIrpOutBufferSize(_In_ PIRP Irp, _In_ SIZE_T Size)
NTSTATUS FdoDispatchPnp(_In_ PDEVICE_OBJECT DeviceObject, _Inout_ PIRP Irp)
NTSTATUS PdoDispatchPnp(_In_ PDEVICE_OBJECT DeviceObject, _Inout_ PIRP Irp)
struct _CONFIGURATION_INFO * PCONFIGURATION_INFO
struct _RESETBUS_PARAMS * PRESETBUS_PARAMS
struct _SCSI_SG_ADDRESS * PSCSI_SG_ADDRESS
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)
NTSTATUS FdoStartAdapter(_In_ PSCSI_PORT_DEVICE_EXTENSION DeviceExtension)
NTSTATUS NTAPI ScsiPortDeviceControl(_In_ PDEVICE_OBJECT DeviceObject, _In_ PIRP Irp)
struct _SCSI_PORT_DEVICE_EXTENSION * PSCSI_PORT_DEVICE_EXTENSION
PSCSI_PORT_LUN_EXTENSION GetLunByPath(_In_ PSCSI_PORT_DEVICE_EXTENSION DeviceExtension, _In_ UCHAR PathId, _In_ UCHAR TargetId, _In_ UCHAR Lun)
struct _SCSI_PORT_INTERRUPT_DATA * PSCSI_PORT_INTERRUPT_DATA
struct _STORAGE_ADAPTER_DESCRIPTOR_WIN8 STORAGE_ADAPTER_DESCRIPTOR_WIN8
struct _RESETBUS_PARAMS RESETBUS_PARAMS
VOID FdoScanAdapter(_In_ PSCSI_PORT_DEVICE_EXTENSION DeviceExtension)
struct _SCSI_PORT_COMMON_EXTENSION SCSI_PORT_COMMON_EXTENSION
struct _SCSI_PORT_LUN_EXTENSION SCSI_PORT_LUN_EXTENSION
BOOLEAN DisableTaggedQueueing
PACCESS_RANGE AccessRanges
BOOLEAN DisableMultipleLun
union _IO_STACK_LOCATION::@1581 Parameters
struct _IO_STACK_LOCATION::@1581::@1582 DeviceIoControl
PSCSI_PORT_DEVICE_EXTENSION DeviceExtension
PDRIVER_OBJECT DriverObject
UNICODE_STRING RegistryPath
PDEVICE_OBJECT LowerDevice
PDEVICE_OBJECT DeviceObject
SCSI_PHYSICAL_ADDRESS IoAddress
BOOLEAN SupportsAutoSense
BOOLEAN SupportsTaggedQueuing
ALIGNAS_PTR UCHAR MiniPortDeviceExtension[]
LONG ActiveRequestCounter
SCSI_PORT_TIMER_STATES TimerState
SENSE_DATA InternalSenseData
PHW_DMA_STARTED HwDmaStarted
SCSI_PORT_COMMON_EXTENSION Common
PPORT_CONFIGURATION_INFORMATION PortConfig
SCSI_PORT_INTERRUPT_DATA InterruptData
SCSI_REQUEST_BLOCK InternalSrb
PSCSI_REQUEST_BLOCK_INFO FreeSrbInfo
BOOLEAN NeedSrbExtensionAlloc
UNICODE_STRING DeviceName
UNICODE_STRING InterfaceName
IO_SCSI_CAPABILITIES PortCapabilities
PHW_INTERRUPT HwInterrupt
PHW_INITIALIZE HwInitialize
PMAPPED_ADDRESS MappedAddressList
ULONG MiniPortExtensionSize
PSCSI_REQUEST_BLOCK OriginalSrb
PHYSICAL_ADDRESS PhysicalAddress
PADAPTER_OBJECT AdapterObject
PCONTROLLER_OBJECT ControllerObject
PSCSI_REQUEST_BLOCK_INFO SrbInfo
BOOLEAN MultipleReqsPerLun
PSCSI_PORT_LUN_EXTENSION ReadyLun
PSCSI_PORT_LUN_EXTENSION CompletedAbort
PSCSI_REQUEST_BLOCK_INFO CompletedRequests
UCHAR MiniportLunExtension[1]
KDEVICE_QUEUE DeviceQueue
SCSI_PORT_COMMON_EXTENSION Common
SCSI_REQUEST_BLOCK_INFO SrbInfo
struct _SCSI_PORT_LUN_EXTENSION * CompletedAbortRequests
struct _SCSI_PORT_LUN_EXTENSION * ReadyLun
struct _SCSI_PORT_DEVICE_EXTENSION * DeviceExtension
PSCSI_PORT_INTERRUPT_DATA InterruptData
SCSI_SG_ADDRESS ScatterGatherList[MAX_SG_LIST]
ULONG NumberOfMapRegisters
struct _SCSI_REQUEST_BLOCK_INFO * CompletedRequests
PSCSI_SG_ADDRESS ScatterGather
PHYSICAL_ADDRESS PhysicalAddress
BOOLEAN AcceleratedTransfer
ULONG MaximumPhysicalPages
ULONG MaximumTransferLength
_In_ PDEVICE_OBJECT DeviceObject
_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
_Inout_ struct _IRP _In_ PVOID MapRegisterBase
enum _IO_ALLOCATION_ACTION IO_ALLOCATION_ACTION
_Requires_lock_held_ Interrupt _Releases_lock_ Interrupt _In_ _IRQL_restores_ KIRQL OldIrql