ReactOS  0.4.15-dev-3017-g1d9542d
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 138 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 161 of file srb.h.

◆ SCSI_DMA64_SYSTEM_SUPPORTED

#define SCSI_DMA64_SYSTEM_SUPPORTED   0x80

Definition at line 153 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 274 of file srb.h.

◆ SCSIPORT_API

#define SCSIPORT_API   DECLSPEC_IMPORT

Definition at line 600 of file srb.h.

◆ ScsiPortConvertPhysicalAddressToUlong

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

Definition at line 949 of file srb.h.

◆ SP_BAD_FW_ERROR

#define SP_BAD_FW_ERROR   0x000a

Definition at line 505 of file srb.h.

◆ SP_BAD_FW_WARNING

#define SP_BAD_FW_WARNING   0x0009

Definition at line 504 of file srb.h.

◆ SP_BUS_PARITY_ERROR

#define SP_BUS_PARITY_ERROR   0x0001

Definition at line 496 of file srb.h.

◆ SP_BUS_TIME_OUT

#define SP_BUS_TIME_OUT   0x0004

Definition at line 499 of file srb.h.

◆ SP_INTERNAL_ADAPTER_ERROR

#define SP_INTERNAL_ADAPTER_ERROR   0x0006

Definition at line 501 of file srb.h.

◆ SP_INVALID_RESELECTION

#define SP_INVALID_RESELECTION   0x0003

Definition at line 498 of file srb.h.

◆ SP_IRQ_NOT_RESPONDING

#define SP_IRQ_NOT_RESPONDING   0x0008

Definition at line 503 of file srb.h.

◆ SP_LOST_WMI_MINIPORT_REQUEST

#define SP_LOST_WMI_MINIPORT_REQUEST   0x000b

Definition at line 506 of file srb.h.

◆ SP_PROTOCOL_ERROR

#define SP_PROTOCOL_ERROR   0x0005

Definition at line 500 of file srb.h.

◆ SP_REQUEST_TIMEOUT

#define SP_REQUEST_TIMEOUT   0x0007

Definition at line 502 of file srb.h.

◆ SP_RETURN_BAD_CONFIG

#define SP_RETURN_BAD_CONFIG   3

Definition at line 516 of file srb.h.

◆ SP_RETURN_ERROR

#define SP_RETURN_ERROR   2

Definition at line 515 of file srb.h.

◆ SP_RETURN_FOUND

#define SP_RETURN_FOUND   1

Definition at line 514 of file srb.h.

◆ SP_RETURN_NOT_FOUND

#define SP_RETURN_NOT_FOUND   0

Definition at line 513 of file srb.h.

◆ SP_UNEXPECTED_DISCONNECT

#define SP_UNEXPECTED_DISCONNECT   0x0002

Definition at line 497 of file srb.h.

◆ SP_UNINITIALIZED_VALUE

#define SP_UNINITIALIZED_VALUE   ((ULONG) ~0)

Definition at line 224 of file srb.h.

◆ SP_UNTAGGED

#define SP_UNTAGGED   ((UCHAR) ~0)

Definition at line 225 of file srb.h.

◆ SRB_FLAGS_ADAPTER_CACHE_ENABLE

#define SRB_FLAGS_ADAPTER_CACHE_ENABLE   0x00000200

Definition at line 397 of file srb.h.

◆ SRB_FLAGS_ALLOCATED_FROM_ZONE

#define SRB_FLAGS_ALLOCATED_FROM_ZONE   0x00020000

Definition at line 400 of file srb.h.

◆ SRB_FLAGS_BYPASS_FROZEN_QUEUE

#define SRB_FLAGS_BYPASS_FROZEN_QUEUE   0x00000010

Definition at line 390 of file srb.h.

◆ SRB_FLAGS_BYPASS_LOCKED_QUEUE

#define SRB_FLAGS_BYPASS_LOCKED_QUEUE   0x00080000

Definition at line 402 of file srb.h.

◆ SRB_FLAGS_CLASS_DRIVER_RESERVED

#define SRB_FLAGS_CLASS_DRIVER_RESERVED   0xF0000000

Definition at line 410 of file srb.h.

◆ SRB_FLAGS_DATA_IN

#define SRB_FLAGS_DATA_IN   0x00000040

Definition at line 392 of file srb.h.

◆ SRB_FLAGS_DATA_OUT

#define SRB_FLAGS_DATA_OUT   0x00000080

Definition at line 393 of file srb.h.

◆ SRB_FLAGS_DISABLE_AUTOSENSE

#define SRB_FLAGS_DISABLE_AUTOSENSE   0x00000020

Definition at line 391 of file srb.h.

◆ SRB_FLAGS_DISABLE_DISCONNECT

#define SRB_FLAGS_DISABLE_DISCONNECT   0x00000004

Definition at line 388 of file srb.h.

◆ SRB_FLAGS_DISABLE_SYNCH_TRANSFER

#define SRB_FLAGS_DISABLE_SYNCH_TRANSFER   0x00000008

Definition at line 389 of file srb.h.

◆ SRB_FLAGS_DONT_START_NEXT_PACKET

#define SRB_FLAGS_DONT_START_NEXT_PACKET   0x00800000

Definition at line 407 of file srb.h.

◆ SRB_FLAGS_FREE_SENSE_BUFFER

#define SRB_FLAGS_FREE_SENSE_BUFFER   0x00000400

Definition at line 398 of file srb.h.

◆ SRB_FLAGS_IS_ACTIVE

#define SRB_FLAGS_IS_ACTIVE   0x00010000

Definition at line 399 of file srb.h.

◆ SRB_FLAGS_NO_DATA_TRANSFER

#define SRB_FLAGS_NO_DATA_TRANSFER   0x00000000

Definition at line 394 of file srb.h.

◆ SRB_FLAGS_NO_KEEP_AWAKE

#define SRB_FLAGS_NO_KEEP_AWAKE   0x00100000

Definition at line 404 of file srb.h.

◆ SRB_FLAGS_NO_QUEUE_FREEZE

#define SRB_FLAGS_NO_QUEUE_FREEZE   0x00000100

Definition at line 396 of file srb.h.

◆ SRB_FLAGS_PORT_DRIVER_ALLOCSENSE

#define SRB_FLAGS_PORT_DRIVER_ALLOCSENSE   0x00200000

Definition at line 405 of file srb.h.

◆ SRB_FLAGS_PORT_DRIVER_RESERVED

#define SRB_FLAGS_PORT_DRIVER_RESERVED   0x0F000000

Definition at line 409 of file srb.h.

◆ SRB_FLAGS_PORT_DRIVER_SENSEHASPORT

#define SRB_FLAGS_PORT_DRIVER_SENSEHASPORT   0x00400000

Definition at line 406 of file srb.h.

◆ SRB_FLAGS_QUEUE_ACTION_ENABLE

#define SRB_FLAGS_QUEUE_ACTION_ENABLE   0x00000002

Definition at line 387 of file srb.h.

◆ SRB_FLAGS_SGLIST_FROM_POOL

#define SRB_FLAGS_SGLIST_FROM_POOL   0x00040000

Definition at line 401 of file srb.h.

◆ SRB_FLAGS_UNSPECIFIED_DIRECTION

#define SRB_FLAGS_UNSPECIFIED_DIRECTION   (SRB_FLAGS_DATA_IN | SRB_FLAGS_DATA_OUT)

Definition at line 395 of file srb.h.

◆ SRB_FUNCTION_ABORT_COMMAND

#define SRB_FUNCTION_ABORT_COMMAND   0x10

Definition at line 316 of file srb.h.

◆ SRB_FUNCTION_ATTACH_DEVICE

#define SRB_FUNCTION_ATTACH_DEVICE   0x05

Definition at line 312 of file srb.h.

◆ SRB_FUNCTION_CLAIM_DEVICE

#define SRB_FUNCTION_CLAIM_DEVICE   0x01

Definition at line 308 of file srb.h.

◆ SRB_FUNCTION_EXECUTE_SCSI

#define SRB_FUNCTION_EXECUTE_SCSI   0x00

Definition at line 307 of file srb.h.

◆ SRB_FUNCTION_FLUSH

#define SRB_FUNCTION_FLUSH   0x08

Definition at line 315 of file srb.h.

◆ SRB_FUNCTION_FLUSH_QUEUE

#define SRB_FUNCTION_FLUSH_QUEUE   0x15

Definition at line 321 of file srb.h.

◆ SRB_FUNCTION_IO_CONTROL

#define SRB_FUNCTION_IO_CONTROL   0x02

Definition at line 309 of file srb.h.

◆ SRB_FUNCTION_LOCK_QUEUE

#define SRB_FUNCTION_LOCK_QUEUE   0x18

Definition at line 324 of file srb.h.

◆ SRB_FUNCTION_RECEIVE_EVENT

#define SRB_FUNCTION_RECEIVE_EVENT   0x03

Definition at line 310 of file srb.h.

◆ SRB_FUNCTION_RELEASE_DEVICE

#define SRB_FUNCTION_RELEASE_DEVICE   0x06

Definition at line 313 of file srb.h.

◆ SRB_FUNCTION_RELEASE_QUEUE

#define SRB_FUNCTION_RELEASE_QUEUE   0x04

Definition at line 311 of file srb.h.

◆ SRB_FUNCTION_RELEASE_RECOVERY

#define SRB_FUNCTION_RELEASE_RECOVERY   0x11

Definition at line 317 of file srb.h.

◆ SRB_FUNCTION_REMOVE_DEVICE

#define SRB_FUNCTION_REMOVE_DEVICE   0x16

Definition at line 322 of file srb.h.

◆ SRB_FUNCTION_RESET_BUS

#define SRB_FUNCTION_RESET_BUS   0x12

Definition at line 318 of file srb.h.

◆ SRB_FUNCTION_RESET_DEVICE

#define SRB_FUNCTION_RESET_DEVICE   0x13

Definition at line 319 of file srb.h.

◆ SRB_FUNCTION_RESET_LOGICAL_UNIT

#define SRB_FUNCTION_RESET_LOGICAL_UNIT   0x20

Definition at line 326 of file srb.h.

◆ SRB_FUNCTION_SHUTDOWN

#define SRB_FUNCTION_SHUTDOWN   0x07

Definition at line 314 of file srb.h.

◆ SRB_FUNCTION_TERMINATE_IO

#define SRB_FUNCTION_TERMINATE_IO   0x14

Definition at line 320 of file srb.h.

◆ SRB_FUNCTION_UNLOCK_QUEUE

#define SRB_FUNCTION_UNLOCK_QUEUE   0x19

Definition at line 325 of file srb.h.

◆ SRB_FUNCTION_WMI

#define SRB_FUNCTION_WMI   0x17

Definition at line 323 of file srb.h.

◆ SRB_HEAD_OF_QUEUE_TAG_REQUEST

#define SRB_HEAD_OF_QUEUE_TAG_REQUEST   0x21

Definition at line 416 of file srb.h.

◆ SRB_ORDERED_QUEUE_TAG_REQUEST

#define SRB_ORDERED_QUEUE_TAG_REQUEST   0x22

Definition at line 417 of file srb.h.

◆ SRB_SIMPLE_TAG_REQUEST

#define SRB_SIMPLE_TAG_REQUEST   0x20

Definition at line 415 of file srb.h.

◆ SRB_STATUS

Definition at line 381 of file srb.h.

◆ SRB_STATUS_ABORT_FAILED

#define SRB_STATUS_ABORT_FAILED   0x03

Definition at line 335 of file srb.h.

◆ SRB_STATUS_ABORTED

#define SRB_STATUS_ABORTED   0x02

Definition at line 334 of file srb.h.

◆ SRB_STATUS_AUTOSENSE_VALID

#define SRB_STATUS_AUTOSENSE_VALID   0x80

Definition at line 379 of file srb.h.

◆ SRB_STATUS_BAD_FUNCTION

#define SRB_STATUS_BAD_FUNCTION   0x22

Definition at line 356 of file srb.h.

◆ SRB_STATUS_BAD_SRB_BLOCK_LENGTH

#define SRB_STATUS_BAD_SRB_BLOCK_LENGTH   0x15

Definition at line 352 of file srb.h.

◆ SRB_STATUS_BUS_RESET

#define SRB_STATUS_BUS_RESET   0x0E

Definition at line 345 of file srb.h.

◆ SRB_STATUS_BUSY

#define SRB_STATUS_BUSY   0x05

Definition at line 337 of file srb.h.

◆ SRB_STATUS_COMMAND_TIMEOUT

#define SRB_STATUS_COMMAND_TIMEOUT   0x0B

Definition at line 343 of file srb.h.

◆ SRB_STATUS_DATA_OVERRUN

#define SRB_STATUS_DATA_OVERRUN   0x12

Definition at line 349 of file srb.h.

◆ SRB_STATUS_ERROR

#define SRB_STATUS_ERROR   0x04

Definition at line 336 of file srb.h.

◆ SRB_STATUS_ERROR_RECOVERY

#define SRB_STATUS_ERROR_RECOVERY   0x23

Definition at line 357 of file srb.h.

◆ SRB_STATUS_INTERNAL_ERROR

#define SRB_STATUS_INTERNAL_ERROR   0x30

Definition at line 365 of file srb.h.

◆ SRB_STATUS_INVALID_LUN

#define SRB_STATUS_INVALID_LUN   0x20

Definition at line 354 of file srb.h.

◆ SRB_STATUS_INVALID_PATH_ID

#define SRB_STATUS_INVALID_PATH_ID   0x07

Definition at line 339 of file srb.h.

◆ SRB_STATUS_INVALID_REQUEST

#define SRB_STATUS_INVALID_REQUEST   0x06

Definition at line 338 of file srb.h.

◆ SRB_STATUS_INVALID_TARGET_ID

#define SRB_STATUS_INVALID_TARGET_ID   0x21

Definition at line 355 of file srb.h.

◆ SRB_STATUS_MESSAGE_REJECTED

#define SRB_STATUS_MESSAGE_REJECTED   0x0D

Definition at line 344 of file srb.h.

◆ SRB_STATUS_NO_DEVICE

#define SRB_STATUS_NO_DEVICE   0x08

Definition at line 340 of file srb.h.

◆ SRB_STATUS_NO_HBA

#define SRB_STATUS_NO_HBA   0x11

Definition at line 348 of file srb.h.

◆ SRB_STATUS_NOT_POWERED

#define SRB_STATUS_NOT_POWERED   0x24

Definition at line 358 of file srb.h.

◆ SRB_STATUS_PARITY_ERROR

#define SRB_STATUS_PARITY_ERROR   0x0F

Definition at line 346 of file srb.h.

◆ SRB_STATUS_PENDING

#define SRB_STATUS_PENDING   0x00

Definition at line 332 of file srb.h.

◆ SRB_STATUS_PHASE_SEQUENCE_FAILURE

#define SRB_STATUS_PHASE_SEQUENCE_FAILURE   0x14

Definition at line 351 of file srb.h.

◆ SRB_STATUS_QUEUE_FROZEN

#define SRB_STATUS_QUEUE_FROZEN   0x40

Definition at line 378 of file srb.h.

◆ SRB_STATUS_REQUEST_FLUSHED

#define SRB_STATUS_REQUEST_FLUSHED   0x16

Definition at line 353 of file srb.h.

◆ SRB_STATUS_REQUEST_SENSE_FAILED

#define SRB_STATUS_REQUEST_SENSE_FAILED   0x10

Definition at line 347 of file srb.h.

◆ SRB_STATUS_SELECTION_TIMEOUT

#define SRB_STATUS_SELECTION_TIMEOUT   0x0A

Definition at line 342 of file srb.h.

◆ SRB_STATUS_SUCCESS

#define SRB_STATUS_SUCCESS   0x01

Definition at line 333 of file srb.h.

◆ SRB_STATUS_TIMEOUT

#define SRB_STATUS_TIMEOUT   0x09

Definition at line 341 of file srb.h.

◆ SRB_STATUS_UNEXPECTED_BUS_FREE

#define SRB_STATUS_UNEXPECTED_BUS_FREE   0x13

Definition at line 350 of file srb.h.

◆ SRB_WMI_FLAGS_ADAPTER_REQUEST

#define SRB_WMI_FLAGS_ADAPTER_REQUEST   0x01

Definition at line 419 of file srb.h.

◆ SRBEV_BUS_RESET

#define SRBEV_BUS_RESET   0x0001

Definition at line 231 of file srb.h.

◆ SRBEV_SCSI_ASYNC_NOTIFICATION

#define SRBEV_SCSI_ASYNC_NOTIFICATION   0x0002

Definition at line 232 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 486 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 478 of file srb.h.

◆ PHW_DMA_STARTED

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

Definition at line 454 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 460 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 429 of file srb.h.

◆ PHW_INTERRUPT

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

Definition at line 442 of file srb.h.

◆ PHW_RESET_BUS

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

Definition at line 471 of file srb.h.

◆ PHW_STARTIO

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

Definition at line 435 of file srb.h.

◆ PHW_TIMER

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

Definition at line 448 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 182 of file srb.h.

182  {
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 168 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 522 of file srb.h.

522  {
524  NextRequest,
530  BusChangeDetected, /* New */
531  WMIEvent,
enum _SCSI_NOTIFICATION_TYPE SCSI_NOTIFICATION_TYPE
enum _SCSI_NOTIFICATION_TYPE * PSCSI_NOTIFICATION_TYPE
Definition: srb.h:531

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 506 of file scsiport.c.

512 {
513  // FIXME
515 }
#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 539 of file scsiport.c.

541 {
542  // FIXME
544 }
#define UNIMPLEMENTED
Definition: debug.h:115

◆ ScsiPortFreeDeviceBase()

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

Definition at line 548 of file scsiport.c.

551 {
552  // Nothing to do
553 }

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 557 of file scsiport.c.

564 {
565  return HalGetBusDataByOffset(BusDataType, SystemIoBusNumber, SlotNumber, Buffer, 0, Length);
566 }
_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 570 of file scsiport.c.

577 {
580 
581  AddressSpace = (ULONG)InIoSpace;
583  SystemIoBusNumber,
584  IoAddress,
585  &AddressSpace,
587  {
588  return NULL;
589  }
590 
591  /* I/O space */
592  if (AddressSpace != 0)
593  return (PVOID)TranslatedAddress.u.LowPart;
594 
595  // FIXME
597  return (PVOID)IoAddress.LowPart;
598 }
_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
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
struct _LARGE_INTEGER::@2252 u

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 602 of file scsiport.c.

607 {
608  // FIXME
610  return NULL;
611 }
#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 615 of file scsiport.c.

620 {
621  PSCSI_PORT_DEVICE_EXTENSION DeviceExtension;
623  ULONG BufferLength = 0;
624  ULONG Offset;
625 
626  TRACE("ScsiPortGetPhysicalAddress(%p %p %p %p)\n",
627  HwDeviceExtension, Srb, VirtualAddress, Length);
628 
629  DeviceExtension = ((PSCSI_PORT_DEVICE_EXTENSION)HwDeviceExtension) - 1;
630 
631  if (Srb == NULL || Srb->SenseInfoBuffer == VirtualAddress)
632  {
633  /* Simply look it up in the allocated common buffer */
634  Offset = (PUCHAR)VirtualAddress - (PUCHAR)DeviceExtension->SrbExtensionBuffer;
635 
636  BufferLength = DeviceExtension->CommonBufferLength - Offset;
638  }
639  else
640  {
641  /* Nothing */
643  }
644 
645  *Length = BufferLength;
646  return PhysicalAddress;
647 }
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG BufferLength
Definition: wdfdevice.h:3767
#define SP_UNINITIALIZED_VALUE
Definition: srb.h:224
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
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
unsigned int ULONG
Definition: retypes.h:1
IN PSCSI_REQUEST_BLOCK Srb
Definition: class2.h:49
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 651 of file scsiport.c.

657 {
658  // FIXME
660  return NULL;
661 }
#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 729 of file scsiport.c.

733 {
734  PSCSI_PORT_DEVICE_EXTENSION DeviceExtension;
736  ULONG MapRegistersCount;
738 
739  TRACE("ScsiPortGetUncachedExtension(%p %p %lu)\n",
740  HwDeviceExtension, ConfigInfo, NumberOfBytes);
741 
742  DeviceExtension = ((PSCSI_PORT_DEVICE_EXTENSION)HwDeviceExtension) - 1;
743 
744  /* Check for allocated common DMA buffer */
745  if (DeviceExtension->SrbExtensionBuffer != NULL)
746  {
747  return NULL;
748  }
749 
750  /* Check for DMA adapter object */
751  if (DeviceExtension->AdapterObject == NULL)
752  {
753  /* Initialize DMA adapter description */
755 
757  DeviceDescription.Master = ConfigInfo->Master;
758  DeviceDescription.ScatterGather = ConfigInfo->ScatterGather;
759  DeviceDescription.DemandMode = ConfigInfo->DemandMode;
760  DeviceDescription.Dma32BitAddresses = ConfigInfo->Dma32BitAddresses;
761  DeviceDescription.BusNumber = ConfigInfo->SystemIoBusNumber;
762  DeviceDescription.DmaChannel = ConfigInfo->DmaChannel;
763  DeviceDescription.InterfaceType = ConfigInfo->AdapterInterfaceType;
764  DeviceDescription.DmaWidth = ConfigInfo->DmaWidth;
765  DeviceDescription.DmaSpeed = ConfigInfo->DmaSpeed;
766  DeviceDescription.MaximumLength = ConfigInfo->MaximumTransferLength;
767  DeviceDescription.DmaPort = ConfigInfo->DmaPort;
768 
769  /* Get a DMA adapter object */
770 #if 0
771  DeviceExtension->AdapterObject =
772  HalGetAdapter(&DeviceDescription, &MapRegistersCount);
773 
774  /* Fail in case of error */
775  if (DeviceExtension->AdapterObject == NULL)
776  {
777  return NULL;
778  }
779 #else
780  MapRegistersCount = 0;
781 #endif
782 
783  /* Set number of physical breaks */
784  if (ConfigInfo->NumberOfPhysicalBreaks != 0 &&
785  MapRegistersCount > ConfigInfo->NumberOfPhysicalBreaks)
786  {
787  DeviceExtension->PortCapabilities.MaximumPhysicalPages =
788  ConfigInfo->NumberOfPhysicalBreaks;
789  }
790  else
791  {
792  DeviceExtension->PortCapabilities.MaximumPhysicalPages = MapRegistersCount;
793  }
794  }
795 
796  /* Update Srb extension size */
797  if (DeviceExtension->SrbExtensionSize != ConfigInfo->SrbExtensionSize)
798  DeviceExtension->SrbExtensionSize = ConfigInfo->SrbExtensionSize;
799 
800  /* Allocate a common DMA buffer */
801  Status = SpiAllocateCommonBuffer(DeviceExtension, NumberOfBytes);
802 
803  if (!NT_SUCCESS(Status))
804  {
805  TRACE("SpiAllocateCommonBuffer() failed with Status = 0x%08X!\n", Status);
806  return NULL;
807  }
808 
809  return DeviceExtension->NonCachedExtension;
810 }
IO_SCSI_CAPABILITIES PortCapabilities
Definition: scsiport.c:79
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:87
_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:665
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 814 of file scsiport.c.

817 {
818  // FIXME
820  return NULL;
821 }
#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  DPRINT1("Created device: %wZ (%p)\n", &DeviceName, PortDeviceObject);
985 
986  /* Set the buffering strategy here... */
987  PortDeviceObject->Flags |= DO_DIRECT_IO;
988  PortDeviceObject->AlignmentRequirement = FILE_WORD_ALIGNMENT; /* FIXME: Is this really needed? */
989 
990  /* Fill Device Extension */
991  DeviceExtension = PortDeviceObject->DeviceExtension;
992  RtlZeroMemory(DeviceExtension, DeviceExtensionSize);
993  DeviceExtension->Common.DeviceObject = PortDeviceObject;
994  DeviceExtension->Common.IsFDO = TRUE;
995  DeviceExtension->Length = DeviceExtensionSize;
996  DeviceExtension->PortNumber = SystemConfig->ScsiPortCount;
997  DeviceExtension->DeviceName = DeviceName;
998 
999  /* Driver's routines... */
1000  DeviceExtension->HwInitialize = HwInitializationData->HwInitialize;
1001  DeviceExtension->HwStartIo = HwInitializationData->HwStartIo;
1002  DeviceExtension->HwInterrupt = HwInitializationData->HwInterrupt;
1003  DeviceExtension->HwResetBus = HwInitializationData->HwResetBus;
1004  DeviceExtension->HwDmaStarted = HwInitializationData->HwDmaStarted;
1005 
1006  /* Extensions sizes */
1007  DeviceExtension->MiniPortExtensionSize = HwInitializationData->DeviceExtensionSize;
1008  DeviceExtension->LunExtensionSize =
1009  ALIGN_UP(HwInitializationData->SpecificLuExtensionSize, INT64);
1010  DeviceExtension->SrbExtensionSize =
1011  ALIGN_UP(HwInitializationData->SrbExtensionSize, INT64);
1012 
1013  /* Fill some numbers (bus count, lun count, etc) */
1014  DeviceExtension->MaxLunCount = SCSI_MAXIMUM_LOGICAL_UNITS;
1015  DeviceExtension->RequestsNumber = 16;
1016 
1017  /* Initialize the spin lock in the controller extension */
1018  KeInitializeSpinLock(&DeviceExtension->IrqLock);
1019  KeInitializeSpinLock(&DeviceExtension->SpinLock);
1020 
1021  /* Initialize the DPC object */
1022  IoInitializeDpcRequest(PortDeviceObject,
1024 
1025  /* Initialize the device timer */
1026  DeviceExtension->TimerCount = -1;
1027  IoInitializeTimer(PortDeviceObject,
1029  DeviceExtension);
1030 
1031  /* Initialize miniport timer */
1032  KeInitializeTimer(&DeviceExtension->MiniportTimer);
1033  KeInitializeDpc(&DeviceExtension->MiniportTimerDpc,
1035  PortDeviceObject);
1036 
1037 CreatePortConfig:
1038 
1039  /* Allocate and initialize port configuration info */
1040  PortConfigSize = sizeof(PORT_CONFIGURATION_INFORMATION) +
1041  HwInitializationData->NumberOfAccessRanges * sizeof(ACCESS_RANGE);
1042  PortConfigSize = ALIGN_UP(PortConfigSize, INT64);
1043  DeviceExtension->PortConfig = ExAllocatePoolWithTag(NonPagedPool, PortConfigSize, TAG_SCSIPORT);
1044 
1045  /* Fail if failed */
1046  if (DeviceExtension->PortConfig == NULL)
1047  {
1049  break;
1050  }
1051 
1052  Status = SpiCreatePortConfig(DeviceExtension,
1054  &ConfigInfo,
1055  DeviceExtension->PortConfig,
1056  FirstConfigCall);
1057 
1058  if (!NT_SUCCESS(Status))
1059  {
1060  DPRINT("SpiCreatePortConfig() failed with Status 0x%08X\n", Status);
1061  break;
1062  }
1063 
1064  PortConfig = DeviceExtension->PortConfig;
1065 
1066  /* Copy extension sizes into the PortConfig */
1067  PortConfig->SpecificLuExtensionSize = DeviceExtension->LunExtensionSize;
1068  PortConfig->SrbExtensionSize = DeviceExtension->SrbExtensionSize;
1069 
1070  /* Initialize Access ranges */
1071  if (HwInitializationData->NumberOfAccessRanges != 0)
1072  {
1073  PortConfig->AccessRanges = ALIGN_UP_POINTER(PortConfig + 1, INT64);
1074 
1075  /* Copy the data */
1076  RtlCopyMemory(PortConfig->AccessRanges,
1077  ConfigInfo.AccessRanges,
1078  HwInitializationData->NumberOfAccessRanges * sizeof(ACCESS_RANGE));
1079  }
1080 
1081  /* Search for matching PCI device */
1082  if ((HwInitializationData->AdapterInterfaceType == PCIBus) &&
1083  (HwInitializationData->VendorIdLength > 0) &&
1084  (HwInitializationData->VendorId != NULL) &&
1085  (HwInitializationData->DeviceIdLength > 0) && (HwInitializationData->DeviceId != NULL))
1086  {
1087  PortConfig->BusInterruptLevel = 0;
1088 
1089  /* Get PCI device data */
1090  DPRINT(
1091  "VendorId '%.*s' DeviceId '%.*s'\n", HwInitializationData->VendorIdLength,
1092  HwInitializationData->VendorId, HwInitializationData->DeviceIdLength,
1093  HwInitializationData->DeviceId);
1094 
1095  if (!SpiGetPciConfigData(
1096  DriverObject, PortDeviceObject, HwInitializationData, PortConfig, RegistryPath,
1097  ConfigInfo.BusNumber, &SlotNumber))
1098  {
1099  /* Continue to the next bus, nothing here */
1100  ConfigInfo.BusNumber++;
1101  DeviceExtension->PortConfig = NULL;
1102  ExFreePool(PortConfig);
1103  Again = FALSE;
1104  goto CreatePortConfig;
1105  }
1106 
1107  if (!PortConfig->BusInterruptLevel)
1108  {
1109  /* Bypass this slot, because no interrupt was assigned */
1110  DeviceExtension->PortConfig = NULL;
1111  ExFreePool(PortConfig);
1112  goto CreatePortConfig;
1113  }
1114  }
1115  else
1116  {
1117  DPRINT("Non-pci bus\n");
1118  }
1119 
1120  /* Note: HwFindAdapter is called once for each bus */
1121  Again = FALSE;
1122  DPRINT("Calling HwFindAdapter() for Bus %lu\n", PortConfig->SystemIoBusNumber);
1123  Result = (HwInitializationData->HwFindAdapter)(
1124  &DeviceExtension->MiniPortDeviceExtension, HwContext, 0, /* BusInformation */
1125  ConfigInfo.Parameter, /* ArgumentString */
1126  PortConfig, &Again);
1127 
1128  DPRINT("HwFindAdapter() Result: %lu Again: %s\n", Result, (Again) ? "True" : "False");
1129 
1130  /* Free MapRegisterBase, it's not needed anymore */
1131  if (DeviceExtension->MapRegisterBase != NULL)
1132  {
1133  ExFreePool(DeviceExtension->MapRegisterBase);
1134  DeviceExtension->MapRegisterBase = NULL;
1135  }
1136 
1137  /* If result is nothing good... */
1138  if (Result != SP_RETURN_FOUND)
1139  {
1140  DPRINT("HwFindAdapter() Result: %lu\n", Result);
1141 
1142  if (Result == SP_RETURN_NOT_FOUND)
1143  {
1144  /* We can continue on the next bus */
1145  ConfigInfo.BusNumber++;
1146  Again = FALSE;
1147 
1148  DeviceExtension->PortConfig = NULL;
1149  ExFreePool(PortConfig);
1150  goto CreatePortConfig;
1151  }
1152 
1153  /* Otherwise, break */
1155  break;
1156  }
1157 
1158  DPRINT(
1159  "ScsiPortInitialize(): Found HBA! (%x), adapter Id %d\n",
1160  PortConfig->BusInterruptVector, PortConfig->InitiatorBusId[0]);
1161 
1162  /* If the SRB extension size was updated */
1163  if (!DeviceExtension->NonCachedExtension &&
1164  (PortConfig->SrbExtensionSize != DeviceExtension->SrbExtensionSize))
1165  {
1166  /* Set it (rounding to LONGLONG again) */
1167  DeviceExtension->SrbExtensionSize = ALIGN_UP(PortConfig->SrbExtensionSize, INT64);
1168  }
1169 
1170  /* The same with LUN extension size */
1171  if (PortConfig->SpecificLuExtensionSize != DeviceExtension->LunExtensionSize)
1172  DeviceExtension->LunExtensionSize = PortConfig->SpecificLuExtensionSize;
1173 
1174  /* Construct a resource list */
1175  ResourceList = SpiConfigToResource(DeviceExtension, PortConfig);
1176 
1177  PDEVICE_OBJECT LowerPDO = NULL;
1178 
1180  HwInitializationData->AdapterInterfaceType,
1181  ConfigInfo.BusNumber,
1182  PortConfig->SlotNumber,
1183  ResourceList,
1184  NULL,
1185  TRUE,
1186  &LowerPDO);
1187 
1188  if (!NT_SUCCESS(Status))
1189  {
1190  DPRINT1("IoReportDetectedDevice failed. Status: 0x%x\n", Status);
1191  __debugbreak();
1192  break;
1193  }
1194 
1195  DeviceExtension->Common.LowerDevice = IoAttachDeviceToDeviceStack(PortDeviceObject, LowerPDO);
1196 
1197  ASSERT(DeviceExtension->Common.LowerDevice);
1198 
1199  PortDeviceObject->Flags &= ~DO_DEVICE_INITIALIZING;
1200 
1201  if (ResourceList)
1202  {
1204  }
1205 
1206  /* Copy all stuff which we ever need from PortConfig to the DeviceExtension */
1208  DeviceExtension->MaxTargedIds = SCSI_MAXIMUM_TARGETS_PER_BUS;
1209  else
1210  DeviceExtension->MaxTargedIds = PortConfig->MaximumNumberOfTargets;
1211 
1212  DeviceExtension->NumberOfBuses = PortConfig->NumberOfBuses;
1213  DeviceExtension->CachesData = PortConfig->CachesData;
1214  DeviceExtension->ReceiveEvent = PortConfig->ReceiveEvent;
1215  DeviceExtension->SupportsTaggedQueuing = PortConfig->TaggedQueuing;
1216  DeviceExtension->MultipleReqsPerLun = PortConfig->MultipleRequestPerLu;
1217 
1218  /* Initialize bus scanning information */
1219  size_t BusConfigSize = DeviceExtension->NumberOfBuses * sizeof(*DeviceExtension->Buses);
1220  DeviceExtension->Buses = ExAllocatePoolZero(NonPagedPool, BusConfigSize, TAG_SCSIPORT);
1221  if (!DeviceExtension->Buses)
1222  {
1223  DPRINT1("Out of resources!\n");
1225  break;
1226  }
1227 
1228  // initialize bus data
1229  for (UINT8 pathId = 0; pathId < DeviceExtension->NumberOfBuses; pathId++)
1230  {
1231  DeviceExtension->Buses[pathId].BusIdentifier =
1232  DeviceExtension->PortConfig->InitiatorBusId[pathId];
1233  InitializeListHead(&DeviceExtension->Buses[pathId].LunsListHead);
1234  }
1235 
1236  /* If something was disabled via registry - apply it */
1237  if (ConfigInfo.DisableMultipleLun)
1238  DeviceExtension->MultipleReqsPerLun = PortConfig->MultipleRequestPerLu = FALSE;
1239 
1240  if (ConfigInfo.DisableTaggedQueueing)
1241  DeviceExtension->SupportsTaggedQueuing = PortConfig->MultipleRequestPerLu = FALSE;
1242 
1243  /* Check if we need to alloc SRB data */
1244  if (DeviceExtension->SupportsTaggedQueuing || DeviceExtension->MultipleReqsPerLun)
1245  {
1246  DeviceExtension->NeedSrbDataAlloc = TRUE;
1247  }
1248  else
1249  {
1250  DeviceExtension->NeedSrbDataAlloc = FALSE;
1251  }
1252 
1253  /* Get a pointer to the port capabilities */
1254  PortCapabilities = &DeviceExtension->PortCapabilities;
1255 
1256  /* Copy one field there */
1257  DeviceExtension->MapBuffers = PortConfig->MapBuffers;
1258  PortCapabilities->AdapterUsesPio = PortConfig->MapBuffers;
1259 
1260  if (DeviceExtension->AdapterObject == NULL &&
1261  (PortConfig->DmaChannel != SP_UNINITIALIZED_VALUE || PortConfig->Master))
1262  {
1263  DPRINT1("DMA is not supported yet\n");
1264  ASSERT(FALSE);
1265  }
1266 
1267  if (DeviceExtension->SrbExtensionBuffer == NULL &&
1268  (DeviceExtension->SrbExtensionSize != 0 || PortConfig->AutoRequestSense))
1269  {
1270  DeviceExtension->SupportsAutoSense = PortConfig->AutoRequestSense;
1271  DeviceExtension->NeedSrbExtensionAlloc = TRUE;
1272 
1273  /* Allocate common buffer */
1274  Status = SpiAllocateCommonBuffer(DeviceExtension, 0);
1275 
1276  /* Check for failure */
1277  if (!NT_SUCCESS(Status))
1278  break;
1279  }
1280 
1281  /* Allocate SrbData, if needed */
1282  if (DeviceExtension->NeedSrbDataAlloc)
1283  {
1284  ULONG Count;
1285  PSCSI_REQUEST_BLOCK_INFO SrbData;
1286 
1287  if (DeviceExtension->SrbDataCount != 0)
1288  Count = DeviceExtension->SrbDataCount;
1289  else
1290  Count = DeviceExtension->RequestsNumber * 2;
1291 
1292  /* Allocate the data */
1293  SrbData = ExAllocatePoolWithTag(
1295  if (SrbData == NULL)
1297 
1298  RtlZeroMemory(SrbData, Count * sizeof(SCSI_REQUEST_BLOCK_INFO));
1299 
1300  DeviceExtension->SrbInfo = SrbData;
1301  DeviceExtension->FreeSrbInfo = SrbData;
1302  DeviceExtension->SrbDataCount = Count;
1303 
1304  /* Link it to the list */
1305  while (Count > 0)
1306  {
1307  SrbData->Requests.Flink = (PLIST_ENTRY)(SrbData + 1);
1308  SrbData++;
1309  Count--;
1310  }
1311 
1312  /* Mark the last entry of the list */
1313  SrbData--;
1314  SrbData->Requests.Flink = NULL;
1315  }
1316 
1317  /* Initialize port capabilities */
1318  PortCapabilities = &DeviceExtension->PortCapabilities;
1319  PortCapabilities->Length = sizeof(IO_SCSI_CAPABILITIES);
1320  PortCapabilities->MaximumTransferLength = PortConfig->MaximumTransferLength;
1321 
1322  if (PortConfig->ReceiveEvent)
1324 
1325  PortCapabilities->TaggedQueuing = DeviceExtension->SupportsTaggedQueuing;
1326  PortCapabilities->AdapterScansDown = PortConfig->AdapterScansDown;
1327 
1328  if (PortConfig->AlignmentMask > PortDeviceObject->AlignmentRequirement)
1329  PortDeviceObject->AlignmentRequirement = PortConfig->AlignmentMask;
1330 
1331  PortCapabilities->AlignmentMask = PortDeviceObject->AlignmentRequirement;
1332 
1333  if (PortCapabilities->MaximumPhysicalPages == 0)
1334  {
1335  PortCapabilities->MaximumPhysicalPages =
1336  BYTES_TO_PAGES(PortCapabilities->MaximumTransferLength);
1337 
1338  /* Apply miniport's limits */
1339  if (PortConfig->NumberOfPhysicalBreaks < PortCapabilities->MaximumPhysicalPages)
1340  {
1341  PortCapabilities->MaximumPhysicalPages = PortConfig->NumberOfPhysicalBreaks;
1342  }
1343  }
1344 
1345  FdoCallHWInitialize(DeviceExtension);
1346 
1347  Status = FdoStartAdapter(DeviceExtension);
1348 
1349  if (!NT_SUCCESS(Status))
1350  {
1351  DPRINT1("Failed to start the legacy adapter. Status 0x%x\n", Status);
1352  break;
1353  }
1354 
1355  FdoScanAdapter(DeviceExtension);
1356 
1357  FirstConfigCall = FALSE;
1358 
1359  /* Increase adapter number and bus number respectively */
1360  ConfigInfo.AdapterNumber++;
1361 
1362  if (!Again)
1363  ConfigInfo.BusNumber++;
1364 
1365  DPRINT("Bus: %lu MaxBus: %lu\n", ConfigInfo.BusNumber, MaxBus);
1366 
1367  DeviceFound = TRUE;
1368  }
1369 
1370  /* Clean up the mess */
1371  if (!NT_SUCCESS(Status) && PortDeviceObject)
1372  {
1373  FdoRemoveAdapter(DeviceExtension);
1374  }
1375 
1376  /* Close registry keys */
1377  if (ConfigInfo.ServiceKey != NULL)
1378  ZwClose(ConfigInfo.ServiceKey);
1379 
1380  if (ConfigInfo.DeviceKey != NULL)
1381  ZwClose(ConfigInfo.DeviceKey);
1382 
1383  if (ConfigInfo.BusKey != NULL)
1384  ZwClose(ConfigInfo.BusKey);
1385 
1386  if (ConfigInfo.AccessRanges != NULL)
1387  ExFreePool(ConfigInfo.AccessRanges);
1388 
1389  if (ConfigInfo.Parameter != NULL)
1390  ExFreePool(ConfigInfo.Parameter);
1391 
1392  DPRINT("ScsiPortInitialize() done, Status = 0x%08X, DeviceFound = %d!\n",
1393  Status, DeviceFound);
1394 
1395  return (DeviceFound == FALSE) ? Status : STATUS_SUCCESS;
1396 }
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:232
FORCEINLINE VOID IoInitializeDpcRequest(_In_ PDEVICE_OBJECT DeviceObject, _In_ PIO_DPC_ROUTINE DpcRoutine)
Definition: iofuncs.h:2840
#define SP_UNINITIALIZED_VALUE
Definition: srb.h:224
#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:1784
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:79
#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:2236
_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:70
IO_DPC_ROUTINE ScsiPortDpcForIsr
Definition: scsiport.h:451
#define swprintf
Definition: precomp.h:40
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:2338
#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:1741
_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:81
FORCEINLINE VOID KeInitializeSpinLock(_Out_ PKSPIN_LOCK SpinLock)
Definition: kefuncs.h:238
static NTSTATUS SpiCreatePortConfig(PSCSI_PORT_DEVICE_EXTENSION DeviceExtension, PHW_INITIALIZATION_DATA HwInitData, PCONFIGURATION_INFO InternalConfigInfo, PPORT_CONFIGURATION_INFORMATION ConfigInfo, BOOLEAN FirstCall)
Definition: scsiport.c:2371
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:605
#define SP_RETURN_NOT_FOUND
Definition: srb.h:513
#define SP_RETURN_FOUND
Definition: srb.h:514
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
static const WCHAR L[]
Definition: oid.c:1250
PDRIVER_UNLOAD DriverUnload
Definition: iotypes.h:2288
signed long long INT64
PVOID NTAPI IoGetDriverObjectExtension(IN PDRIVER_OBJECT DriverObject, IN PVOID ClientIdentificationAddress)
Definition: driver.c:1862
struct _SCSI_PORT_DEVICE_EXTENSION SCSI_PORT_DEVICE_EXTENSION
VOID FdoScanAdapter(_In_ PSCSI_PORT_DEVICE_EXTENSION PortExtension)
Definition: fdo.c:222
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:506
PHW_RESET_BUS HwResetBus
Definition: scsiport.c:84
PADAPTER_OBJECT AdapterObject
Definition: scsiport.c:87
#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:83
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:1893
#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:2026
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:362
_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 1279 of file scsiport.c.

1284 {
1285  // FIXME
1286  UNIMPLEMENTED;
1287 }
#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 1291 of file scsiport.c.

1299 {
1300  // FIXME
1301  UNIMPLEMENTED;
1302 }
#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 1306 of file scsiport.c.

1310 {
1312 }
_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 1453 of file scsiport.c.

1454 {
1455  PSCSI_PORT_DEVICE_EXTENSION DeviceExtension;
1456  va_list ap;
1457 
1458  DPRINT("ScsiPortNotification() called\n");
1459 
1460  DeviceExtension =
1461  CONTAINING_RECORD(HwDeviceExtension, SCSI_PORT_DEVICE_EXTENSION, MiniPortDeviceExtension);
1462 
1463  DPRINT("DeviceExtension %p\n", DeviceExtension);
1464 
1465  va_start(ap, HwDeviceExtension);
1466 
1467  switch (NotificationType)
1468  {
1469  case RequestComplete:
1470  {
1472  PSCSI_REQUEST_BLOCK_INFO SrbData;
1473 
1475 
1476  DPRINT("Notify: RequestComplete (Srb %p)\n", Srb);
1477 
1478  /* Make sure Srb is alright */
1479  ASSERT(Srb->SrbStatus != SRB_STATUS_PENDING);
1480  ASSERT(
1481  Srb->Function != SRB_FUNCTION_EXECUTE_SCSI ||
1482  Srb->SrbStatus != SRB_STATUS_SUCCESS || Srb->ScsiStatus == SCSISTAT_GOOD);
1483 
1484  if (!(Srb->SrbFlags & SRB_FLAGS_IS_ACTIVE))
1485  {
1486  /* It's been already completed */
1487  va_end(ap);
1488  return;
1489  }
1490 
1491  /* It's not active anymore */
1492  Srb->SrbFlags &= ~SRB_FLAGS_IS_ACTIVE;
1493 
1494  if (Srb->Function == SRB_FUNCTION_ABORT_COMMAND)
1495  {
1496  /* TODO: Treat it specially */
1497  ASSERT(FALSE);
1498  }
1499  else
1500  {
1501  PIO_STACK_LOCATION IoStack = IoGetCurrentIrpStackLocation(Srb->OriginalRequest);
1502  PSCSI_PORT_LUN_EXTENSION LunExtension = IoStack->DeviceObject->DeviceExtension;
1503  ASSERT(LunExtension && !LunExtension->Common.IsFDO);
1504 
1505  /* Get the SRB data */
1506  SrbData = SpiGetSrbData(DeviceExtension, LunExtension, Srb->QueueTag);
1507 
1508  /* Make sure there are no CompletedRequests and there is a Srb */
1509  ASSERT(SrbData->CompletedRequests == NULL && SrbData->Srb != NULL);
1510 
1511  /* If it's a read/write request, make sure it has data inside it */
1512  if ((Srb->SrbStatus == SRB_STATUS_SUCCESS) &&
1513  ((Srb->Cdb[0] == SCSIOP_READ) || (Srb->Cdb[0] == SCSIOP_WRITE)))
1514  {
1515  ASSERT(Srb->DataTransferLength);
1516  }
1517 
1518  SrbData->CompletedRequests = DeviceExtension->InterruptData.CompletedRequests;
1519  DeviceExtension->InterruptData.CompletedRequests = SrbData;
1520  }
1521  }
1522  break;
1523 
1524  case NextRequest:
1525  DPRINT("Notify: NextRequest\n");
1526  DeviceExtension->InterruptData.Flags |= SCSI_PORT_NEXT_REQUEST_READY;
1527  break;
1528 
1529  case NextLuRequest:
1530  {
1531  UCHAR PathId;
1532  UCHAR TargetId;
1533  UCHAR Lun;
1534  PSCSI_PORT_LUN_EXTENSION LunExtension;
1535 
1536  PathId = (UCHAR)va_arg(ap, int);
1537  TargetId = (UCHAR)va_arg(ap, int);
1538  Lun = (UCHAR)va_arg(ap, int);
1539 
1540  DPRINT(
1541  "Notify: NextLuRequest(PathId %u TargetId %u Lun %u)\n", PathId, TargetId, Lun);
1542 
1543  /* Mark it in the flags field */
1544  DeviceExtension->InterruptData.Flags |= SCSI_PORT_NEXT_REQUEST_READY;
1545 
1546  /* Get the LUN extension */
1547  LunExtension = GetLunByPath(DeviceExtension, PathId, TargetId, Lun);
1548 
1549  /* If returned LunExtension is NULL, break out */
1550  if (!LunExtension)
1551  break;
1552 
1553  /* This request should not be processed if */
1554  if ((LunExtension->ReadyLun) || (LunExtension->SrbInfo.Srb))
1555  {
1556  /* Nothing to do here */
1557  break;
1558  }
1559 
1560  /* Add this LUN to the list */
1561  LunExtension->ReadyLun = DeviceExtension->InterruptData.ReadyLun;
1562  DeviceExtension->InterruptData.ReadyLun = LunExtension;
1563  }
1564  break;
1565 
1566  case ResetDetected:
1567  DPRINT("Notify: ResetDetected\n");
1568  /* Add RESET flags */
1569  DeviceExtension->InterruptData.Flags |= SCSI_PORT_RESET | SCSI_PORT_RESET_REPORTED;
1570  break;
1571 
1572  case CallDisableInterrupts:
1573  DPRINT1("UNIMPLEMENTED SCSI Notification called: CallDisableInterrupts!\n");
1574  break;
1575 
1576  case CallEnableInterrupts:
1577  DPRINT1("UNIMPLEMENTED SCSI Notification called: CallEnableInterrupts!\n");
1578  break;
1579 
1580  case RequestTimerCall:
1581  DPRINT("Notify: RequestTimerCall\n");
1582  DeviceExtension->InterruptData.Flags |= SCSI_PORT_TIMER_NEEDED;
1583  DeviceExtension->InterruptData.HwScsiTimer = (PHW_TIMER)va_arg(ap, PHW_TIMER);
1584  DeviceExtension->InterruptData.MiniportTimerValue = (ULONG)va_arg(ap, ULONG);
1585  break;
1586 
1587  case BusChangeDetected:
1588  DPRINT1("UNIMPLEMENTED SCSI Notification called: BusChangeDetected!\n");
1589  break;
1590 
1591  default:
1592  DPRINT1("Unsupported notification from WMI: %lu\n", NotificationType);
1593  break;
1594  }
1595 
1596  va_end(ap);
1597 
1598  /* Request a DPC after we're done with the interrupt */
1599  DeviceExtension->InterruptData.Flags |= SCSI_PORT_NOTIFICATION_NEEDED;
1600 }
struct _SCSI_REQUEST_BLOCK_INFO * CompletedRequests
Definition: scsiport.h:129
_In_ ULONG _In_ BOOLEAN _In_ ULONG _In_ UCHAR _In_ UCHAR _In_ UCHAR Lun
Definition: classpnp.h:1310
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:399
_In_ ULONG _In_ BOOLEAN _In_ ULONG _In_ UCHAR _In_ UCHAR TargetId
Definition: classpnp.h:1310
#define SCSI_PORT_RESET
Definition: scsiport.h:35
#define SCSI_PORT_NOTIFICATION_NEEDED
Definition: scsiport.h:31
_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:54
#define SCSIOP_READ
Definition: cdrw_hw.h:905
#define SRB_STATUS_PENDING
Definition: srb.h:332
PVOID DeviceExtension
Definition: env_spec_w32.h:418
#define SCSIOP_WRITE
Definition: cdrw_hw.h:906
char * va_list
Definition: acmsvcex.h:78
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
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:316
__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:448
#define SRB_FUNCTION_EXECUTE_SCSI
Definition: srb.h:307
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:333
#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
IN PSCSI_REQUEST_BLOCK Srb
Definition: class2.h:49
#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 1382 of file scsiport.c.

1384 {
1385  TRACE("ScsiPortReadPortUchar(%p)\n", Port);
1386 
1387  return READ_PORT_UCHAR(Port);
1388 }
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 1392 of file scsiport.c.

1394 {
1395  return READ_PORT_ULONG(Port);
1396 }
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 1400 of file scsiport.c.

1402 {
1403  return READ_PORT_USHORT(Port);
1404 }
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 1408 of file scsiport.c.

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

◆ ScsiPortReadRegisterBufferUlong()

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

Definition at line 1419 of file scsiport.c.

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

◆ ScsiPortReadRegisterBufferUshort()

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

Definition at line 1430 of file scsiport.c.

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

◆ ScsiPortReadRegisterUchar()

SCSIPORT_API UCHAR NTAPI ScsiPortReadRegisterUchar ( IN PUCHAR  Register)

Definition at line 1441 of file scsiport.c.

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

◆ ScsiPortReadRegisterUlong()

SCSIPORT_API ULONG NTAPI ScsiPortReadRegisterUlong ( IN PULONG  Register)

Definition at line 1449 of file scsiport.c.

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

◆ ScsiPortReadRegisterUshort()

SCSIPORT_API USHORT NTAPI ScsiPortReadRegisterUshort ( IN PUSHORT  Register)

Definition at line 1457 of file scsiport.c.

1459 {
1460  return READ_REGISTER_USHORT(Register);
1461 }
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 1465 of file scsiport.c.

1473 {
1474  // FIXME
1475  UNIMPLEMENTED;
1476  return 0;
1477 }
#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 1489 of file scsiport.c.

1496 {
1497  // FIXME
1498  UNIMPLEMENTED;
1499  return TRUE;
1500 }
#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 1509 of file scsiport.c.

1513 {
1515 }
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 1519 of file scsiport.c.

1523 {
1525 }
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 1529 of file scsiport.c.

1533 {
1535 }
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 1539 of file scsiport.c.

1542 {
1544 }
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 1548 of file scsiport.c.

1551 {
1553 }
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 1557 of file scsiport.c.

1560 {
1562 }
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 1566 of file scsiport.c.

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

◆ ScsiPortWriteRegisterBufferUlong()

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

Definition at line 1577 of file scsiport.c.

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

◆ ScsiPortWriteRegisterBufferUshort()

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

Definition at line 1588 of file scsiport.c.

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

◆ ScsiPortWriteRegisterUchar()

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

Definition at line 1599 of file scsiport.c.

1602 {
1603  WRITE_REGISTER_UCHAR(Register, Value);
1604 }
_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 1608 of file scsiport.c.

1611 {
1612  WRITE_REGISTER_ULONG(Register, Value);
1613 }
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 1617 of file scsiport.c.

1620 {
1621  WRITE_REGISTER_USHORT(Register, Value);
1622 }
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