ReactOS  0.4.15-dev-4614-ga5a6101
srb.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _ACCESS_RANGE
 
struct  _PORT_CONFIGURATION_INFORMATION
 
struct  _PORT_CONFIGURATION_INFORMATION_NT
 
struct  _PORT_CONFIGURATION_INFORMATION_2K
 
struct  _PORT_CONFIGURATION_INFORMATION_COMMON
 
struct  _SCSI_SUPPORTED_CONTROL_TYPE_LIST
 
struct  _SCSI_REQUEST_BLOCK
 
struct  _SCSI_WMI_REQUEST_BLOCK
 
struct  _HW_INITIALIZATION_DATA
 
struct  _HW_INITIALIZATION_DATA_2K
 
struct  _HW_INITIALIZATION_DATA_COMMON
 

Macros

#define SCSI_MAXIMUM_LOGICAL_UNITS   8
 
#define SCSI_MAXIMUM_TARGETS_PER_BUS   128
 
#define SCSI_MAXIMUM_LUNS_PER_TARGET   255
 
#define SCSI_MAXIMUM_BUSES   8
 
#define SCSI_MINIMUM_PHYSICAL_BREAKS   16
 
#define SCSI_MAXIMUM_PHYSICAL_BREAKS   255
 
#define SCSI_MAXIMUM_TARGETS   8
 
#define MAXIMUM_CDB_SIZE   12
 
#define CONFIG_INFO_VERSION_2   sizeof(PORT_CONFIGURATION_INFORMATION)
 
#define SCSI_DMA64_SYSTEM_SUPPORTED   0x80
 
#define SCSI_DMA64_MINIPORT_SUPPORTED   0x01
 
#define SP_UNINITIALIZED_VALUE   ((ULONG) ~0)
 
#define SP_UNTAGGED   ((UCHAR) ~0)
 
#define SRBEV_BUS_RESET   0x0001
 
#define SRBEV_SCSI_ASYNC_NOTIFICATION   0x0002
 
#define SCSI_REQUEST_BLOCK_SIZE   sizeof(SCSI_REQUEST_BLOCK)
 
#define SRB_FUNCTION_EXECUTE_SCSI   0x00
 
#define SRB_FUNCTION_CLAIM_DEVICE   0x01
 
#define SRB_FUNCTION_IO_CONTROL   0x02
 
#define SRB_FUNCTION_RECEIVE_EVENT   0x03
 
#define SRB_FUNCTION_RELEASE_QUEUE   0x04
 
#define SRB_FUNCTION_ATTACH_DEVICE   0x05
 
#define SRB_FUNCTION_RELEASE_DEVICE   0x06
 
#define SRB_FUNCTION_SHUTDOWN   0x07
 
#define SRB_FUNCTION_FLUSH   0x08
 
#define SRB_FUNCTION_ABORT_COMMAND   0x10
 
#define SRB_FUNCTION_RELEASE_RECOVERY   0x11
 
#define SRB_FUNCTION_RESET_BUS   0x12
 
#define SRB_FUNCTION_RESET_DEVICE   0x13
 
#define SRB_FUNCTION_TERMINATE_IO   0x14
 
#define SRB_FUNCTION_FLUSH_QUEUE   0x15
 
#define SRB_FUNCTION_REMOVE_DEVICE   0x16
 
#define SRB_FUNCTION_WMI   0x17
 
#define SRB_FUNCTION_LOCK_QUEUE   0x18
 
#define SRB_FUNCTION_UNLOCK_QUEUE   0x19
 
#define SRB_FUNCTION_RESET_LOGICAL_UNIT   0x20
 
#define SRB_STATUS_PENDING   0x00
 
#define SRB_STATUS_SUCCESS   0x01
 
#define SRB_STATUS_ABORTED   0x02
 
#define SRB_STATUS_ABORT_FAILED   0x03
 
#define SRB_STATUS_ERROR   0x04
 
#define SRB_STATUS_BUSY   0x05
 
#define SRB_STATUS_INVALID_REQUEST   0x06
 
#define SRB_STATUS_INVALID_PATH_ID   0x07
 
#define SRB_STATUS_NO_DEVICE   0x08
 
#define SRB_STATUS_TIMEOUT   0x09
 
#define SRB_STATUS_SELECTION_TIMEOUT   0x0A
 
#define SRB_STATUS_COMMAND_TIMEOUT   0x0B
 
#define SRB_STATUS_MESSAGE_REJECTED   0x0D
 
#define SRB_STATUS_BUS_RESET   0x0E
 
#define SRB_STATUS_PARITY_ERROR   0x0F
 
#define SRB_STATUS_REQUEST_SENSE_FAILED   0x10
 
#define SRB_STATUS_NO_HBA   0x11
 
#define SRB_STATUS_DATA_OVERRUN   0x12
 
#define SRB_STATUS_UNEXPECTED_BUS_FREE   0x13
 
#define SRB_STATUS_PHASE_SEQUENCE_FAILURE   0x14
 
#define SRB_STATUS_BAD_SRB_BLOCK_LENGTH   0x15
 
#define SRB_STATUS_REQUEST_FLUSHED   0x16
 
#define SRB_STATUS_INVALID_LUN   0x20
 
#define SRB_STATUS_INVALID_TARGET_ID   0x21
 
#define SRB_STATUS_BAD_FUNCTION   0x22
 
#define SRB_STATUS_ERROR_RECOVERY   0x23
 
#define SRB_STATUS_NOT_POWERED   0x24
 
#define SRB_STATUS_INTERNAL_ERROR   0x30
 
#define SRB_STATUS_QUEUE_FROZEN   0x40
 
#define SRB_STATUS_AUTOSENSE_VALID   0x80
 
#define SRB_STATUS(Status)   (Status & ~(SRB_STATUS_AUTOSENSE_VALID | SRB_STATUS_QUEUE_FROZEN))
 
#define SRB_FLAGS_QUEUE_ACTION_ENABLE   0x00000002
 
#define SRB_FLAGS_DISABLE_DISCONNECT   0x00000004
 
#define SRB_FLAGS_DISABLE_SYNCH_TRANSFER   0x00000008
 
#define SRB_FLAGS_BYPASS_FROZEN_QUEUE   0x00000010
 
#define SRB_FLAGS_DISABLE_AUTOSENSE   0x00000020
 
#define SRB_FLAGS_DATA_IN   0x00000040
 
#define SRB_FLAGS_DATA_OUT   0x00000080
 
#define SRB_FLAGS_NO_DATA_TRANSFER   0x00000000
 
#define SRB_FLAGS_UNSPECIFIED_DIRECTION   (SRB_FLAGS_DATA_IN | SRB_FLAGS_DATA_OUT)
 
#define SRB_FLAGS_NO_QUEUE_FREEZE   0x00000100
 
#define SRB_FLAGS_ADAPTER_CACHE_ENABLE   0x00000200
 
#define SRB_FLAGS_FREE_SENSE_BUFFER   0x00000400
 
#define SRB_FLAGS_IS_ACTIVE   0x00010000
 
#define SRB_FLAGS_ALLOCATED_FROM_ZONE   0x00020000
 
#define SRB_FLAGS_SGLIST_FROM_POOL   0x00040000
 
#define SRB_FLAGS_BYPASS_LOCKED_QUEUE   0x00080000
 
#define SRB_FLAGS_NO_KEEP_AWAKE   0x00100000
 
#define SRB_FLAGS_PORT_DRIVER_ALLOCSENSE   0x00200000
 
#define SRB_FLAGS_PORT_DRIVER_SENSEHASPORT   0x00400000
 
#define SRB_FLAGS_DONT_START_NEXT_PACKET   0x00800000
 
#define SRB_FLAGS_PORT_DRIVER_RESERVED   0x0F000000
 
#define SRB_FLAGS_CLASS_DRIVER_RESERVED   0xF0000000
 
#define SRB_SIMPLE_TAG_REQUEST   0x20
 
#define SRB_HEAD_OF_QUEUE_TAG_REQUEST   0x21
 
#define SRB_ORDERED_QUEUE_TAG_REQUEST   0x22
 
#define SRB_WMI_FLAGS_ADAPTER_REQUEST   0x01
 
#define SP_BUS_PARITY_ERROR   0x0001
 
#define SP_UNEXPECTED_DISCONNECT   0x0002
 
#define SP_INVALID_RESELECTION   0x0003
 
#define SP_BUS_TIME_OUT   0x0004
 
#define SP_PROTOCOL_ERROR   0x0005
 
#define SP_INTERNAL_ADAPTER_ERROR   0x0006
 
#define SP_REQUEST_TIMEOUT   0x0007
 
#define SP_IRQ_NOT_RESPONDING   0x0008
 
#define SP_BAD_FW_WARNING   0x0009
 
#define SP_BAD_FW_ERROR   0x000a
 
#define SP_LOST_WMI_MINIPORT_REQUEST   0x000b
 
#define SP_RETURN_NOT_FOUND   0
 
#define SP_RETURN_FOUND   1
 
#define SP_RETURN_ERROR   2
 
#define SP_RETURN_BAD_CONFIG   3
 
#define SCSIPORT_API   DECLSPEC_IMPORT
 
#define ScsiPortConvertPhysicalAddressToUlong(Address)   ((Address).LowPart)
 

Typedefs

typedef PHYSICAL_ADDRESS SCSI_PHYSICAL_ADDRESS
 
typedef PHYSICAL_ADDRESSPSCSI_PHYSICAL_ADDRESS
 
typedef struct _ACCESS_RANGE ACCESS_RANGE
 
typedef struct _ACCESS_RANGEPACCESS_RANGE
 
typedef struct _PORT_CONFIGURATION_INFORMATION PORT_CONFIGURATION_INFORMATION
 
typedef struct _PORT_CONFIGURATION_INFORMATIONPPORT_CONFIGURATION_INFORMATION
 
typedef struct _PORT_CONFIGURATION_INFORMATION_NT PORT_CONFIGURATION_INFORMATION_NT
 
typedef struct _PORT_CONFIGURATION_INFORMATION_NTPPORT_CONFIGURATION_INFORMATION_NT
 
typedef struct _PORT_CONFIGURATION_INFORMATION_2K PORT_CONFIGURATION_INFORMATION_2K
 
typedef struct _PORT_CONFIGURATION_INFORMATION_2KPPORT_CONFIGURATION_INFORMATION_2K
 
typedef struct _PORT_CONFIGURATION_INFORMATION_COMMON PORT_CONFIGURATION_INFORMATION_COMMON
 
typedef struct _PORT_CONFIGURATION_INFORMATION_COMMONPPORT_CONFIGURATION_INFORMATION_COMMON
 
typedef enum _SCSI_ADAPTER_CONTROL_TYPE SCSI_ADAPTER_CONTROL_TYPE
 
typedef enum _SCSI_ADAPTER_CONTROL_TYPEPSCSI_ADAPTER_CONTROL_TYPE
 
typedef enum _SCSI_ADAPTER_CONTROL_STATUS SCSI_ADAPTER_CONTROL_STATUS
 
typedef enum _SCSI_ADAPTER_CONTROL_STATUSPSCSI_ADAPTER_CONTROL_STATUS
 
typedef struct _SCSI_SUPPORTED_CONTROL_TYPE_LIST SCSI_SUPPORTED_CONTROL_TYPE_LIST
 
typedef struct _SCSI_SUPPORTED_CONTROL_TYPE_LISTPSCSI_SUPPORTED_CONTROL_TYPE_LIST
 
typedef struct _SCSI_REQUEST_BLOCK SCSI_REQUEST_BLOCK
 
typedef struct _SCSI_REQUEST_BLOCKPSCSI_REQUEST_BLOCK
 
typedef struct _SCSI_WMI_REQUEST_BLOCK SCSI_WMI_REQUEST_BLOCK
 
typedef struct _SCSI_WMI_REQUEST_BLOCKPSCSI_WMI_REQUEST_BLOCK
 
typedef BOOLEAN(NTAPIPHW_INITIALIZE) (IN PVOID DeviceExtension)
 
typedef BOOLEAN(NTAPIPHW_STARTIO) (IN PVOID DeviceExtension, IN PSCSI_REQUEST_BLOCK Srb)
 
typedef BOOLEAN(NTAPIPHW_INTERRUPT) (IN PVOID DeviceExtension)
 
typedef VOID(NTAPIPHW_TIMER) (IN PVOID DeviceExtension)
 
typedef VOID(NTAPIPHW_DMA_STARTED) (IN PVOID DeviceExtension)
 
typedef ULONG(NTAPIPHW_FIND_ADAPTER) (IN PVOID DeviceExtension, IN PVOID HwContext, IN PVOID BusInformation, IN PCHAR ArgumentString, IN OUT PPORT_CONFIGURATION_INFORMATION ConfigInfo, OUT PBOOLEAN Again)
 
typedef BOOLEAN(NTAPIPHW_RESET_BUS) (IN PVOID DeviceExtension, IN ULONG PathId)
 
typedef BOOLEAN(NTAPIPHW_ADAPTER_STATE) (IN PVOID DeviceExtension, IN PVOID Context, IN BOOLEAN SaveState)
 
typedef SCSI_ADAPTER_CONTROL_STATUS(NTAPIPHW_ADAPTER_CONTROL) (IN PVOID DeviceExtension, IN SCSI_ADAPTER_CONTROL_TYPE ControlType, IN PVOID Parameters)
 
typedef enum _SCSI_NOTIFICATION_TYPE SCSI_NOTIFICATION_TYPE
 
typedef enum _SCSI_NOTIFICATION_TYPEPSCSI_NOTIFICATION_TYPE
 
typedef struct _HW_INITIALIZATION_DATA HW_INITIALIZATION_DATA
 
typedef struct _HW_INITIALIZATION_DATAPHW_INITIALIZATION_DATA
 
typedef struct _HW_INITIALIZATION_DATA_2K HW_INITIALIZATION_DATA_2K
 
typedef struct _HW_INITIALIZATION_DATA_2KPHW_INITIALIZATION_DATA_2K
 
typedef struct _HW_INITIALIZATION_DATA_COMMON HW_INITIALIZATION_DATA_COMMON
 
typedef struct _HW_INITIALIZATION_DATA_COMMONPHW_INITIALIZATION_DATA_COMMON
 

Enumerations

enum  _SCSI_ADAPTER_CONTROL_TYPE {
  ScsiQuerySupportedControlTypes = 0, ScsiStopAdapter, ScsiRestartAdapter, ScsiSetBootConfig,
  ScsiSetRunningConfig, ScsiAdapterControlMax, MakeAdapterControlTypeSizeOfUlong = 0xffffffff, ScsiQuerySupportedControlTypes = 0,
  ScsiStopAdapter, ScsiRestartAdapter, ScsiSetBootConfig, ScsiSetRunningConfig,
  ScsiAdapterControlMax, MakeAdapterControlTypeSizeOfUlong = 0xffffffff, ScsiQuerySupportedControlTypes = 0, ScsiStopAdapter,
  ScsiRestartAdapter, ScsiSetBootConfig, ScsiSetRunningConfig, ScsiAdapterControlMax,
  MakeAdapterControlTypeSizeOfUlong = 0xffffffff
}
 
enum  _SCSI_ADAPTER_CONTROL_STATUS {
  ScsiAdapterControlSuccess = 0, ScsiAdapterControlUnsuccessful, ScsiAdapterControlSuccess = 0, ScsiAdapterControlUnsuccessful,
  ScsiAdapterControlSuccess = 0, ScsiAdapterControlUnsuccessful
}
 
enum  _SCSI_NOTIFICATION_TYPE {
  RequestComplete, NextRequest, NextLuRequest, ResetDetected,
  CallDisableInterrupts, CallEnableInterrupts, RequestTimerCall, BusChangeDetected,
  WMIEvent, WMIReregister, RequestComplete, NextRequest,
  NextLuRequest, ResetDetected, CallDisableInterrupts, CallEnableInterrupts,
  RequestTimerCall, BusChangeDetected, WMIEvent, WMIReregister,
  LinkUp, LinkDown, QueryTickCount, BufferOverrunDetected,
  TraceNotification, RequestComplete, NextRequest, NextLuRequest,
  ResetDetected, _obsolete1, _obsolete2, RequestTimerCall,
  BusChangeDetected, WMIEvent, WMIReregister, LinkUp,
  LinkDown, QueryTickCount, BufferOverrunDetected, TraceNotification,
  GetExtendedFunctionTable, EnablePassiveInitialization = 0x1000, InitializeDpc, IssueDpc,
  AcquireSpinLock, ReleaseSpinLock
}
 

Functions

SCSIPORT_API ULONG NTAPI ScsiPortInitialize (IN PVOID Argument1, IN PVOID Argument2, IN struct _HW_INITIALIZATION_DATA *HwInitializationData, IN PVOID HwContext)
 
SCSIPORT_API VOID NTAPI ScsiPortFreeDeviceBase (IN PVOID HwDeviceExtension, IN PVOID MappedAddress)
 
SCSIPORT_API ULONG NTAPI ScsiPortGetBusData (IN PVOID DeviceExtension, IN ULONG BusDataType, IN ULONG SystemIoBusNumber, IN ULONG SlotNumber, IN PVOID Buffer, IN ULONG Length)
 
SCSIPORT_API ULONG NTAPI ScsiPortSetBusDataByOffset (IN PVOID DeviceExtension, IN ULONG BusDataType, IN ULONG SystemIoBusNumber, IN ULONG SlotNumber, IN PVOID Buffer, IN ULONG Offset, IN ULONG Length)
 
SCSIPORT_API PVOID NTAPI ScsiPortGetDeviceBase (IN PVOID HwDeviceExtension, IN INTERFACE_TYPE BusType, IN ULONG SystemIoBusNumber, IN SCSI_PHYSICAL_ADDRESS IoAddress, IN ULONG NumberOfBytes, IN BOOLEAN InIoSpace)
 
SCSIPORT_API PVOID NTAPI ScsiPortGetLogicalUnit (IN PVOID HwDeviceExtension, IN UCHAR PathId, IN UCHAR TargetId, IN UCHAR Lun)
 
SCSIPORT_API PSCSI_REQUEST_BLOCK NTAPI ScsiPortGetSrb (IN PVOID DeviceExtension, IN UCHAR PathId, IN UCHAR TargetId, IN UCHAR Lun, IN LONG QueueTag)
 
SCSIPORT_API SCSI_PHYSICAL_ADDRESS NTAPI ScsiPortGetPhysicalAddress (IN PVOID HwDeviceExtension, IN PSCSI_REQUEST_BLOCK Srb, IN PVOID VirtualAddress, OUT ULONG *Length)
 
SCSIPORT_API PVOID NTAPI ScsiPortGetVirtualAddress (IN PVOID HwDeviceExtension, IN SCSI_PHYSICAL_ADDRESS PhysicalAddress)
 
SCSIPORT_API PVOID NTAPI ScsiPortGetUncachedExtension (IN PVOID HwDeviceExtension, IN PPORT_CONFIGURATION_INFORMATION ConfigInfo, IN ULONG NumberOfBytes)
 
SCSIPORT_API VOID NTAPI ScsiPortFlushDma (IN PVOID DeviceExtension)
 
SCSIPORT_API VOID NTAPI ScsiPortIoMapTransfer (IN PVOID HwDeviceExtension, IN PSCSI_REQUEST_BLOCK Srb, IN PVOID LogicalAddress, IN ULONG Length)
 
SCSIPORT_API VOID __cdecl ScsiPortNotification (IN SCSI_NOTIFICATION_TYPE NotificationType, IN PVOID HwDeviceExtension,...)
 
SCSIPORT_API 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)
 
SCSIPORT_API VOID NTAPI ScsiPortCompleteRequest (IN PVOID HwDeviceExtension, IN UCHAR PathId, IN UCHAR TargetId, IN UCHAR Lun, IN UCHAR SrbStatus)
 
SCSIPORT_API VOID NTAPI ScsiPortMoveMemory (IN PVOID WriteBuffer, IN PVOID ReadBuffer, IN ULONG Length)
 
SCSIPORT_API UCHAR NTAPI ScsiPortReadPortUchar (IN PUCHAR Port)
 
SCSIPORT_API USHORT NTAPI ScsiPortReadPortUshort (IN PUSHORT Port)
 
SCSIPORT_API ULONG NTAPI ScsiPortReadPortUlong (IN PULONG Port)
 
SCSIPORT_API VOID NTAPI ScsiPortReadPortBufferUchar (IN PUCHAR Port, IN PUCHAR Buffer, IN ULONG Count)
 
SCSIPORT_API VOID NTAPI ScsiPortReadPortBufferUshort (IN PUSHORT Port, IN PUSHORT Buffer, IN ULONG Count)
 
SCSIPORT_API VOID NTAPI ScsiPortReadPortBufferUlong (IN PULONG Port, IN PULONG Buffer, IN ULONG Count)
 
SCSIPORT_API UCHAR NTAPI ScsiPortReadRegisterUchar (IN PUCHAR Register)
 
SCSIPORT_API USHORT NTAPI ScsiPortReadRegisterUshort (IN PUSHORT Register)
 
SCSIPORT_API ULONG NTAPI ScsiPortReadRegisterUlong (IN PULONG Register)
 
SCSIPORT_API VOID NTAPI ScsiPortReadRegisterBufferUchar (IN PUCHAR Register, IN PUCHAR Buffer, IN ULONG Count)
 
SCSIPORT_API VOID NTAPI ScsiPortReadRegisterBufferUshort (IN PUSHORT Register, IN PUSHORT Buffer, IN ULONG Count)
 
SCSIPORT_API VOID NTAPI ScsiPortReadRegisterBufferUlong (IN PULONG Register, IN PULONG Buffer, IN ULONG Count)
 
SCSIPORT_API VOID NTAPI ScsiPortStallExecution (IN ULONG Delay)
 
SCSIPORT_API VOID NTAPI ScsiPortWritePortUchar (IN PUCHAR Port, IN UCHAR Value)
 
SCSIPORT_API VOID NTAPI ScsiPortWritePortUshort (IN PUSHORT Port, IN USHORT Value)
 
SCSIPORT_API VOID NTAPI ScsiPortWritePortUlong (IN PULONG Port, IN ULONG Value)
 
SCSIPORT_API VOID NTAPI ScsiPortWritePortBufferUchar (IN PUCHAR Port, IN PUCHAR Buffer, IN ULONG Count)
 
SCSIPORT_API VOID NTAPI ScsiPortWritePortBufferUshort (IN PUSHORT Port, IN PUSHORT Buffer, IN ULONG Count)
 
SCSIPORT_API VOID NTAPI ScsiPortWritePortBufferUlong (IN PULONG Port, IN PULONG Buffer, IN ULONG Count)
 
SCSIPORT_API VOID NTAPI ScsiPortWriteRegisterUchar (IN PUCHAR Register, IN UCHAR Value)
 
SCSIPORT_API VOID NTAPI ScsiPortWriteRegisterUshort (IN PUSHORT Register, IN USHORT Value)
 
SCSIPORT_API VOID NTAPI ScsiPortWriteRegisterUlong (IN PULONG Register, IN ULONG Value)
 
SCSIPORT_API VOID NTAPI ScsiPortWriteRegisterBufferUchar (IN PUCHAR Register, IN PUCHAR Buffer, IN ULONG Count)
 
SCSIPORT_API VOID NTAPI ScsiPortWriteRegisterBufferUshort (IN PUSHORT Register, IN PUSHORT Buffer, IN ULONG Count)
 
SCSIPORT_API VOID NTAPI ScsiPortWriteRegisterBufferUlong (IN PULONG Register, IN PULONG Buffer, IN ULONG Count)
 
SCSIPORT_API SCSI_PHYSICAL_ADDRESS NTAPI ScsiPortConvertUlongToPhysicalAddress (ULONG UlongAddress)
 
SCSIPORT_API ULONG NTAPI ScsiPortConvertPhysicalAddressToUlong (SCSI_PHYSICAL_ADDRESS Address)
 
SCSIPORT_API BOOLEAN NTAPI ScsiPortValidateRange (IN PVOID HwDeviceExtension, IN INTERFACE_TYPE BusType, IN ULONG SystemIoBusNumber, IN SCSI_PHYSICAL_ADDRESS IoAddress, IN ULONG NumberOfBytes, IN BOOLEAN InIoSpace)
 
SCSIPORT_API VOID __cdecl ScsiDebugPrint (ULONG DebugPrintLevel, PCCHAR DebugMessage,...)
 

Macro Definition Documentation

◆ CONFIG_INFO_VERSION_2

#define CONFIG_INFO_VERSION_2   sizeof(PORT_CONFIGURATION_INFORMATION)

Definition at line 146 of file srb.h.

◆ MAXIMUM_CDB_SIZE

#define MAXIMUM_CDB_SIZE   12

Definition at line 33 of file srb.h.

◆ SCSI_DMA64_MINIPORT_SUPPORTED

#define SCSI_DMA64_MINIPORT_SUPPORTED   0x01

Definition at line 169 of file srb.h.

◆ SCSI_DMA64_SYSTEM_SUPPORTED

#define SCSI_DMA64_SYSTEM_SUPPORTED   0x80

Definition at line 161 of file srb.h.

◆ SCSI_MAXIMUM_BUSES

#define SCSI_MAXIMUM_BUSES   8

Definition at line 24 of file srb.h.

◆ SCSI_MAXIMUM_LOGICAL_UNITS

#define SCSI_MAXIMUM_LOGICAL_UNITS   8

Definition at line 21 of file srb.h.

◆ SCSI_MAXIMUM_LUNS_PER_TARGET

#define SCSI_MAXIMUM_LUNS_PER_TARGET   255

Definition at line 23 of file srb.h.

◆ SCSI_MAXIMUM_PHYSICAL_BREAKS

#define SCSI_MAXIMUM_PHYSICAL_BREAKS   255

Definition at line 26 of file srb.h.

◆ SCSI_MAXIMUM_TARGETS

#define SCSI_MAXIMUM_TARGETS   8

Definition at line 31 of file srb.h.

◆ SCSI_MAXIMUM_TARGETS_PER_BUS

#define SCSI_MAXIMUM_TARGETS_PER_BUS   128

Definition at line 22 of file srb.h.

◆ SCSI_MINIMUM_PHYSICAL_BREAKS

#define SCSI_MINIMUM_PHYSICAL_BREAKS   16

Definition at line 25 of file srb.h.

◆ SCSI_REQUEST_BLOCK_SIZE

#define SCSI_REQUEST_BLOCK_SIZE   sizeof(SCSI_REQUEST_BLOCK)

Definition at line 282 of file srb.h.

◆ SCSIPORT_API

#define SCSIPORT_API   DECLSPEC_IMPORT

Definition at line 608 of file srb.h.

◆ ScsiPortConvertPhysicalAddressToUlong

#define ScsiPortConvertPhysicalAddressToUlong (   Address)    ((Address).LowPart)

Definition at line 957 of file srb.h.

◆ SP_BAD_FW_ERROR

#define SP_BAD_FW_ERROR   0x000a

Definition at line 513 of file srb.h.

◆ SP_BAD_FW_WARNING

#define SP_BAD_FW_WARNING   0x0009

Definition at line 512 of file srb.h.

◆ SP_BUS_PARITY_ERROR

#define SP_BUS_PARITY_ERROR   0x0001

Definition at line 504 of file srb.h.

◆ SP_BUS_TIME_OUT

#define SP_BUS_TIME_OUT   0x0004

Definition at line 507 of file srb.h.

◆ SP_INTERNAL_ADAPTER_ERROR

#define SP_INTERNAL_ADAPTER_ERROR   0x0006

Definition at line 509 of file srb.h.

◆ SP_INVALID_RESELECTION

#define SP_INVALID_RESELECTION   0x0003

Definition at line 506 of file srb.h.

◆ SP_IRQ_NOT_RESPONDING

#define SP_IRQ_NOT_RESPONDING   0x0008

Definition at line 511 of file srb.h.

◆ SP_LOST_WMI_MINIPORT_REQUEST

#define SP_LOST_WMI_MINIPORT_REQUEST   0x000b

Definition at line 514 of file srb.h.

◆ SP_PROTOCOL_ERROR

#define SP_PROTOCOL_ERROR   0x0005

Definition at line 508 of file srb.h.

◆ SP_REQUEST_TIMEOUT

#define SP_REQUEST_TIMEOUT   0x0007

Definition at line 510 of file srb.h.

◆ SP_RETURN_BAD_CONFIG

#define SP_RETURN_BAD_CONFIG   3

Definition at line 524 of file srb.h.

◆ SP_RETURN_ERROR

#define SP_RETURN_ERROR   2

Definition at line 523 of file srb.h.

◆ SP_RETURN_FOUND

#define SP_RETURN_FOUND   1

Definition at line 522 of file srb.h.

◆ SP_RETURN_NOT_FOUND

#define SP_RETURN_NOT_FOUND   0

Definition at line 521 of file srb.h.

◆ SP_UNEXPECTED_DISCONNECT

#define SP_UNEXPECTED_DISCONNECT   0x0002

Definition at line 505 of file srb.h.

◆ SP_UNINITIALIZED_VALUE

#define SP_UNINITIALIZED_VALUE   ((ULONG) ~0)

Definition at line 232 of file srb.h.

◆ SP_UNTAGGED

#define SP_UNTAGGED   ((UCHAR) ~0)

Definition at line 233 of file srb.h.

◆ SRB_FLAGS_ADAPTER_CACHE_ENABLE

#define SRB_FLAGS_ADAPTER_CACHE_ENABLE   0x00000200

Definition at line 405 of file srb.h.

◆ SRB_FLAGS_ALLOCATED_FROM_ZONE

#define SRB_FLAGS_ALLOCATED_FROM_ZONE   0x00020000

Definition at line 408 of file srb.h.

◆ SRB_FLAGS_BYPASS_FROZEN_QUEUE

#define SRB_FLAGS_BYPASS_FROZEN_QUEUE   0x00000010

Definition at line 398 of file srb.h.

◆ SRB_FLAGS_BYPASS_LOCKED_QUEUE

#define SRB_FLAGS_BYPASS_LOCKED_QUEUE   0x00080000

Definition at line 410 of file srb.h.

◆ SRB_FLAGS_CLASS_DRIVER_RESERVED

#define SRB_FLAGS_CLASS_DRIVER_RESERVED   0xF0000000

Definition at line 418 of file srb.h.

◆ SRB_FLAGS_DATA_IN

#define SRB_FLAGS_DATA_IN   0x00000040

Definition at line 400 of file srb.h.

◆ SRB_FLAGS_DATA_OUT

#define SRB_FLAGS_DATA_OUT   0x00000080

Definition at line 401 of file srb.h.

◆ SRB_FLAGS_DISABLE_AUTOSENSE

#define SRB_FLAGS_DISABLE_AUTOSENSE   0x00000020

Definition at line 399 of file srb.h.

◆ SRB_FLAGS_DISABLE_DISCONNECT

#define SRB_FLAGS_DISABLE_DISCONNECT   0x00000004

Definition at line 396 of file srb.h.

◆ SRB_FLAGS_DISABLE_SYNCH_TRANSFER

#define SRB_FLAGS_DISABLE_SYNCH_TRANSFER   0x00000008

Definition at line 397 of file srb.h.

◆ SRB_FLAGS_DONT_START_NEXT_PACKET

#define SRB_FLAGS_DONT_START_NEXT_PACKET   0x00800000

Definition at line 415 of file srb.h.

◆ SRB_FLAGS_FREE_SENSE_BUFFER

#define SRB_FLAGS_FREE_SENSE_BUFFER   0x00000400

Definition at line 406 of file srb.h.

◆ SRB_FLAGS_IS_ACTIVE

#define SRB_FLAGS_IS_ACTIVE   0x00010000

Definition at line 407 of file srb.h.

◆ SRB_FLAGS_NO_DATA_TRANSFER

#define SRB_FLAGS_NO_DATA_TRANSFER   0x00000000

Definition at line 402 of file srb.h.

◆ SRB_FLAGS_NO_KEEP_AWAKE

#define SRB_FLAGS_NO_KEEP_AWAKE   0x00100000

Definition at line 412 of file srb.h.

◆ SRB_FLAGS_NO_QUEUE_FREEZE

#define SRB_FLAGS_NO_QUEUE_FREEZE   0x00000100

Definition at line 404 of file srb.h.

◆ SRB_FLAGS_PORT_DRIVER_ALLOCSENSE

#define SRB_FLAGS_PORT_DRIVER_ALLOCSENSE   0x00200000

Definition at line 413 of file srb.h.

◆ SRB_FLAGS_PORT_DRIVER_RESERVED

#define SRB_FLAGS_PORT_DRIVER_RESERVED   0x0F000000

Definition at line 417 of file srb.h.

◆ SRB_FLAGS_PORT_DRIVER_SENSEHASPORT

#define SRB_FLAGS_PORT_DRIVER_SENSEHASPORT   0x00400000

Definition at line 414 of file srb.h.

◆ SRB_FLAGS_QUEUE_ACTION_ENABLE

#define SRB_FLAGS_QUEUE_ACTION_ENABLE   0x00000002

Definition at line 395 of file srb.h.

◆ SRB_FLAGS_SGLIST_FROM_POOL

#define SRB_FLAGS_SGLIST_FROM_POOL   0x00040000

Definition at line 409 of file srb.h.

◆ SRB_FLAGS_UNSPECIFIED_DIRECTION

#define SRB_FLAGS_UNSPECIFIED_DIRECTION   (SRB_FLAGS_DATA_IN | SRB_FLAGS_DATA_OUT)

Definition at line 403 of file srb.h.

◆ SRB_FUNCTION_ABORT_COMMAND

#define SRB_FUNCTION_ABORT_COMMAND   0x10

Definition at line 324 of file srb.h.

◆ SRB_FUNCTION_ATTACH_DEVICE

#define SRB_FUNCTION_ATTACH_DEVICE   0x05

Definition at line 320 of file srb.h.

◆ SRB_FUNCTION_CLAIM_DEVICE

#define SRB_FUNCTION_CLAIM_DEVICE   0x01

Definition at line 316 of file srb.h.

◆ SRB_FUNCTION_EXECUTE_SCSI

#define SRB_FUNCTION_EXECUTE_SCSI   0x00

Definition at line 315 of file srb.h.

◆ SRB_FUNCTION_FLUSH

#define SRB_FUNCTION_FLUSH   0x08

Definition at line 323 of file srb.h.

◆ SRB_FUNCTION_FLUSH_QUEUE

#define SRB_FUNCTION_FLUSH_QUEUE   0x15

Definition at line 329 of file srb.h.

◆ SRB_FUNCTION_IO_CONTROL

#define SRB_FUNCTION_IO_CONTROL   0x02

Definition at line 317 of file srb.h.

◆ SRB_FUNCTION_LOCK_QUEUE

#define SRB_FUNCTION_LOCK_QUEUE   0x18

Definition at line 332 of file srb.h.

◆ SRB_FUNCTION_RECEIVE_EVENT

#define SRB_FUNCTION_RECEIVE_EVENT   0x03

Definition at line 318 of file srb.h.

◆ SRB_FUNCTION_RELEASE_DEVICE

#define SRB_FUNCTION_RELEASE_DEVICE   0x06

Definition at line 321 of file srb.h.

◆ SRB_FUNCTION_RELEASE_QUEUE

#define SRB_FUNCTION_RELEASE_QUEUE   0x04

Definition at line 319 of file srb.h.

◆ SRB_FUNCTION_RELEASE_RECOVERY

#define SRB_FUNCTION_RELEASE_RECOVERY   0x11

Definition at line 325 of file srb.h.

◆ SRB_FUNCTION_REMOVE_DEVICE

#define SRB_FUNCTION_REMOVE_DEVICE   0x16

Definition at line 330 of file srb.h.

◆ SRB_FUNCTION_RESET_BUS

#define SRB_FUNCTION_RESET_BUS   0x12

Definition at line 326 of file srb.h.

◆ SRB_FUNCTION_RESET_DEVICE

#define SRB_FUNCTION_RESET_DEVICE   0x13

Definition at line 327 of file srb.h.

◆ SRB_FUNCTION_RESET_LOGICAL_UNIT

#define SRB_FUNCTION_RESET_LOGICAL_UNIT   0x20

Definition at line 334 of file srb.h.

◆ SRB_FUNCTION_SHUTDOWN

#define SRB_FUNCTION_SHUTDOWN   0x07

Definition at line 322 of file srb.h.

◆ SRB_FUNCTION_TERMINATE_IO

#define SRB_FUNCTION_TERMINATE_IO   0x14

Definition at line 328 of file srb.h.

◆ SRB_FUNCTION_UNLOCK_QUEUE

#define SRB_FUNCTION_UNLOCK_QUEUE   0x19

Definition at line 333 of file srb.h.

◆ SRB_FUNCTION_WMI

#define SRB_FUNCTION_WMI   0x17

Definition at line 331 of file srb.h.

◆ SRB_HEAD_OF_QUEUE_TAG_REQUEST

#define SRB_HEAD_OF_QUEUE_TAG_REQUEST   0x21

Definition at line 424 of file srb.h.

◆ SRB_ORDERED_QUEUE_TAG_REQUEST

#define SRB_ORDERED_QUEUE_TAG_REQUEST   0x22

Definition at line 425 of file srb.h.

◆ SRB_SIMPLE_TAG_REQUEST

#define SRB_SIMPLE_TAG_REQUEST   0x20

Definition at line 423 of file srb.h.

◆ SRB_STATUS

Definition at line 389 of file srb.h.

◆ SRB_STATUS_ABORT_FAILED

#define SRB_STATUS_ABORT_FAILED   0x03

Definition at line 343 of file srb.h.

◆ SRB_STATUS_ABORTED

#define SRB_STATUS_ABORTED   0x02

Definition at line 342 of file srb.h.

◆ SRB_STATUS_AUTOSENSE_VALID

#define SRB_STATUS_AUTOSENSE_VALID   0x80

Definition at line 387 of file srb.h.

◆ SRB_STATUS_BAD_FUNCTION

#define SRB_STATUS_BAD_FUNCTION   0x22

Definition at line 364 of file srb.h.

◆ SRB_STATUS_BAD_SRB_BLOCK_LENGTH

#define SRB_STATUS_BAD_SRB_BLOCK_LENGTH   0x15

Definition at line 360 of file srb.h.

◆ SRB_STATUS_BUS_RESET

#define SRB_STATUS_BUS_RESET   0x0E

Definition at line 353 of file srb.h.

◆ SRB_STATUS_BUSY

#define SRB_STATUS_BUSY   0x05

Definition at line 345 of file srb.h.

◆ SRB_STATUS_COMMAND_TIMEOUT

#define SRB_STATUS_COMMAND_TIMEOUT   0x0B

Definition at line 351 of file srb.h.

◆ SRB_STATUS_DATA_OVERRUN

#define SRB_STATUS_DATA_OVERRUN   0x12

Definition at line 357 of file srb.h.

◆ SRB_STATUS_ERROR

#define SRB_STATUS_ERROR   0x04

Definition at line 344 of file srb.h.

◆ SRB_STATUS_ERROR_RECOVERY

#define SRB_STATUS_ERROR_RECOVERY   0x23

Definition at line 365 of file srb.h.

◆ SRB_STATUS_INTERNAL_ERROR

#define SRB_STATUS_INTERNAL_ERROR   0x30

Definition at line 373 of file srb.h.

◆ SRB_STATUS_INVALID_LUN

#define SRB_STATUS_INVALID_LUN   0x20

Definition at line 362 of file srb.h.

◆ SRB_STATUS_INVALID_PATH_ID

#define SRB_STATUS_INVALID_PATH_ID   0x07

Definition at line 347 of file srb.h.

◆ SRB_STATUS_INVALID_REQUEST

#define SRB_STATUS_INVALID_REQUEST   0x06

Definition at line 346 of file srb.h.

◆ SRB_STATUS_INVALID_TARGET_ID

#define SRB_STATUS_INVALID_TARGET_ID   0x21

Definition at line 363 of file srb.h.

◆ SRB_STATUS_MESSAGE_REJECTED

#define SRB_STATUS_MESSAGE_REJECTED   0x0D

Definition at line 352 of file srb.h.

◆ SRB_STATUS_NO_DEVICE

#define SRB_STATUS_NO_DEVICE   0x08

Definition at line 348 of file srb.h.

◆ SRB_STATUS_NO_HBA

#define SRB_STATUS_NO_HBA   0x11

Definition at line 356 of file srb.h.

◆ SRB_STATUS_NOT_POWERED

#define SRB_STATUS_NOT_POWERED   0x24

Definition at line 366 of file srb.h.

◆ SRB_STATUS_PARITY_ERROR

#define SRB_STATUS_PARITY_ERROR   0x0F

Definition at line 354 of file srb.h.

◆ SRB_STATUS_PENDING

#define SRB_STATUS_PENDING   0x00

Definition at line 340 of file srb.h.

◆ SRB_STATUS_PHASE_SEQUENCE_FAILURE

#define SRB_STATUS_PHASE_SEQUENCE_FAILURE   0x14

Definition at line 359 of file srb.h.

◆ SRB_STATUS_QUEUE_FROZEN

#define SRB_STATUS_QUEUE_FROZEN   0x40

Definition at line 386 of file srb.h.

◆ SRB_STATUS_REQUEST_FLUSHED

#define SRB_STATUS_REQUEST_FLUSHED   0x16

Definition at line 361 of file srb.h.

◆ SRB_STATUS_REQUEST_SENSE_FAILED

#define SRB_STATUS_REQUEST_SENSE_FAILED   0x10

Definition at line 355 of file srb.h.

◆ SRB_STATUS_SELECTION_TIMEOUT

#define SRB_STATUS_SELECTION_TIMEOUT   0x0A

Definition at line 350 of file srb.h.

◆ SRB_STATUS_SUCCESS

#define SRB_STATUS_SUCCESS   0x01

Definition at line 341 of file srb.h.

◆ SRB_STATUS_TIMEOUT

#define SRB_STATUS_TIMEOUT   0x09

Definition at line 349 of file srb.h.

◆ SRB_STATUS_UNEXPECTED_BUS_FREE

#define SRB_STATUS_UNEXPECTED_BUS_FREE   0x13

Definition at line 358 of file srb.h.

◆ SRB_WMI_FLAGS_ADAPTER_REQUEST

#define SRB_WMI_FLAGS_ADAPTER_REQUEST   0x01

Definition at line 427 of file srb.h.

◆ SRBEV_BUS_RESET

#define SRBEV_BUS_RESET   0x0001

Definition at line 239 of file srb.h.

◆ SRBEV_SCSI_ASYNC_NOTIFICATION

#define SRBEV_SCSI_ASYNC_NOTIFICATION   0x0002

Definition at line 240 of file srb.h.

Typedef Documentation

◆ ACCESS_RANGE

◆ HW_INITIALIZATION_DATA

◆ HW_INITIALIZATION_DATA_2K

◆ HW_INITIALIZATION_DATA_COMMON

◆ PACCESS_RANGE

◆ PHW_ADAPTER_CONTROL

typedef SCSI_ADAPTER_CONTROL_STATUS(NTAPI * PHW_ADAPTER_CONTROL) (IN PVOID DeviceExtension, IN SCSI_ADAPTER_CONTROL_TYPE ControlType, IN PVOID Parameters)

Definition at line 494 of file srb.h.

◆ PHW_ADAPTER_STATE

typedef BOOLEAN(NTAPI * PHW_ADAPTER_STATE) (IN PVOID DeviceExtension, IN PVOID Context, IN BOOLEAN SaveState)

Definition at line 486 of file srb.h.

◆ PHW_DMA_STARTED

typedef VOID(NTAPI * PHW_DMA_STARTED) (IN PVOID DeviceExtension)

Definition at line 462 of file srb.h.

◆ PHW_FIND_ADAPTER

typedef ULONG(NTAPI * PHW_FIND_ADAPTER) (IN PVOID DeviceExtension, IN PVOID HwContext, IN PVOID BusInformation, IN PCHAR ArgumentString, IN OUT PPORT_CONFIGURATION_INFORMATION ConfigInfo, OUT PBOOLEAN Again)

Definition at line 468 of file srb.h.

◆ PHW_INITIALIZATION_DATA

◆ PHW_INITIALIZATION_DATA_2K

◆ PHW_INITIALIZATION_DATA_COMMON

◆ PHW_INITIALIZE

typedef BOOLEAN(NTAPI * PHW_INITIALIZE) (IN PVOID DeviceExtension)

Definition at line 437 of file srb.h.

◆ PHW_INTERRUPT

typedef BOOLEAN(NTAPI * PHW_INTERRUPT) (IN PVOID DeviceExtension)

Definition at line 450 of file srb.h.

◆ PHW_RESET_BUS

typedef BOOLEAN(NTAPI * PHW_RESET_BUS) (IN PVOID DeviceExtension, IN ULONG PathId)

Definition at line 479 of file srb.h.

◆ PHW_STARTIO

typedef BOOLEAN(NTAPI * PHW_STARTIO) (IN PVOID DeviceExtension, IN PSCSI_REQUEST_BLOCK Srb)

Definition at line 443 of file srb.h.

◆ PHW_TIMER

typedef VOID(NTAPI * PHW_TIMER) (IN PVOID DeviceExtension)

Definition at line 456 of file srb.h.

◆ PORT_CONFIGURATION_INFORMATION

◆ PORT_CONFIGURATION_INFORMATION_2K

◆ PORT_CONFIGURATION_INFORMATION_COMMON

◆ PORT_CONFIGURATION_INFORMATION_NT

◆ PPORT_CONFIGURATION_INFORMATION

◆ PPORT_CONFIGURATION_INFORMATION_2K

◆ PPORT_CONFIGURATION_INFORMATION_COMMON

◆ PPORT_CONFIGURATION_INFORMATION_NT

◆ PSCSI_ADAPTER_CONTROL_STATUS

◆ PSCSI_ADAPTER_CONTROL_TYPE

◆ PSCSI_NOTIFICATION_TYPE

◆ PSCSI_PHYSICAL_ADDRESS

Definition at line 38 of file srb.h.

◆ PSCSI_REQUEST_BLOCK

◆ PSCSI_SUPPORTED_CONTROL_TYPE_LIST

◆ PSCSI_WMI_REQUEST_BLOCK

◆ SCSI_ADAPTER_CONTROL_STATUS

◆ SCSI_ADAPTER_CONTROL_TYPE

◆ SCSI_NOTIFICATION_TYPE

◆ SCSI_PHYSICAL_ADDRESS

Definition at line 38 of file srb.h.

◆ SCSI_REQUEST_BLOCK

◆ SCSI_SUPPORTED_CONTROL_TYPE_LIST

◆ SCSI_WMI_REQUEST_BLOCK

Enumeration Type Documentation

◆ _SCSI_ADAPTER_CONTROL_STATUS

Enumerator
ScsiAdapterControlSuccess 
ScsiAdapterControlUnsuccessful 
ScsiAdapterControlSuccess 
ScsiAdapterControlUnsuccessful 
ScsiAdapterControlSuccess 
ScsiAdapterControlUnsuccessful 

Definition at line 190 of file srb.h.

190  {
enum _SCSI_ADAPTER_CONTROL_STATUS SCSI_ADAPTER_CONTROL_STATUS
enum _SCSI_ADAPTER_CONTROL_STATUS * PSCSI_ADAPTER_CONTROL_STATUS

◆ _SCSI_ADAPTER_CONTROL_TYPE

Enumerator
ScsiQuerySupportedControlTypes 
ScsiStopAdapter 
ScsiRestartAdapter 
ScsiSetBootConfig 
ScsiSetRunningConfig 
ScsiAdapterControlMax 
MakeAdapterControlTypeSizeOfUlong 
ScsiQuerySupportedControlTypes 
ScsiStopAdapter 
ScsiRestartAdapter 
ScsiSetBootConfig 
ScsiSetRunningConfig 
ScsiAdapterControlMax 
MakeAdapterControlTypeSizeOfUlong 
ScsiQuerySupportedControlTypes 
ScsiStopAdapter 
ScsiRestartAdapter 
ScsiSetBootConfig 
ScsiSetRunningConfig 
ScsiAdapterControlMax 
MakeAdapterControlTypeSizeOfUlong 

Definition at line 176 of file srb.h.

◆ _SCSI_NOTIFICATION_TYPE

Enumerator
RequestComplete 
NextRequest 
NextLuRequest 
ResetDetected 
CallDisableInterrupts 
CallEnableInterrupts 
RequestTimerCall 
BusChangeDetected 
WMIEvent 
WMIReregister 
RequestComplete 
NextRequest 
NextLuRequest 
ResetDetected 
CallDisableInterrupts 
CallEnableInterrupts 
RequestTimerCall 
BusChangeDetected 
WMIEvent 
WMIReregister 
LinkUp 
LinkDown 
QueryTickCount 
BufferOverrunDetected 
TraceNotification 
RequestComplete 
NextRequest 
NextLuRequest 
ResetDetected 
_obsolete1 
_obsolete2 
RequestTimerCall 
BusChangeDetected 
WMIEvent 
WMIReregister 
LinkUp 
LinkDown 
QueryTickCount 
BufferOverrunDetected 
TraceNotification 
GetExtendedFunctionTable 
EnablePassiveInitialization 
InitializeDpc 
IssueDpc 
AcquireSpinLock 
ReleaseSpinLock 

Definition at line 530 of file srb.h.

530  {
532  NextRequest,
538  BusChangeDetected, /* New */
539  WMIEvent,
enum _SCSI_NOTIFICATION_TYPE SCSI_NOTIFICATION_TYPE
enum _SCSI_NOTIFICATION_TYPE * PSCSI_NOTIFICATION_TYPE
Definition: srb.h:539

Function Documentation

◆ ScsiDebugPrint()

SCSIPORT_API VOID __cdecl ScsiDebugPrint ( ULONG  DebugPrintLevel,
PCCHAR  DebugMessage,
  ... 
)

◆ ScsiPortCompleteRequest()

SCSIPORT_API VOID NTAPI ScsiPortCompleteRequest ( IN PVOID  HwDeviceExtension,
IN UCHAR  PathId,
IN UCHAR  TargetId,
IN UCHAR  Lun,
IN UCHAR  SrbStatus 
)

Definition at line 505 of file scsiport.c.

511 {
512  // FIXME
514 }
#define UNIMPLEMENTED
Definition: debug.h:115

Referenced by AtapiResetController(), BT958HwResetBus(), and BusLogic_ProcessCompletedCCBs().

◆ ScsiPortConvertPhysicalAddressToUlong()

SCSIPORT_API ULONG NTAPI ScsiPortConvertPhysicalAddressToUlong ( SCSI_PHYSICAL_ADDRESS  Address)

◆ ScsiPortConvertUlongToPhysicalAddress()

SCSIPORT_API SCSI_PHYSICAL_ADDRESS NTAPI ScsiPortConvertUlongToPhysicalAddress ( ULONG  UlongAddress)

◆ ScsiPortFlushDma()

SCSIPORT_API VOID NTAPI ScsiPortFlushDma ( IN PVOID  DeviceExtension)

Definition at line 538 of file scsiport.c.

540 {
541  // FIXME
543 }
#define UNIMPLEMENTED
Definition: debug.h:115

◆ ScsiPortFreeDeviceBase()

SCSIPORT_API VOID NTAPI ScsiPortFreeDeviceBase ( IN PVOID  HwDeviceExtension,
IN PVOID  MappedAddress 
)

Definition at line 547 of file scsiport.c.

550 {
551  // Nothing to do
552 }

Referenced by AtapiFindController(), AtapiFindIsaController(), AtapiFindNativeModeController(), AtapiFindPCIController(), and UniataChipDetect().

◆ ScsiPortGetBusData()

SCSIPORT_API ULONG NTAPI ScsiPortGetBusData ( IN PVOID  DeviceExtension,
IN ULONG  BusDataType,
IN ULONG  SystemIoBusNumber,
IN ULONG  SlotNumber,
IN PVOID  Buffer,
IN ULONG  Length 
)

Definition at line 556 of file scsiport.c.

563 {
564  return HalGetBusDataByOffset(BusDataType, SystemIoBusNumber, SlotNumber, Buffer, 0, Length);
565 }
_In_ WDFIORESREQLIST _In_ ULONG SlotNumber
Definition: wdfresource.h:65
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
Definition: bufpool.h:45
ULONG NTAPI HalGetBusDataByOffset(IN BUS_DATA_TYPE BusDataType, IN ULONG BusNumber, IN ULONG SlotNumber, IN PVOID Buffer, IN ULONG Offset, IN ULONG Length)
Definition: bus.c:73

Referenced by AtapiAliSouthBridgeFixup(), AtapiFindController(), AtapiFindNativeModeController(), AtapiRosbSouthBridgeFixup(), AtapiViaSouthBridgeFixup(), and FindBrokenController().

◆ ScsiPortGetDeviceBase()

SCSIPORT_API PVOID NTAPI ScsiPortGetDeviceBase ( IN PVOID  HwDeviceExtension,
IN INTERFACE_TYPE  BusType,
IN ULONG  SystemIoBusNumber,
IN SCSI_PHYSICAL_ADDRESS  IoAddress,
IN ULONG  NumberOfBytes,
IN BOOLEAN  InIoSpace 
)

Definition at line 569 of file scsiport.c.

576 {
579 
580  AddressSpace = (ULONG)InIoSpace;
582  SystemIoBusNumber,
583  IoAddress,
584  &AddressSpace,
586  {
587  return NULL;
588  }
589 
590  /* I/O space */
591  if (AddressSpace != 0)
592  return (PVOID)TranslatedAddress.u.LowPart;
593 
594  // FIXME
596  return (PVOID)IoAddress.LowPart;
597 }
_In_opt_ PUNICODE_STRING _In_ PDRIVER_OBJECT _In_ PDEVICE_OBJECT _In_ INTERFACE_TYPE BusType
Definition: halfuncs.h:156
_In_ ULONG _In_ PHYSICAL_ADDRESS _Inout_ PULONG AddressSpace
Definition: iofuncs.h:2272
_In_ ULONG _In_ PHYSICAL_ADDRESS _Inout_ PULONG _Out_ PPHYSICAL_ADDRESS TranslatedAddress
Definition: iofuncs.h:2272
#define FALSE
Definition: types.h:117
struct _LARGE_INTEGER::@2249 u
BOOLEAN NTAPI HalTranslateBusAddress(IN INTERFACE_TYPE InterfaceType, IN ULONG BusNumber, IN PHYSICAL_ADDRESS BusAddress, IN OUT PULONG AddressSpace, OUT PPHYSICAL_ADDRESS TranslatedAddress)
Definition: bus.c:140
#define NULL
Definition: types.h:112
unsigned int ULONG
Definition: retypes.h:1
#define UNIMPLEMENTED
Definition: debug.h:115

Referenced by AtapiFindController(), AtapiFindIsaController(), AtapiFindNativeModeController(), AtapiFindPCIController(), AtapiGetIoRange(), BT958HwFindAdapter(), and UniataFindBusMasterController().

◆ ScsiPortGetLogicalUnit()

SCSIPORT_API PVOID NTAPI ScsiPortGetLogicalUnit ( IN PVOID  HwDeviceExtension,
IN UCHAR  PathId,
IN UCHAR  TargetId,
IN UCHAR  Lun 
)

Definition at line 601 of file scsiport.c.

606 {
607  // FIXME
609  return NULL;
610 }
#define NULL
Definition: types.h:112
#define UNIMPLEMENTED
Definition: debug.h:115

◆ ScsiPortGetPhysicalAddress()

SCSIPORT_API SCSI_PHYSICAL_ADDRESS NTAPI ScsiPortGetPhysicalAddress ( IN PVOID  HwDeviceExtension,
IN PSCSI_REQUEST_BLOCK  Srb,
IN PVOID  VirtualAddress,
OUT ULONG Length 
)

Definition at line 614 of file scsiport.c.

619 {
620  PSCSI_PORT_DEVICE_EXTENSION DeviceExtension;
622  ULONG BufferLength = 0;
623  ULONG Offset;
624 
625  TRACE("ScsiPortGetPhysicalAddress(%p %p %p %p)\n",
626  HwDeviceExtension, Srb, VirtualAddress, Length);
627 
628  DeviceExtension = ((PSCSI_PORT_DEVICE_EXTENSION)HwDeviceExtension) - 1;
629 
630  if (Srb == NULL || Srb->SenseInfoBuffer == VirtualAddress)
631  {
632  /* Simply look it up in the allocated common buffer */
633  Offset = (PUCHAR)VirtualAddress - (PUCHAR)DeviceExtension->SrbExtensionBuffer;
634 
635  BufferLength = DeviceExtension->CommonBufferLength - Offset;
637  }
638  else
639  {
640  /* Nothing */
642  }
643 
644  *Length = BufferLength;
645  return PhysicalAddress;
646 }
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG BufferLength
Definition: wdfdevice.h:3767
#define SP_UNINITIALIZED_VALUE
Definition: srb.h:232
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
_In_ PSCSI_REQUEST_BLOCK Srb
Definition: cdrom.h:989
unsigned char * PUCHAR
Definition: retypes.h:3
struct SCSI_PORT_DEVICE_EXTENSION * PSCSI_PORT_DEVICE_EXTENSION
_Must_inspect_result_ _In_ WDFDMATRANSACTION _In_ PFN_WDF_PROGRAM_DMA _In_ WDF_DMA_DIRECTION _In_ PMDL _In_ PVOID VirtualAddress
int64_t LONGLONG
Definition: typedefs.h:68
#define TRACE(s)
Definition: solgame.cpp:4
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS PhysicalAddress
Definition: iotypes.h:1098
_In_ ULONG _In_ ULONG Offset
Definition: ntddpcm.h:101
#define NULL
Definition: types.h:112
PVOID SenseInfoBuffer
Definition: srb.h:264
unsigned int ULONG
Definition: retypes.h:1
LONGLONG QuadPart
Definition: typedefs.h:114

Referenced by BusLogic_InitializeHostAdapter(), BusLogic_QueueCommand(), and BusLogic_WriteOutgoingMailbox().

◆ ScsiPortGetSrb()

SCSIPORT_API PSCSI_REQUEST_BLOCK NTAPI ScsiPortGetSrb ( IN PVOID  DeviceExtension,
IN UCHAR  PathId,
IN UCHAR  TargetId,
IN UCHAR  Lun,
IN LONG  QueueTag 
)

Definition at line 650 of file scsiport.c.

656 {
657  // FIXME
659  return NULL;
660 }
#define NULL
Definition: types.h:112
#define UNIMPLEMENTED
Definition: debug.h:115

Referenced by AtapiStartIo__(), and BT958HwStartIO().

◆ ScsiPortGetUncachedExtension()

SCSIPORT_API PVOID NTAPI ScsiPortGetUncachedExtension ( IN PVOID  HwDeviceExtension,
IN PPORT_CONFIGURATION_INFORMATION  ConfigInfo,
IN ULONG  NumberOfBytes 
)

Definition at line 728 of file scsiport.c.

732 {
733  PSCSI_PORT_DEVICE_EXTENSION DeviceExtension;
735  ULONG MapRegistersCount;
737 
738  TRACE("ScsiPortGetUncachedExtension(%p %p %lu)\n",
739  HwDeviceExtension, ConfigInfo, NumberOfBytes);
740 
741  DeviceExtension = ((PSCSI_PORT_DEVICE_EXTENSION)HwDeviceExtension) - 1;
742 
743  /* Check for allocated common DMA buffer */
744  if (DeviceExtension->SrbExtensionBuffer != NULL)
745  {
746  return NULL;
747  }
748 
749  /* Check for DMA adapter object */
750  if (DeviceExtension->AdapterObject == NULL)
751  {
752  /* Initialize DMA adapter description */
754 
756  DeviceDescription.Master = ConfigInfo->Master;
757  DeviceDescription.ScatterGather = ConfigInfo->ScatterGather;
758  DeviceDescription.DemandMode = ConfigInfo->DemandMode;
759  DeviceDescription.Dma32BitAddresses = ConfigInfo->Dma32BitAddresses;
760  DeviceDescription.BusNumber = ConfigInfo->SystemIoBusNumber;
761  DeviceDescription.DmaChannel = ConfigInfo->DmaChannel;
762  DeviceDescription.InterfaceType = ConfigInfo->AdapterInterfaceType;
763  DeviceDescription.DmaWidth = ConfigInfo->DmaWidth;
764  DeviceDescription.DmaSpeed = ConfigInfo->DmaSpeed;
765  DeviceDescription.MaximumLength = ConfigInfo->MaximumTransferLength;
766  DeviceDescription.DmaPort = ConfigInfo->DmaPort;
767 
768  /* Get a DMA adapter object */
769 #if 0
770  DeviceExtension->AdapterObject =
771  HalGetAdapter(&DeviceDescription, &MapRegistersCount);
772 
773  /* Fail in case of error */
774  if (DeviceExtension->AdapterObject == NULL)
775  {
776  return NULL;
777  }
778 #else
779  MapRegistersCount = 0;
780 #endif
781 
782  /* Set number of physical breaks */
783  if (ConfigInfo->NumberOfPhysicalBreaks != 0 &&
784  MapRegistersCount > ConfigInfo->NumberOfPhysicalBreaks)
785  {
786  DeviceExtension->PortCapabilities.MaximumPhysicalPages =
787  ConfigInfo->NumberOfPhysicalBreaks;
788  }
789  else
790  {
791  DeviceExtension->PortCapabilities.MaximumPhysicalPages = MapRegistersCount;
792  }
793  }
794 
795  /* Update Srb extension size */
796  if (DeviceExtension->SrbExtensionSize != ConfigInfo->SrbExtensionSize)
797  DeviceExtension->SrbExtensionSize = ConfigInfo->SrbExtensionSize;
798 
799  /* Allocate a common DMA buffer */
800  Status = SpiAllocateCommonBuffer(DeviceExtension, NumberOfBytes);
801 
802  if (!NT_SUCCESS(Status))
803  {
804  TRACE("SpiAllocateCommonBuffer() failed with Status = 0x%08X!\n", Status);
805  return NULL;
806  }
807 
808  return DeviceExtension->NonCachedExtension;
809 }
IO_SCSI_CAPABILITIES PortCapabilities
Definition: scsiport.c:78
struct SCSI_PORT_DEVICE_EXTENSION * PSCSI_PORT_DEVICE_EXTENSION
LONG NTSTATUS
Definition: precomp.h:26
#define DEVICE_DESCRIPTION_VERSION
Definition: iotypes.h:2063
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_ PCUNICODE_STRING DeviceDescription
Definition: wdfpdo.h:430
Status
Definition: gdiplustypes.h:24
#define TRACE(s)
Definition: solgame.cpp:4
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
PADAPTER_OBJECT AdapterObject
Definition: scsiport.c:86
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS _Inout_ PLARGE_INTEGER NumberOfBytes
Definition: iotypes.h:1035
#define NULL
Definition: types.h:112
static NTSTATUS SpiAllocateCommonBuffer(IN OUT PSCSI_PORT_DEVICE_EXTENSION DeviceExtension, IN ULONG NonCachedSize)
Definition: scsiport.c:664
unsigned int ULONG
Definition: retypes.h:1
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
PADAPTER_OBJECT NTAPI HalGetAdapter(IN PDEVICE_DESCRIPTION DeviceDescription, OUT PULONG NumberOfMapRegisters)
Definition: dma.c:22

Referenced by Buslogic_InitBT958().

◆ ScsiPortGetVirtualAddress()

SCSIPORT_API PVOID NTAPI ScsiPortGetVirtualAddress ( IN PVOID  HwDeviceExtension,
IN SCSI_PHYSICAL_ADDRESS  PhysicalAddress 
)

Definition at line 813 of file scsiport.c.

816 {
817  // FIXME
819  return NULL;
820 }
#define NULL
Definition: types.h:112
#define UNIMPLEMENTED
Definition: debug.h:115

Referenced by AtapiDmaPioSync(), and BusLogic_ScanIncomingMailboxes().

◆ ScsiPortInitialize()

SCSIPORT_API ULONG NTAPI ScsiPortInitialize ( IN PVOID  Argument1,
IN PVOID  Argument2,
IN struct _HW_INITIALIZATION_DATA HwInitializationData,
IN PVOID  HwContext 
)

Definition at line 836 of file scsiport.c.

841 {
844  PSCSI_PORT_DEVICE_EXTENSION DeviceExtension = NULL;
845  PCONFIGURATION_INFORMATION SystemConfig;
847  CONFIGURATION_INFO ConfigInfo;
848  ULONG DeviceExtensionSize;
849  ULONG PortConfigSize;
850  BOOLEAN Again;
851  BOOLEAN DeviceFound = FALSE;
852  BOOLEAN FirstConfigCall = TRUE;
853  ULONG Result;
855  ULONG MaxBus;
857 
858  PDEVICE_OBJECT PortDeviceObject;
860  PIO_SCSI_CAPABILITIES PortCapabilities;
861 
863 
864  DPRINT ("ScsiPortInitialize() called!\n");
865 
866  /* Check params for validity */
867  if ((HwInitializationData->HwInitialize == NULL) ||
868  (HwInitializationData->HwStartIo == NULL) ||
869  (HwInitializationData->HwInterrupt == NULL) ||
870  (HwInitializationData->HwFindAdapter == NULL) ||
871  (HwInitializationData->HwResetBus == NULL))
872  {
874  }
875 
876  PSCSI_PORT_DRIVER_EXTENSION driverExtension;
877 
878  // ScsiPortInitialize may be called multiple times by the same driver
879  driverExtension = IoGetDriverObjectExtension(DriverObject, HwInitializationData->HwInitialize);
880 
881  if (!driverExtension)
882  {
884  HwInitializationData->HwInitialize,
886  (PVOID *)&driverExtension);
887 
888  if (!NT_SUCCESS(Status))
889  {
890  DPRINT1("Failed to allocate the driver extension! Status 0x%x\n", Status);
891  return Status;
892  }
893  }
894 
895  // set up the driver extension
896  driverExtension->RegistryPath.Buffer =
898  driverExtension->RegistryPath.MaximumLength = RegistryPath->MaximumLength;
899  RtlCopyUnicodeString(&driverExtension->RegistryPath, RegistryPath);
900 
901  driverExtension->DriverObject = DriverObject;
902 
903  /* Set handlers */
905  DriverObject->DriverStartIo = ScsiPortStartIo;
906  DriverObject->DriverExtension->AddDevice = ScsiPortAddDevice;
911  DriverObject->MajorFunction[IRP_MJ_PNP] = ScsiPortDispatchPnp;
913 
914  /* Obtain configuration information */
915  SystemConfig = IoGetConfigurationInformation();
916 
917  /* Zero the internal configuration info structure */
918  RtlZeroMemory(&ConfigInfo, sizeof(CONFIGURATION_INFO));
919 
920  /* Zero starting slot number */
921  SlotNumber.u.AsULONG = 0;
922 
923  /* Allocate space for access ranges */
924  if (HwInitializationData->NumberOfAccessRanges)
925  {
926  ConfigInfo.AccessRanges =
928  HwInitializationData->NumberOfAccessRanges * sizeof(ACCESS_RANGE), TAG_SCSIPORT);
929 
930  /* Fail if failed */
931  if (ConfigInfo.AccessRanges == NULL)
933  }
934 
935  /* Open registry keys and fill the driverExtension */
936  SpiInitOpenKeys(&ConfigInfo, driverExtension);
937 
938  // FIXME: PnP miniports are not supported
939  ASSERT(driverExtension->IsLegacyDriver);
940 
941  /* Last adapter number = not known */
943 
944  /* Calculate sizes of DeviceExtension and PortConfig */
945  DeviceExtensionSize = sizeof(SCSI_PORT_DEVICE_EXTENSION) +
946  HwInitializationData->DeviceExtensionSize;
947 
948  MaxBus = (HwInitializationData->AdapterInterfaceType == PCIBus) ? 8 : 1;
949  DPRINT("MaxBus: %lu\n", MaxBus);
950 
951  while (TRUE)
952  {
953  WCHAR NameBuffer[27];
954  /* Create a unicode device name */
955  swprintf(NameBuffer,
956  L"\\Device\\ScsiPort%lu",
957  SystemConfig->ScsiPortCount);
958  if (!RtlCreateUnicodeString(&DeviceName, NameBuffer))
959  {
960  DPRINT1("Failed to allocate memory for device name!\n");
962  PortDeviceObject = NULL;
963  break;
964  }
965 
966  DPRINT("Creating device: %wZ\n", &DeviceName);
967 
968  /* Create the port device */
970  DeviceExtensionSize,
971  &DeviceName,
974  FALSE,
975  &PortDeviceObject);
976 
977  if (!NT_SUCCESS(Status))
978  {
979  DPRINT1("IoCreateDevice call failed! (Status 0x%lX)\n", Status);
980  PortDeviceObject = NULL;
981  break;
982  }
983 
984  /* Set the buffering strategy here... */
985  PortDeviceObject->Flags |= DO_DIRECT_IO;
986  PortDeviceObject->AlignmentRequirement = FILE_WORD_ALIGNMENT; /* FIXME: Is this really needed? */
987 
988  /* Fill Device Extension */
989  DeviceExtension = PortDeviceObject->DeviceExtension;
990  RtlZeroMemory(DeviceExtension, DeviceExtensionSize);
991  DeviceExtension->Common.DeviceObject = PortDeviceObject;
992  DeviceExtension->Common.IsFDO = TRUE;
993  DeviceExtension->Length = DeviceExtensionSize;
994  DeviceExtension->PortNumber = SystemConfig->ScsiPortCount;
995  DeviceExtension->DeviceName = DeviceName;
996 
997  /* Driver's routines... */
998  DeviceExtension->HwInitialize = HwInitializationData->HwInitialize;
999  DeviceExtension->HwStartIo = HwInitializationData->HwStartIo;
1000  DeviceExtension->HwInterrupt = HwInitializationData->HwInterrupt;
1001  DeviceExtension->HwResetBus = HwInitializationData->HwResetBus;
1002  DeviceExtension->HwDmaStarted = HwInitializationData->HwDmaStarted;
1003 
1004  /* Extensions sizes */
1005  DeviceExtension->MiniPortExtensionSize = HwInitializationData->DeviceExtensionSize;
1006  DeviceExtension->LunExtensionSize =
1007  ALIGN_UP(HwInitializationData->SpecificLuExtensionSize, INT64);
1008  DeviceExtension->SrbExtensionSize =
1009  ALIGN_UP(HwInitializationData->SrbExtensionSize, INT64);
1010 
1011  /* Fill some numbers (bus count, lun count, etc) */
1012  DeviceExtension->MaxLunCount = SCSI_MAXIMUM_LOGICAL_UNITS;
1013  DeviceExtension->RequestsNumber = 16;
1014 
1015  /* Initialize the spin lock in the controller extension */
1016  KeInitializeSpinLock(&DeviceExtension->IrqLock);
1017  KeInitializeSpinLock(&DeviceExtension->SpinLock);
1018 
1019  /* Initialize the DPC object */
1020  IoInitializeDpcRequest(PortDeviceObject,
1022 
1023  /* Initialize the device timer */
1024  DeviceExtension->TimerCount = -1;
1025  IoInitializeTimer(PortDeviceObject,
1027  DeviceExtension);
1028 
1029  /* Initialize miniport timer */
1030  KeInitializeTimer(&DeviceExtension->MiniportTimer);
1031  KeInitializeDpc(&DeviceExtension->MiniportTimerDpc,
1033  PortDeviceObject);
1034 
1035 CreatePortConfig:
1036 
1037  /* Allocate and initialize port configuration info */
1038  PortConfigSize = sizeof(PORT_CONFIGURATION_INFORMATION) +
1039  HwInitializationData->NumberOfAccessRanges * sizeof(ACCESS_RANGE);
1040  PortConfigSize = ALIGN_UP(PortConfigSize, INT64);
1041  DeviceExtension->PortConfig = ExAllocatePoolWithTag(NonPagedPool, PortConfigSize, TAG_SCSIPORT);
1042 
1043  /* Fail if failed */
1044  if (DeviceExtension->PortConfig == NULL)
1045  {
1047  break;
1048  }
1049 
1050  Status = SpiCreatePortConfig(DeviceExtension,
1052  &ConfigInfo,
1053  DeviceExtension->PortConfig,
1054  FirstConfigCall);
1055 
1056  if (!NT_SUCCESS(Status))
1057  {
1058  DPRINT("SpiCreatePortConfig() failed with Status 0x%08X\n", Status);
1059  break;
1060  }
1061 
1062  PortConfig = DeviceExtension->PortConfig;
1063 
1064  /* Copy extension sizes into the PortConfig */
1065  PortConfig->SpecificLuExtensionSize = DeviceExtension->LunExtensionSize;
1066  PortConfig->SrbExtensionSize = DeviceExtension->SrbExtensionSize;
1067 
1068  /* Initialize Access ranges */
1069  if (HwInitializationData->NumberOfAccessRanges != 0)
1070  {
1071  PortConfig->AccessRanges = ALIGN_UP_POINTER(PortConfig + 1, INT64);
1072 
1073  /* Copy the data */
1074  RtlCopyMemory(PortConfig->AccessRanges,
1075  ConfigInfo.AccessRanges,
1076  HwInitializationData->NumberOfAccessRanges * sizeof(ACCESS_RANGE));
1077  }
1078 
1079  /* Search for matching PCI device */
1080  if ((HwInitializationData->AdapterInterfaceType == PCIBus) &&
1081  (HwInitializationData->VendorIdLength > 0) &&
1082  (HwInitializationData->VendorId != NULL) &&
1083  (HwInitializationData->DeviceIdLength > 0) && (HwInitializationData->DeviceId != NULL))
1084  {
1085  PortConfig->BusInterruptLevel = 0;
1086 
1087  /* Get PCI device data */
1088  DPRINT(
1089  "VendorId '%.*s' DeviceId '%.*s'\n", HwInitializationData->VendorIdLength,
1090  HwInitializationData->VendorId, HwInitializationData->DeviceIdLength,
1091  HwInitializationData->DeviceId);
1092 
1093  if (!SpiGetPciConfigData(
1094  DriverObject, PortDeviceObject, HwInitializationData, PortConfig, RegistryPath,
1095  ConfigInfo.BusNumber, &SlotNumber))
1096  {
1097  /* Continue to the next bus, nothing here */
1098  ConfigInfo.BusNumber++;
1099  DeviceExtension->PortConfig = NULL;
1100  ExFreePool(PortConfig);
1101  Again = FALSE;
1102  goto CreatePortConfig;
1103  }
1104 
1105  if (!PortConfig->BusInterruptLevel)
1106  {
1107  /* Bypass this slot, because no interrupt was assigned */
1108  DeviceExtension->PortConfig = NULL;
1109  ExFreePool(PortConfig);
1110  goto CreatePortConfig;
1111  }
1112  }
1113  else
1114  {
1115  DPRINT("Non-pci bus\n");
1116  }
1117 
1118  /* Note: HwFindAdapter is called once for each bus */
1119  Again = FALSE;
1120  DPRINT("Calling HwFindAdapter() for Bus %lu\n", PortConfig->SystemIoBusNumber);
1121  Result = (HwInitializationData->HwFindAdapter)(
1122  &DeviceExtension->MiniPortDeviceExtension, HwContext, 0, /* BusInformation */
1123  ConfigInfo.Parameter, /* ArgumentString */
1124  PortConfig, &Again);
1125 
1126  DPRINT("HwFindAdapter() Result: %lu Again: %s\n", Result, (Again) ? "True" : "False");
1127 
1128  /* Free MapRegisterBase, it's not needed anymore */
1129  if (DeviceExtension->MapRegisterBase != NULL)
1130  {
1131  ExFreePool(DeviceExtension->MapRegisterBase);
1132  DeviceExtension->MapRegisterBase = NULL;
1133  }
1134 
1135  /* If result is nothing good... */
1136  if (Result != SP_RETURN_FOUND)
1137  {
1138  DPRINT("HwFindAdapter() Result: %lu\n", Result);
1139 
1140  if (Result == SP_RETURN_NOT_FOUND)
1141  {
1142  /* We can continue on the next bus */
1143  ConfigInfo.BusNumber++;
1144  Again = FALSE;
1145 
1146  DeviceExtension->PortConfig = NULL;
1147  ExFreePool(PortConfig);
1148  goto CreatePortConfig;
1149  }
1150 
1151  /* Otherwise, break */
1153  break;
1154  }
1155 
1156  DPRINT(
1157  "ScsiPortInitialize(): Found HBA! (%x), adapter Id %d\n",
1158  PortConfig->BusInterruptVector, PortConfig->InitiatorBusId[0]);
1159 
1160  /* If the SRB extension size was updated */
1161  if (!DeviceExtension->NonCachedExtension &&
1162  (PortConfig->SrbExtensionSize != DeviceExtension->SrbExtensionSize))
1163  {
1164  /* Set it (rounding to LONGLONG again) */
1165  DeviceExtension->SrbExtensionSize = ALIGN_UP(PortConfig->SrbExtensionSize, INT64);
1166  }
1167 
1168  /* The same with LUN extension size */
1169  if (PortConfig->SpecificLuExtensionSize != DeviceExtension->LunExtensionSize)
1170  DeviceExtension->LunExtensionSize = PortConfig->SpecificLuExtensionSize;
1171 
1172  /* Construct a resource list */
1173  ResourceList = SpiConfigToResource(DeviceExtension, PortConfig);
1174 
1175  PDEVICE_OBJECT LowerPDO = NULL;
1176 
1178  HwInitializationData->AdapterInterfaceType,
1179  ConfigInfo.BusNumber,
1180  PortConfig->SlotNumber,
1181  ResourceList,
1182  NULL,
1183  TRUE,
1184  &LowerPDO);
1185 
1186  if (!NT_SUCCESS(Status))
1187  {
1188  DPRINT1("IoReportDetectedDevice failed. Status: 0x%x\n", Status);
1189  __debugbreak();
1190  break;
1191  }
1192 
1193  DeviceExtension->Common.LowerDevice = IoAttachDeviceToDeviceStack(PortDeviceObject, LowerPDO);
1194 
1195  ASSERT(DeviceExtension->Common.LowerDevice);
1196 
1197  PortDeviceObject->Flags &= ~DO_DEVICE_INITIALIZING;
1198 
1199  if (ResourceList)
1200  {
1202  }
1203 
1204  /* Copy all stuff which we ever need from PortConfig to the DeviceExtension */
1206  DeviceExtension->MaxTargedIds = SCSI_MAXIMUM_TARGETS_PER_BUS;
1207  else
1208  DeviceExtension->MaxTargedIds = PortConfig->MaximumNumberOfTargets;
1209 
1210  DeviceExtension->NumberOfBuses = PortConfig->NumberOfBuses;
1211  DeviceExtension->CachesData = PortConfig->CachesData;
1212  DeviceExtension->ReceiveEvent = PortConfig->ReceiveEvent;
1213  DeviceExtension->SupportsTaggedQueuing = PortConfig->TaggedQueuing;
1214  DeviceExtension->MultipleReqsPerLun = PortConfig->MultipleRequestPerLu;
1215 
1216  /* Initialize bus scanning information */
1217  size_t BusConfigSize = DeviceExtension->NumberOfBuses * sizeof(*DeviceExtension->Buses);
1218  DeviceExtension->Buses = ExAllocatePoolZero(NonPagedPool, BusConfigSize, TAG_SCSIPORT);
1219  if (!DeviceExtension->Buses)
1220  {
1221  DPRINT1("Out of resources!\n");
1223  break;
1224  }
1225 
1226  // initialize bus data
1227  for (UINT8 pathId = 0; pathId < DeviceExtension->NumberOfBuses; pathId++)
1228  {
1229  DeviceExtension->Buses[pathId].BusIdentifier =
1230  DeviceExtension->PortConfig->InitiatorBusId[pathId];
1231  InitializeListHead(&DeviceExtension->Buses[pathId].LunsListHead);
1232  }
1233 
1234  /* If something was disabled via registry - apply it */
1235  if (ConfigInfo.DisableMultipleLun)
1236  DeviceExtension->MultipleReqsPerLun = PortConfig->MultipleRequestPerLu = FALSE;
1237 
1238  if (ConfigInfo.DisableTaggedQueueing)
1239  DeviceExtension->SupportsTaggedQueuing = PortConfig->MultipleRequestPerLu = FALSE;
1240 
1241  /* Check if we need to alloc SRB data */
1242  if (DeviceExtension->SupportsTaggedQueuing || DeviceExtension->MultipleReqsPerLun)
1243  {
1244  DeviceExtension->NeedSrbDataAlloc = TRUE;
1245  }
1246  else
1247  {
1248  DeviceExtension->NeedSrbDataAlloc = FALSE;
1249  }
1250 
1251  /* Get a pointer to the port capabilities */
1252  PortCapabilities = &DeviceExtension->PortCapabilities;
1253 
1254  /* Copy one field there */
1255  DeviceExtension->MapBuffers = PortConfig->MapBuffers;
1256  PortCapabilities->AdapterUsesPio = PortConfig->MapBuffers;
1257 
1258  if (DeviceExtension->AdapterObject == NULL &&
1259  (PortConfig->DmaChannel != SP_UNINITIALIZED_VALUE || PortConfig->Master))
1260  {
1261  DPRINT1("DMA is not supported yet\n");
1262  ASSERT(FALSE);
1263  }
1264 
1265  if (DeviceExtension->SrbExtensionBuffer == NULL &&
1266  (DeviceExtension->SrbExtensionSize != 0 || PortConfig->AutoRequestSense))
1267  {
1268  DeviceExtension->SupportsAutoSense = PortConfig->AutoRequestSense;
1269  DeviceExtension->NeedSrbExtensionAlloc = TRUE;
1270 
1271  /* Allocate common buffer */
1272  Status = SpiAllocateCommonBuffer(DeviceExtension, 0);
1273 
1274  /* Check for failure */
1275  if (!NT_SUCCESS(Status))
1276  break;
1277  }
1278 
1279  /* Allocate SrbData, if needed */
1280  if (DeviceExtension->NeedSrbDataAlloc)
1281  {
1282  ULONG Count;
1283  PSCSI_REQUEST_BLOCK_INFO SrbData;
1284 
1285  if (DeviceExtension->SrbDataCount != 0)
1286  Count = DeviceExtension->SrbDataCount;
1287  else
1288  Count = DeviceExtension->RequestsNumber * 2;
1289 
1290  /* Allocate the data */
1291  SrbData = ExAllocatePoolWithTag(
1293  if (SrbData == NULL)
1295 
1296  RtlZeroMemory(SrbData, Count * sizeof(SCSI_REQUEST_BLOCK_INFO));
1297 
1298  DeviceExtension->SrbInfo = SrbData;
1299  DeviceExtension->FreeSrbInfo = SrbData;
1300  DeviceExtension->SrbDataCount = Count;
1301 
1302  /* Link it to the list */
1303  while (Count > 0)
1304  {
1305  SrbData->Requests.Flink = (PLIST_ENTRY)(SrbData + 1);
1306  SrbData++;
1307  Count--;
1308  }
1309 
1310  /* Mark the last entry of the list */
1311  SrbData--;
1312  SrbData->Requests.Flink = NULL;
1313  }
1314 
1315  /* Initialize port capabilities */
1316  PortCapabilities = &DeviceExtension->PortCapabilities;
1317  PortCapabilities->Length = sizeof(IO_SCSI_CAPABILITIES);
1318  PortCapabilities->MaximumTransferLength = PortConfig->MaximumTransferLength;
1319 
1320  if (PortConfig->ReceiveEvent)
1322 
1323  PortCapabilities->TaggedQueuing = DeviceExtension->SupportsTaggedQueuing;
1324  PortCapabilities->AdapterScansDown = PortConfig->AdapterScansDown;
1325 
1326  if (PortConfig->AlignmentMask > PortDeviceObject->AlignmentRequirement)
1327  PortDeviceObject->AlignmentRequirement = PortConfig->AlignmentMask;
1328 
1329  PortCapabilities->AlignmentMask = PortDeviceObject->AlignmentRequirement;
1330 
1331  if (PortCapabilities->MaximumPhysicalPages == 0)
1332  {
1333  PortCapabilities->MaximumPhysicalPages =
1334  BYTES_TO_PAGES(PortCapabilities->MaximumTransferLength);
1335 
1336  /* Apply miniport's limits */
1337  if (PortConfig->NumberOfPhysicalBreaks < PortCapabilities->MaximumPhysicalPages)
1338  {
1339  PortCapabilities->MaximumPhysicalPages = PortConfig->NumberOfPhysicalBreaks;
1340  }
1341  }
1342 
1343  FdoCallHWInitialize(DeviceExtension);
1344 
1345  Status = FdoStartAdapter(DeviceExtension);
1346 
1347  if (!NT_SUCCESS(Status))
1348  {
1349  DPRINT1("Failed to start the legacy adapter. Status 0x%x\n", Status);
1350  break;
1351  }
1352 
1353  FdoScanAdapter(DeviceExtension);
1354 
1355  FirstConfigCall = FALSE;
1356 
1357  /* Increase adapter number and bus number respectively */
1358  ConfigInfo.AdapterNumber++;
1359 
1360  if (!Again)
1361  ConfigInfo.BusNumber++;
1362 
1363  DPRINT("Bus: %lu MaxBus: %lu\n", ConfigInfo.BusNumber, MaxBus);
1364 
1365  DeviceFound = TRUE;
1366  }
1367 
1368  /* Clean up the mess */
1369  if (!NT_SUCCESS(Status) && PortDeviceObject)
1370  {
1371  FdoRemoveAdapter(DeviceExtension);
1372  }
1373 
1374  /* Close registry keys */
1375  if (ConfigInfo.ServiceKey != NULL)
1376  ZwClose(ConfigInfo.ServiceKey);
1377 
1378  if (ConfigInfo.DeviceKey != NULL)
1379  ZwClose(ConfigInfo.DeviceKey);
1380 
1381  if (ConfigInfo.BusKey != NULL)
1382  ZwClose(ConfigInfo.BusKey);
1383 
1384  if (ConfigInfo.AccessRanges != NULL)
1385  ExFreePool(ConfigInfo.AccessRanges);
1386 
1387  if (ConfigInfo.Parameter != NULL)
1388  ExFreePool(ConfigInfo.Parameter);
1389 
1390  DPRINT("ScsiPortInitialize() done, Status = 0x%08X, DeviceFound = %d!\n",
1391  Status, DeviceFound);
1392 
1393  return (DeviceFound == FALSE) ? Status : STATUS_SUCCESS;
1394 }
struct _LIST_ENTRY * PLIST_ENTRY
#define DO_DEVICE_INITIALIZING
Definition: env_spec_w32.h:399
_In_ WDFIORESREQLIST _In_ ULONG SlotNumber
Definition: wdfresource.h:65
#define STATUS_REVISION_MISMATCH
Definition: ntstatus.h:325
#define SRBEV_SCSI_ASYNC_NOTIFICATION
Definition: srb.h:240
FORCEINLINE VOID IoInitializeDpcRequest(_In_ PDEVICE_OBJECT DeviceObject, _In_ PIO_DPC_ROUTINE DpcRoutine)
Definition: iofuncs.h:2840
#define SP_UNINITIALIZED_VALUE
Definition: srb.h:232
#define IRP_MJ_CREATE
Definition: rdpdr.c:44
ULONG SupportedAsynchronousEvents
Definition: scsi_port.h:139
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158
_IRQL_requires_same_ _In_opt_ PVOID Argument1
Definition: cmtypes.h:696
#define ALIGN_UP(size, type)
Definition: umtypes.h:91
BOOLEAN DisableMultipleLun
Definition: scsiport.h:93
NTSTATUS NTAPI IoAllocateDriverObjectExtension(IN PDRIVER_OBJECT DriverObject, IN PVOID ClientIdentificationAddress, IN ULONG DriverObjectExtensionSize, OUT PVOID *DriverObjectExtension)
Definition: driver.c:1797
USHORT MaximumLength
Definition: env_spec_w32.h:370
PCONFIGURATION_INFORMATION NTAPI IoGetConfigurationInformation(VOID)
Definition: iorsrce.c:830
#define TRUE
Definition: types.h:120
NTSYSAPI NTSTATUS NTAPI ZwClose(_In_ HANDLE Handle)
VOID SpiInitOpenKeys(_Inout_ PCONFIGURATION_INFO ConfigInfo, _In_ PSCSI_PORT_DRIVER_EXTENSION DriverExtension)
Definition: registry.c:18
IO_SCSI_CAPABILITIES PortCapabilities
Definition: scsiport.c:78
#define SCSI_MAXIMUM_LOGICAL_UNITS
Definition: srb.h:21
#define IRP_MJ_PNP
Definition: cdrw_usr.h:52
BOOLEAN AdapterScansDown
Definition: scsi_port.h:142
LONG NTSTATUS
Definition: precomp.h:26
_Must_inspect_result_ _In_ PDRIVER_OBJECT _In_ PCUNICODE_STRING RegistryPath
Definition: wdfdriver.h:213
static VOID NTAPI ScsiPortIoTimer(PDEVICE_OBJECT DeviceObject, PVOID Context)
Definition: scsiport.c:2234
_Must_inspect_result_ _In_ PVOID _In_ struct _HW_INITIALIZATION_DATA _In_ PVOID HwContext
Definition: srb.h:897
#define TAG_SCSIPORT
Definition: scsiport.h:21
ACCESS_RANGE(* AccessRanges)[]
Definition: srb.h:74
IO_DPC_ROUTINE ScsiPortDpcForIsr
Definition: scsiport.h:451
void __cdecl __debugbreak(void)
Definition: intrin_ppc.h:698
_Must_inspect_result_ _In_ WDFIORESREQLIST _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFIORESLIST * ResourceList
Definition: wdfresource.h:304
DRIVER_DISPATCH ScsiPortDispatchScsi
Definition: scsiport.h:452
#define DO_DIRECT_IO
Definition: env_spec_w32.h:396
NTSYSAPI VOID NTAPI RtlCopyUnicodeString(PUNICODE_STRING DestinationString, PUNICODE_STRING SourceString)
VOID NTAPI SpiMiniportTimerDpc(IN struct _KDPC *Dpc, IN PVOID DeviceObject, IN PVOID SystemArgument1, IN PVOID SystemArgument2)
Definition: scsiport.c:2336
#define IRP_MJ_SCSI
#define STATUS_INTERNAL_ERROR
Definition: ntstatus.h:465
static PCM_RESOURCE_LIST SpiConfigToResource(PSCSI_PORT_DEVICE_EXTENSION DeviceExtension, PPORT_CONFIGURATION_INFORMATION PortConfig)
Definition: scsiport.c:1739
#define L(x)
Definition: ntvdm.h:50
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_opt_ PCUNICODE_STRING DeviceName
Definition: wdfdevice.h:3272
#define FILE_DEVICE_CONTROLLER
Definition: winioctl.h:110
#define FALSE
Definition: types.h:117
#define SCSI_MAXIMUM_TARGETS_PER_BUS
Definition: srb.h:22
PDEVICE_OBJECT NTAPI IoAttachDeviceToDeviceStack(IN PDEVICE_OBJECT SourceDevice, IN PDEVICE_OBJECT TargetDevice)
Definition: device.c:966
PHW_INITIALIZE HwInitialize
Definition: scsiport.c:80
FORCEINLINE VOID KeInitializeSpinLock(_Out_ PKSPIN_LOCK SpinLock)
Definition: kefuncs.h:240
static NTSTATUS SpiCreatePortConfig(PSCSI_PORT_DEVICE_EXTENSION DeviceExtension, PHW_INITIALIZATION_DATA HwInitData, PCONFIGURATION_INFO InternalConfigInfo, PPORT_CONFIGURATION_INFORMATION ConfigInfo, BOOLEAN FirstCall)
Definition: scsiport.c:2369
PVOID DeviceExtension
Definition: env_spec_w32.h:418
unsigned char BOOLEAN
PACCESS_RANGE AccessRanges
Definition: scsiport.h:97
_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
Definition: wsk.h:426
VOID NTAPI KeInitializeTimer(OUT PKTIMER Timer)
Definition: timerobj.c:233
NTSTATUS NTAPI ScsiPortDeviceControl(_In_ PDEVICE_OBJECT DeviceObject, _In_ PIRP Irp)
Definition: ioctl.c:404
static NTSTATUS SpiAllocateCommonBuffer(PSCSI_PORT_DEVICE_EXTENSION DeviceExtension, ULONG NonCachedSize)
Definition: scsiport.c:690
_In_ PVOID Argument2
Definition: classpnp.h:721
_Must_inspect_result_ _In_ PDRIVER_OBJECT DriverObject
Definition: wdfdriver.h:213
Status
Definition: gdiplustypes.h:24
struct _LIST_ENTRY * Flink
Definition: typedefs.h:121
int Count
Definition: noreturn.cpp:7
#define ASSERT(a)
Definition: mode.c:44
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
NTSTATUS NTAPI IoInitializeTimer(IN PDEVICE_OBJECT DeviceObject, IN PIO_TIMER_ROUTINE TimerRoutine, IN PVOID Context)
Definition: iotimer.c:92
NTSTATUS FdoStartAdapter(_In_ PSCSI_PORT_DEVICE_EXTENSION PortExtension)
Definition: fdo.c:609
#define SP_RETURN_NOT_FOUND
Definition: srb.h:521
#define SP_RETURN_FOUND
Definition: srb.h:522
VOID NTAPI ScsiPortUnload(_In_ PDRIVER_OBJECT DriverObject)
Definition: scsiport.c:121
#define ExAllocatePoolWithTag(hernya, size, tag)
Definition: env_spec_w32.h:350
#define BYTES_TO_PAGES(Size)
struct _PORT_CONFIGURATION_INFORMATION PORT_CONFIGURATION_INFORMATION
NTSYSAPI BOOLEAN NTAPI RtlCreateUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
#define IRP_MJ_POWER
#define IRP_MJ_CLOSE
Definition: rdpdr.c:45
PDRIVER_UNLOAD DriverUnload
Definition: iotypes.h:2288
signed long long INT64
PVOID NTAPI IoGetDriverObjectExtension(IN PDRIVER_OBJECT DriverObject, IN PVOID ClientIdentificationAddress)
Definition: driver.c:1875
struct _SCSI_PORT_DEVICE_EXTENSION SCSI_PORT_DEVICE_EXTENSION
VOID FdoScanAdapter(_In_ PSCSI_PORT_DEVICE_EXTENSION PortExtension)
Definition: fdo.c:222
int _cdecl swprintf(const WCHAR *,...)
ULONG AlignmentRequirement
Definition: env_spec_w32.h:420
#define FILE_WORD_ALIGNMENT
Definition: nt_native.h:787
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)
Definition: pnpreport.c:148
PDRIVER_OBJECT DriverObject
Definition: scsiport.h:334
ULONG LastAdapterNumber
Definition: scsiport.h:83
NTSTATUS FdoRemoveAdapter(_In_ PSCSI_PORT_DEVICE_EXTENSION DeviceExtension)
Definition: fdo.c:510
PHW_RESET_BUS HwResetBus
Definition: scsiport.c:83
PADAPTER_OBJECT AdapterObject
Definition: scsiport.c:86
#define InitializeListHead(ListHead)
Definition: env_spec_w32.h:944
NTSTATUS NTAPI ScsiPortDispatchPnp(PDEVICE_OBJECT DeviceObject, PIRP Irp)
Definition: scsiport.c:129
#define ALIGN_UP_POINTER(ptr, type)
Definition: umtypes.h:97
PHW_INTERRUPT HwInterrupt
Definition: scsiport.c:82
static BOOLEAN SpiGetPciConfigData(IN PDRIVER_OBJECT DriverObject, IN PDEVICE_OBJECT DeviceObject, IN struct _HW_INITIALIZATION_DATA *HwInitializationData, IN OUT PPORT_CONFIGURATION_INFORMATION PortConfig, IN PUNICODE_STRING RegistryPath, IN ULONG BusNumber, IN OUT PPCI_SLOT_NUMBER NextSlotNumber)
Definition: scsiport.c:1891
#define NULL
Definition: types.h:112
UNICODE_STRING * PUNICODE_STRING
Definition: env_spec_w32.h:373
#define DPRINT1
Definition: precomp.h:8
DRIVER_STARTIO ScsiPortStartIo
Definition: scsiport.h:454
static NTSTATUS NTAPI ScsiPortCreateClose(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: scsiport.c:2024
unsigned int ULONG
Definition: retypes.h:1
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)
Definition: device.c:1031
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263
#define FILE_DEVICE_SECURE_OPEN
Definition: cdrw_usr.h:46
#define STATUS_SUCCESS
Definition: shellext.h:65
#define DPRINT
Definition: sndvol32.h:71
DRIVER_DISPATCH ScsiPortDispatchPower
Definition: scsiport.h:426
VOID NTAPI KeInitializeDpc(IN PKDPC Dpc, IN PKDEFERRED_ROUTINE DeferredRoutine, IN PVOID DeferredContext)
Definition: dpc.c:712
unsigned char UINT8
#define ExFreePoolWithTag(_P, _T)
Definition: module.h:1099
BOOLEAN DisableTaggedQueueing
Definition: scsiport.h:92
UNICODE_STRING RegistryPath
Definition: scsiport.h:335
struct _IO_SCSI_CAPABILITIES IO_SCSI_CAPABILITIES
NTSTATUS NTAPI ScsiPortAddDevice(_In_ PDRIVER_OBJECT DriverObject, _In_ PDEVICE_OBJECT PhysicalDeviceObject)
Definition: scsiport.c:145
struct _DRIVER_OBJECT * PDRIVER_OBJECT
#define ExFreePool(addr)
Definition: env_spec_w32.h:352
NTSTATUS FdoCallHWInitialize(_In_ PSCSI_PORT_DEVICE_EXTENSION DeviceExtension)
Calls HwInitialize routine of the miniport and sets up interrupts Should be called inside ScsiPortIni...
Definition: fdo.c:366
_Must_inspect_result_ _In_ PVOID _In_ struct _HW_INITIALIZATION_DATA * HwInitializationData
Definition: srb.h:897
#define IRP_MJ_DEVICE_CONTROL
Definition: rdpdr.c:52

◆ ScsiPortIoMapTransfer()

SCSIPORT_API VOID NTAPI ScsiPortIoMapTransfer ( IN PVOID  HwDeviceExtension,
IN PSCSI_REQUEST_BLOCK  Srb,
IN PVOID  LogicalAddress,
IN ULONG  Length 
)

Definition at line 1278 of file scsiport.c.

1283 {
1284  // FIXME
1285  UNIMPLEMENTED;
1286 }
#define UNIMPLEMENTED
Definition: debug.h:115

◆ ScsiPortLogError()

SCSIPORT_API 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 
)

Definition at line 1290 of file scsiport.c.

1298 {
1299  // FIXME
1300  UNIMPLEMENTED;
1301 }
#define UNIMPLEMENTED
Definition: debug.h:115

Referenced by AtapiStartIo(), AtapiStartIo__(), BT958HwFindAdapter(), Buslogic_InitBT958(), BusLogic_ProcessCompletedCCBs(), and MapError().

◆ ScsiPortMoveMemory()

SCSIPORT_API VOID NTAPI ScsiPortMoveMemory ( IN PVOID  WriteBuffer,
IN PVOID  ReadBuffer,
IN ULONG  Length 
)

Definition at line 1305 of file scsiport.c.

1309 {
1311 }
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
#define ReadBuffer(BaseIoAddress, Buffer, Count)
Definition: atapi.h:339
#define RtlMoveMemory(Destination, Source, Length)
Definition: typedefs.h:264
#define WriteBuffer(BaseIoAddress, Buffer, Count)
Definition: atapi.h:344

Referenced by Atapi2Scsi(), AtapiStartIo(), AtapiStartIo__(), BusLogic_QueueCommand(), and IssueIdentify().

◆ ScsiPortNotification()

SCSIPORT_API VOID __cdecl ScsiPortNotification ( IN SCSI_NOTIFICATION_TYPE  NotificationType,
IN PVOID  HwDeviceExtension,
  ... 
)

Definition at line 1451 of file scsiport.c.

1452 {
1453  PSCSI_PORT_DEVICE_EXTENSION DeviceExtension;
1454  va_list ap;
1455 
1456  DPRINT("ScsiPortNotification() called\n");
1457 
1458  DeviceExtension =
1459  CONTAINING_RECORD(HwDeviceExtension, SCSI_PORT_DEVICE_EXTENSION, MiniPortDeviceExtension);
1460 
1461  DPRINT("DeviceExtension %p\n", DeviceExtension);
1462 
1463  va_start(ap, HwDeviceExtension);
1464 
1465  switch (NotificationType)
1466  {
1467  case RequestComplete:
1468  {
1470  PSCSI_REQUEST_BLOCK_INFO SrbData;
1471 
1473 
1474  DPRINT("Notify: RequestComplete (Srb %p)\n", Srb);
1475 
1476  /* Make sure Srb is alright */
1478  ASSERT(
1481 
1482  if (!(Srb->SrbFlags & SRB_FLAGS_IS_ACTIVE))
1483  {
1484  /* It's been already completed */
1485  va_end(ap);
1486  return;
1487  }
1488 
1489  /* It's not active anymore */
1491 
1493  {
1494  /* TODO: Treat it specially */
1495  ASSERT(FALSE);
1496  }
1497  else
1498  {
1500  PSCSI_PORT_LUN_EXTENSION LunExtension = IoStack->DeviceObject->DeviceExtension;
1501  ASSERT(LunExtension && !LunExtension->Common.IsFDO);
1502 
1503  /* Get the SRB data */
1504  SrbData = SpiGetSrbData(DeviceExtension, LunExtension, Srb->QueueTag);
1505 
1506  /* Make sure there are no CompletedRequests and there is a Srb */
1507  ASSERT(SrbData->CompletedRequests == NULL && SrbData->Srb != NULL);
1508 
1509  /* If it's a read/write request, make sure it has data inside it */
1510  if ((Srb->SrbStatus == SRB_STATUS_SUCCESS) &&
1511  ((Srb->Cdb[0] == SCSIOP_READ) || (Srb->Cdb[0] == SCSIOP_WRITE)))
1512  {
1514  }
1515 
1516  SrbData->CompletedRequests = DeviceExtension->InterruptData.CompletedRequests;
1517  DeviceExtension->InterruptData.CompletedRequests = SrbData;
1518  }
1519  }
1520  break;
1521 
1522  case NextRequest:
1523  DPRINT("Notify: NextRequest\n");
1524  DeviceExtension->InterruptData.Flags |= SCSI_PORT_NEXT_REQUEST_READY;
1525  break;
1526 
1527  case NextLuRequest:
1528  {
1529  UCHAR PathId;
1530  UCHAR TargetId;
1531  UCHAR Lun;
1532  PSCSI_PORT_LUN_EXTENSION LunExtension;
1533 
1534  PathId = (UCHAR)va_arg(ap, int);
1535  TargetId = (UCHAR)va_arg(ap, int);
1536  Lun = (UCHAR)va_arg(ap, int);
1537 
1538  DPRINT(
1539  "Notify: NextLuRequest(PathId %u TargetId %u Lun %u)\n", PathId, TargetId, Lun);
1540 
1541  /* Mark it in the flags field */
1542  DeviceExtension->InterruptData.Flags |= SCSI_PORT_NEXT_REQUEST_READY;
1543 
1544  /* Get the LUN extension */
1545  LunExtension = GetLunByPath(DeviceExtension, PathId, TargetId, Lun);
1546 
1547  /* If returned LunExtension is NULL, break out */
1548  if (!LunExtension)
1549  break;
1550 
1551  /* This request should not be processed if */
1552  if ((LunExtension->ReadyLun) || (LunExtension->SrbInfo.Srb))
1553  {
1554  /* Nothing to do here */
1555  break;
1556  }
1557 
1558  /* Add this LUN to the list */
1559  LunExtension->ReadyLun = DeviceExtension->InterruptData.ReadyLun;
1560  DeviceExtension->InterruptData.ReadyLun = LunExtension;
1561  }
1562  break;
1563 
1564  case ResetDetected:
1565  DPRINT("Notify: ResetDetected\n");
1566  /* Add RESET flags */
1567  DeviceExtension->InterruptData.Flags |= SCSI_PORT_RESET | SCSI_PORT_RESET_REPORTED;
1568  break;
1569 
1570  case CallDisableInterrupts:
1571  DPRINT1("UNIMPLEMENTED SCSI Notification called: CallDisableInterrupts!\n");
1572  break;
1573 
1574  case CallEnableInterrupts:
1575  DPRINT1("UNIMPLEMENTED SCSI Notification called: CallEnableInterrupts!\n");
1576  break;
1577 
1578  case RequestTimerCall:
1579  DPRINT("Notify: RequestTimerCall\n");
1580  DeviceExtension->InterruptData.Flags |= SCSI_PORT_TIMER_NEEDED;
1581  DeviceExtension->InterruptData.HwScsiTimer = (PHW_TIMER)va_arg(ap, PHW_TIMER);
1582  DeviceExtension->InterruptData.MiniportTimerValue = (ULONG)va_arg(ap, ULONG);
1583  break;
1584 
1585  case BusChangeDetected:
1586  DPRINT1("UNIMPLEMENTED SCSI Notification called: BusChangeDetected!\n");
1587  break;
1588 
1589  default:
1590  DPRINT1("Unsupported notification from WMI: %lu\n", NotificationType);
1591  break;
1592  }
1593 
1594  va_end(ap);
1595 
1596  /* Request a DPC after we're done with the interrupt */
1597  DeviceExtension->InterruptData.Flags |= SCSI_PORT_NOTIFICATION_NEEDED;
1598 }
struct _SCSI_REQUEST_BLOCK_INFO * CompletedRequests
Definition: scsiport.h:129
ULONG SrbFlags
Definition: srb.h:260
_In_ ULONG _In_ BOOLEAN _In_ ULONG _In_ UCHAR _In_ UCHAR _In_ UCHAR Lun
Definition: classpnp.h:1310
PVOID OriginalRequest
Definition: srb.h:266
_In_ PSCSI_REQUEST_BLOCK Srb
Definition: cdrom.h:989
UCHAR Cdb[16]
Definition: srb.h:279
struct _SCSI_REQUEST_BLOCK * PSCSI_REQUEST_BLOCK
_In_ ULONG _In_ BOOLEAN _In_ ULONG _In_ UCHAR PathId
Definition: classpnp.h:1310
#define SRB_FLAGS_IS_ACTIVE
Definition: srb.h:407
_In_ ULONG _In_ BOOLEAN _In_ ULONG _In_ UCHAR _In_ UCHAR TargetId
Definition: classpnp.h:1310
ULONG DataTransferLength
Definition: srb.h:261
#define SCSI_PORT_RESET
Definition: scsiport.h:35
#define SCSI_PORT_NOTIFICATION_NEEDED
Definition: scsiport.h:31
UCHAR SrbStatus
Definition: srb.h:251
_In_ WDF_SPECIAL_FILE_TYPE NotificationType
Definition: wdfdevice.h:1024
#define va_end(ap)
Definition: acmsvcex.h:90
#define FALSE
Definition: types.h:117
#define SCSI_PORT_NEXT_REQUEST_READY
Definition: scsiport.c:53
UCHAR ScsiStatus
Definition: srb.h:252
#define SCSIOP_READ
Definition: cdrw_hw.h:905
#define SRB_STATUS_PENDING
Definition: srb.h:340
PVOID DeviceExtension
Definition: env_spec_w32.h:418
#define SCSIOP_WRITE
Definition: cdrw_hw.h:906
char * va_list
Definition: acmsvcex.h:78
UCHAR QueueTag
Definition: srb.h:256
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560
#define ASSERT(a)
Definition: mode.c:44
SCSI_REQUEST_BLOCK_INFO SrbInfo
Definition: scsiport.h:174
UCHAR Function
Definition: srb.h:250
PDEVICE_OBJECT DeviceObject
Definition: iotypes.h:3223
va_start(ap, x)
unsigned char UCHAR
Definition: xmlstorage.h:181
PSCSI_REQUEST_BLOCK Srb
Definition: scsiport.h:119
#define SRB_FUNCTION_ABORT_COMMAND
Definition: srb.h:324
__drv_aliasesMem FORCEINLINE PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(_In_ PIRP Irp)
Definition: iofuncs.h:2793
#define va_arg(ap, T)
Definition: acmsvcex.h:89
#define NULL
Definition: types.h:112
struct _SCSI_PORT_LUN_EXTENSION * ReadyLun
Definition: scsiport.h:171
#define DPRINT1
Definition: precomp.h:8
SCSI_PORT_COMMON_EXTENSION Common
Definition: scsiport.h:146
void int int ULONGLONG int va_list * ap
Definition: winesup.h:32
VOID(NTAPI * PHW_TIMER)(IN PVOID DeviceExtension)
Definition: srb.h:456
#define SRB_FUNCTION_EXECUTE_SCSI
Definition: srb.h:315
PSCSI_REQUEST_BLOCK_INFO SpiGetSrbData(_In_ PSCSI_PORT_DEVICE_EXTENSION DeviceExtension, _In_ PSCSI_PORT_LUN_EXTENSION LunExtension, _In_ UCHAR QueueTag)
Definition: pdo.c:102
unsigned int ULONG
Definition: retypes.h:1
#define SRB_STATUS_SUCCESS
Definition: srb.h:341
#define SCSISTAT_GOOD
Definition: cdrw_hw.h:1078
PSCSI_PORT_LUN_EXTENSION GetLunByPath(_In_ PSCSI_PORT_DEVICE_EXTENSION DeviceExtension, _In_ UCHAR PathId, _In_ UCHAR TargetId, _In_ UCHAR Lun)
Definition: pdo.c:68
#define DPRINT
Definition: sndvol32.h:71
#define SCSI_PORT_TIMER_NEEDED
Definition: scsiport.h:43
#define SCSI_PORT_RESET_REPORTED
Definition: scsiport.h:37

◆ ScsiPortReadPortBufferUchar()

SCSIPORT_API VOID NTAPI ScsiPortReadPortBufferUchar ( IN PUCHAR  Port,
IN PUCHAR  Buffer,
IN ULONG  Count 
)

Definition at line 54 of file stubs.c.

58 {
60 }
CPPORT Port[4]
Definition: headless.c:35
VOID NTAPI READ_PORT_BUFFER_UCHAR(IN PUCHAR Port, OUT PUCHAR Buffer, IN ULONG Count)
Definition: portio.c:26
Definition: bufpool.h:45
int Count
Definition: noreturn.cpp:7

◆ ScsiPortReadPortBufferUlong()

SCSIPORT_API VOID NTAPI ScsiPortReadPortBufferUlong ( IN PULONG  Port,
IN PULONG  Buffer,
IN ULONG  Count 
)

Definition at line 74 of file stubs.c.

78 {
80 }
CPPORT Port[4]
Definition: headless.c:35
Definition: bufpool.h:45
int Count
Definition: noreturn.cpp:7
VOID NTAPI READ_PORT_BUFFER_ULONG(IN PULONG Port, OUT PULONG Buffer, IN ULONG Count)
Definition: portio.c:46

◆ ScsiPortReadPortBufferUshort()

SCSIPORT_API VOID NTAPI ScsiPortReadPortBufferUshort ( IN PUSHORT  Port,
IN PUSHORT  Buffer,
IN ULONG  Count 
)

Definition at line 64 of file stubs.c.

68 {
70 }
CPPORT Port[4]
Definition: headless.c:35
Definition: bufpool.h:45
int Count
Definition: noreturn.cpp:7
VOID NTAPI READ_PORT_BUFFER_USHORT(IN PUSHORT Port, OUT PUSHORT Buffer, IN ULONG Count)
Definition: portio.c:36

◆ ScsiPortReadPortUchar()

SCSIPORT_API UCHAR NTAPI ScsiPortReadPortUchar ( IN PUCHAR  Port)

Definition at line 1381 of file scsiport.c.

1383 {
1384  TRACE("ScsiPortReadPortUchar(%p)\n", Port);
1385 
1386  return READ_PORT_UCHAR(Port);
1387 }
CPPORT Port[4]
Definition: headless.c:35
#define READ_PORT_UCHAR(p)
Definition: pc98vid.h:22
#define TRACE(s)
Definition: solgame.cpp:4

Referenced by AtapiFindController(), AtapiFindNativeModeController(), AtapiFindPCIController(), AtapiHwInitialize(), AtapiInterrupt(), FindDevices(), IdeMediaStatus(), IdeSendCommand(), IssueIdentify(), MapError(), ReadBusLogicPort(), and SetDriveParameters().

◆ ScsiPortReadPortUlong()

SCSIPORT_API ULONG NTAPI ScsiPortReadPortUlong ( IN PULONG  Port)

Definition at line 1391 of file scsiport.c.

1393 {
1394  return READ_PORT_ULONG(Port);
1395 }
CPPORT Port[4]
Definition: headless.c:35
ULONG NTAPI READ_PORT_ULONG(IN PULONG Port)
Definition: portio.c:70

◆ ScsiPortReadPortUshort()

SCSIPORT_API USHORT NTAPI ScsiPortReadPortUshort ( IN PUSHORT  Port)

Definition at line 1399 of file scsiport.c.

1401 {
1402  return READ_PORT_USHORT(Port);
1403 }
CPPORT Port[4]
Definition: headless.c:35
USHORT NTAPI READ_PORT_USHORT(IN PUSHORT Port)
Definition: portio.c:63

Referenced by AtapiSendCommand(), and IssueIdentify().

◆ ScsiPortReadRegisterBufferUchar()

SCSIPORT_API VOID NTAPI ScsiPortReadRegisterBufferUchar ( IN PUCHAR  Register,
IN PUCHAR  Buffer,
IN ULONG  Count 
)

Definition at line 1407 of file scsiport.c.

1411 {
1412  // FIXME
1413  UNIMPLEMENTED;
1414 }
#define UNIMPLEMENTED
Definition: debug.h:115

◆ ScsiPortReadRegisterBufferUlong()

SCSIPORT_API VOID NTAPI ScsiPortReadRegisterBufferUlong ( IN PULONG  Register,
IN PULONG  Buffer,
IN ULONG  Count 
)

Definition at line 1418 of file scsiport.c.

1422 {
1423  // FIXME
1424  UNIMPLEMENTED;
1425 }
#define UNIMPLEMENTED
Definition: debug.h:115

◆ ScsiPortReadRegisterBufferUshort()

SCSIPORT_API VOID NTAPI ScsiPortReadRegisterBufferUshort ( IN PUSHORT  Register,
IN PUSHORT  Buffer,
IN ULONG  Count 
)

Definition at line 1429 of file scsiport.c.

1433 {
1434  // FIXME
1435  UNIMPLEMENTED;
1436 }
#define UNIMPLEMENTED
Definition: debug.h:115

◆ ScsiPortReadRegisterUchar()

SCSIPORT_API UCHAR NTAPI ScsiPortReadRegisterUchar ( IN PUCHAR  Register)

Definition at line 1440 of file scsiport.c.

1442 {
1443  return READ_REGISTER_UCHAR(Register);
1444 }
NTKERNELAPI UCHAR NTAPI READ_REGISTER_UCHAR(IN PUCHAR Register)

◆ ScsiPortReadRegisterUlong()

SCSIPORT_API ULONG NTAPI ScsiPortReadRegisterUlong ( IN PULONG  Register)

Definition at line 1448 of file scsiport.c.

1450 {
1451  return READ_REGISTER_ULONG(Register);
1452 }
NTKERNELAPI ULONG NTAPI READ_REGISTER_ULONG(IN PULONG Register)

◆ ScsiPortReadRegisterUshort()

SCSIPORT_API USHORT NTAPI ScsiPortReadRegisterUshort ( IN PUSHORT  Register)

Definition at line 1456 of file scsiport.c.

1458 {
1459  return READ_REGISTER_USHORT(Register);
1460 }
NTKERNELAPI USHORT NTAPI READ_REGISTER_USHORT(IN PUSHORT Register)

◆ ScsiPortSetBusDataByOffset()

SCSIPORT_API ULONG NTAPI ScsiPortSetBusDataByOffset ( IN PVOID  DeviceExtension,
IN ULONG  BusDataType,
IN ULONG  SystemIoBusNumber,
IN ULONG  SlotNumber,
IN PVOID  Buffer,
IN ULONG  Offset,
IN ULONG  Length 
)

Definition at line 1464 of file scsiport.c.

1472 {
1473  // FIXME
1474  UNIMPLEMENTED;
1475  return 0;
1476 }
#define UNIMPLEMENTED
Definition: debug.h:115

◆ ScsiPortStallExecution()

◆ ScsiPortValidateRange()

SCSIPORT_API BOOLEAN NTAPI ScsiPortValidateRange ( IN PVOID  HwDeviceExtension,
IN INTERFACE_TYPE  BusType,
IN ULONG  SystemIoBusNumber,
IN SCSI_PHYSICAL_ADDRESS  IoAddress,
IN ULONG  NumberOfBytes,
IN BOOLEAN  InIoSpace 
)

Definition at line 1488 of file scsiport.c.

1495 {
1496  // FIXME
1497  UNIMPLEMENTED;
1498  return TRUE;
1499 }
#define TRUE
Definition: types.h:120
#define UNIMPLEMENTED
Definition: debug.h:115

Referenced by BT958HwFindAdapter(), and UniataFindBusMasterController().

◆ ScsiPortWritePortBufferUchar()

SCSIPORT_API VOID NTAPI ScsiPortWritePortBufferUchar ( IN PUCHAR  Port,
IN PUCHAR  Buffer,
IN ULONG  Count 
)

Definition at line 1508 of file scsiport.c.

1512 {
1514 }
CPPORT Port[4]
Definition: headless.c:35
PPC_QUAL void __outbytestring(unsigned long const Port, const unsigned char *const Buffer, const unsigned long Count)
Definition: intrin_ppc.h:653
#define H2I(Port)
Definition: portio.c:18
Definition: bufpool.h:45
int Count
Definition: noreturn.cpp:7

◆ ScsiPortWritePortBufferUlong()

SCSIPORT_API VOID NTAPI ScsiPortWritePortBufferUlong ( IN PULONG  Port,
IN PULONG  Buffer,
IN ULONG  Count 
)

Definition at line 1518 of file scsiport.c.

1522 {
1524 }
CPPORT Port[4]
Definition: headless.c:35
#define H2I(Port)
Definition: portio.c:18
PPC_QUAL void __outdwordstring(unsigned long const Port, const unsigned long *const Buffer, const unsigned long Count)
Definition: intrin_ppc.h:671
Definition: bufpool.h:45
int Count
Definition: noreturn.cpp:7

◆ ScsiPortWritePortBufferUshort()

SCSIPORT_API VOID NTAPI ScsiPortWritePortBufferUshort ( IN PUSHORT  Port,
IN PUSHORT  Buffer,
IN ULONG  Count 
)

Definition at line 1528 of file scsiport.c.

1532 {
1534 }
CPPORT Port[4]
Definition: headless.c:35
#define H2I(Port)
Definition: portio.c:18
Definition: bufpool.h:45
int Count
Definition: noreturn.cpp:7
PPC_QUAL void __outwordstring(unsigned long const Port, const unsigned short *const Buffer, const unsigned long Count)
Definition: intrin_ppc.h:662

◆ ScsiPortWritePortUchar()

SCSIPORT_API VOID NTAPI ScsiPortWritePortUchar ( IN PUCHAR  Port,
IN UCHAR  Value 
)

Definition at line 1538 of file scsiport.c.

1541 {
1543 }
CPPORT Port[4]
Definition: headless.c:35
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
Definition: wdfregistry.h:406
#define WRITE_PORT_UCHAR(p, d)
Definition: pc98vid.h:21

Referenced by AtapiFindController(), AtapiFindNativeModeController(), AtapiFindPCIController(), AtapiHwInitialize(), AtapiSendCommand(), FindDevices(), IdeMediaStatus(), IdeReadWrite(), IdeSendCommand(), IdeSendSmartCommand(), IdeVerify(), IssueIdentify(), MapError(), SetDriveParameters(), and WriteBusLogicPort().

◆ ScsiPortWritePortUlong()

SCSIPORT_API VOID NTAPI ScsiPortWritePortUlong ( IN PULONG  Port,
IN ULONG  Value 
)

Definition at line 1547 of file scsiport.c.

1550 {
1552 }
CPPORT Port[4]
Definition: headless.c:35
VOID NTAPI WRITE_PORT_ULONG(IN PULONG Port, IN ULONG Value)
Definition: portio.c:123
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
Definition: wdfregistry.h:406

◆ ScsiPortWritePortUshort()

SCSIPORT_API VOID NTAPI ScsiPortWritePortUshort ( IN PUSHORT  Port,
IN USHORT  Value 
)

Definition at line 1556 of file scsiport.c.

1559 {
1561 }
CPPORT Port[4]
Definition: headless.c:35
VOID NTAPI WRITE_PORT_USHORT(IN PUSHORT Port, IN USHORT Value)
Definition: portio.c:115
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
Definition: wdfregistry.h:406

◆ ScsiPortWriteRegisterBufferUchar()

SCSIPORT_API VOID NTAPI ScsiPortWriteRegisterBufferUchar ( IN PUCHAR  Register,
IN PUCHAR  Buffer,
IN ULONG  Count 
)

Definition at line 1565 of file scsiport.c.

1569 {
1570  // FIXME
1571  UNIMPLEMENTED;
1572 }
#define UNIMPLEMENTED
Definition: debug.h:115

◆ ScsiPortWriteRegisterBufferUlong()

SCSIPORT_API VOID NTAPI ScsiPortWriteRegisterBufferUlong ( IN PULONG  Register,
IN PULONG  Buffer,
IN ULONG  Count 
)

Definition at line 1576 of file scsiport.c.

1580 {
1581  // FIXME
1582  UNIMPLEMENTED;
1583 }
#define UNIMPLEMENTED
Definition: debug.h:115

◆ ScsiPortWriteRegisterBufferUshort()

SCSIPORT_API VOID NTAPI ScsiPortWriteRegisterBufferUshort ( IN PUSHORT  Register,
IN PUSHORT  Buffer,
IN ULONG  Count 
)

Definition at line 1587 of file scsiport.c.

1591 {
1592  // FIXME
1593  UNIMPLEMENTED;
1594 }
#define UNIMPLEMENTED
Definition: debug.h:115

◆ ScsiPortWriteRegisterUchar()

SCSIPORT_API VOID NTAPI ScsiPortWriteRegisterUchar ( IN PUCHAR  Register,
IN UCHAR  Value 
)

Definition at line 1598 of file scsiport.c.

1601 {
1602  WRITE_REGISTER_UCHAR(Register, Value);
1603 }
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
Definition: wdfregistry.h:406
NTKERNELAPI VOID NTAPI WRITE_REGISTER_UCHAR(IN PUCHAR Register, IN UCHAR Value)

◆ ScsiPortWriteRegisterUlong()

SCSIPORT_API VOID NTAPI ScsiPortWriteRegisterUlong ( IN PULONG  Register,
IN ULONG  Value 
)

Definition at line 1607 of file scsiport.c.

1610 {
1611  WRITE_REGISTER_ULONG(Register, Value);
1612 }
NTKERNELAPI VOID NTAPI WRITE_REGISTER_ULONG(IN PULONG Register, IN ULONG Value)
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
Definition: wdfregistry.h:406

◆ ScsiPortWriteRegisterUshort()

SCSIPORT_API VOID NTAPI ScsiPortWriteRegisterUshort ( IN PUSHORT  Register,
IN USHORT  Value 
)

Definition at line 1616 of file scsiport.c.

1619 {
1620  WRITE_REGISTER_USHORT(Register, Value);
1621 }
NTKERNELAPI VOID NTAPI WRITE_REGISTER_USHORT(IN PUSHORT Register, IN USHORT Value)
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
Definition: wdfregistry.h:406