ReactOS  0.4.15-dev-1197-g8081ba9
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 498 of file scsiport.c.

504 {
505  // FIXME
507 }
#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 531 of file scsiport.c.

533 {
534  // FIXME
536 }
#define UNIMPLEMENTED
Definition: debug.h:115

◆ ScsiPortFreeDeviceBase()

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

Definition at line 540 of file scsiport.c.

543 {
544  // Nothing to do
545 }

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

556 {
557  return HalGetBusDataByOffset(BusDataType, SystemIoBusNumber, SlotNumber, Buffer, 0, Length);
558 }
Definition: bufpool.h:45
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
_In_opt_ PUNICODE_STRING _In_ PDRIVER_OBJECT _In_ PDEVICE_OBJECT _In_ INTERFACE_TYPE _In_ ULONG _In_ ULONG SlotNumber
Definition: halfuncs.h:156
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 562 of file scsiport.c.

569 {
572 
573  AddressSpace = (ULONG)InIoSpace;
575  SystemIoBusNumber,
576  IoAddress,
577  &AddressSpace,
579  {
580  return NULL;
581  }
582 
583  /* I/O space */
584  if (AddressSpace != 0)
585  return (PVOID)TranslatedAddress.u.LowPart;
586 
587  // FIXME
589  return (PVOID)IoAddress.LowPart;
590 }
_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:2268
_In_ ULONG _In_ PHYSICAL_ADDRESS _Inout_ PULONG _Out_ PPHYSICAL_ADDRESS TranslatedAddress
Definition: iofuncs.h:2268
#define FALSE
Definition: types.h:117
smooth NULL
Definition: ftsmooth.c:416
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
unsigned int ULONG
Definition: retypes.h:1
#define UNIMPLEMENTED
Definition: debug.h:115
struct _LARGE_INTEGER::@2267 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 594 of file scsiport.c.

599 {
600  // FIXME
602  return NULL;
603 }
smooth NULL
Definition: ftsmooth.c:416
#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 607 of file scsiport.c.

612 {
613  PSCSI_PORT_DEVICE_EXTENSION DeviceExtension;
615  ULONG BufferLength = 0;
616  ULONG Offset;
617 
618  TRACE("ScsiPortGetPhysicalAddress(%p %p %p %p)\n",
619  HwDeviceExtension, Srb, VirtualAddress, Length);
620 
621  DeviceExtension = ((PSCSI_PORT_DEVICE_EXTENSION)HwDeviceExtension) - 1;
622 
623  if (Srb == NULL || Srb->SenseInfoBuffer == VirtualAddress)
624  {
625  /* Simply look it up in the allocated common buffer */
626  Offset = (PUCHAR)VirtualAddress - (PUCHAR)DeviceExtension->SrbExtensionBuffer;
627 
628  BufferLength = DeviceExtension->CommonBufferLength - Offset;
630  }
631  else
632  {
633  /* Nothing */
635  }
636 
637  *Length = BufferLength;
638  return PhysicalAddress;
639 }
#define SP_UNINITIALIZED_VALUE
Definition: srb.h:224
_In_ PSCSI_REQUEST_BLOCK _In_opt_ PVOID _In_ ULONG BufferLength
Definition: cdrom.h:989
unsigned char * PUCHAR
Definition: retypes.h:3
struct SCSI_PORT_DEVICE_EXTENSION * PSCSI_PORT_DEVICE_EXTENSION
_In_ ULONG _In_ ULONG Offset
Definition: ntddpcm.h:101
smooth NULL
Definition: ftsmooth.c:416
int64_t LONGLONG
Definition: typedefs.h:68
#define TRACE(s)
Definition: solgame.cpp:4
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS PhysicalAddress
Definition: iotypes.h:1081
_In_ ULONG _In_ BOOLEAN _Must_inspect_result_ PVOID * VirtualAddress
Definition: ndis.h:3791
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 643 of file scsiport.c.

649 {
650  // FIXME
652  return NULL;
653 }
smooth NULL
Definition: ftsmooth.c:416
#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 721 of file scsiport.c.

725 {
726  PSCSI_PORT_DEVICE_EXTENSION DeviceExtension;
728  ULONG MapRegistersCount;
730 
731  TRACE("ScsiPortGetUncachedExtension(%p %p %lu)\n",
732  HwDeviceExtension, ConfigInfo, NumberOfBytes);
733 
734  DeviceExtension = ((PSCSI_PORT_DEVICE_EXTENSION)HwDeviceExtension) - 1;
735 
736  /* Check for allocated common DMA buffer */
737  if (DeviceExtension->SrbExtensionBuffer != NULL)
738  {
739  return NULL;
740  }
741 
742  /* Check for DMA adapter object */
743  if (DeviceExtension->AdapterObject == NULL)
744  {
745  /* Initialize DMA adapter description */
747 
749  DeviceDescription.Master = ConfigInfo->Master;
750  DeviceDescription.ScatterGather = ConfigInfo->ScatterGather;
751  DeviceDescription.DemandMode = ConfigInfo->DemandMode;
752  DeviceDescription.Dma32BitAddresses = ConfigInfo->Dma32BitAddresses;
753  DeviceDescription.BusNumber = ConfigInfo->SystemIoBusNumber;
754  DeviceDescription.DmaChannel = ConfigInfo->DmaChannel;
755  DeviceDescription.InterfaceType = ConfigInfo->AdapterInterfaceType;
756  DeviceDescription.DmaWidth = ConfigInfo->DmaWidth;
757  DeviceDescription.DmaSpeed = ConfigInfo->DmaSpeed;
758  DeviceDescription.MaximumLength = ConfigInfo->MaximumTransferLength;
759  DeviceDescription.DmaPort = ConfigInfo->DmaPort;
760 
761  /* Get a DMA adapter object */
762 #if 0
763  DeviceExtension->AdapterObject =
764  HalGetAdapter(&DeviceDescription, &MapRegistersCount);
765 
766  /* Fail in case of error */
767  if (DeviceExtension->AdapterObject == NULL)
768  {
769  return NULL;
770  }
771 #else
772  MapRegistersCount = 0;
773 #endif
774 
775  /* Set number of physical breaks */
776  if (ConfigInfo->NumberOfPhysicalBreaks != 0 &&
777  MapRegistersCount > ConfigInfo->NumberOfPhysicalBreaks)
778  {
779  DeviceExtension->PortCapabilities.MaximumPhysicalPages =
780  ConfigInfo->NumberOfPhysicalBreaks;
781  }
782  else
783  {
784  DeviceExtension->PortCapabilities.MaximumPhysicalPages = MapRegistersCount;
785  }
786  }
787 
788  /* Update Srb extension size */
789  if (DeviceExtension->SrbExtensionSize != ConfigInfo->SrbExtensionSize)
790  DeviceExtension->SrbExtensionSize = ConfigInfo->SrbExtensionSize;
791 
792  /* Allocate a common DMA buffer */
793  Status = SpiAllocateCommonBuffer(DeviceExtension, NumberOfBytes);
794 
795  if (!NT_SUCCESS(Status))
796  {
797  TRACE("SpiAllocateCommonBuffer() failed with Status = 0x%08X!\n", Status);
798  return NULL;
799  }
800 
801  return DeviceExtension->NonCachedExtension;
802 }
IO_SCSI_CAPABILITIES PortCapabilities
Definition: scsiport.c:79
struct SCSI_PORT_DEVICE_EXTENSION * PSCSI_PORT_DEVICE_EXTENSION
LONG NTSTATUS
Definition: precomp.h:26
DMA_SPEED DmaSpeed
Definition: iotypes.h:2062
#define DEVICE_DESCRIPTION_VERSION
Definition: iotypes.h:2043
smooth NULL
Definition: ftsmooth.c:416
BOOLEAN Dma32BitAddresses
Definition: iotypes.h:2054
_Must_inspect_result_ _In_ PDEVICE_DESCRIPTION DeviceDescription
Definition: iofuncs.h:1015
#define TRACE(s)
Definition: solgame.cpp:4
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
BOOLEAN DemandMode
Definition: iotypes.h:2052
BOOLEAN ScatterGather
Definition: iotypes.h:2051
DMA_WIDTH DmaWidth
Definition: iotypes.h:2061
Status
Definition: gdiplustypes.h:24
PADAPTER_OBJECT AdapterObject
Definition: scsiport.c:87
static NTSTATUS SpiAllocateCommonBuffer(IN OUT PSCSI_PORT_DEVICE_EXTENSION DeviceExtension, IN ULONG NonCachedSize)
Definition: scsiport.c:657
INTERFACE_TYPE InterfaceType
Definition: iotypes.h:2060
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS _Inout_ PLARGE_INTEGER NumberOfBytes
Definition: iotypes.h:1018
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 806 of file scsiport.c.

809 {
810  // FIXME
812  return NULL;
813 }
smooth NULL
Definition: ftsmooth.c:416
#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 808 of file scsiport.c.

813 {
816  PSCSI_PORT_DEVICE_EXTENSION DeviceExtension = NULL;
817  PCONFIGURATION_INFORMATION SystemConfig;
819  PORT_CONFIGURATION_INFORMATION InitialPortConfig;
820  CONFIGURATION_INFO ConfigInfo;
821  ULONG DeviceExtensionSize;
822  ULONG PortConfigSize;
823  BOOLEAN Again;
824  BOOLEAN DeviceFound = FALSE;
825  BOOLEAN FirstConfigCall = TRUE;
826  ULONG Result;
828  ULONG MaxBus;
830 
831  PDEVICE_OBJECT PortDeviceObject;
832  WCHAR NameBuffer[80];
834  WCHAR DosNameBuffer[80];
836  PIO_SCSI_CAPABILITIES PortCapabilities;
837 
839  BOOLEAN Conflict;
840  SIZE_T BusConfigSize;
841 
842 
843  DPRINT ("ScsiPortInitialize() called!\n");
844 
845  /* Check params for validity */
846  if ((HwInitializationData->HwInitialize == NULL) ||
847  (HwInitializationData->HwStartIo == NULL) ||
848  (HwInitializationData->HwInterrupt == NULL) ||
849  (HwInitializationData->HwFindAdapter == NULL) ||
850  (HwInitializationData->HwResetBus == NULL))
851  {
853  }
854 
855  /* Set handlers */
861 
862  /* Obtain configuration information */
863  SystemConfig = IoGetConfigurationInformation();
864 
865  /* Zero the internal configuration info structure */
866  RtlZeroMemory(&ConfigInfo, sizeof(CONFIGURATION_INFO));
867 
868  /* Zero starting slot number */
869  SlotNumber.u.AsULONG = 0;
870 
871  /* Allocate space for access ranges */
872  if (HwInitializationData->NumberOfAccessRanges)
873  {
874  ConfigInfo.AccessRanges =
876  HwInitializationData->NumberOfAccessRanges * sizeof(ACCESS_RANGE), TAG_SCSIPORT);
877 
878  /* Fail if failed */
879  if (ConfigInfo.AccessRanges == NULL)
881  }
882 
883  /* Open registry keys */
885 
886  /* Last adapter number = not known */
888 
889  /* Calculate sizes of DeviceExtension and PortConfig */
890  DeviceExtensionSize = sizeof(SCSI_PORT_DEVICE_EXTENSION) +
891  HwInitializationData->DeviceExtensionSize;
892 
893  MaxBus = (HwInitializationData->AdapterInterfaceType == PCIBus) ? 8 : 1;
894  DPRINT("MaxBus: %lu\n", MaxBus);
895 
896  while (TRUE)
897  {
898  /* Create a unicode device name */
899  swprintf(NameBuffer,
900  L"\\Device\\ScsiPort%lu",
901  SystemConfig->ScsiPortCount);
902  RtlInitUnicodeString(&DeviceName, NameBuffer);
903 
904  DPRINT("Creating device: %wZ\n", &DeviceName);
905 
906  /* Create the port device */
908  DeviceExtensionSize,
909  &DeviceName,
911  0,
912  FALSE,
913  &PortDeviceObject);
914 
915  if (!NT_SUCCESS(Status))
916  {
917  DPRINT1("IoCreateDevice call failed! (Status 0x%lX)\n", Status);
918  PortDeviceObject = NULL;
919  break;
920  }
921 
922  DPRINT ("Created device: %wZ (%p)\n", &DeviceName, PortDeviceObject);
923 
924  /* Set the buffering strategy here... */
925  PortDeviceObject->Flags |= DO_DIRECT_IO;
926  PortDeviceObject->AlignmentRequirement = FILE_WORD_ALIGNMENT; /* FIXME: Is this really needed? */
927 
928  /* Fill Device Extension */
929  DeviceExtension = PortDeviceObject->DeviceExtension;
930  RtlZeroMemory(DeviceExtension, DeviceExtensionSize);
931  DeviceExtension->Length = DeviceExtensionSize;
932  DeviceExtension->DeviceObject = PortDeviceObject;
933  DeviceExtension->PortNumber = SystemConfig->ScsiPortCount;
934 
935  /* Driver's routines... */
936  DeviceExtension->HwInitialize = HwInitializationData->HwInitialize;
937  DeviceExtension->HwStartIo = HwInitializationData->HwStartIo;
938  DeviceExtension->HwInterrupt = HwInitializationData->HwInterrupt;
939  DeviceExtension->HwResetBus = HwInitializationData->HwResetBus;
940  DeviceExtension->HwDmaStarted = HwInitializationData->HwDmaStarted;
941 
942  /* Extensions sizes */
943  DeviceExtension->MiniPortExtensionSize = HwInitializationData->DeviceExtensionSize;
944  DeviceExtension->LunExtensionSize = HwInitializationData->SpecificLuExtensionSize;
945  DeviceExtension->SrbExtensionSize = HwInitializationData->SrbExtensionSize;
946 
947  /* Round Srb extension size to the quadword */
948  DeviceExtension->SrbExtensionSize =
949  ~(sizeof(LONGLONG) - 1) & (DeviceExtension->SrbExtensionSize +
950  sizeof(LONGLONG) - 1);
951 
952  /* Fill some numbers (bus count, lun count, etc) */
953  DeviceExtension->MaxLunCount = SCSI_MAXIMUM_LOGICAL_UNITS;
954  DeviceExtension->RequestsNumber = 16;
955 
956  /* Initialize the spin lock in the controller extension */
957  KeInitializeSpinLock(&DeviceExtension->IrqLock);
958  KeInitializeSpinLock(&DeviceExtension->SpinLock);
959 
960  /* Initialize the DPC object */
961  IoInitializeDpcRequest(PortDeviceObject,
963 
964  /* Initialize the device timer */
965  DeviceExtension->TimerCount = -1;
966  IoInitializeTimer(PortDeviceObject,
968  DeviceExtension);
969 
970  /* Initialize miniport timer */
971  KeInitializeTimer(&DeviceExtension->MiniportTimer);
972  KeInitializeDpc(&DeviceExtension->MiniportTimerDpc,
974  PortDeviceObject);
975 
976 CreatePortConfig:
977 
978  Status = SpiCreatePortConfig(DeviceExtension,
980  &ConfigInfo,
981  &InitialPortConfig,
982  FirstConfigCall);
983 
984  if (!NT_SUCCESS(Status))
985  {
986  DPRINT("SpiCreatePortConfig() failed with Status 0x%08X\n", Status);
987  break;
988  }
989 
990  /* Allocate and initialize port configuration info */
991  PortConfigSize = (sizeof(PORT_CONFIGURATION_INFORMATION) +
992  HwInitializationData->NumberOfAccessRanges *
993  sizeof(ACCESS_RANGE) + 7) & ~7;
994  DeviceExtension->PortConfig = ExAllocatePoolWithTag(NonPagedPool, PortConfigSize, TAG_SCSIPORT);
995 
996  /* Fail if failed */
997  if (DeviceExtension->PortConfig == NULL)
998  {
1000  break;
1001  }
1002 
1003  PortConfig = DeviceExtension->PortConfig;
1004 
1005  /* Copy information here */
1006  RtlCopyMemory(PortConfig,
1007  &InitialPortConfig,
1009 
1010 
1011  /* Copy extension sizes into the PortConfig */
1012  PortConfig->SpecificLuExtensionSize = DeviceExtension->LunExtensionSize;
1013  PortConfig->SrbExtensionSize = DeviceExtension->SrbExtensionSize;
1014 
1015  /* Initialize Access ranges */
1016  if (HwInitializationData->NumberOfAccessRanges != 0)
1017  {
1018  PortConfig->AccessRanges = (PVOID)(PortConfig+1);
1019 
1020  /* Align to LONGLONG */
1021  PortConfig->AccessRanges = (PVOID)((ULONG_PTR)(PortConfig->AccessRanges) + 7);
1022  PortConfig->AccessRanges = (PVOID)((ULONG_PTR)(PortConfig->AccessRanges) & ~7);
1023 
1024  /* Copy the data */
1025  RtlCopyMemory(PortConfig->AccessRanges,
1026  ConfigInfo.AccessRanges,
1027  HwInitializationData->NumberOfAccessRanges * sizeof(ACCESS_RANGE));
1028  }
1029 
1030  /* Search for matching PCI device */
1031  if ((HwInitializationData->AdapterInterfaceType == PCIBus) &&
1032  (HwInitializationData->VendorIdLength > 0) &&
1033  (HwInitializationData->VendorId != NULL) &&
1034  (HwInitializationData->DeviceIdLength > 0) && (HwInitializationData->DeviceId != NULL))
1035  {
1036  PortConfig->BusInterruptLevel = 0;
1037 
1038  /* Get PCI device data */
1039  DPRINT(
1040  "VendorId '%.*s' DeviceId '%.*s'\n", HwInitializationData->VendorIdLength,
1041  HwInitializationData->VendorId, HwInitializationData->DeviceIdLength,
1042  HwInitializationData->DeviceId);
1043 
1044  if (!SpiGetPciConfigData(
1045  DriverObject, PortDeviceObject, HwInitializationData, PortConfig, RegistryPath,
1046  ConfigInfo.BusNumber, &SlotNumber))
1047  {
1048  /* Continue to the next bus, nothing here */
1049  ConfigInfo.BusNumber++;
1050  DeviceExtension->PortConfig = NULL;
1051  ExFreePool(PortConfig);
1052  Again = FALSE;
1053  goto CreatePortConfig;
1054  }
1055 
1056  if (!PortConfig->BusInterruptLevel)
1057  {
1058  /* Bypass this slot, because no interrupt was assigned */
1059  DeviceExtension->PortConfig = NULL;
1060  ExFreePool(PortConfig);
1061  goto CreatePortConfig;
1062  }
1063  }
1064  else
1065  {
1066  DPRINT("Non-pci bus\n");
1067  }
1068 
1069  /* Note: HwFindAdapter is called once for each bus */
1070  Again = FALSE;
1071  DPRINT("Calling HwFindAdapter() for Bus %lu\n", PortConfig->SystemIoBusNumber);
1072  Result = (HwInitializationData->HwFindAdapter)(
1073  &DeviceExtension->MiniPortDeviceExtension, HwContext, 0, /* BusInformation */
1074  ConfigInfo.Parameter, /* ArgumentString */
1075  PortConfig, &Again);
1076 
1077  DPRINT("HwFindAdapter() Result: %lu Again: %s\n", Result, (Again) ? "True" : "False");
1078 
1079  /* Free MapRegisterBase, it's not needed anymore */
1080  if (DeviceExtension->MapRegisterBase != NULL)
1081  {
1082  ExFreePool(DeviceExtension->MapRegisterBase);
1083  DeviceExtension->MapRegisterBase = NULL;
1084  }
1085 
1086  /* If result is nothing good... */
1087  if (Result != SP_RETURN_FOUND)
1088  {
1089  DPRINT("HwFindAdapter() Result: %lu\n", Result);
1090 
1091  if (Result == SP_RETURN_NOT_FOUND)
1092  {
1093  /* We can continue on the next bus */
1094  ConfigInfo.BusNumber++;
1095  Again = FALSE;
1096 
1097  DeviceExtension->PortConfig = NULL;
1098  ExFreePool(PortConfig);
1099  goto CreatePortConfig;
1100  }
1101 
1102  /* Otherwise, break */
1104  break;
1105  }
1106 
1107  DPRINT(
1108  "ScsiPortInitialize(): Found HBA! (%x), adapter Id %d\n",
1109  PortConfig->BusInterruptVector, PortConfig->InitiatorBusId[0]);
1110 
1111  /* If the SRB extension size was updated */
1112  if (!DeviceExtension->NonCachedExtension &&
1113  (PortConfig->SrbExtensionSize != DeviceExtension->SrbExtensionSize))
1114  {
1115  /* Set it (rounding to LONGLONG again) */
1116  DeviceExtension->SrbExtensionSize =
1117  (PortConfig->SrbExtensionSize + sizeof(LONGLONG)) & ~(sizeof(LONGLONG) - 1);
1118  }
1119 
1120  /* The same with LUN extension size */
1121  if (PortConfig->SpecificLuExtensionSize != DeviceExtension->LunExtensionSize)
1122  DeviceExtension->LunExtensionSize = PortConfig->SpecificLuExtensionSize;
1123 
1124  if (!((HwInitializationData->AdapterInterfaceType == PCIBus) &&
1125  (HwInitializationData->VendorIdLength > 0) &&
1126  (HwInitializationData->VendorId != NULL) &&
1127  (HwInitializationData->DeviceIdLength > 0) &&
1128  (HwInitializationData->DeviceId != NULL)))
1129  {
1130  /* Construct a resource list */
1131  ResourceList = SpiConfigToResource(DeviceExtension, PortConfig);
1132 
1133  if (ResourceList)
1134  {
1136  RtlInitUnicodeString(&UnicodeString, L"ScsiAdapter");
1137  DPRINT("Reporting resources\n");
1139  DriverObject,
1140  NULL,
1141  0,
1142  PortDeviceObject,
1143  ResourceList,
1145  List[0].PartialResourceList.PartialDescriptors) +
1146  ResourceList->List[0].PartialResourceList.Count *
1148  FALSE,
1149  &Conflict);
1151 
1152  /* In case of a failure or a conflict, break */
1153  if (Conflict || (!NT_SUCCESS(Status)))
1154  {
1155  if (Conflict)
1157  break;
1158  }
1159  }
1160  }
1161 
1162  /* Reset the Conflict var */
1163  Conflict = FALSE;
1164 
1165  /* Copy all stuff which we ever need from PortConfig to the DeviceExtension */
1167  DeviceExtension->MaxTargedIds = SCSI_MAXIMUM_TARGETS_PER_BUS;
1168  else
1169  DeviceExtension->MaxTargedIds = PortConfig->MaximumNumberOfTargets;
1170 
1171  DeviceExtension->BusNum = PortConfig->NumberOfBuses;
1172  DeviceExtension->CachesData = PortConfig->CachesData;
1173  DeviceExtension->ReceiveEvent = PortConfig->ReceiveEvent;
1174  DeviceExtension->SupportsTaggedQueuing = PortConfig->TaggedQueuing;
1175  DeviceExtension->MultipleReqsPerLun = PortConfig->MultipleRequestPerLu;
1176 
1177  /* If something was disabled via registry - apply it */
1178  if (ConfigInfo.DisableMultipleLun)
1179  DeviceExtension->MultipleReqsPerLun = PortConfig->MultipleRequestPerLu = FALSE;
1180 
1181  if (ConfigInfo.DisableTaggedQueueing)
1182  DeviceExtension->SupportsTaggedQueuing = PortConfig->MultipleRequestPerLu = FALSE;
1183 
1184  /* Check if we need to alloc SRB data */
1185  if (DeviceExtension->SupportsTaggedQueuing || DeviceExtension->MultipleReqsPerLun)
1186  {
1187  DeviceExtension->NeedSrbDataAlloc = TRUE;
1188  }
1189  else
1190  {
1191  DeviceExtension->NeedSrbDataAlloc = FALSE;
1192  }
1193 
1194  /* Get a pointer to the port capabilities */
1195  PortCapabilities = &DeviceExtension->PortCapabilities;
1196 
1197  /* Copy one field there */
1198  DeviceExtension->MapBuffers = PortConfig->MapBuffers;
1199  PortCapabilities->AdapterUsesPio = PortConfig->MapBuffers;
1200 
1201  if (DeviceExtension->AdapterObject == NULL &&
1202  (PortConfig->DmaChannel != SP_UNINITIALIZED_VALUE || PortConfig->Master))
1203  {
1204  DPRINT1("DMA is not supported yet\n");
1205  ASSERT(FALSE);
1206  }
1207 
1208  if (DeviceExtension->SrbExtensionBuffer == NULL &&
1209  (DeviceExtension->SrbExtensionSize != 0 || PortConfig->AutoRequestSense))
1210  {
1211  DeviceExtension->SupportsAutoSense = PortConfig->AutoRequestSense;
1212  DeviceExtension->NeedSrbExtensionAlloc = TRUE;
1213 
1214  /* Allocate common buffer */
1215  Status = SpiAllocateCommonBuffer(DeviceExtension, 0);
1216 
1217  /* Check for failure */
1218  if (!NT_SUCCESS(Status))
1219  break;
1220  }
1221 
1222  /* Allocate SrbData, if needed */
1223  if (DeviceExtension->NeedSrbDataAlloc)
1224  {
1225  ULONG Count;
1226  PSCSI_REQUEST_BLOCK_INFO SrbData;
1227 
1228  if (DeviceExtension->SrbDataCount != 0)
1229  Count = DeviceExtension->SrbDataCount;
1230  else
1231  Count = DeviceExtension->RequestsNumber * 2;
1232 
1233  /* Allocate the data */
1234  SrbData = ExAllocatePoolWithTag(
1236  if (SrbData == NULL)
1238 
1239  RtlZeroMemory(SrbData, Count * sizeof(SCSI_REQUEST_BLOCK_INFO));
1240 
1241  DeviceExtension->SrbInfo = SrbData;
1242  DeviceExtension->FreeSrbInfo = SrbData;
1243  DeviceExtension->SrbDataCount = Count;
1244 
1245  /* Link it to the list */
1246  while (Count > 0)
1247  {
1248  SrbData->Requests.Flink = (PLIST_ENTRY)(SrbData + 1);
1249  SrbData++;
1250  Count--;
1251  }
1252 
1253  /* Mark the last entry of the list */
1254  SrbData--;
1255  SrbData->Requests.Flink = NULL;
1256  }
1257 
1258  /* Initialize port capabilities */
1259  PortCapabilities = &DeviceExtension->PortCapabilities;
1260  PortCapabilities->Length = sizeof(IO_SCSI_CAPABILITIES);
1261  PortCapabilities->MaximumTransferLength = PortConfig->MaximumTransferLength;
1262 
1263  if (PortConfig->ReceiveEvent)
1265 
1266  PortCapabilities->TaggedQueuing = DeviceExtension->SupportsTaggedQueuing;
1267  PortCapabilities->AdapterScansDown = PortConfig->AdapterScansDown;
1268 
1269  if (PortConfig->AlignmentMask > PortDeviceObject->AlignmentRequirement)
1270  PortDeviceObject->AlignmentRequirement = PortConfig->AlignmentMask;
1271 
1272  PortCapabilities->AlignmentMask = PortDeviceObject->AlignmentRequirement;
1273 
1274  if (PortCapabilities->MaximumPhysicalPages == 0)
1275  {
1276  PortCapabilities->MaximumPhysicalPages =
1277  BYTES_TO_PAGES(PortCapabilities->MaximumTransferLength);
1278 
1279  /* Apply miniport's limits */
1280  if (PortConfig->NumberOfPhysicalBreaks < PortCapabilities->MaximumPhysicalPages)
1281  {
1282  PortCapabilities->MaximumPhysicalPages = PortConfig->NumberOfPhysicalBreaks;
1283  }
1284  }
1285 
1286  CallHWInitialize(DeviceExtension);
1287 
1288  /* Start our timer */
1289  IoStartTimer(PortDeviceObject);
1290 
1291  /* Initialize bus scanning information */
1292  BusConfigSize = FIELD_OFFSET(
1294  BusScanInfo[DeviceExtension->PortConfig->NumberOfBuses]);
1295  DeviceExtension->BusesConfig =
1296  ExAllocatePoolWithTag(PagedPool, BusConfigSize, TAG_SCSIPORT);
1297  if (!DeviceExtension->BusesConfig)
1298  {
1299  DPRINT1("Out of resources!\n");
1301  break;
1302  }
1303 
1304  /* Zero it */
1305  RtlZeroMemory(DeviceExtension->BusesConfig, BusConfigSize);
1306 
1307  /* Store number of buses there */
1308  DeviceExtension->BusesConfig->NumberOfBuses = (UCHAR)DeviceExtension->BusNum;
1309 
1310  /* Scan the adapter for devices */
1311  SpiScanAdapter(DeviceExtension);
1312 
1313  /* Build the registry device map */
1314  SpiBuildDeviceMap(DeviceExtension, (PUNICODE_STRING)Argument2);
1315 
1316  /* Create the dos device link */
1317  swprintf(DosNameBuffer, L"\\??\\Scsi%lu:", SystemConfig->ScsiPortCount);
1318  RtlInitUnicodeString(&DosDeviceName, DosNameBuffer);
1320 
1321  /* Increase the port count */
1322  SystemConfig->ScsiPortCount++;
1323  FirstConfigCall = FALSE;
1324 
1325  /* Increase adapter number and bus number respectively */
1326  ConfigInfo.AdapterNumber++;
1327 
1328  if (!Again)
1329  ConfigInfo.BusNumber++;
1330 
1331  DPRINT("Bus: %lu MaxBus: %lu\n", ConfigInfo.BusNumber, MaxBus);
1332 
1333  DeviceFound = TRUE;
1334  }
1335 
1336  /* Clean up the mess */
1337  SpiCleanupAfterInit(DeviceExtension);
1338 
1339  /* Close registry keys */
1340  if (ConfigInfo.ServiceKey != NULL)
1341  ZwClose(ConfigInfo.ServiceKey);
1342 
1343  if (ConfigInfo.DeviceKey != NULL)
1344  ZwClose(ConfigInfo.DeviceKey);
1345 
1346  if (ConfigInfo.BusKey != NULL)
1347  ZwClose(ConfigInfo.BusKey);
1348 
1349  if (ConfigInfo.AccessRanges != NULL)
1350  ExFreePool(ConfigInfo.AccessRanges);
1351 
1352  if (ConfigInfo.Parameter != NULL)
1353  ExFreePool(ConfigInfo.Parameter);
1354 
1355  DPRINT("ScsiPortInitialize() done, Status = 0x%08X, DeviceFound = %d!\n",
1356  Status, DeviceFound);
1357 
1358  return (DeviceFound == FALSE) ? Status : STATUS_SUCCESS;
1359 }
struct _LIST_ENTRY * PLIST_ENTRY
#define SRBEV_SCSI_ASYNC_NOTIFICATION
Definition: srb.h:232
FORCEINLINE VOID IoInitializeDpcRequest(_In_ PDEVICE_OBJECT DeviceObject, _In_ PIO_DPC_ROUTINE DpcRoutine)
Definition: iofuncs.h:2836
#define SP_UNINITIALIZED_VALUE
Definition: srb.h:224
NTSYSAPI VOID NTAPI RtlCopyMemory(VOID UNALIGNED *Destination, CONST VOID UNALIGNED *Source, ULONG Length)
#define IRP_MJ_CREATE
Definition: rdpdr.c:44
ULONG SupportedAsynchronousEvents
Definition: scsi_port.h:139
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158
*BytesInUnicodeString PWCH UnicodeString
Definition: rtlfuncs.h:1979
_IRQL_requires_same_ _In_opt_ PVOID Argument1
Definition: cmtypes.h:696
BOOLEAN DisableMultipleLun
Definition: scsiport.h:75
VOID NTAPI IoStartTimer(IN PDEVICE_OBJECT DeviceObject)
Definition: iotimer.c:133
PCONFIGURATION_INFORMATION NTAPI IoGetConfigurationInformation(VOID)
Definition: iorsrce.c:830
#define TRUE
Definition: types.h:120
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135
NTSYSAPI NTSTATUS NTAPI ZwClose(_In_ HANDLE Handle)
IO_SCSI_CAPABILITIES PortCapabilities
Definition: scsiport.c:79
#define SCSI_MAXIMUM_LOGICAL_UNITS
Definition: srb.h:21
BOOLEAN AdapterScansDown
Definition: scsi_port.h:142
LONG NTSTATUS
Definition: precomp.h:26
static VOID NTAPI ScsiPortIoTimer(PDEVICE_OBJECT DeviceObject, PVOID Context)
Definition: scsiport.c:2196
_Must_inspect_result_ _In_ PVOID _In_ struct _HW_INITIALIZATION_DATA _In_ PVOID HwContext
Definition: srb.h:897
#define TAG_SCSIPORT
Definition: scsiport.h:20
_Inout_ __drv_aliasesMem PSLIST_ENTRY _Inout_ PSLIST_ENTRY _In_ ULONG Count
Definition: exfuncs.h:1223
ACCESS_RANGE(* AccessRanges)[]
Definition: srb.h:70
IO_DPC_ROUTINE ScsiPortDpcForIsr
Definition: scsiport.h:369
WCHAR DeviceName[]
Definition: adapter.cpp:21
const MUI_LANGUAGE_RESOURCE ResourceList[]
Definition: muilanguages.h:414
DRIVER_DISPATCH ScsiPortDispatchScsi
Definition: scsiport.h:370
#define DO_DIRECT_IO
Definition: env_spec_w32.h:396
VOID NTAPI SpiMiniportTimerDpc(IN struct _KDPC *Dpc, IN PVOID DeviceObject, IN PVOID SystemArgument1, IN PVOID SystemArgument2)
Definition: scsiport.c:2297
uint32_t ULONG_PTR
Definition: typedefs.h:65
#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:1701
#define FILE_DEVICE_CONTROLLER
Definition: winioctl.h:109
#define FALSE
Definition: types.h:117
#define SCSI_MAXIMUM_TARGETS_PER_BUS
Definition: srb.h:22
NTSTATUS SpiBuildDeviceMap(_In_ PSCSI_PORT_DEVICE_EXTENSION DeviceExtension, _In_ PUNICODE_STRING RegistryPath)
Definition: registry.c:107
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:2330
PVOID DeviceExtension
Definition: env_spec_w32.h:418
unsigned char BOOLEAN
smooth NULL
Definition: ftsmooth.c:416
PACCESS_RANGE AccessRanges
Definition: scsiport.h:79
_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
static PDRIVER_OBJECT DriverObject
Definition: template.c:42
VOID NTAPI KeInitializeTimer(OUT PKTIMER Timer)
Definition: timerobj.c:233
void DPRINT(...)
Definition: polytest.cpp:61
void * PVOID
Definition: retypes.h:9
NTSTATUS NTAPI ScsiPortDeviceControl(_In_ PDEVICE_OBJECT DeviceObject, _In_ PIRP Irp)
Definition: ioctl.c:150
static NTSTATUS SpiAllocateCommonBuffer(PSCSI_PORT_DEVICE_EXTENSION DeviceExtension, ULONG NonCachedSize)
Definition: scsiport.c:662
_In_ PVOID Argument2
Definition: classpnp.h:721
NTSTATUS CallHWInitialize(_In_ PSCSI_PORT_DEVICE_EXTENSION DeviceExtension)
Calls HwInitialize routine of the miniport and sets up interrupts Should be called inside ScsiPortIni...
Definition: fdo.c:459
int64_t LONGLONG
Definition: typedefs.h:68
struct _LIST_ENTRY * Flink
Definition: typedefs.h:121
_In_z_ PWSTR RegistryPath
Definition: classp.h:1930
LIST_ENTRY List
Definition: psmgr.c:57
__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
#define swprintf(buf, format,...)
Definition: sprintf.c:56
#define SP_RETURN_NOT_FOUND
Definition: srb.h:513
#define SP_RETURN_FOUND
Definition: srb.h:514
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
#define ExAllocatePoolWithTag(hernya, size, tag)
Definition: env_spec_w32.h:350
_In_opt_ PUNICODE_STRING _In_ PDRIVER_OBJECT _In_ PDEVICE_OBJECT _In_ INTERFACE_TYPE _In_ ULONG _In_ ULONG SlotNumber
Definition: halfuncs.h:156
static char DosDeviceName[DEVICE_SIZE]
Definition: lsdd.c:26
#define BYTES_TO_PAGES(Size)
unsigned char UCHAR
Definition: xmlstorage.h:181
struct _PORT_CONFIGURATION_INFORMATION PORT_CONFIGURATION_INFORMATION
#define IRP_MJ_CLOSE
Definition: rdpdr.c:45
Status
Definition: gdiplustypes.h:24
static const WCHAR L[]
Definition: oid.c:1250
struct _SCSI_PORT_DEVICE_EXTENSION SCSI_PORT_DEVICE_EXTENSION
static VOID SpiScanAdapter(IN PSCSI_PORT_DEVICE_EXTENSION DeviceExtension, IN ULONG ScsiBus, IN UCHAR PathId)
Definition: scsiport.c:861
ULONG AlignmentRequirement
Definition: env_spec_w32.h:420
#define FILE_WORD_ALIGNMENT
Definition: nt_native.h:787
VOID SpiCleanupAfterInit(_In_ PSCSI_PORT_DEVICE_EXTENSION DeviceExtension)
Definition: fdo.c:596
ULONG_PTR SIZE_T
Definition: typedefs.h:80
ULONG LastAdapterNumber
Definition: scsiport.h:65
PHW_RESET_BUS HwResetBus
Definition: scsiport.c:84
PADAPTER_OBJECT AdapterObject
Definition: scsiport.c:87
VOID SpiInitOpenKeys(_Inout_ PCONFIGURATION_INFO ConfigInfo, _In_ PUNICODE_STRING RegistryPath)
Definition: registry.c:16
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:255
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:1853
UNICODE_STRING * PUNICODE_STRING
Definition: env_spec_w32.h:373
#define DPRINT1
Definition: precomp.h:8
DRIVER_STARTIO ScsiPortStartIo
Definition: scsiport.h:372
static NTSTATUS NTAPI ScsiPortCreateClose(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: scsiport.c:1986
PDRIVER_DISPATCH MajorFunction[IRP_MJ_MAXIMUM_FUNCTION+1]
Definition: iotypes.h:2269
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
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
PDRIVER_STARTIO DriverStartIo
Definition: iotypes.h:2267
VOID NTAPI KeInitializeDpc(IN PKDPC Dpc, IN PKDEFERRED_ROUTINE DeferredRoutine, IN PVOID DeferredContext)
Definition: dpc.c:711
NTSTATUS NTAPI IoReportResourceUsage(PUNICODE_STRING DriverClassName, PDRIVER_OBJECT DriverObject, PCM_RESOURCE_LIST DriverList, ULONG DriverListSize, PDEVICE_OBJECT DeviceObject, PCM_RESOURCE_LIST DeviceList, ULONG DeviceListSize, BOOLEAN OverrideConflict, PBOOLEAN ConflictDetected)
Definition: iorsrce.c:839
#define STATUS_CONFLICTING_ADDRESSES
Definition: ntstatus.h:261
return STATUS_SUCCESS
Definition: btrfs.c:3014
BOOLEAN DisableTaggedQueueing
Definition: scsiport.h:74
struct _IO_SCSI_CAPABILITIES IO_SCSI_CAPABILITIES
struct _DRIVER_OBJECT * PDRIVER_OBJECT
#define ExFreePool(addr)
Definition: env_spec_w32.h:352
_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 1271 of file scsiport.c.

1276 {
1277  // FIXME
1278  UNIMPLEMENTED;
1279 }
#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 1283 of file scsiport.c.

1291 {
1292  // FIXME
1293  UNIMPLEMENTED;
1294 }
#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 1298 of file scsiport.c.

1302 {
1304 }
#define ReadBuffer(BaseIoAddress, Buffer, Count)
Definition: atapi.h:339
#define RtlMoveMemory(Destination, Source, Length)
Definition: typedefs.h:264
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
#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 1416 of file scsiport.c.

1417 {
1418  PSCSI_PORT_DEVICE_EXTENSION DeviceExtension;
1419  va_list ap;
1420 
1421  DPRINT("ScsiPortNotification() called\n");
1422 
1423  DeviceExtension =
1424  CONTAINING_RECORD(HwDeviceExtension, SCSI_PORT_DEVICE_EXTENSION, MiniPortDeviceExtension);
1425 
1426  DPRINT("DeviceExtension %p\n", DeviceExtension);
1427 
1428  va_start(ap, HwDeviceExtension);
1429 
1430  switch (NotificationType)
1431  {
1432  case RequestComplete:
1433  {
1435  PSCSI_REQUEST_BLOCK_INFO SrbData;
1436 
1438 
1439  DPRINT("Notify: RequestComplete (Srb %p)\n", Srb);
1440 
1441  /* Make sure Srb is alright */
1442  ASSERT(Srb->SrbStatus != SRB_STATUS_PENDING);
1443  ASSERT(
1444  Srb->Function != SRB_FUNCTION_EXECUTE_SCSI ||
1445  Srb->SrbStatus != SRB_STATUS_SUCCESS || Srb->ScsiStatus == SCSISTAT_GOOD);
1446 
1447  if (!(Srb->SrbFlags & SRB_FLAGS_IS_ACTIVE))
1448  {
1449  /* It's been already completed */
1450  va_end(ap);
1451  return;
1452  }
1453 
1454  /* It's not active anymore */
1455  Srb->SrbFlags &= ~SRB_FLAGS_IS_ACTIVE;
1456 
1457  if (Srb->Function == SRB_FUNCTION_ABORT_COMMAND)
1458  {
1459  /* TODO: Treat it specially */
1460  ASSERT(FALSE);
1461  }
1462  else
1463  {
1464  /* Get the SRB data */
1465  SrbData = SpiGetSrbData(
1466  DeviceExtension, Srb->PathId, Srb->TargetId, Srb->Lun, Srb->QueueTag);
1467 
1468  /* Make sure there are no CompletedRequests and there is a Srb */
1469  ASSERT(SrbData->CompletedRequests == NULL && SrbData->Srb != NULL);
1470 
1471  /* If it's a read/write request, make sure it has data inside it */
1472  if ((Srb->SrbStatus == SRB_STATUS_SUCCESS) &&
1473  ((Srb->Cdb[0] == SCSIOP_READ) || (Srb->Cdb[0] == SCSIOP_WRITE)))
1474  {
1475  ASSERT(Srb->DataTransferLength);
1476  }
1477 
1478  SrbData->CompletedRequests = DeviceExtension->InterruptData.CompletedRequests;
1479  DeviceExtension->InterruptData.CompletedRequests = SrbData;
1480  }
1481  }
1482  break;
1483 
1484  case NextRequest:
1485  DPRINT("Notify: NextRequest\n");
1486  DeviceExtension->InterruptData.Flags |= SCSI_PORT_NEXT_REQUEST_READY;
1487  break;
1488 
1489  case NextLuRequest:
1490  {
1491  UCHAR PathId;
1492  UCHAR TargetId;
1493  UCHAR Lun;
1494  PSCSI_PORT_LUN_EXTENSION LunExtension;
1495 
1496  PathId = (UCHAR)va_arg(ap, int);
1497  TargetId = (UCHAR)va_arg(ap, int);
1498  Lun = (UCHAR)va_arg(ap, int);
1499 
1500  DPRINT(
1501  "Notify: NextLuRequest(PathId %u TargetId %u Lun %u)\n", PathId, TargetId, Lun);
1502 
1503  /* Mark it in the flags field */
1504  DeviceExtension->InterruptData.Flags |= SCSI_PORT_NEXT_REQUEST_READY;
1505 
1506  /* Get the LUN extension */
1507  LunExtension = SpiGetLunExtension(DeviceExtension, PathId, TargetId, Lun);
1508 
1509  /* If returned LunExtension is NULL, break out */
1510  if (!LunExtension)
1511  break;
1512 
1513  /* This request should not be processed if */
1514  if ((LunExtension->ReadyLun) || (LunExtension->SrbInfo.Srb))
1515  {
1516  /* Nothing to do here */
1517  break;
1518  }
1519 
1520  /* Add this LUN to the list */
1521  LunExtension->ReadyLun = DeviceExtension->InterruptData.ReadyLun;
1522  DeviceExtension->InterruptData.ReadyLun = LunExtension;
1523  }
1524  break;
1525 
1526  case ResetDetected:
1527  DPRINT("Notify: ResetDetected\n");
1528  /* Add RESET flags */
1529  DeviceExtension->InterruptData.Flags |= SCSI_PORT_RESET | SCSI_PORT_RESET_REPORTED;
1530  break;
1531 
1532  case CallDisableInterrupts:
1533  DPRINT1("UNIMPLEMENTED SCSI Notification called: CallDisableInterrupts!\n");
1534  break;
1535 
1536  case CallEnableInterrupts:
1537  DPRINT1("UNIMPLEMENTED SCSI Notification called: CallEnableInterrupts!\n");
1538  break;
1539 
1540  case RequestTimerCall:
1541  DPRINT("Notify: RequestTimerCall\n");
1542  DeviceExtension->InterruptData.Flags |= SCSI_PORT_TIMER_NEEDED;
1543  DeviceExtension->InterruptData.HwScsiTimer = (PHW_TIMER)va_arg(ap, PHW_TIMER);
1544  DeviceExtension->InterruptData.MiniportTimerValue = (ULONG)va_arg(ap, ULONG);
1545  break;
1546 
1547  case BusChangeDetected:
1548  DPRINT1("UNIMPLEMENTED SCSI Notification called: BusChangeDetected!\n");
1549  break;
1550 
1551  default:
1552  DPRINT1("Unsupported notification from WMI: %lu\n", NotificationType);
1553  break;
1554  }
1555 
1556  va_end(ap);
1557 
1558  /* Request a DPC after we're done with the interrupt */
1559  DeviceExtension->InterruptData.Flags |= SCSI_PORT_NOTIFICATION_NEEDED;
1560 }
struct _SCSI_REQUEST_BLOCK_INFO * CompletedRequests
Definition: scsiport.h:111
_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
PSCSI_PORT_LUN_EXTENSION SpiGetLunExtension(_In_ PSCSI_PORT_DEVICE_EXTENSION DeviceExtension, _In_ UCHAR PathId, _In_ UCHAR TargetId, _In_ UCHAR Lun)
Definition: pdo.c:57
PSCSI_REQUEST_BLOCK_INFO SpiGetSrbData(_In_ PSCSI_PORT_DEVICE_EXTENSION DeviceExtension, _In_ UCHAR PathId, _In_ UCHAR TargetId, _In_ UCHAR Lun, _In_ UCHAR QueueTag)
Definition: pdo.c:92
#define SCSI_PORT_RESET
Definition: scsiport.h:34
#define SCSI_PORT_NOTIFICATION_NEEDED
Definition: scsiport.h:30
#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
#define SCSIOP_WRITE
Definition: cdrw_hw.h:906
smooth NULL
Definition: ftsmooth.c:416
char * va_list
Definition: acmsvcex.h:78
void DPRINT(...)
Definition: polytest.cpp:61
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
SCSI_REQUEST_BLOCK_INFO SrbInfo
Definition: scsiport.h:147
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
unsigned char UCHAR
Definition: xmlstorage.h:181
PSCSI_REQUEST_BLOCK Srb
Definition: scsiport.h:101
#define SRB_FUNCTION_ABORT_COMMAND
Definition: srb.h:316
#define va_arg(ap, T)
Definition: acmsvcex.h:89
#define va_start(ap, A)
Definition: acmsvcex.h:91
struct _SCSI_PORT_LUN_EXTENSION * ReadyLun
Definition: scsiport.h:144
#define DPRINT1
Definition: precomp.h:8
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
unsigned int ULONG
Definition: retypes.h:1
#define SRB_STATUS_SUCCESS
Definition: srb.h:333
#define SCSISTAT_GOOD
Definition: cdrw_hw.h:1078
IN PSCSI_REQUEST_BLOCK Srb
Definition: class2.h:49
#define SCSI_PORT_TIMER_NEEDED
Definition: scsiport.h:42
#define SCSI_PORT_RESET_REPORTED
Definition: scsiport.h:36

◆ 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:34
VOID NTAPI READ_PORT_BUFFER_UCHAR(IN PUCHAR Port, OUT PUCHAR Buffer, IN ULONG Count)
Definition: portio.c:26
_Inout_ __drv_aliasesMem PSLIST_ENTRY _Inout_ PSLIST_ENTRY _In_ ULONG Count
Definition: exfuncs.h:1223
Definition: bufpool.h:45

◆ 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:34
_Inout_ __drv_aliasesMem PSLIST_ENTRY _Inout_ PSLIST_ENTRY _In_ ULONG Count
Definition: exfuncs.h:1223
Definition: bufpool.h:45
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:34
_Inout_ __drv_aliasesMem PSLIST_ENTRY _Inout_ PSLIST_ENTRY _In_ ULONG Count
Definition: exfuncs.h:1223
Definition: bufpool.h:45
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 1374 of file scsiport.c.

1376 {
1377  TRACE("ScsiPortReadPortUchar(%p)\n", Port);
1378 
1379  return READ_PORT_UCHAR(Port);
1380 }
CPPORT Port[4]
Definition: headless.c:34
#define READ_PORT_UCHAR(p)
Definition: pc98vid.h:21
#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 1384 of file scsiport.c.

1386 {
1387  return READ_PORT_ULONG(Port);
1388 }
CPPORT Port[4]
Definition: headless.c:34
ULONG NTAPI READ_PORT_ULONG(IN PULONG Port)
Definition: portio.c:70

◆ ScsiPortReadPortUshort()

SCSIPORT_API USHORT NTAPI ScsiPortReadPortUshort ( IN PUSHORT  Port)

Definition at line 1392 of file scsiport.c.

1394 {
1395  return READ_PORT_USHORT(Port);
1396 }
CPPORT Port[4]
Definition: headless.c:34
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 1400 of file scsiport.c.

1404 {
1405  // FIXME
1406  UNIMPLEMENTED;
1407 }
#define UNIMPLEMENTED
Definition: debug.h:115

◆ ScsiPortReadRegisterBufferUlong()

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

Definition at line 1411 of file scsiport.c.

1415 {
1416  // FIXME
1417  UNIMPLEMENTED;
1418 }
#define UNIMPLEMENTED
Definition: debug.h:115

◆ ScsiPortReadRegisterBufferUshort()

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

Definition at line 1422 of file scsiport.c.

1426 {
1427  // FIXME
1428  UNIMPLEMENTED;
1429 }
#define UNIMPLEMENTED
Definition: debug.h:115

◆ ScsiPortReadRegisterUchar()

SCSIPORT_API UCHAR NTAPI ScsiPortReadRegisterUchar ( IN PUCHAR  Register)

Definition at line 1433 of file scsiport.c.

1435 {
1436  return READ_REGISTER_UCHAR(Register);
1437 }
NTKERNELAPI UCHAR NTAPI READ_REGISTER_UCHAR(IN PUCHAR Register)

◆ ScsiPortReadRegisterUlong()

SCSIPORT_API ULONG NTAPI ScsiPortReadRegisterUlong ( IN PULONG  Register)

Definition at line 1441 of file scsiport.c.

1443 {
1444  return READ_REGISTER_ULONG(Register);
1445 }
NTKERNELAPI ULONG NTAPI READ_REGISTER_ULONG(IN PULONG Register)

◆ ScsiPortReadRegisterUshort()

SCSIPORT_API USHORT NTAPI ScsiPortReadRegisterUshort ( IN PUSHORT  Register)

Definition at line 1449 of file scsiport.c.

1451 {
1452  return READ_REGISTER_USHORT(Register);
1453 }
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 1457 of file scsiport.c.

1465 {
1466  // FIXME
1467  UNIMPLEMENTED;
1468  return 0;
1469 }
#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 1481 of file scsiport.c.

1488 {
1489  // FIXME
1490  UNIMPLEMENTED;
1491  return TRUE;
1492 }
#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 1501 of file scsiport.c.

1505 {
1507 }
CPPORT Port[4]
Definition: headless.c:34
PPC_QUAL void __outbytestring(unsigned long const Port, const unsigned char *const Buffer, const unsigned long Count)
Definition: intrin_ppc.h:653
_Inout_ __drv_aliasesMem PSLIST_ENTRY _Inout_ PSLIST_ENTRY _In_ ULONG Count
Definition: exfuncs.h:1223
#define H2I(Port)
Definition: portio.c:18
Definition: bufpool.h:45

◆ ScsiPortWritePortBufferUlong()

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

Definition at line 1511 of file scsiport.c.

1515 {
1517 }
CPPORT Port[4]
Definition: headless.c:34
_Inout_ __drv_aliasesMem PSLIST_ENTRY _Inout_ PSLIST_ENTRY _In_ ULONG Count
Definition: exfuncs.h:1223
#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

◆ ScsiPortWritePortBufferUshort()

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

Definition at line 1521 of file scsiport.c.

1525 {
1527 }
CPPORT Port[4]
Definition: headless.c:34
_Inout_ __drv_aliasesMem PSLIST_ENTRY _Inout_ PSLIST_ENTRY _In_ ULONG Count
Definition: exfuncs.h:1223
#define H2I(Port)
Definition: portio.c:18
Definition: bufpool.h:45
PPC_QUAL void __outwordstring(unsigned long const Port, const unsigned short *const Buffer, const unsigned long Count)
Definition: intrin_ppc.h:662

◆ ScsiPortWritePortUchar()

◆ ScsiPortWritePortUlong()

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

Definition at line 1540 of file scsiport.c.

1543 {
1545 }
CPPORT Port[4]
Definition: headless.c:34
IN UCHAR Value
Definition: halp.h:394
VOID NTAPI WRITE_PORT_ULONG(IN PULONG Port, IN ULONG Value)
Definition: portio.c:123

◆ ScsiPortWritePortUshort()

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

Definition at line 1549 of file scsiport.c.

1552 {
1554 }
CPPORT Port[4]
Definition: headless.c:34
VOID NTAPI WRITE_PORT_USHORT(IN PUSHORT Port, IN USHORT Value)
Definition: portio.c:115
IN UCHAR Value
Definition: halp.h:394

◆ ScsiPortWriteRegisterBufferUchar()

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

Definition at line 1558 of file scsiport.c.

1562 {
1563  // FIXME
1564  UNIMPLEMENTED;
1565 }
#define UNIMPLEMENTED
Definition: debug.h:115

◆ ScsiPortWriteRegisterBufferUlong()

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

Definition at line 1569 of file scsiport.c.

1573 {
1574  // FIXME
1575  UNIMPLEMENTED;
1576 }
#define UNIMPLEMENTED
Definition: debug.h:115

◆ ScsiPortWriteRegisterBufferUshort()

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

Definition at line 1580 of file scsiport.c.

1584 {
1585  // FIXME
1586  UNIMPLEMENTED;
1587 }
#define UNIMPLEMENTED
Definition: debug.h:115

◆ ScsiPortWriteRegisterUchar()

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

Definition at line 1591 of file scsiport.c.

1594 {
1595  WRITE_REGISTER_UCHAR(Register, Value);
1596 }
IN UCHAR Value
Definition: halp.h:394
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 1600 of file scsiport.c.

1603 {
1604  WRITE_REGISTER_ULONG(Register, Value);
1605 }
NTKERNELAPI VOID NTAPI WRITE_REGISTER_ULONG(IN PULONG Register, IN ULONG Value)
IN UCHAR Value
Definition: halp.h:394

◆ ScsiPortWriteRegisterUshort()

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

Definition at line 1609 of file scsiport.c.

1612 {
1613  WRITE_REGISTER_USHORT(Register, Value);
1614 }
NTKERNELAPI VOID NTAPI WRITE_REGISTER_USHORT(IN PUSHORT Register, IN USHORT Value)
IN UCHAR Value
Definition: halp.h:394