;****************************************************************************
;                                                                           *
; THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY     *
; KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE       *
; IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR     *
; PURPOSE.                                                                  *
;                                                                           *
; Copyright (C) 1993-95  Microsoft Corporation.  All Rights Reserved.       *
;                                                                           *
;****************************************************************************

option expr32

IFNDEF	srb_inc
srb_inc	EQU		1

; Begin of file ..\ioh\srb.h
SCSI_MAXIMUM_LOGICAL_UNITS		EQU		8t
SCSI_MAXIMUM_TARGETS_PER_BUS		EQU		32t
SCSI_MAXIMUM_BUSES		EQU		8t
SCSI_MAXIMUM_TARGETS		EQU		8t
MAXIMUM_CDB_SIZE		EQU		12t
	INCLUDE	miniport.inc

SCSI_PHYSICAL_ADDRESS		TYPEDEF		PHYSICAL_ADDRESS

PSCSI_PHYSICAL_ADDRESS		TYPEDEF		PTR PHYSICAL_ADDRESS

_ACCESS_RANGE		STRUCT 1t
RangeStart		SCSI_PHYSICAL_ADDRESS		<>
RangeLength		ULONG		?
RangeInMemory		BOOLEAN		?
_ACCESS_RANGE		ENDS

ACCESS_RANGE		TYPEDEF		_ACCESS_RANGE

PACCESS_RANGE		TYPEDEF		PTR _ACCESS_RANGE

@t_srb0		TYPEDEF		PTR ACCESS_RANGE
_PORT_CONFIGURATION_INFORMATION		STRUCT 1t
_Length		ULONG		?
SystemIoBusNumber		ULONG		?
AdapterInterfaceType		INTERFACE_TYPE		?
BusInterruptLevel		ULONG		?
BusInterruptVector		ULONG		?
InterruptMode		KINTERRUPT_MODE		?
MaximumTransferLength		ULONG		?
NumberOfPhysicalBreaks		ULONG		?
DmaChannel		ULONG		?
DmaPort		ULONG		?
DmaWidth		DMA_WIDTH		?
DmaSpeed		DMA_SPEED		?
AlignmentMask		ULONG		?
NumberOfAccessRanges		ULONG		?
AccessRanges		@t_srb0		?
Reserved		PVOID		?
NumberOfBuses		UCHAR		?
InitiatorBusId		CCHAR		8t DUP (?)
ScatterGather		BOOLEAN		?
Master		BOOLEAN		?
CachesData		BOOLEAN		?
AdapterScansDown		BOOLEAN		?
AtdiskPrimaryClaimed		BOOLEAN		?
AtdiskSecondaryClaimed		BOOLEAN		?
Dma32BitAddresses		BOOLEAN		?
DemandMode		BOOLEAN		?
MapBuffers		BOOLEAN		?
NeedPhysicalAddresses		BOOLEAN		?
TaggedQueuing		BOOLEAN		?
AutoRequestSense		BOOLEAN		?
MultipleRequestPerLu		BOOLEAN		?
ReceiveEvent		BOOLEAN		?
RealModeInitialized		BOOLEAN		?
BufferAccessScsiPortControlled		BOOLEAN		?
MaximumNumberOfTargets		UCHAR		?
ReservedUchars		UCHAR		2t DUP (?)
SlotNumber		ULONG		?
BusInterruptLevel2		ULONG		?
BusInterruptVector2		ULONG		?
InterruptMode2		KINTERRUPT_MODE		?
DmaChannel2		ULONG		?
DmaPort2		ULONG		?
DmaWidth2		DMA_WIDTH		?
DmaSpeed2		DMA_SPEED		?
_PORT_CONFIGURATION_INFORMATION		ENDS

PORT_CONFIGURATION_INFORMATION		TYPEDEF		_PORT_CONFIGURATION_INFORMATION

PPORT_CONFIGURATION_INFORMATION		TYPEDEF		PTR _PORT_CONFIGURATION_INFORMATION

SRBEV_BUS_RESET		EQU		000000001h
SRBEV_SCSI_ASYNC_NOTIFICATION		EQU		000000002h
@t_srb1		TYPEDEF		PTR _SCSI_REQUEST_BLOCK
_SCSI_REQUEST_BLOCK		STRUCT 1t
_Length		USHORT		?
Function		UCHAR		?
SrbStatus		UCHAR		?
ScsiStatus		UCHAR		?
PathId		UCHAR		?
TargetId		UCHAR		?
Lun		UCHAR		?
QueueTag		UCHAR		?
QueueAction		UCHAR		?
CdbLength		UCHAR		?
SenseInfoBufferLength		UCHAR		?
SrbFlags		ULONG		?
DataTransferLength		ULONG		?
TimeOutValue		ULONG		?
DataBuffer		PVOID		?
SenseInfoBuffer		PVOID		?
NextSrb		@t_srb1		?
OriginalRequest		PVOID		?
SrbExtension		PVOID		?
QueueSortKey		ULONG		?
Cdb		UCHAR		16t DUP (?)
_SCSI_REQUEST_BLOCK		ENDS

SCSI_REQUEST_BLOCK		TYPEDEF		_SCSI_REQUEST_BLOCK

PSCSI_REQUEST_BLOCK		TYPEDEF		PTR _SCSI_REQUEST_BLOCK

SRB_FUNCTION_EXECUTE_SCSI		EQU		000000000h
SRB_FUNCTION_CLAIM_DEVICE		EQU		000000001h
SRB_FUNCTION_IO_CONTROL		EQU		000000002h
SRB_FUNCTION_RECEIVE_EVENT		EQU		000000003h
SRB_FUNCTION_RELEASE_QUEUE		EQU		000000004h
SRB_FUNCTION_ATTACH_DEVICE		EQU		000000005h
SRB_FUNCTION_RELEASE_DEVICE		EQU		000000006h
SRB_FUNCTION_SHUTDOWN		EQU		000000007h
SRB_FUNCTION_FLUSH		EQU		000000008h
SRB_FUNCTION_ABORT_COMMAND		EQU		000000010h
SRB_FUNCTION_RELEASE_RECOVERY		EQU		000000011h
SRB_FUNCTION_RESET_BUS		EQU		000000012h
SRB_FUNCTION_RESET_DEVICE		EQU		000000013h
SRB_FUNCTION_TERMINATE_IO		EQU		000000014h
SRB_FUNCTION_FLUSH_QUEUE		EQU		000000015h
SRB_FUNCTION_REMOVE_DEVICE		EQU		000000016h
SRB_STATUS_PENDING		EQU		000000000h
SRB_STATUS_SUCCESS		EQU		000000001h
SRB_STATUS_ABORTED		EQU		000000002h
SRB_STATUS_ABORT_FAILED		EQU		000000003h
SRB_STATUS_ERROR		EQU		000000004h
SRB_STATUS_BUSY		EQU		000000005h
SRB_STATUS_INVALID_REQUEST		EQU		000000006h
SRB_STATUS_INVALID_PATH_ID		EQU		000000007h
SRB_STATUS_NO_DEVICE		EQU		000000008h
SRB_STATUS_TIMEOUT		EQU		000000009h
SRB_STATUS_SELECTION_TIMEOUT		EQU		00000000ah
SRB_STATUS_COMMAND_TIMEOUT		EQU		00000000bh
SRB_STATUS_MESSAGE_REJECTED		EQU		00000000dh
SRB_STATUS_BUS_RESET		EQU		00000000eh
SRB_STATUS_PARITY_ERROR		EQU		00000000fh
SRB_STATUS_REQUEST_SENSE_FAILED		EQU		000000010h
SRB_STATUS_NO_HBA		EQU		000000011h
SRB_STATUS_DATA_OVERRUN		EQU		000000012h
SRB_STATUS_UNEXPECTED_BUS_FREE		EQU		000000013h
SRB_STATUS_PHASE_SEQUENCE_FAILU		EQU		000000014h
SRB_STATUS_BAD_SRB_BLOCK_LENGTH		EQU		000000015h
SRB_STATUS_REQUEST_FLUSHED		EQU		000000016h
SRB_STATUS_INVALID_LUN		EQU		000000020h
SRB_STATUS_INVALID_TARGET_ID		EQU		000000021h
SRB_STATUS_BAD_FUNCTION		EQU		000000022h
SRB_STATUS_ERROR_RECOVERY		EQU		000000023h
SRB_STATUS_QUEUE_FROZEN		EQU		000000040h
SRB_STATUS_AUTOSENSE_VALID		EQU		000000080h
SRB_FLAGS_QUEUE_ACTION_ENABLE		EQU		000000002h
SRB_FLAGS_DISABLE_DISCONNECT		EQU		000000004h
SRB_FLAGS_DISABLE_SYNCH_TRANSFE		EQU		000000008h
SRB_FLAGS_BYPASS_FROZEN_QUEUE		EQU		000000010h
SRB_FLAGS_DISABLE_AUTOSENSE		EQU		000000020h
SRB_FLAGS_DATA_IN		EQU		000000040h
SRB_FLAGS_DATA_OUT		EQU		000000080h
SRB_FLAGS_NO_DATA_TRANSFER		EQU		000000000h
SRB_FLAGS_NO_QUEUE_FREEZE		EQU		000000100h
SRB_FLAGS_UNSPECFIED_DIRECTION		EQU		0000000c0h
SRB_FLAGS_UNSPECIFIED_DIRECTION		EQU		0000000c0h
SRB_FLAGS_ADAPTER_CACHE_ENABLE		EQU		000000200h
SRB_FLAGS_BIT_IS_ACTIVE		EQU		16t
SRB_FLAGS_IS_ACTIVE		EQU		000010000h
SRB_FLAGS_ALLOCATED_FROM_ZONE		EQU		000020000h
SRB_FLAGS_SGLIST_FROM_POOL		EQU		000040000h
SRB_SIMPLE_TAG_REQUEST		EQU		000000020h
SRB_HEAD_OF_QUEUE_TAG_REQUEST		EQU		000000021h
SRB_ORDERED_QUEUE_TAG_REQUEST		EQU		000000022h
@proto_srb0		TYPEDEF		PROTO C :PVOID
PHW_INITIALIZE		TYPEDEF		PTR @proto_srb0

@proto_srb1		TYPEDEF		PROTO C :PVOID, :PSCSI_REQUEST_BLOCK
PHW_STARTIO		TYPEDEF		PTR @proto_srb1

@proto_srb2		TYPEDEF		PROTO C :PVOID
PHW_INTERRUPT		TYPEDEF		PTR @proto_srb2

@proto_srb3		TYPEDEF		PROTO C :PVOID
PHW_TIMER		TYPEDEF		PTR @proto_srb3

@proto_srb4		TYPEDEF		PROTO C :PVOID
PHW_DMA_STARTED		TYPEDEF		PTR @proto_srb4

@proto_srb5		TYPEDEF		PROTO C :PVOID, :PVOID, :PVOID, :PCHAR, :PPORT_CONFIGURATION_INFORMATION, :PBOOLEAN
PHW_FIND_ADAPTER		TYPEDEF		PTR @proto_srb5

@proto_srb6		TYPEDEF		PROTO C :PVOID, :ULONG
PHW_RESET_BUS		TYPEDEF		PTR @proto_srb6

@proto_srb7		TYPEDEF		PROTO C :PVOID, :PVOID, :BOOLEAN
PHW_ADAPTER_STATE		TYPEDEF		PTR @proto_srb7

SP_BUS_PARITY_ERROR		EQU		000000001h
SP_UNEXPECTED_DISCONNECT		EQU		000000002h
SP_INVALID_RESELECTION		EQU		000000003h
SP_BUS_TIME_OUT		EQU		000000004h
SP_PROTOCOL_ERROR		EQU		000000005h
SP_INTERNAL_ADAPTER_ERROR		EQU		000000006h
SP_REQUEST_TIMEOUT		EQU		000000007h
SP_IRQ_NOT_RESPONDING		EQU		000000008h
SP_BAD_FW_WARNING		EQU		000000009h
SP_BAD_FW_ERROR		EQU		00000000ah
SP_RETURN_NOT_FOUND		EQU		0t
SP_RETURN_FOUND		EQU		1t
SP_RETURN_ERROR		EQU		2t
SP_RETURN_BAD_CONFIG		EQU		3t
RequestComplete		EQU		0t
NextRequest		EQU		1t
NextLuRequest		EQU		2t
ResetDetected		EQU		3t
CallDisableInterrupts		EQU		4t
CallEnableInterrupts		EQU		5t
RequestTimerCall		EQU		6t
SCSI_NOTIFICATION_TYPE		TYPEDEF		ULONG

PSCSI_NOTIFICATION_TYPE		TYPEDEF		PTR ULONG

_HW_INITIALIZATION_DATA		STRUCT 1t
HwInitializationDataSize		ULONG		?
AdapterInterfaceType		INTERFACE_TYPE		?
HwInitialize		PHW_INITIALIZE		?
HwStartIo		PHW_STARTIO		?
HwInterrupt		PHW_INTERRUPT		?
HwFindAdapter		PHW_FIND_ADAPTER		?
HwResetBus		PHW_RESET_BUS		?
HwDmaStarted		PHW_DMA_STARTED		?
HwAdapterState		PHW_ADAPTER_STATE		?
DeviceExtensionSize		ULONG		?
SpecificLuExtensionSize		ULONG		?
SrbExtensionSize		ULONG		?
NumberOfAccessRanges		ULONG		?
Reserved		PVOID		?
MapBuffers		BOOLEAN		?
NeedPhysicalAddresses		BOOLEAN		?
TaggedQueuing		BOOLEAN		?
AutoRequestSense		BOOLEAN		?
MultipleRequestPerLu		BOOLEAN		?
ReceiveEvent		BOOLEAN		?
VendorIdLength		USHORT		?
VendorId		PVOID		?
ReservedUshort		USHORT		?
DeviceIdLength		USHORT		?
DeviceId		PVOID		?
_HW_INITIALIZATION_DATA		ENDS

HW_INITIALIZATION_DATA		TYPEDEF		_HW_INITIALIZATION_DATA

PHW_INITIALIZATION_DATA		TYPEDEF		PTR _HW_INITIALIZATION_DATA

; End of file ..\ioh\srb.h

ENDIF

