ReactOS  0.4.13-dev-259-g5ca9c9c
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 473 of file scsiport.c.

479 {
480  // FIXME
482 }
#define UNIMPLEMENTED
Definition: debug.h:114

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

508 {
509  // FIXME
511 }
#define UNIMPLEMENTED
Definition: debug.h:114

◆ ScsiPortFreeDeviceBase()

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

Definition at line 515 of file scsiport.c.

518 {
519  // Nothing to do
520 }

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

531 {
532  return HalGetBusDataByOffset(BusDataType, SystemIoBusNumber, SlotNumber, Buffer, 0, Length);
533 }
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 537 of file scsiport.c.

544 {
547 
548  AddressSpace = (ULONG)InIoSpace;
550  SystemIoBusNumber,
551  IoAddress,
552  &AddressSpace,
554  {
555  return NULL;
556  }
557 
558  /* I/O space */
559  if (AddressSpace != 0)
560  return (PVOID)TranslatedAddress.u.LowPart;
561 
562  // FIXME
564  return (PVOID)IoAddress.LowPart;
565 }
_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
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
struct _LARGE_INTEGER::@2192 u
unsigned int ULONG
Definition: retypes.h:1
#define UNIMPLEMENTED
Definition: debug.h:114

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

574 {
575  // FIXME
577  return NULL;
578 }
smooth NULL
Definition: ftsmooth.c:416
#define UNIMPLEMENTED
Definition: debug.h:114

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

587 {
588  PSCSI_PORT_DEVICE_EXTENSION DeviceExtension;
590  ULONG BufferLength = 0;
591  ULONG Offset;
592 
593  TRACE("ScsiPortGetPhysicalAddress(%p %p %p %p)\n",
594  HwDeviceExtension, Srb, VirtualAddress, Length);
595 
596  DeviceExtension = ((PSCSI_PORT_DEVICE_EXTENSION)HwDeviceExtension) - 1;
597 
598  if (Srb == NULL || Srb->SenseInfoBuffer == VirtualAddress)
599  {
600  /* Simply look it up in the allocated common buffer */
601  Offset = (PUCHAR)VirtualAddress - (PUCHAR)DeviceExtension->SrbExtensionBuffer;
602 
603  BufferLength = DeviceExtension->CommonBufferLength - Offset;
605  }
606  else
607  {
608  /* Nothing */
610  }
611 
612  *Length = BufferLength;
613  return PhysicalAddress;
614 }
#define SP_UNINITIALIZED_VALUE
Definition: srb.h:224
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
_In_ ULONG BufferLength
Definition: usbdlib.h:225
smooth NULL
Definition: ftsmooth.c:416
int64_t LONGLONG
Definition: typedefs.h:66
#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:1060
_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:112

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

624 {
625  // FIXME
627  return NULL;
628 }
smooth NULL
Definition: ftsmooth.c:416
#define UNIMPLEMENTED
Definition: debug.h:114

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

700 {
701  PSCSI_PORT_DEVICE_EXTENSION DeviceExtension;
703  ULONG MapRegistersCount;
705 
706  TRACE("ScsiPortGetUncachedExtension(%p %p %lu)\n",
707  HwDeviceExtension, ConfigInfo, NumberOfBytes);
708 
709  DeviceExtension = ((PSCSI_PORT_DEVICE_EXTENSION)HwDeviceExtension) - 1;
710 
711  /* Check for allocated common DMA buffer */
712  if (DeviceExtension->SrbExtensionBuffer != NULL)
713  {
714  return NULL;
715  }
716 
717  /* Check for DMA adapter object */
718  if (DeviceExtension->AdapterObject == NULL)
719  {
720  /* Initialize DMA adapter description */
722 
724  DeviceDescription.Master = ConfigInfo->Master;
725  DeviceDescription.ScatterGather = ConfigInfo->ScatterGather;
726  DeviceDescription.DemandMode = ConfigInfo->DemandMode;
727  DeviceDescription.Dma32BitAddresses = ConfigInfo->Dma32BitAddresses;
728  DeviceDescription.BusNumber = ConfigInfo->SystemIoBusNumber;
729  DeviceDescription.DmaChannel = ConfigInfo->DmaChannel;
730  DeviceDescription.InterfaceType = ConfigInfo->AdapterInterfaceType;
731  DeviceDescription.DmaWidth = ConfigInfo->DmaWidth;
732  DeviceDescription.DmaSpeed = ConfigInfo->DmaSpeed;
733  DeviceDescription.MaximumLength = ConfigInfo->MaximumTransferLength;
734  DeviceDescription.DmaPort = ConfigInfo->DmaPort;
735 
736  /* Get a DMA adapter object */
737 #if 0
738  DeviceExtension->AdapterObject =
739  HalGetAdapter(&DeviceDescription, &MapRegistersCount);
740 
741  /* Fail in case of error */
742  if (DeviceExtension->AdapterObject == NULL)
743  {
744  return NULL;
745  }
746 #else
747  MapRegistersCount = 0;
748 #endif
749 
750  /* Set number of physical breaks */
751  if (ConfigInfo->NumberOfPhysicalBreaks != 0 &&
752  MapRegistersCount > ConfigInfo->NumberOfPhysicalBreaks)
753  {
754  DeviceExtension->PortCapabilities.MaximumPhysicalPages =
755  ConfigInfo->NumberOfPhysicalBreaks;
756  }
757  else
758  {
759  DeviceExtension->PortCapabilities.MaximumPhysicalPages = MapRegistersCount;
760  }
761  }
762 
763  /* Update Srb extension size */
764  if (DeviceExtension->SrbExtensionSize != ConfigInfo->SrbExtensionSize)
765  DeviceExtension->SrbExtensionSize = ConfigInfo->SrbExtensionSize;
766 
767  /* Allocate a common DMA buffer */
768  Status = SpiAllocateCommonBuffer(DeviceExtension, NumberOfBytes);
769 
770  if (!NT_SUCCESS(Status))
771  {
772  TRACE("SpiAllocateCommonBuffer() failed with Status = 0x%08X!\n", Status);
773  return NULL;
774  }
775 
776  return DeviceExtension->NonCachedExtension;
777 }
IO_SCSI_CAPABILITIES PortCapabilities
Definition: scsiport.c:80
struct SCSI_PORT_DEVICE_EXTENSION * PSCSI_PORT_DEVICE_EXTENSION
LONG NTSTATUS
Definition: precomp.h:26
DMA_SPEED DmaSpeed
Definition: iotypes.h:2037
#define DEVICE_DESCRIPTION_VERSION
Definition: iotypes.h:2019
smooth NULL
Definition: ftsmooth.c:416
BOOLEAN Dma32BitAddresses
Definition: iotypes.h:2029
_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:2027
BOOLEAN ScatterGather
Definition: iotypes.h:2026
DMA_WIDTH DmaWidth
Definition: iotypes.h:2036
Status
Definition: gdiplustypes.h:24
PADAPTER_OBJECT AdapterObject
Definition: scsiport.c:88
static NTSTATUS SpiAllocateCommonBuffer(IN OUT PSCSI_PORT_DEVICE_EXTENSION DeviceExtension, IN ULONG NonCachedSize)
Definition: scsiport.c:632
INTERFACE_TYPE InterfaceType
Definition: iotypes.h:2035
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS _Inout_ PLARGE_INTEGER NumberOfBytes
Definition: iotypes.h:997
unsigned int ULONG
Definition: retypes.h:1
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:261
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 781 of file scsiport.c.

784 {
785  // FIXME
787  return NULL;
788 }
smooth NULL
Definition: ftsmooth.c:416
#define UNIMPLEMENTED
Definition: debug.h:114

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

1012 {
1015  PSCSI_PORT_DEVICE_EXTENSION DeviceExtension = NULL;
1016  PCONFIGURATION_INFORMATION SystemConfig;
1018  PORT_CONFIGURATION_INFORMATION InitialPortConfig;
1019  CONFIGURATION_INFO ConfigInfo;
1020  ULONG DeviceExtensionSize;
1021  ULONG PortConfigSize;
1022  BOOLEAN Again;
1023  BOOLEAN DeviceFound = FALSE;
1024  BOOLEAN FirstConfigCall = TRUE;
1025  ULONG Result;
1026  NTSTATUS Status;
1027  ULONG MaxBus;
1029 
1030  PDEVICE_OBJECT PortDeviceObject;
1031  WCHAR NameBuffer[80];
1033  WCHAR DosNameBuffer[80];
1035  PIO_SCSI_CAPABILITIES PortCapabilities;
1036 
1037  KIRQL OldIrql;
1039  BOOLEAN Conflict;
1040  SIZE_T BusConfigSize;
1041 
1042 
1043  DPRINT ("ScsiPortInitialize() called!\n");
1044 
1045  /* Check params for validity */
1046  if ((HwInitializationData->HwInitialize == NULL) ||
1047  (HwInitializationData->HwStartIo == NULL) ||
1048  (HwInitializationData->HwInterrupt == NULL) ||
1049  (HwInitializationData->HwFindAdapter == NULL) ||
1050  (HwInitializationData->HwResetBus == NULL))
1051  {
1052  return STATUS_INVALID_PARAMETER;
1053  }
1054 
1055  /* Set handlers */
1061 
1062  /* Obtain configuration information */
1063  SystemConfig = IoGetConfigurationInformation();
1064 
1065  /* Zero the internal configuration info structure */
1066  RtlZeroMemory(&ConfigInfo, sizeof(CONFIGURATION_INFO));
1067 
1068  /* Zero starting slot number */
1069  SlotNumber.u.AsULONG = 0;
1070 
1071  /* Allocate space for access ranges */
1072  if (HwInitializationData->NumberOfAccessRanges)
1073  {
1074  ConfigInfo.AccessRanges =
1076  HwInitializationData->NumberOfAccessRanges * sizeof(ACCESS_RANGE), TAG_SCSIPORT);
1077 
1078  /* Fail if failed */
1079  if (ConfigInfo.AccessRanges == NULL)
1081  }
1082 
1083  /* Open registry keys */
1084  SpiInitOpenKeys(&ConfigInfo, (PUNICODE_STRING)Argument2);
1085 
1086  /* Last adapter number = not known */
1088 
1089  /* Calculate sizes of DeviceExtension and PortConfig */
1090  DeviceExtensionSize = sizeof(SCSI_PORT_DEVICE_EXTENSION) +
1091  HwInitializationData->DeviceExtensionSize;
1092 
1093  MaxBus = (HwInitializationData->AdapterInterfaceType == PCIBus) ? 8 : 1;
1094  DPRINT("MaxBus: %lu\n", MaxBus);
1095 
1096  while (TRUE)
1097  {
1098  /* Create a unicode device name */
1099  swprintf(NameBuffer,
1100  L"\\Device\\ScsiPort%lu",
1101  SystemConfig->ScsiPortCount);
1102  RtlInitUnicodeString(&DeviceName, NameBuffer);
1103 
1104  DPRINT("Creating device: %wZ\n", &DeviceName);
1105 
1106  /* Create the port device */
1108  DeviceExtensionSize,
1109  &DeviceName,
1111  0,
1112  FALSE,
1113  &PortDeviceObject);
1114 
1115  if (!NT_SUCCESS(Status))
1116  {
1117  DPRINT1("IoCreateDevice call failed! (Status 0x%lX)\n", Status);
1118  PortDeviceObject = NULL;
1119  break;
1120  }
1121 
1122  DPRINT ("Created device: %wZ (%p)\n", &DeviceName, PortDeviceObject);
1123 
1124  /* Set the buffering strategy here... */
1125  PortDeviceObject->Flags |= DO_DIRECT_IO;
1126  PortDeviceObject->AlignmentRequirement = FILE_WORD_ALIGNMENT; /* FIXME: Is this really needed? */
1127 
1128  /* Fill Device Extension */
1129  DeviceExtension = PortDeviceObject->DeviceExtension;
1130  RtlZeroMemory(DeviceExtension, DeviceExtensionSize);
1131  DeviceExtension->Length = DeviceExtensionSize;
1132  DeviceExtension->DeviceObject = PortDeviceObject;
1133  DeviceExtension->PortNumber = SystemConfig->ScsiPortCount;
1134 
1135  /* Driver's routines... */
1136  DeviceExtension->HwInitialize = HwInitializationData->HwInitialize;
1137  DeviceExtension->HwStartIo = HwInitializationData->HwStartIo;
1138  DeviceExtension->HwInterrupt = HwInitializationData->HwInterrupt;
1139  DeviceExtension->HwResetBus = HwInitializationData->HwResetBus;
1140  DeviceExtension->HwDmaStarted = HwInitializationData->HwDmaStarted;
1141 
1142  /* Extensions sizes */
1143  DeviceExtension->MiniPortExtensionSize = HwInitializationData->DeviceExtensionSize;
1144  DeviceExtension->LunExtensionSize = HwInitializationData->SpecificLuExtensionSize;
1145  DeviceExtension->SrbExtensionSize = HwInitializationData->SrbExtensionSize;
1146 
1147  /* Round Srb extension size to the quadword */
1148  DeviceExtension->SrbExtensionSize =
1149  ~(sizeof(LONGLONG) - 1) & (DeviceExtension->SrbExtensionSize +
1150  sizeof(LONGLONG) - 1);
1151 
1152  /* Fill some numbers (bus count, lun count, etc) */
1153  DeviceExtension->MaxLunCount = SCSI_MAXIMUM_LOGICAL_UNITS;
1154  DeviceExtension->RequestsNumber = 16;
1155 
1156  /* Initialize the spin lock in the controller extension */
1157  KeInitializeSpinLock(&DeviceExtension->IrqLock);
1158  KeInitializeSpinLock(&DeviceExtension->SpinLock);
1159 
1160  /* Initialize the DPC object */
1161  IoInitializeDpcRequest(PortDeviceObject,
1163 
1164  /* Initialize the device timer */
1165  DeviceExtension->TimerCount = -1;
1166  IoInitializeTimer(PortDeviceObject,
1168  DeviceExtension);
1169 
1170  /* Initialize miniport timer */
1171  KeInitializeTimer(&DeviceExtension->MiniportTimer);
1172  KeInitializeDpc(&DeviceExtension->MiniportTimerDpc,
1174  PortDeviceObject);
1175 
1176 CreatePortConfig:
1177 
1178  Status = SpiCreatePortConfig(DeviceExtension,
1180  &ConfigInfo,
1181  &InitialPortConfig,
1182  FirstConfigCall);
1183 
1184  if (!NT_SUCCESS(Status))
1185  {
1186  DPRINT("SpiCreatePortConfig() failed with Status 0x%08X\n", Status);
1187  break;
1188  }
1189 
1190  /* Allocate and initialize port configuration info */
1191  PortConfigSize = (sizeof(PORT_CONFIGURATION_INFORMATION) +
1192  HwInitializationData->NumberOfAccessRanges *
1193  sizeof(ACCESS_RANGE) + 7) & ~7;
1194  DeviceExtension->PortConfig = ExAllocatePoolWithTag(NonPagedPool, PortConfigSize, TAG_SCSIPORT);
1195 
1196  /* Fail if failed */
1197  if (DeviceExtension->PortConfig == NULL)
1198  {
1200  break;
1201  }
1202 
1203  PortConfig = DeviceExtension->PortConfig;
1204 
1205  /* Copy information here */
1206  RtlCopyMemory(PortConfig,
1207  &InitialPortConfig,
1209 
1210 
1211  /* Copy extension sizes into the PortConfig */
1212  PortConfig->SpecificLuExtensionSize = DeviceExtension->LunExtensionSize;
1213  PortConfig->SrbExtensionSize = DeviceExtension->SrbExtensionSize;
1214 
1215  /* Initialize Access ranges */
1216  if (HwInitializationData->NumberOfAccessRanges != 0)
1217  {
1218  PortConfig->AccessRanges = (PVOID)(PortConfig+1);
1219 
1220  /* Align to LONGLONG */
1221  PortConfig->AccessRanges = (PVOID)((ULONG_PTR)(PortConfig->AccessRanges) + 7);
1222  PortConfig->AccessRanges = (PVOID)((ULONG_PTR)(PortConfig->AccessRanges) & ~7);
1223 
1224  /* Copy the data */
1225  RtlCopyMemory(PortConfig->AccessRanges,
1226  ConfigInfo.AccessRanges,
1227  HwInitializationData->NumberOfAccessRanges * sizeof(ACCESS_RANGE));
1228  }
1229 
1230  /* Search for matching PCI device */
1231  if ((HwInitializationData->AdapterInterfaceType == PCIBus) &&
1232  (HwInitializationData->VendorIdLength > 0) &&
1233  (HwInitializationData->VendorId != NULL) &&
1234  (HwInitializationData->DeviceIdLength > 0) &&
1235  (HwInitializationData->DeviceId != NULL))
1236  {
1237  PortConfig->BusInterruptLevel = 0;
1238 
1239  /* Get PCI device data */
1240  DPRINT("VendorId '%.*s' DeviceId '%.*s'\n",
1241  HwInitializationData->VendorIdLength,
1242  HwInitializationData->VendorId,
1243  HwInitializationData->DeviceIdLength,
1244  HwInitializationData->DeviceId);
1245 
1247  PortDeviceObject,
1249  PortConfig,
1250  RegistryPath,
1251  ConfigInfo.BusNumber,
1252  &SlotNumber))
1253  {
1254  /* Continue to the next bus, nothing here */
1255  ConfigInfo.BusNumber++;
1256  DeviceExtension->PortConfig = NULL;
1257  ExFreePool(PortConfig);
1258  Again = FALSE;
1259  goto CreatePortConfig;
1260  }
1261 
1262  if (!PortConfig->BusInterruptLevel)
1263  {
1264  /* Bypass this slot, because no interrupt was assigned */
1265  DeviceExtension->PortConfig = NULL;
1266  ExFreePool(PortConfig);
1267  goto CreatePortConfig;
1268  }
1269  }
1270  else
1271  {
1272  DPRINT("Non-pci bus\n");
1273  }
1274 
1275  /* Note: HwFindAdapter is called once for each bus */
1276  Again = FALSE;
1277  DPRINT("Calling HwFindAdapter() for Bus %lu\n", PortConfig->SystemIoBusNumber);
1278  Result = (HwInitializationData->HwFindAdapter)(&DeviceExtension->MiniPortDeviceExtension,
1279  HwContext,
1280  0, /* BusInformation */
1281  ConfigInfo.Parameter, /* ArgumentString */
1282  PortConfig,
1283  &Again);
1284 
1285  DPRINT("HwFindAdapter() Result: %lu Again: %s\n",
1286  Result, (Again) ? "True" : "False");
1287 
1288  /* Free MapRegisterBase, it's not needed anymore */
1289  if (DeviceExtension->MapRegisterBase != NULL)
1290  {
1291  ExFreePool(DeviceExtension->MapRegisterBase);
1292  DeviceExtension->MapRegisterBase = NULL;
1293  }
1294 
1295  /* If result is nothing good... */
1296  if (Result != SP_RETURN_FOUND)
1297  {
1298  DPRINT("HwFindAdapter() Result: %lu\n", Result);
1299 
1300  if (Result == SP_RETURN_NOT_FOUND)
1301  {
1302  /* We can continue on the next bus */
1303  ConfigInfo.BusNumber++;
1304  Again = FALSE;
1305 
1306  DeviceExtension->PortConfig = NULL;
1307  ExFreePool(PortConfig);
1308  goto CreatePortConfig;
1309  }
1310 
1311  /* Otherwise, break */
1313  break;
1314  }
1315 
1316  DPRINT("ScsiPortInitialize(): Found HBA! (%x), adapter Id %d\n",
1317  PortConfig->BusInterruptVector, PortConfig->InitiatorBusId[0]);
1318 
1319  /* If the SRB extension size was updated */
1320  if (!DeviceExtension->NonCachedExtension &&
1321  (PortConfig->SrbExtensionSize != DeviceExtension->SrbExtensionSize))
1322  {
1323  /* Set it (rounding to LONGLONG again) */
1324  DeviceExtension->SrbExtensionSize =
1325  (PortConfig->SrbExtensionSize +
1326  sizeof(LONGLONG)) & ~(sizeof(LONGLONG) - 1);
1327  }
1328 
1329  /* The same with LUN extension size */
1330  if (PortConfig->SpecificLuExtensionSize != DeviceExtension->LunExtensionSize)
1331  DeviceExtension->LunExtensionSize = PortConfig->SpecificLuExtensionSize;
1332 
1333 
1334  if (!((HwInitializationData->AdapterInterfaceType == PCIBus) &&
1335  (HwInitializationData->VendorIdLength > 0) &&
1336  (HwInitializationData->VendorId != NULL) &&
1337  (HwInitializationData->DeviceIdLength > 0) &&
1338  (HwInitializationData->DeviceId != NULL)))
1339  {
1340  /* Construct a resource list */
1341  ResourceList = SpiConfigToResource(DeviceExtension,
1342  PortConfig);
1343 
1344  if (ResourceList)
1345  {
1347  RtlInitUnicodeString(&UnicodeString, L"ScsiAdapter");
1348  DPRINT("Reporting resources\n");
1350  DriverObject,
1351  NULL,
1352  0,
1353  PortDeviceObject,
1354  ResourceList,
1356  List[0].PartialResourceList.PartialDescriptors) +
1357  ResourceList->List[0].PartialResourceList.Count
1359  FALSE,
1360  &Conflict);
1362 
1363  /* In case of a failure or a conflict, break */
1364  if (Conflict || (!NT_SUCCESS(Status)))
1365  {
1366  if (Conflict)
1368  break;
1369  }
1370  }
1371  }
1372 
1373  /* Reset the Conflict var */
1374  Conflict = FALSE;
1375 
1376  /* Copy all stuff which we ever need from PortConfig to the DeviceExtension */
1378  DeviceExtension->MaxTargedIds = SCSI_MAXIMUM_TARGETS_PER_BUS;
1379  else
1380  DeviceExtension->MaxTargedIds = PortConfig->MaximumNumberOfTargets;
1381 
1382  DeviceExtension->BusNum = PortConfig->NumberOfBuses;
1383  DeviceExtension->CachesData = PortConfig->CachesData;
1384  DeviceExtension->ReceiveEvent = PortConfig->ReceiveEvent;
1385  DeviceExtension->SupportsTaggedQueuing = PortConfig->TaggedQueuing;
1386  DeviceExtension->MultipleReqsPerLun = PortConfig->MultipleRequestPerLu;
1387 
1388  /* If something was disabled via registry - apply it */
1389  if (ConfigInfo.DisableMultipleLun)
1390  DeviceExtension->MultipleReqsPerLun = PortConfig->MultipleRequestPerLu = FALSE;
1391 
1392  if (ConfigInfo.DisableTaggedQueueing)
1393  DeviceExtension->SupportsTaggedQueuing = PortConfig->MultipleRequestPerLu = FALSE;
1394 
1395  /* Check if we need to alloc SRB data */
1396  if (DeviceExtension->SupportsTaggedQueuing ||
1397  DeviceExtension->MultipleReqsPerLun)
1398  {
1399  DeviceExtension->NeedSrbDataAlloc = TRUE;
1400  }
1401  else
1402  {
1403  DeviceExtension->NeedSrbDataAlloc = FALSE;
1404  }
1405 
1406  /* Get a pointer to the port capabilities */
1407  PortCapabilities = &DeviceExtension->PortCapabilities;
1408 
1409  /* Copy one field there */
1410  DeviceExtension->MapBuffers = PortConfig->MapBuffers;
1411  PortCapabilities->AdapterUsesPio = PortConfig->MapBuffers;
1412 
1413  if (DeviceExtension->AdapterObject == NULL &&
1414  (PortConfig->DmaChannel != SP_UNINITIALIZED_VALUE || PortConfig->Master))
1415  {
1416  DPRINT1("DMA is not supported yet\n");
1417  ASSERT(FALSE);
1418  }
1419 
1420  if (DeviceExtension->SrbExtensionBuffer == NULL &&
1421  (DeviceExtension->SrbExtensionSize != 0 ||
1422  PortConfig->AutoRequestSense))
1423  {
1424  DeviceExtension->SupportsAutoSense = PortConfig->AutoRequestSense;
1425  DeviceExtension->NeedSrbExtensionAlloc = TRUE;
1426 
1427  /* Allocate common buffer */
1428  Status = SpiAllocateCommonBuffer(DeviceExtension, 0);
1429 
1430  /* Check for failure */
1431  if (!NT_SUCCESS(Status))
1432  break;
1433  }
1434 
1435  /* Allocate SrbData, if needed */
1436  if (DeviceExtension->NeedSrbDataAlloc)
1437  {
1438  ULONG Count;
1439  PSCSI_REQUEST_BLOCK_INFO SrbData;
1440 
1441  if (DeviceExtension->SrbDataCount != 0)
1442  Count = DeviceExtension->SrbDataCount;
1443  else
1444  Count = DeviceExtension->RequestsNumber * 2;
1445 
1446  /* Allocate the data */
1448  if (SrbData == NULL)
1450 
1451  RtlZeroMemory(SrbData, Count * sizeof(SCSI_REQUEST_BLOCK_INFO));
1452 
1453  DeviceExtension->SrbInfo = SrbData;
1454  DeviceExtension->FreeSrbInfo = SrbData;
1455  DeviceExtension->SrbDataCount = Count;
1456 
1457  /* Link it to the list */
1458  while (Count > 0)
1459  {
1460  SrbData->Requests.Flink = (PLIST_ENTRY)(SrbData + 1);
1461  SrbData++;
1462  Count--;
1463  }
1464 
1465  /* Mark the last entry of the list */
1466  SrbData--;
1467  SrbData->Requests.Flink = NULL;
1468  }
1469 
1470  /* Initialize port capabilities */
1471  PortCapabilities = &DeviceExtension->PortCapabilities;
1472  PortCapabilities->Length = sizeof(IO_SCSI_CAPABILITIES);
1473  PortCapabilities->MaximumTransferLength = PortConfig->MaximumTransferLength;
1474 
1475  if (PortConfig->ReceiveEvent)
1477 
1478  PortCapabilities->TaggedQueuing = DeviceExtension->SupportsTaggedQueuing;
1479  PortCapabilities->AdapterScansDown = PortConfig->AdapterScansDown;
1480 
1481  if (PortConfig->AlignmentMask > PortDeviceObject->AlignmentRequirement)
1482  PortDeviceObject->AlignmentRequirement = PortConfig->AlignmentMask;
1483 
1484  PortCapabilities->AlignmentMask = PortDeviceObject->AlignmentRequirement;
1485 
1486  if (PortCapabilities->MaximumPhysicalPages == 0)
1487  {
1488  PortCapabilities->MaximumPhysicalPages =
1489  BYTES_TO_PAGES(PortCapabilities->MaximumTransferLength);
1490 
1491  /* Apply miniport's limits */
1492  if (PortConfig->NumberOfPhysicalBreaks < PortCapabilities->MaximumPhysicalPages)
1493  {
1494  PortCapabilities->MaximumPhysicalPages = PortConfig->NumberOfPhysicalBreaks;
1495  }
1496  }
1497 
1498  /* Deal with interrupts */
1499  if (DeviceExtension->HwInterrupt == NULL ||
1500  (PortConfig->BusInterruptLevel == 0 && PortConfig->BusInterruptVector == 0))
1501  {
1502  /* No interrupts */
1503  DeviceExtension->InterruptCount = 0;
1504 
1505  DPRINT1("Interrupt Count: 0\n");
1506 
1507  UNIMPLEMENTED;
1508 
1509  /* This code path will ALWAYS crash so stop it now */
1510  while(TRUE);
1511  }
1512  else
1513  {
1514  BOOLEAN InterruptShareable;
1516  ULONG InterruptVector[2], i, MappedIrq[2];
1517  KIRQL Dirql[2], MaxDirql;
1518  KAFFINITY Affinity[2];
1519 
1520  DeviceExtension->InterruptLevel[0] = PortConfig->BusInterruptLevel;
1521  DeviceExtension->InterruptLevel[1] = PortConfig->BusInterruptLevel2;
1522 
1523  InterruptVector[0] = PortConfig->BusInterruptVector;
1524  InterruptVector[1] = PortConfig->BusInterruptVector2;
1525 
1526  InterruptMode[0] = PortConfig->InterruptMode;
1527  InterruptMode[1] = PortConfig->InterruptMode2;
1528 
1529  DeviceExtension->InterruptCount = (PortConfig->BusInterruptLevel2 != 0 || PortConfig->BusInterruptVector2 != 0) ? 2 : 1;
1530 
1531  for (i = 0; i < DeviceExtension->InterruptCount; i++)
1532  {
1533  /* Register an interrupt handler for this device */
1534  MappedIrq[i] = HalGetInterruptVector(PortConfig->AdapterInterfaceType,
1535  PortConfig->SystemIoBusNumber,
1536  DeviceExtension->InterruptLevel[i],
1537  InterruptVector[i],
1538  &Dirql[i],
1539  &Affinity[i]);
1540  }
1541 
1542  if (DeviceExtension->InterruptCount == 1 || Dirql[0] > Dirql[1])
1543  MaxDirql = Dirql[0];
1544  else
1545  MaxDirql = Dirql[1];
1546 
1547  for (i = 0; i < DeviceExtension->InterruptCount; i++)
1548  {
1549  /* Determine IRQ sharability as usual */
1550  if (PortConfig->AdapterInterfaceType == MicroChannel ||
1552  {
1553  InterruptShareable = TRUE;
1554  }
1555  else
1556  {
1557  InterruptShareable = FALSE;
1558  }
1559 
1560  Status = IoConnectInterrupt(&DeviceExtension->Interrupt[i],
1562  DeviceExtension,
1563  &DeviceExtension->IrqLock,
1564  MappedIrq[i],
1565  Dirql[i],
1566  MaxDirql,
1567  InterruptMode[i],
1568  InterruptShareable,
1569  Affinity[i],
1570  FALSE);
1571 
1572  if (!(NT_SUCCESS(Status)))
1573  {
1574  DPRINT1("Could not connect interrupt %d\n",
1575  InterruptVector[i]);
1576  DeviceExtension->Interrupt[i] = NULL;
1577  break;
1578  }
1579  }
1580 
1581  if (!NT_SUCCESS(Status))
1582  break;
1583  }
1584 
1585  /* Save IoAddress (from access ranges) */
1586  if (HwInitializationData->NumberOfAccessRanges != 0)
1587  {
1588  DeviceExtension->IoAddress =
1589  ((*(PortConfig->AccessRanges))[0]).RangeStart.LowPart;
1590 
1591  DPRINT("Io Address %x\n", DeviceExtension->IoAddress);
1592  }
1593 
1594  /* Set flag that it's allowed to disconnect during this command */
1595  DeviceExtension->Flags |= SCSI_PORT_DISCONNECT_ALLOWED;
1596 
1597  /* Initialize counter of active requests (-1 means there are none) */
1598  DeviceExtension->ActiveRequestCounter = -1;
1599 
1600  /* Analyze what we have about DMA */
1601  if (DeviceExtension->AdapterObject != NULL &&
1602  PortConfig->Master &&
1603  PortConfig->NeedPhysicalAddresses)
1604  {
1605  DeviceExtension->MapRegisters = TRUE;
1606  }
1607  else
1608  {
1609  DeviceExtension->MapRegisters = FALSE;
1610  }
1611 
1612  /* Call HwInitialize at DISPATCH_LEVEL */
1614 
1615  if (!KeSynchronizeExecution(DeviceExtension->Interrupt[0],
1616  DeviceExtension->HwInitialize,
1617  DeviceExtension->MiniPortDeviceExtension))
1618  {
1619  DPRINT1("HwInitialize() failed!\n");
1622  break;
1623  }
1624 
1625  /* Check if a notification is needed */
1626  if (DeviceExtension->InterruptData.Flags & SCSI_PORT_NOTIFICATION_NEEDED)
1627  {
1628  /* Call DPC right away, because we're already at DISPATCH_LEVEL */
1630  DeviceExtension->DeviceObject,
1631  NULL,
1632  NULL);
1633  }
1634 
1635  /* Lower irql back to what it was */
1637 
1638  /* Start our timer */
1639  IoStartTimer(PortDeviceObject);
1640 
1641  /* Initialize bus scanning information */
1643  BusScanInfo[DeviceExtension->PortConfig->NumberOfBuses]);
1644  DeviceExtension->BusesConfig = ExAllocatePoolWithTag(PagedPool,
1645  BusConfigSize,
1646  TAG_SCSIPORT);
1647  if (!DeviceExtension->BusesConfig)
1648  {
1649  DPRINT1("Out of resources!\n");
1651  break;
1652  }
1653 
1654  /* Zero it */
1655  RtlZeroMemory(DeviceExtension->BusesConfig, BusConfigSize);
1656 
1657  /* Store number of buses there */
1658  DeviceExtension->BusesConfig->NumberOfBuses = (UCHAR)DeviceExtension->BusNum;
1659 
1660  /* Scan the adapter for devices */
1661  SpiScanAdapter(DeviceExtension);
1662 
1663  /* Build the registry device map */
1664  SpiBuildDeviceMap(DeviceExtension,
1666 
1667  /* Create the dos device link */
1668  swprintf(DosNameBuffer,
1669  L"\\??\\Scsi%lu:",
1670  SystemConfig->ScsiPortCount);
1671  RtlInitUnicodeString(&DosDeviceName, DosNameBuffer);
1673 
1674  /* Increase the port count */
1675  SystemConfig->ScsiPortCount++;
1676  FirstConfigCall = FALSE;
1677 
1678  /* Increase adapter number and bus number respectively */
1679  ConfigInfo.AdapterNumber++;
1680 
1681  if (!Again)
1682  ConfigInfo.BusNumber++;
1683 
1684  DPRINT("Bus: %lu MaxBus: %lu\n", ConfigInfo.BusNumber, MaxBus);
1685 
1686  DeviceFound = TRUE;
1687  }
1688 
1689  /* Clean up the mess */
1690  SpiCleanupAfterInit(DeviceExtension);
1691 
1692  /* Close registry keys */
1693  if (ConfigInfo.ServiceKey != NULL)
1694  ZwClose(ConfigInfo.ServiceKey);
1695 
1696  if (ConfigInfo.DeviceKey != NULL)
1697  ZwClose(ConfigInfo.DeviceKey);
1698 
1699  if (ConfigInfo.BusKey != NULL)
1700  ZwClose(ConfigInfo.BusKey);
1701 
1702  if (ConfigInfo.AccessRanges != NULL)
1703  ExFreePool(ConfigInfo.AccessRanges);
1704 
1705  if (ConfigInfo.Parameter != NULL)
1706  ExFreePool(ConfigInfo.Parameter);
1707 
1708  DPRINT("ScsiPortInitialize() done, Status = 0x%08X, DeviceFound = %d!\n",
1709  Status, DeviceFound);
1710 
1711  return (DeviceFound == FALSE) ? Status : STATUS_SUCCESS;
1712 }
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:2792
static NTSTATUS NTAPI ScsiPortDeviceControl(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: scsiport.c:2801
#define SP_UNINITIALIZED_VALUE
Definition: srb.h:224
#define KeRaiseIrql(irql, oldIrql)
Definition: env_spec_w32.h:597
#define TRUE
Definition: types.h:120
NTSYSAPI VOID NTAPI RtlCopyMemory(VOID UNALIGNED *Destination, CONST VOID UNALIGNED *Source, ULONG Length)
#define IRP_MJ_CREATE
Definition: rdpdr.c:44
INTERFACE_TYPE AdapterInterfaceType
Definition: srb.h:55
ULONG SupportedAsynchronousEvents
Definition: scsi_port.h:139
_In_ PKSERVICE_ROUTINE _In_opt_ PVOID _In_opt_ PKSPIN_LOCK _In_ ULONG _In_ KIRQL _In_ KIRQL _In_ KINTERRUPT_MODE InterruptMode
Definition: iofuncs.h:798
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158
#define KeLowerIrql(oldIrql)
Definition: env_spec_w32.h:602
*BytesInUnicodeString PWCH UnicodeString
Definition: rtlfuncs.h:1980
_IRQL_requires_same_ _In_opt_ PVOID Argument1
Definition: cmtypes.h:694
BOOLEAN DisableMultipleLun
Definition: scsiport_int.h:74
VOID NTAPI SpiMiniportTimerDpc(IN struct _KDPC *Dpc, IN PVOID DeviceObject, IN PVOID SystemArgument1, IN PVOID SystemArgument2)
Definition: scsiport.c:5700
NTHALAPI ULONG NTAPI HalGetInterruptVector(INTERFACE_TYPE, ULONG, ULONG, ULONG, PKIRQL, PKAFFINITY)
VOID NTAPI IoStartTimer(IN PDEVICE_OBJECT DeviceObject)
Definition: iotimer.c:133
PCONFIGURATION_INFORMATION NTAPI IoGetConfigurationInformation(VOID)
Definition: iorsrce.c:830
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135
NTSYSAPI NTSTATUS NTAPI ZwClose(_In_ HANDLE Handle)
IO_SCSI_CAPABILITIES PortCapabilities
Definition: scsiport.c:80
#define SCSI_MAXIMUM_LOGICAL_UNITS
Definition: srb.h:21
BOOLEAN AdapterScansDown
Definition: scsi_port.h:142
LONG NTSTATUS
Definition: precomp.h:26
_Must_inspect_result_ _In_ PVOID _In_ struct _HW_INITIALIZATION_DATA _In_ PVOID HwContext
Definition: srb.h:664
static VOID NTAPI ScsiPortDpcForIsr(IN PKDPC Dpc, IN PDEVICE_OBJECT DpcDeviceObject, IN PIRP DpcIrp, IN PVOID DpcContext)
Definition: scsiport.c:4865
_Inout_ __drv_aliasesMem PSLIST_ENTRY _Inout_ PSLIST_ENTRY _In_ ULONG Count
Definition: exfuncs.h:1015
struct _SCSI_PORT_DEVICE_EXTENSION SCSI_PORT_DEVICE_EXTENSION
static PCM_RESOURCE_LIST SpiConfigToResource(PSCSI_PORT_DEVICE_EXTENSION DeviceExtension, PPORT_CONFIGURATION_INFORMATION PortConfig)
Definition: scsiport.c:2162
ACCESS_RANGE(* AccessRanges)[]
Definition: srb.h:70
WCHAR DeviceName[]
Definition: adapter.cpp:21
const MUI_LANGUAGE_RESOURCE ResourceList[]
Definition: muilanguages.h:414
#define SCSI_PORT_NOTIFICATION_NEEDED
Definition: scsiport_int.h:29
static VOID SpiInitOpenKeys(PCONFIGURATION_INFO ConfigInfo, PUNICODE_STRING RegistryPath)
Definition: scsiport.c:912
#define DO_DIRECT_IO
Definition: env_spec_w32.h:396
KSERVICE_ROUTINE * PKSERVICE_ROUTINE
Definition: ketypes.h:500
uint32_t ULONG_PTR
Definition: typedefs.h:63
#define IRP_MJ_SCSI
#define STATUS_INTERNAL_ERROR
Definition: ntstatus.h:451
UCHAR KIRQL
Definition: env_spec_w32.h:591
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define FILE_DEVICE_CONTROLLER
Definition: winioctl.h:109
#define SCSI_MAXIMUM_TARGETS_PER_BUS
Definition: srb.h:22
NTSTATUS NTAPI IoConnectInterrupt(OUT PKINTERRUPT *InterruptObject, IN PKSERVICE_ROUTINE ServiceRoutine, IN PVOID ServiceContext, IN PKSPIN_LOCK SpinLock, IN ULONG Vector, IN KIRQL Irql, IN KIRQL SynchronizeIrql, IN KINTERRUPT_MODE InterruptMode, IN BOOLEAN ShareVector, IN KAFFINITY ProcessorEnableMask, IN BOOLEAN FloatingSave)
Definition: irq.c:22
static NTSTATUS SpiBuildDeviceMap(IN PSCSI_PORT_DEVICE_EXTENSION DeviceExtension, IN PUNICODE_STRING RegistryPath)
Definition: scsiport.c:5284
PHW_INITIALIZE HwInitialize
Definition: scsiport.c:82
FORCEINLINE VOID KeInitializeSpinLock(_Out_ PKSPIN_LOCK SpinLock)
Definition: kefuncs.h:251
PVOID DeviceExtension
Definition: env_spec_w32.h:418
unsigned char BOOLEAN
smooth NULL
Definition: ftsmooth.c:416
enum _KINTERRUPT_MODE KINTERRUPT_MODE
PACCESS_RANGE AccessRanges
Definition: scsiport_int.h:78
_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
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:2314
void DPRINT(...)
Definition: polytest.cpp:61
KINTERRUPT_MODE InterruptMode2
Definition: srb.h:97
void * PVOID
Definition: retypes.h:9
_In_ PVOID Argument2
Definition: classpnp.h:680
static NTSTATUS NTAPI ScsiPortCreateClose(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: scsiport.c:2447
KINTERRUPT_MODE InterruptMode
Definition: srb.h:60
int64_t LONGLONG
Definition: typedefs.h:66
struct _LIST_ENTRY * Flink
Definition: typedefs.h:119
LIST_ENTRY List
Definition: psmgr.c:57
static VOID SpiCleanupAfterInit(PSCSI_PORT_DEVICE_EXTENSION DeviceExtension)
Definition: scsiport.c:1715
#define SCSI_PORT_DISCONNECT_ALLOWED
Definition: scsiport_int.h:37
__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
static VOID NTAPI ScsiPortIoTimer(PDEVICE_OBJECT DeviceObject, PVOID Context)
Definition: scsiport.c:5161
static DRIVER_DISPATCH ScsiPortDispatchScsi
Definition: scsiport.c:63
#define swprintf(buf, format,...)
Definition: sprintf.c:56
#define SP_RETURN_NOT_FOUND
Definition: srb.h:513
_In_ ULONG _In_ ULONG _In_ ULONG _Out_ PKIRQL _Out_ PKAFFINITY Affinity
Definition: halfuncs.h:170
#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
static DRIVER_STARTIO ScsiPortStartIo
Definition: scsiport.c:72
static VOID SpiScanAdapter(IN PSCSI_PORT_DEVICE_EXTENSION DeviceExtension)
Definition: scsiport.c:3763
#define IRP_MJ_CLOSE
Definition: rdpdr.c:45
static const WCHAR L[]
Definition: oid.c:1250
_Requires_lock_held_ Interrupt _Releases_lock_ Interrupt _In_ _IRQL_restores_ KIRQL OldIrql
Definition: kefuncs.h:803
static NTSTATUS SpiAllocateCommonBuffer(PSCSI_PORT_DEVICE_EXTENSION DeviceExtension, ULONG NonCachedSize)
Definition: scsiport.c:795
ULONG AlignmentRequirement
Definition: env_spec_w32.h:420
#define FILE_WORD_ALIGNMENT
Definition: nt_native.h:787
Status
Definition: gdiplustypes.h:24
#define DISPATCH_LEVEL
Definition: env_spec_w32.h:696
ULONG_PTR SIZE_T
Definition: typedefs.h:78
PHW_RESET_BUS HwResetBus
Definition: scsiport.c:85
PADAPTER_OBJECT AdapterObject
Definition: scsiport.c:88
static BOOLEAN NTAPI ScsiPortIsr(IN PKINTERRUPT Interrupt, IN PVOID ServiceContext)
Definition: scsiport.c:4607
ULONG_PTR KAFFINITY
Definition: compat.h:75
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:254
PHW_INTERRUPT HwInterrupt
Definition: scsiport.c:84
UNICODE_STRING * PUNICODE_STRING
Definition: env_spec_w32.h:373
#define DPRINT1
Definition: precomp.h:8
PDRIVER_DISPATCH MajorFunction[IRP_MJ_MAXIMUM_FUNCTION+1]
Definition: iotypes.h:2180
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 UNIMPLEMENTED
Definition: debug.h:114
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:261
_In_ PUNICODE_STRING RegistryPath
Definition: wmip.h:27
BOOLEAN NTAPI KeSynchronizeExecution(IN OUT PKINTERRUPT Interrupt, IN PKSYNCHRONIZE_ROUTINE SynchronizeRoutine, IN PVOID SynchronizeContext OPTIONAL)
Definition: interrupt.c:142
PDRIVER_STARTIO DriverStartIo
Definition: iotypes.h:2178
#define TAG_SCSIPORT
Definition: scsiport_int.h:19
static NTSTATUS SpiCreatePortConfig(PSCSI_PORT_DEVICE_EXTENSION DeviceExtension, PHW_INITIALIZATION_DATA HwInitData, PCONFIGURATION_INFO InternalConfigInfo, PPORT_CONFIGURATION_INFORMATION ConfigInfo, BOOLEAN FirstCall)
Definition: scsiport.c:5733
#define STATUS_ADAPTER_HARDWARE_ERROR
Definition: ntstatus.h:416
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:247
return STATUS_SUCCESS
Definition: btrfs.c:2745
BOOLEAN DisableTaggedQueueing
Definition: scsiport_int.h:73
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:664
#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 1243 of file scsiport.c.

1248 {
1249  // FIXME
1250  UNIMPLEMENTED;
1251 }
#define UNIMPLEMENTED
Definition: debug.h:114

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

1263 {
1264  // FIXME
1265  UNIMPLEMENTED;
1266 }
#define UNIMPLEMENTED
Definition: debug.h:114

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

1274 {
1276 }
#define ReadBuffer(BaseIoAddress, Buffer, Count)
Definition: atapi.h:339
#define RtlMoveMemory(Destination, Source, Length)
Definition: typedefs.h:263
_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 1869 of file scsiport.c.

1872 {
1873  PSCSI_PORT_DEVICE_EXTENSION DeviceExtension;
1874  va_list ap;
1875 
1876  DPRINT("ScsiPortNotification() called\n");
1877 
1878  DeviceExtension = CONTAINING_RECORD(HwDeviceExtension,
1880  MiniPortDeviceExtension);
1881 
1882  DPRINT("DeviceExtension %p\n", DeviceExtension);
1883 
1884  va_start(ap, HwDeviceExtension);
1885 
1886  switch (NotificationType)
1887  {
1888  case RequestComplete:
1889  {
1891  PSCSI_REQUEST_BLOCK_INFO SrbData;
1892 
1894 
1895  DPRINT("Notify: RequestComplete (Srb %p)\n", Srb);
1896 
1897  /* Make sure Srb is alright */
1898  ASSERT(Srb->SrbStatus != SRB_STATUS_PENDING);
1899  ASSERT(Srb->Function != SRB_FUNCTION_EXECUTE_SCSI || Srb->SrbStatus != SRB_STATUS_SUCCESS || Srb->ScsiStatus == SCSISTAT_GOOD);
1900 
1901  if (!(Srb->SrbFlags & SRB_FLAGS_IS_ACTIVE))
1902  {
1903  /* It's been already completed */
1904  va_end(ap);
1905  return;
1906  }
1907 
1908  /* It's not active anymore */
1909  Srb->SrbFlags &= ~SRB_FLAGS_IS_ACTIVE;
1910 
1911  if (Srb->Function == SRB_FUNCTION_ABORT_COMMAND)
1912  {
1913  /* TODO: Treat it specially */
1914  ASSERT(FALSE);
1915  }
1916  else
1917  {
1918  /* Get the SRB data */
1919  SrbData = SpiGetSrbData(DeviceExtension,
1920  Srb->PathId,
1921  Srb->TargetId,
1922  Srb->Lun,
1923  Srb->QueueTag);
1924 
1925  /* Make sure there are no CompletedRequests and there is a Srb */
1926  ASSERT(SrbData->CompletedRequests == NULL && SrbData->Srb != NULL);
1927 
1928  /* If it's a read/write request, make sure it has data inside it */
1929  if ((Srb->SrbStatus == SRB_STATUS_SUCCESS) &&
1930  ((Srb->Cdb[0] == SCSIOP_READ) || (Srb->Cdb[0] == SCSIOP_WRITE)))
1931  {
1932  ASSERT(Srb->DataTransferLength);
1933  }
1934 
1935  SrbData->CompletedRequests = DeviceExtension->InterruptData.CompletedRequests;
1936  DeviceExtension->InterruptData.CompletedRequests = SrbData;
1937  }
1938  }
1939  break;
1940 
1941  case NextRequest:
1942  DPRINT("Notify: NextRequest\n");
1943  DeviceExtension->InterruptData.Flags |= SCSI_PORT_NEXT_REQUEST_READY;
1944  break;
1945 
1946  case NextLuRequest:
1947  {
1948  UCHAR PathId;
1949  UCHAR TargetId;
1950  UCHAR Lun;
1951  PSCSI_PORT_LUN_EXTENSION LunExtension;
1952 
1953  PathId = (UCHAR) va_arg (ap, int);
1954  TargetId = (UCHAR) va_arg (ap, int);
1955  Lun = (UCHAR) va_arg (ap, int);
1956 
1957  DPRINT("Notify: NextLuRequest(PathId %u TargetId %u Lun %u)\n",
1958  PathId, TargetId, Lun);
1959 
1960  /* Mark it in the flags field */
1961  DeviceExtension->InterruptData.Flags |= SCSI_PORT_NEXT_REQUEST_READY;
1962 
1963  /* Get the LUN extension */
1964  LunExtension = SpiGetLunExtension(DeviceExtension,
1965  PathId,
1966  TargetId,
1967  Lun);
1968 
1969  /* If returned LunExtension is NULL, break out */
1970  if (!LunExtension) break;
1971 
1972  /* This request should not be processed if */
1973  if ((LunExtension->ReadyLun) ||
1974  (LunExtension->SrbInfo.Srb))
1975  {
1976  /* Nothing to do here */
1977  break;
1978  }
1979 
1980  /* Add this LUN to the list */
1981  LunExtension->ReadyLun = DeviceExtension->InterruptData.ReadyLun;
1982  DeviceExtension->InterruptData.ReadyLun = LunExtension;
1983  }
1984  break;
1985 
1986  case ResetDetected:
1987  DPRINT("Notify: ResetDetected\n");
1988  /* Add RESET flags */
1989  DeviceExtension->InterruptData.Flags |=
1991  break;
1992 
1993  case CallDisableInterrupts:
1994  DPRINT1("UNIMPLEMENTED SCSI Notification called: CallDisableInterrupts!\n");
1995  break;
1996 
1997  case CallEnableInterrupts:
1998  DPRINT1("UNIMPLEMENTED SCSI Notification called: CallEnableInterrupts!\n");
1999  break;
2000 
2001  case RequestTimerCall:
2002  DPRINT("Notify: RequestTimerCall\n");
2003  DeviceExtension->InterruptData.Flags |= SCSI_PORT_TIMER_NEEDED;
2004  DeviceExtension->InterruptData.HwScsiTimer = (PHW_TIMER)va_arg(ap, PHW_TIMER);
2005  DeviceExtension->InterruptData.MiniportTimerValue = (ULONG)va_arg(ap, ULONG);
2006  break;
2007 
2008  case BusChangeDetected:
2009  DPRINT1("UNIMPLEMENTED SCSI Notification called: BusChangeDetected!\n");
2010  break;
2011 
2012  default:
2013  DPRINT1 ("Unsupported notification from WMI: %lu\n", NotificationType);
2014  break;
2015  }
2016 
2017  va_end(ap);
2018 
2019  /* Request a DPC after we're done with the interrupt */
2020  DeviceExtension->InterruptData.Flags |= SCSI_PORT_NOTIFICATION_NEEDED;
2021 }
struct _SCSI_REQUEST_BLOCK_INFO * CompletedRequests
Definition: scsiport_int.h:110
#define SCSI_PORT_RESET_REPORTED
Definition: scsiport_int.h:35
_In_ ULONG _In_ BOOLEAN _In_ ULONG _In_ UCHAR _In_ UCHAR _In_ UCHAR Lun
Definition: classpnp.h:1117
#define SCSI_PORT_RESET
Definition: scsiport_int.h:33
struct _SCSI_REQUEST_BLOCK * PSCSI_REQUEST_BLOCK
_In_ ULONG _In_ BOOLEAN _In_ ULONG _In_ UCHAR PathId
Definition: classpnp.h:1117
#define SRB_FLAGS_IS_ACTIVE
Definition: srb.h:399
_In_ ULONG _In_ BOOLEAN _In_ ULONG _In_ UCHAR _In_ UCHAR TargetId
Definition: classpnp.h:1117
static PSCSI_REQUEST_BLOCK_INFO SpiGetSrbData(IN PSCSI_PORT_DEVICE_EXTENSION DeviceExtension, IN UCHAR PathId, IN UCHAR TargetId, IN UCHAR Lun, IN UCHAR QueueTag)
Definition: scsiport.c:4096
#define SCSI_PORT_NOTIFICATION_NEEDED
Definition: scsiport_int.h:29
#define va_end(ap)
Definition: acmsvcex.h:90
#define SCSI_PORT_NEXT_REQUEST_READY
Definition: scsiport.c:53
#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
static PSCSI_PORT_LUN_EXTENSION SpiGetLunExtension(IN PSCSI_PORT_DEVICE_EXTENSION DeviceExtension, IN UCHAR PathId, IN UCHAR TargetId, IN UCHAR Lun)
Definition: scsiport.c:3365
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_int.h:146
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
unsigned char UCHAR
Definition: xmlstorage.h:181
#define SCSI_PORT_TIMER_NEEDED
Definition: scsiport_int.h:41
PSCSI_REQUEST_BLOCK Srb
Definition: scsiport_int.h:100
#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_int.h:143
#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

◆ 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:1015
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:1015
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:1015
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 1346 of file scsiport.c.

1348 {
1349  TRACE("ScsiPortReadPortUchar(%p)\n", Port);
1350 
1351  return READ_PORT_UCHAR(Port);
1352 }
CPPORT Port[4]
Definition: headless.c:34
UCHAR NTAPI READ_PORT_UCHAR(PUCHAR Address)
Definition: mach.c:535
#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 1356 of file scsiport.c.

1358 {
1359  return READ_PORT_ULONG(Port);
1360 }
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 1364 of file scsiport.c.

1366 {
1367  return READ_PORT_USHORT(Port);
1368 }
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 1372 of file scsiport.c.

1376 {
1377  // FIXME
1378  UNIMPLEMENTED;
1379 }
#define UNIMPLEMENTED
Definition: debug.h:114

◆ ScsiPortReadRegisterBufferUlong()

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

Definition at line 1383 of file scsiport.c.

1387 {
1388  // FIXME
1389  UNIMPLEMENTED;
1390 }
#define UNIMPLEMENTED
Definition: debug.h:114

◆ ScsiPortReadRegisterBufferUshort()

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

Definition at line 1394 of file scsiport.c.

1398 {
1399  // FIXME
1400  UNIMPLEMENTED;
1401 }
#define UNIMPLEMENTED
Definition: debug.h:114

◆ ScsiPortReadRegisterUchar()

SCSIPORT_API UCHAR NTAPI ScsiPortReadRegisterUchar ( IN PUCHAR  Register)

Definition at line 1405 of file scsiport.c.

1407 {
1408  return READ_REGISTER_UCHAR(Register);
1409 }
NTKERNELAPI UCHAR NTAPI READ_REGISTER_UCHAR(IN PUCHAR Register)

◆ ScsiPortReadRegisterUlong()

SCSIPORT_API ULONG NTAPI ScsiPortReadRegisterUlong ( IN PULONG  Register)

Definition at line 1413 of file scsiport.c.

1415 {
1416  return READ_REGISTER_ULONG(Register);
1417 }
NTKERNELAPI ULONG NTAPI READ_REGISTER_ULONG(IN PULONG Register)

◆ ScsiPortReadRegisterUshort()

SCSIPORT_API USHORT NTAPI ScsiPortReadRegisterUshort ( IN PUSHORT  Register)

Definition at line 1421 of file scsiport.c.

1423 {
1424  return READ_REGISTER_USHORT(Register);
1425 }
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 1429 of file scsiport.c.

1437 {
1438  // FIXME
1439  UNIMPLEMENTED;
1440  return 0;
1441 }
#define UNIMPLEMENTED
Definition: debug.h:114

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

1460 {
1461  // FIXME
1462  UNIMPLEMENTED;
1463  return TRUE;
1464 }
#define TRUE
Definition: types.h:120
#define UNIMPLEMENTED
Definition: debug.h:114

Referenced by BT958HwFindAdapter(), and UniataFindBusMasterController().

◆ ScsiPortWritePortBufferUchar()

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

Definition at line 1473 of file scsiport.c.

1477 {
1479 }
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:1015
#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 1483 of file scsiport.c.

1487 {
1489 }
CPPORT Port[4]
Definition: headless.c:34
_Inout_ __drv_aliasesMem PSLIST_ENTRY _Inout_ PSLIST_ENTRY _In_ ULONG Count
Definition: exfuncs.h:1015
#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 1493 of file scsiport.c.

1497 {
1499 }
CPPORT Port[4]
Definition: headless.c:34
_Inout_ __drv_aliasesMem PSLIST_ENTRY _Inout_ PSLIST_ENTRY _In_ ULONG Count
Definition: exfuncs.h:1015
#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()

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

◆ ScsiPortWritePortUlong()

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

Definition at line 1512 of file scsiport.c.

1515 {
1517 }
_In_opt_ ULONG _Out_ PULONG Value
Definition: rtlfuncs.h:2327
CPPORT Port[4]
Definition: headless.c:34
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 1521 of file scsiport.c.

1524 {
1526 }
_In_opt_ ULONG _Out_ PULONG Value
Definition: rtlfuncs.h:2327
CPPORT Port[4]
Definition: headless.c:34
VOID NTAPI WRITE_PORT_USHORT(IN PUSHORT Port, IN USHORT Value)
Definition: portio.c:115

◆ ScsiPortWriteRegisterBufferUchar()

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

Definition at line 1530 of file scsiport.c.

1534 {
1535  // FIXME
1536  UNIMPLEMENTED;
1537 }
#define UNIMPLEMENTED
Definition: debug.h:114

◆ ScsiPortWriteRegisterBufferUlong()

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

Definition at line 1541 of file scsiport.c.

1545 {
1546  // FIXME
1547  UNIMPLEMENTED;
1548 }
#define UNIMPLEMENTED
Definition: debug.h:114

◆ ScsiPortWriteRegisterBufferUshort()

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

Definition at line 1552 of file scsiport.c.

1556 {
1557  // FIXME
1558  UNIMPLEMENTED;
1559 }
#define UNIMPLEMENTED
Definition: debug.h:114

◆ ScsiPortWriteRegisterUchar()

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

Definition at line 1563 of file scsiport.c.

1566 {
1567  WRITE_REGISTER_UCHAR(Register, Value);
1568 }
_In_opt_ ULONG _Out_ PULONG Value
Definition: rtlfuncs.h:2327
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 1572 of file scsiport.c.

1575 {
1576  WRITE_REGISTER_ULONG(Register, Value);
1577 }
_In_opt_ ULONG _Out_ PULONG Value
Definition: rtlfuncs.h:2327
NTKERNELAPI VOID NTAPI WRITE_REGISTER_ULONG(IN PULONG Register, IN ULONG Value)

◆ ScsiPortWriteRegisterUshort()

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

Definition at line 1581 of file scsiport.c.

1584 {
1585  WRITE_REGISTER_USHORT(Register, Value);
1586 }
_In_opt_ ULONG _Out_ PULONG Value
Definition: rtlfuncs.h:2327
NTKERNELAPI VOID NTAPI WRITE_REGISTER_USHORT(IN PUSHORT Register, IN USHORT Value)